wined3d: Fixup 2D sampler when sampling 3D texture for PS models 2 and 3.
Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
34eeb0a877
commit
a9eca729bc
|
@ -25939,7 +25939,6 @@ static void test_mismatched_sample_types(void)
|
|||
IDirect3DPixelShader9 **pixel_shader;
|
||||
D3DCOLOR expected_colour;
|
||||
D3DCOLOR expected_broken;
|
||||
BOOL todo;
|
||||
D3DCOLOR expected_broken2;
|
||||
}
|
||||
tests[] =
|
||||
|
@ -25947,7 +25946,7 @@ static void test_mismatched_sample_types(void)
|
|||
{"2d_2d", (IDirect3DBaseTexture9 **)&tex_2d, &ps_2d, 0x00707070},
|
||||
{"3d_3d", (IDirect3DBaseTexture9 **)&volume, &ps_3d, 0x00303030},
|
||||
{"2d_3d", (IDirect3DBaseTexture9 **)&tex_2d, &ps_3d, 0x00707070, 0x00b2cce5},
|
||||
{"3d_2d", (IDirect3DBaseTexture9 **)&volume, &ps_2d, 0x00303030, 0x00b2cce5, TRUE, 0x00202020},
|
||||
{"3d_2d", (IDirect3DBaseTexture9 **)&volume, &ps_2d, 0x00303030, 0x00b2cce5, 0x00202020},
|
||||
};
|
||||
|
||||
window = create_window();
|
||||
|
@ -26044,7 +26043,7 @@ static void test_mismatched_sample_types(void)
|
|||
|
||||
colour = getPixelColor(device, 320, 240);
|
||||
|
||||
todo_wine_if(tests[i].todo) ok(color_match(colour, tests[i].expected_colour, 1)
|
||||
ok(color_match(colour, tests[i].expected_colour, 1)
|
||||
|| broken(tests[i].expected_broken && color_match(colour, tests[i].expected_broken, 1))
|
||||
|| broken(tests[i].expected_broken2 && color_match(colour, tests[i].expected_broken2, 1)),
|
||||
"test %s, expected 0x%08x, got 0x%08x.\n",
|
||||
|
|
|
@ -4032,6 +4032,9 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
|||
&& resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_3D
|
||||
&& !(texture->resource.usage & WINED3DUSAGE_LEGACY_CUBEMAP))
|
||||
tex_type = WINED3D_SHADER_TEX_2D;
|
||||
else if (texture->resource.type == WINED3D_RTYPE_TEXTURE_3D
|
||||
&& resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_2D)
|
||||
tex_type = WINED3D_SHADER_TEX_3D;
|
||||
}
|
||||
args->tex_types |= tex_type << i * WINED3D_PSARGS_TEXTYPE_SHIFT;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue