Module: wine Branch: master Commit: 37845b0e41550453d2a7687a1f8b7f83f6295d76 URL: https://gitlab.winehq.org/wine/wine/-/commit/37845b0e41550453d2a7687a1f8b7f8...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Oct 26 15:21:35 2023 -0500
d3d10core/tests: Use slightly different values in test_sample_c_lz().
For some arcane reason the native AMD driver on Windows seems to fail to clear (or read from?) layer 0. Work around that by using 0.0 there.
---
dlls/d3d10core/tests/d3d10core.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 8db3b1abff6..fadf9211640 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -8427,7 +8427,7 @@ static void test_sample_c_lz(void) 0x0020800a, 0x00000000, 0x00000000, 0x05000036, 0x001020f2, 0x00000000, 0x00100006, 0x00000000, 0x0100003e, }; - static const float depth_values[] = {1.0f, 0.0f, 0.5f, 0.6f, 0.4f, 0.1f}; + static const float depth_values[] = {0.0f, 1.0f, 0.5f, 0.6f, 0.4f, 0.1f}; static const struct { unsigned int layer; @@ -8436,8 +8436,8 @@ static void test_sample_c_lz(void) } tests[] = { - {0, 0.5f, 0.0f}, - {1, 0.5f, 1.0f}, + {0, 0.5f, 1.0f}, + {1, 0.5f, 0.0f}, {2, 0.5f, 0.0f}, {3, 0.5f, 0.0f}, {4, 0.5f, 1.0f}, @@ -8450,8 +8450,8 @@ static void test_sample_c_lz(void) {4, 0.0f, 0.0f}, {5, 0.0f, 0.0f},
- {0, 1.0f, 0.0f}, - {1, 1.0f, 1.0f}, + {0, 1.0f, 1.0f}, + {1, 1.0f, 0.0f}, {2, 1.0f, 1.0f}, {3, 1.0f, 1.0f}, {4, 1.0f, 1.0f}, @@ -8538,6 +8538,8 @@ static void test_sample_c_lz(void)
for (i = 0; i < ARRAY_SIZE(tests); ++i) { + winetest_push_context("Layer %u, ref %f", tests[i].layer, tests[i].d_ref); + ps_constant.x = tests[i].d_ref; ps_constant.y = tests[i].layer; ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)cb, 0, @@ -8547,6 +8549,8 @@ static void test_sample_c_lz(void) /* Avoid testing values affected by seamless cube map filtering. */ SetRect(&rect, 100, 100, 540, 380); check_texture_sub_resource_float(rt_texture, 0, &rect, tests[i].expected, 2); + + winetest_pop_context(); }
ID3D10Texture2D_Release(texture);