d3d9: "Fix" the HLSL render chain

It won't get you very far, but at least it won't crash.
Needs HAVE_HLSL and HAVE_D3DX defines and DirectX SDK
This commit is contained in:
driver1998 2020-09-07 10:08:07 +08:00 committed by GH Cao
parent 3c6552ba4d
commit a4dec6e226
2 changed files with 3 additions and 3 deletions

View File

@ -34,11 +34,11 @@ static const char *stock_hlsl_program = CG(
float frame_rotation;
};
output main_fragment(float2 texCoord : TEXCOORD0,
output main_fragment(float4 color : COLOR, float2 texCoord : TEXCOORD0,
uniform sampler2D decal : TEXUNIT0, uniform input IN)
{
output OUT;
OUT.color = tex2D(decal, texCoord);
OUT.color = color * tex2D(decal, texCoord);
return OUT;
}
);

View File

@ -246,7 +246,7 @@ static bool hlsl_d3d9_renderchain_create_first_pass(
unsigned _fmt)
{
unsigned i;
struct shader_pass pass;
struct shader_pass pass = { 0 };
unsigned fmt =
(_fmt == RETRO_PIXEL_FORMAT_RGB565) ?
d3d9_get_rgb565_format() : d3d9_get_xrgb8888_format();