Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/tests/visual.c | 88 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index fc8a05a3c40..f25549388d0 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -11070,6 +11070,93 @@ static void test_desktop_window(void) IDirect3D8_Release(d3d); }
+static void test_sample_mask(void) +{ + IDirect3DSurface8 *rt, *ms_rt; + struct surface_readback rb; + IDirect3DDevice8 *device; + IDirect3D8 *d3d; + ULONG refcount; + DWORD colour; + HWND window; + HRESULT hr; + + static const struct + { + struct vec3 position; + DWORD diffuse; + } + quad[] = + { + {{-1.0f, -1.0f, 0.1f}, 0xffffffff}, + {{-1.0f, 1.0f, 0.1f}, 0xffffffff}, + {{ 1.0f, -1.0f, 0.1f}, 0xffffffff}, + {{ 1.0f, 1.0f, 0.1f}, 0xffffffff}, + }; + + window = create_window(); + d3d = Direct3DCreate8(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + + if (FAILED(IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES))) + { + skip("Multisampling not supported for D3DFMT_A8R8G8B8.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a 3D device.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice8_CreateRenderTarget(device, 128, 128, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, FALSE, &rt); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_CreateRenderTarget(device, 128, 128, + D3DFMT_A8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, FALSE, &ms_rt); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, ms_rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_MULTISAMPLEMASK, 0x5); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_CopyRects(device, ms_rt, NULL, 0, rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + colour = get_readback_color(&rb, 64, 64); + ok(color_match(colour, 0xffff8080, 1), "Got unexpected colour %08x.\n", colour); + release_surface_readback(&rb); + + hr = IDirect3DDevice8_EndScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + IDirect3DSurface8_Release(ms_rt); + IDirect3DSurface8_Release(rt); + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D8_Release(d3d); + DestroyWindow(window); +} + START_TEST(visual) { D3DADAPTER_IDENTIFIER8 identifier; @@ -11147,4 +11234,5 @@ START_TEST(visual) test_sysmem_draw(); test_alphatest(); test_desktop_window(); + test_sample_mask(); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/tests/visual.c | 144 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index f25549388d0..175cd7d3514 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -4527,6 +4527,9 @@ static void resz_test(void) hr = IDirect3DDevice8_SetRenderState(device, D3DRS_COLORWRITEENABLE, 0xf); ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, FALSE); + ok(hr == D3D_OK, "SetRenderState failed, hr %#x.\n", hr); + /* The actual multisampled depth buffer resolve happens here */ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_POINTSIZE, 0x7fa05000); ok(SUCCEEDED(hr), "SetRenderState (multisampled depth buffer resolve) failed, hr %#x.\n", hr); @@ -11146,6 +11149,146 @@ static void test_sample_mask(void) ok(color_match(colour, 0xffff8080, 1), "Got unexpected colour %08x.\n", colour); release_surface_readback(&rb);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_CopyRects(device, ms_rt, NULL, 0, rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + colour = get_readback_color(&rb, 64, 64); + todo_wine ok(color_match(colour, 0xffff8080, 1), "Got unexpected colour %08x.\n", colour); + release_surface_readback(&rb); + + hr = IDirect3DDevice8_EndScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + IDirect3DSurface8_Release(ms_rt); + IDirect3DSurface8_Release(rt); + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D8_Release(d3d); + DestroyWindow(window); +} + +static void test_multisample_draw(void) +{ + IDirect3DSurface8 *rt, *ms_rt; + struct surface_readback rb; + IDirect3DDevice8 *device; + IDirect3D8 *d3d; + unsigned int i; + ULONG refcount; + DWORD colour; + HWND window; + HRESULT hr; + + static const struct + { + struct vec3 position; + DWORD diffuse; + } + tri[] = + { + {{ 0.9f, -0.5f, 0.0f}, 0xffffffff}, + {{-0.8f, -0.9f, 0.0f}, 0xffffffff}, + {{ 0.2f, 0.7f, 0.0f}, 0xffffffff}, + }; + + static const struct + { + unsigned int x, y; + DWORD colour_ms, colour_no_ms; + } + pixels[] = + { + {338, 407, 0xffffffff, 0xffffffff}, + {339, 407, 0xffffffff, 0xffffffff}, + {340, 407, 0xff7f7f7f, 0xffffffff}, + {341, 407, 0xff7f7f7f, 0xffffffff}, + {342, 407, 0xff7f7f7f, 0xff000000}, + {343, 407, 0xff7f7f7f, 0xff000000}, + {344, 407, 0xff000000, 0xff000000}, + {345, 407, 0xff000000, 0xff000000}, + }; + + window = create_window(); + d3d = Direct3DCreate8(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + + if (FAILED(IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES))) + { + skip("Multisampling not supported for D3DFMT_A8R8G8B8.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a 3D device.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice8_CreateRenderTarget(device, 640, 480, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, FALSE, &rt); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_CreateRenderTarget(device, 640, 480, + D3DFMT_A8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, FALSE, &ms_rt); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, ms_rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, TRUE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 1, tri, sizeof(tri[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_CopyRects(device, ms_rt, NULL, 0, rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + colour = get_readback_color(&rb, pixels[i].x, pixels[i].y); + ok(color_match(colour, pixels[i].colour_ms, 1), + "Got unexpected colour %08x at (%u, %u).\n", colour, pixels[i].x, pixels[i].y); + } + release_surface_readback(&rb); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 1, tri, sizeof(tri[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice8_CopyRects(device, ms_rt, NULL, 0, rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + colour = get_readback_color(&rb, pixels[i].x, pixels[i].y); + ok(color_match(colour, pixels[i].colour_no_ms, 1), + "Got unexpected colour %08x at (%u, %u).\n", colour, pixels[i].x, pixels[i].y); + } + release_surface_readback(&rb); + hr = IDirect3DDevice8_EndScene(device); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -11235,4 +11378,5 @@ START_TEST(visual) test_alphatest(); test_desktop_window(); test_sample_mask(); + test_multisample_draw(); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d9/tests/visual.c | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index b7fcb100c93..b7eb6ad394e 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -18173,6 +18173,9 @@ static void resz_test(void) hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, 0xf); ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, FALSE); + ok(hr == D3D_OK, "SetRenderState failed, hr %#x.\n", hr); + /* The actual multisampled depth buffer resolve happens here */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, 0x7fa05000); ok(SUCCEEDED(hr), "SetRenderState (multisampled depth buffer resolve) failed, hr %#x.\n", hr); @@ -26903,6 +26906,149 @@ static void test_sample_mask(void) ok(color_match(colour, 0xffff8080, 1), "Got unexpected colour %08x.\n", colour); release_surface_readback(&rb);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_StretchRect(device, ms_rt, NULL, rt, NULL, D3DTEXF_POINT); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + colour = get_readback_color(&rb, 64, 64); + todo_wine ok(color_match(colour, 0xffff8080, 1), "Got unexpected colour %08x.\n", colour); + release_surface_readback(&rb); + + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + IDirect3DSurface9_Release(ms_rt); + IDirect3DSurface9_Release(rt); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + +static void test_multisample_draw(void) +{ + IDirect3DSurface9 *rt, *ms_rt; + struct surface_readback rb; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + unsigned int i; + ULONG refcount; + DWORD colour; + HWND window; + HRESULT hr; + + static const struct + { + struct vec3 position; + DWORD diffuse; + } + tri[] = + { + {{ 0.9f, -0.5f, 0.0f}, 0xffffffff}, + {{-0.8f, -0.9f, 0.0f}, 0xffffffff}, + {{ 0.2f, 0.7f, 0.0f}, 0xffffffff}, + }; + + static const struct + { + unsigned int x, y; + DWORD colour_ms, colour_no_ms; + } + pixels[] = + { + {338, 407, 0xffffffff, 0xffffffff}, + {339, 407, 0xffffffff, 0xffffffff}, + {340, 407, 0xff7f7f7f, 0xffffffff}, + {341, 407, 0xff7f7f7f, 0xffffffff}, + {342, 407, 0xff7f7f7f, 0xff000000}, + {343, 407, 0xff7f7f7f, 0xff000000}, + {344, 407, 0xff000000, 0xff000000}, + {345, 407, 0xff000000, 0xff000000}, + }; + + window = create_window(); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + + if (FAILED(IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, NULL))) + { + skip("Multisampling not supported for D3DFMT_A8R8G8B8.\n"); + IDirect3D9_Release(d3d); + DestroyWindow(window); + return; + } + + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a 3D device.\n"); + IDirect3D9_Release(d3d); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice9_CreateRenderTarget(device, 640, 480, + D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_CreateRenderTarget(device, 640, 480, + D3DFMT_A8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, 0, FALSE, &ms_rt, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderTarget(device, 0, ms_rt); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_SetDepthStencilSurface(device, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, TRUE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 1, tri, sizeof(tri[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_MULTISAMPLEANTIALIAS, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_StretchRect(device, ms_rt, NULL, rt, NULL, D3DTEXF_POINT); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + colour = get_readback_color(&rb, pixels[i].x, pixels[i].y); + ok(color_match(colour, pixels[i].colour_ms, 1), + "Got unexpected colour %08x at (%u, %u).\n", colour, pixels[i].x, pixels[i].y); + } + release_surface_readback(&rb); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 1, tri, sizeof(tri[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_StretchRect(device, ms_rt, NULL, rt, NULL, D3DTEXF_POINT); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + get_rt_readback(rt, &rb); + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + colour = get_readback_color(&rb, pixels[i].x, pixels[i].y); + ok(color_match(colour, pixels[i].colour_no_ms, 1), + "Got unexpected colour %08x at (%u, %u).\n", colour, pixels[i].x, pixels[i].y); + } + release_surface_readback(&rb); + hr = IDirect3DDevice9_EndScene(device); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -27062,4 +27208,5 @@ START_TEST(visual) test_sample_attached_rendertarget(); test_alpha_to_coverage(); test_sample_mask(); + test_multisample_draw(); }
On Fri, 30 Apr 2021 at 18:08, Zebediah Figura z.figura12@gmail.com wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/d3d9/tests/visual.c | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+)
This (and the equivalent d3d8 test) fails here on Windows:
visual.c:27077: Description string: "AMD Radeon HD 6310 Graphics" ... visual.c:27029: Test failed: Got unexpected colour ffffffff at (340, 407). visual.c:27029: Test failed: Got unexpected colour ffbcbcbc at (341, 407). visual.c:27029: Test failed: Got unexpected colour ffbcbcbc at (342, 407). visual.c:27029: Test failed: Got unexpected colour ff000000 at (343, 407).
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v2: Fix test failures.
These tests pass on radeonsi and AMD Windows 10. They currently fail on llvmpipe due to a bug in llvmpipe, which I intend to fix as soon as possible.
dlls/d3d10core/tests/d3d10core.c | 175 +++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index ccddb401aed..6c0a1c04120 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -18907,6 +18907,180 @@ static void test_unbound_streams(void) release_test_context(&test_context); }
+static void test_multisample_draw(void) +{ + static const D3D10_INPUT_ELEMENT_DESC layout_desc[] = + { + {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, + }; + static const DWORD vs_code[] = + { +#if 0 + float4 main(float4 position : POSITION) : SV_POSITION + { + return position; + } +#endif + 0x43425844, 0xa7a2f22d, 0x83ff2560, 0xe61638bd, 0x87e3ce90, 0x00000001, 0x000000d8, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x49534f50, 0x4e4f4954, 0xababab00, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, 0x52444853, 0x0000003c, 0x00010040, + 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, + 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, + }; + static const DWORD ps_code[] = + { +#if 0 + float4 main() : sv_target + { + return float4(1.0, 1.0, 1.0, 1.0); + } +#endif + 0x43425844, 0x949557e7, 0x1480242b, 0x831e64fc, 0x7c0305d2, 0x00000001, 0x000000b0, 0x00000003, + 0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074, 0x52444853, 0x00000038, 0x00000040, 0x0000000e, + 0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002, 0x3f800000, + 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, + }; + static const struct vec3 tri[] = + { + { 0.9f, -0.5f, 0.0f}, + {-0.8f, -0.9f, 0.0f}, + { 0.2f, 0.7f, 0.0f}, + }; + static const float black[] = {0.0f, 0.0f, 0.0f, 1.0f}; + struct d3d10core_test_context test_context; + D3D10_TEXTURE2D_DESC texture_desc; + D3D10_RASTERIZER_DESC rs_desc; + ID3D10RenderTargetView *rtv; + unsigned int stride, offset; + ID3D10RasterizerState *rs; + ID3D10Texture2D *texture; + ID3D10Device *device; + UINT quality_levels; + unsigned int i; + DWORD color; + HRESULT hr; + + static const struct + { + unsigned int x, y; + DWORD colour_tri, colour_line; + } + pixels[] = + { + {333, 407, 0xffffffff, 0xff000000}, + {334, 407, 0xffffffff, 0xff3f3f3f}, + {335, 407, 0xffffffff, 0xff3f3f3f}, + {336, 407, 0xffffffff, 0xffbfbfbf}, + {337, 407, 0xffbfbfbf, 0xffbfbfbf}, + {338, 407, 0xff7f7f7f, 0xffffffff}, + {339, 407, 0xff3f3f3f, 0xffbfbfbf}, + {340, 407, 0xff3f3f3f, 0xffbfbfbf}, + {341, 407, 0xff000000, 0xff7f7f7f}, + {342, 407, 0xff000000, 0xff3f3f3f}, + {343, 407, 0xff000000, 0xff3f3f3f}, + {344, 407, 0xff000000, 0xff000000}, + }; + + if (!init_test_context(&test_context)) + return; + device = test_context.device; + + if (is_warp_device(device)) + { + /* Line multisampling is broken on all versions of Windows up to at + * least Windows 10 2009; triangle multisampling is broken on 2008. + * Both cases render as if not multisampled. */ + win_skip("Multisampling is broken on WARP.\n"); + release_test_context(&test_context); + return; + } + + hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_TYPELESS, 4, &quality_levels); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + if (!quality_levels) + { + skip("4xMSAA not supported.\n"); + release_test_context(&test_context); + return; + } + + ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); + texture_desc.SampleDesc.Count = 4; + texture_desc.SampleDesc.Quality = 0; + hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); + ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); + ok(hr == S_OK, "Failed to create render target view, hr %#x.\n", hr); + ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); + + hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &test_context.vs); + ok(hr == S_OK, "Failed to create vertex shader, hr %#x.\n", hr); + hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &test_context.ps); + ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), + vs_code, sizeof(vs_code), &test_context.input_layout); + ok(hr == S_OK, "Failed to create input layout, hr %#x.\n", hr); + test_context.vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(tri), tri); + + rs_desc.FillMode = D3D10_FILL_SOLID; + rs_desc.CullMode = D3D10_CULL_BACK; + rs_desc.FrontCounterClockwise = FALSE; + rs_desc.DepthBias = 0; + rs_desc.DepthBiasClamp = 0.0f; + rs_desc.SlopeScaledDepthBias = 0.0f; + rs_desc.DepthClipEnable = TRUE; + rs_desc.ScissorEnable = FALSE; + rs_desc.MultisampleEnable = FALSE; + rs_desc.AntialiasedLineEnable = FALSE; + hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs); + ok(hr == S_OK, "Failed to create rasterizer state, hr %#x.\n", hr); + + ID3D10Device_VSSetShader(device, test_context.vs); + ID3D10Device_PSSetShader(device, test_context.ps); + ID3D10Device_IASetInputLayout(device, test_context.input_layout); + stride = sizeof(*tri); + offset = 0; + ID3D10Device_IASetVertexBuffers(device, 0, 1, &test_context.vb, &stride, &offset); + ID3D10Device_RSSetState(device, rs); + + ID3D10Device_ClearRenderTargetView(device, rtv, black); + ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + ID3D10Device_Draw(device, 4, 0); + ID3D10Device_ResolveSubresource(device, (ID3D10Resource *)test_context.backbuffer, 0, + (ID3D10Resource *)texture, 0, texture_desc.Format); + + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); + todo_wine_if (pixels[i].colour_tri != 0xff000000 && pixels[i].colour_tri != 0xffffffff) + ok(compare_color(color, pixels[i].colour_tri, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + } + + ID3D10Device_ClearRenderTargetView(device, rtv, black); + ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_LINELIST); + ID3D10Device_Draw(device, 4, 0); + ID3D10Device_ResolveSubresource(device, (ID3D10Resource *)test_context.backbuffer, 0, + (ID3D10Resource *)texture, 0, texture_desc.Format); + + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); + todo_wine_if (pixels[i].colour_line != 0xff000000 && pixels[i].colour_line != 0xffffffff) + ok(compare_color(color, pixels[i].colour_line, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + } + + ID3D10RasterizerState_Release(rs); + ID3D10RenderTargetView_Release(rtv); + ID3D10Texture2D_Release(texture); + release_test_context(&test_context); +} + START_TEST(d3d10core) { unsigned int argc, i; @@ -19032,6 +19206,7 @@ START_TEST(d3d10core) queue_test(test_independent_blend); queue_test(test_dual_source_blend); queue_test(test_unbound_streams); + queue_test(test_multisample_draw);
run_queued_tests();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=89660
Your paranoid android.
=== w1064v1809 (64 bit report) ===
d3d10core: d3d10core.c:4766: Test failed: Got unexpected IAVertices count: 0. d3d10core.c:4767: Test failed: Got unexpected IAPrimitives count: 0. d3d10core.c:4768: Test failed: Got unexpected VSInvocations count: 0. d3d10core.c:4771: Test failed: Got unexpected CInvocations count: 0. d3d10core.c:4772: Test failed: Got unexpected CPrimitives count: 0.
=== debiant2 (32 bit report) ===
d3d10core: d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d10core.c:19074: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit French report) ===
d3d10core: d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d10core.c:19074: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit Japanese:Japan report) ===
d3d10core: d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d10core.c:19074: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit Chinese:China report) ===
d3d10core: d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d10core.c:19074: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit WoW report) ===
d3d10core: d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d10core.c:19074: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (64 bit WoW report) ===
d3d10core: d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d10core.c:19060: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d10core.c:19074: Test failed: Got unexpected color 0xff404040 at (338, 407).
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/tests/d3d11.c | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 191df67a41d..ddb49d4166b 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -32438,6 +32438,188 @@ static void test_deferred_context_rendering(void) release_test_context(&test_context); }
+static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) +{ + static const D3D11_INPUT_ELEMENT_DESC layout_desc[] = + { + {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, + }; + static const DWORD vs_code[] = + { +#if 0 + float4 main(float4 position : POSITION) : SV_POSITION + { + return position; + } +#endif + 0x43425844, 0x06bbe9c8, 0x927aedde, 0xb3c454df, 0xd739785a, 0x00000001, 0x00000140, 0x00000004, + 0x00000030, 0x00000094, 0x000000d8, 0x0000010c, 0x396e6f41, 0x0000005c, 0x0000005c, 0xfffe0200, + 0x00000034, 0x00000028, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240001, 0x00000000, + 0xfffe0200, 0x0200001f, 0x80000005, 0x900f0000, 0x04000004, 0xc0030000, 0x90ff0000, 0xa0e40000, + 0x90e40000, 0x02000001, 0xc00c0000, 0x90e40000, 0x0000ffff, 0x52444853, 0x0000003c, 0x00010040, + 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, + 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, 0x4e475349, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, + 0x49534f50, 0x4e4f4954, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, + }; + static const DWORD ps_code[] = + { +#if 0 + float4 main() : sv_target + { + return float4(1.0, 1.0, 1.0, 1.0); + } +#endif + 0x43425844, 0xe8ed6039, 0xd42f2bf4, 0x38efe2fd, 0x9dc3406f, 0x00000001, 0x00000118, 0x00000004, + 0x00000030, 0x00000094, 0x000000d4, 0x000000e4, 0x396e6f41, 0x0000005c, 0x0000005c, 0xffff0200, + 0x00000038, 0x00000024, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0xffff0200, + 0x05000051, 0xa00f0000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x02000001, 0x800f0000, + 0xa0000000, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff, 0x52444853, 0x00000038, 0x00000040, + 0x0000000e, 0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002, + 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, 0x4e475349, 0x00000008, 0x00000000, + 0x00000008, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074, + }; + static const struct vec3 tri[] = + { + { 0.9f, -0.5f, 0.0f}, + {-0.8f, -0.9f, 0.0f}, + { 0.2f, 0.7f, 0.0f}, + }; + static const float black[] = {0.0f, 0.0f, 0.0f, 1.0f}; + struct d3d11_test_context test_context; + D3D11_TEXTURE2D_DESC texture_desc; + D3D11_RASTERIZER_DESC rs_desc; + ID3D11DeviceContext *context; + ID3D11RenderTargetView *rtv; + unsigned int stride, offset; + ID3D11RasterizerState *rs; + ID3D11Texture2D *texture; + ID3D11Device *device; + UINT quality_levels; + unsigned int i; + DWORD color; + HRESULT hr; + + static const struct + { + unsigned int x, y; + DWORD colour_tri, colour_line; + } + pixels[] = + { + {333, 407, 0xffffffff, 0xff000000}, + {334, 407, 0xffffffff, 0xff3f3f3f}, + {335, 407, 0xffffffff, 0xff3f3f3f}, + {336, 407, 0xffffffff, 0xffbfbfbf}, + {337, 407, 0xffbfbfbf, 0xffbfbfbf}, + {338, 407, 0xff7f7f7f, 0xffffffff}, + {339, 407, 0xff3f3f3f, 0xffbfbfbf}, + {340, 407, 0xff3f3f3f, 0xffbfbfbf}, + {341, 407, 0xff000000, 0xff7f7f7f}, + {342, 407, 0xff000000, 0xff3f3f3f}, + {343, 407, 0xff000000, 0xff3f3f3f}, + {344, 407, 0xff000000, 0xff000000}, + }; + + if (!init_test_context(&test_context, &feature_level)) + return; + device = test_context.device; + context = test_context.immediate_context; + + if (is_warp_device(device)) + { + /* Line multisampling is broken on all versions of Windows up to at + * least Windows 10 2009; triangle multisampling is broken on 2008. + * Both cases render as if not multisampled. */ + win_skip("Multisampling is broken on WARP.\n"); + release_test_context(&test_context); + return; + } + + hr = ID3D11Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_TYPELESS, 4, &quality_levels); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + if (!quality_levels) + { + skip("4xMSAA not supported.\n"); + release_test_context(&test_context); + return; + } + + ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc); + texture_desc.SampleDesc.Count = 4; + texture_desc.SampleDesc.Quality = 0; + hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture); + ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv); + ok(hr == S_OK, "Failed to create render target view, hr %#x.\n", hr); + ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rtv, NULL); + + hr = ID3D11Device_CreateVertexShader(device, vs_code, sizeof(vs_code), NULL, &test_context.vs); + ok(hr == S_OK, "Failed to create vertex shader, hr %#x.\n", hr); + hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &test_context.ps); + ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + hr = ID3D11Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), + vs_code, sizeof(vs_code), &test_context.input_layout); + ok(hr == S_OK, "Failed to create input layout, hr %#x.\n", hr); + test_context.vb = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, sizeof(tri), tri); + + rs_desc.FillMode = D3D11_FILL_SOLID; + rs_desc.CullMode = D3D11_CULL_BACK; + rs_desc.FrontCounterClockwise = FALSE; + rs_desc.DepthBias = 0; + rs_desc.DepthBiasClamp = 0.0f; + rs_desc.SlopeScaledDepthBias = 0.0f; + rs_desc.DepthClipEnable = TRUE; + rs_desc.ScissorEnable = FALSE; + rs_desc.MultisampleEnable = FALSE; + rs_desc.AntialiasedLineEnable = FALSE; + hr = ID3D11Device_CreateRasterizerState(device, &rs_desc, &rs); + ok(hr == S_OK, "Failed to create rasterizer state, hr %#x.\n", hr); + + ID3D11DeviceContext_VSSetShader(context, test_context.vs, NULL, 0); + ID3D11DeviceContext_PSSetShader(context, test_context.ps, NULL, 0); + ID3D11DeviceContext_IASetInputLayout(context, test_context.input_layout); + stride = sizeof(*tri); + offset = 0; + ID3D11DeviceContext_IASetVertexBuffers(context, 0, 1, &test_context.vb, &stride, &offset); + ID3D11DeviceContext_RSSetState(context, rs); + + ID3D11DeviceContext_ClearRenderTargetView(context, rtv, black); + ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + ID3D11DeviceContext_Draw(context, 3, 0); + ID3D11DeviceContext_ResolveSubresource(context, (ID3D11Resource *)test_context.backbuffer, 0, + (ID3D11Resource *)texture, 0, texture_desc.Format); + + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); + todo_wine_if (pixels[i].colour_tri != 0xff000000 && pixels[i].colour_tri != 0xffffffff) + ok(compare_color(color, pixels[i].colour_tri, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + } + + ID3D11DeviceContext_ClearRenderTargetView(context, rtv, black); + ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_LINELIST); + ID3D11DeviceContext_Draw(context, 2, 0); + ID3D11DeviceContext_ResolveSubresource(context, (ID3D11Resource *)test_context.backbuffer, 0, + (ID3D11Resource *)texture, 0, texture_desc.Format); + + for (i = 0; i < ARRAY_SIZE(pixels); ++i) + { + color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); + todo_wine_if (pixels[i].colour_line != 0xff000000 && pixels[i].colour_line != 0xffffffff) + ok(compare_color(color, pixels[i].colour_line, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + } + + ID3D11RasterizerState_Release(rs); + ID3D11RenderTargetView_Release(rtv); + ID3D11Texture2D_Release(texture); + release_test_context(&test_context); +} + START_TEST(d3d11) { unsigned int argc, i; @@ -32608,6 +32790,7 @@ START_TEST(d3d11) queue_test(test_deferred_context_swap_state); queue_test(test_deferred_context_rendering); queue_test(test_unbound_streams); + queue_for_each_feature_level(test_multisample_draw);
run_queued_tests(); }
On Fri, 30 Apr 2021 at 18:09, Zebediah Figura z.figura12@gmail.com wrote:
+static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) +{
- static const D3D11_INPUT_ELEMENT_DESC layout_desc[] =
- {
{"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
- };
- static const DWORD vs_code[] =
- {
+#if 0
float4 main(float4 position : POSITION) : SV_POSITION
{
return position;
}
+#endif
0x43425844, 0x06bbe9c8, 0x927aedde, 0xb3c454df, 0xd739785a, 0x00000001, 0x00000140, 0x00000004,
0x00000030, 0x00000094, 0x000000d8, 0x0000010c, 0x396e6f41, 0x0000005c, 0x0000005c, 0xfffe0200,
0x00000034, 0x00000028, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240001, 0x00000000,
0xfffe0200, 0x0200001f, 0x80000005, 0x900f0000, 0x04000004, 0xc0030000, 0x90ff0000, 0xa0e40000,
0x90e40000, 0x02000001, 0xc00c0000, 0x90e40000, 0x0000ffff, 0x52444853, 0x0000003c, 0x00010040,
0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001,
0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, 0x4e475349, 0x0000002c,
0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f,
0x49534f50, 0x4e4f4954, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49,
- };
- static const DWORD ps_code[] =
- {
+#if 0
float4 main() : sv_target
{
return float4(1.0, 1.0, 1.0, 1.0);
}
+#endif
0x43425844, 0xe8ed6039, 0xd42f2bf4, 0x38efe2fd, 0x9dc3406f, 0x00000001, 0x00000118, 0x00000004,
0x00000030, 0x00000094, 0x000000d4, 0x000000e4, 0x396e6f41, 0x0000005c, 0x0000005c, 0xffff0200,
0x00000038, 0x00000024, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0xffff0200,
0x05000051, 0xa00f0000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x02000001, 0x800f0000,
0xa0000000, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff, 0x52444853, 0x00000038, 0x00000040,
0x0000000e, 0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002,
0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, 0x4e475349, 0x00000008, 0x00000000,
0x00000008, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
0x00000003, 0x00000000, 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074,
- };
- static const struct vec3 tri[] =
- {
{ 0.9f, -0.5f, 0.0f},
{-0.8f, -0.9f, 0.0f},
{ 0.2f, 0.7f, 0.0f},
- };
Would it be possible to use draw_color_quad() in this test, perhaps in a similar way to e.g. test_stencil_separate() and test_face_culling()?
On 4/30/21 12:00 PM, Henri Verbeet wrote:
On Fri, 30 Apr 2021 at 18:09, Zebediah Figura z.figura12@gmail.com wrote:
+static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) +{
- static const D3D11_INPUT_ELEMENT_DESC layout_desc[] =
- {
{"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
- };
- static const DWORD vs_code[] =
- {
+#if 0
float4 main(float4 position : POSITION) : SV_POSITION
{
return position;
}
+#endif
0x43425844, 0x06bbe9c8, 0x927aedde, 0xb3c454df, 0xd739785a, 0x00000001, 0x00000140, 0x00000004,
0x00000030, 0x00000094, 0x000000d8, 0x0000010c, 0x396e6f41, 0x0000005c, 0x0000005c, 0xfffe0200,
0x00000034, 0x00000028, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240001, 0x00000000,
0xfffe0200, 0x0200001f, 0x80000005, 0x900f0000, 0x04000004, 0xc0030000, 0x90ff0000, 0xa0e40000,
0x90e40000, 0x02000001, 0xc00c0000, 0x90e40000, 0x0000ffff, 0x52444853, 0x0000003c, 0x00010040,
0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001,
0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, 0x4e475349, 0x0000002c,
0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f,
0x49534f50, 0x4e4f4954, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49,
- };
- static const DWORD ps_code[] =
- {
+#if 0
float4 main() : sv_target
{
return float4(1.0, 1.0, 1.0, 1.0);
}
+#endif
0x43425844, 0xe8ed6039, 0xd42f2bf4, 0x38efe2fd, 0x9dc3406f, 0x00000001, 0x00000118, 0x00000004,
0x00000030, 0x00000094, 0x000000d4, 0x000000e4, 0x396e6f41, 0x0000005c, 0x0000005c, 0xffff0200,
0x00000038, 0x00000024, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0xffff0200,
0x05000051, 0xa00f0000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x02000001, 0x800f0000,
0xa0000000, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff, 0x52444853, 0x00000038, 0x00000040,
0x0000000e, 0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002,
0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, 0x4e475349, 0x00000008, 0x00000000,
0x00000008, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
0x00000003, 0x00000000, 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074,
- };
- static const struct vec3 tri[] =
- {
{ 0.9f, -0.5f, 0.0f},
{-0.8f, -0.9f, 0.0f},
{ 0.2f, 0.7f, 0.0f},
- };
Would it be possible to use draw_color_quad() in this test, perhaps in a similar way to e.g. test_stencil_separate() and test_face_culling()?
It's not a great fit, especially given the line tests, but also the different set and number of vertices. Of course it's unfortunate to duplicate the vertex shader, but it doesn't strike me as better to modify draw_color_quad().
On Fri, 30 Apr 2021 at 20:34, Zebediah Figura (she/her) zfigura@codeweavers.com wrote:
On 4/30/21 12:00 PM, Henri Verbeet wrote:
On Fri, 30 Apr 2021 at 18:09, Zebediah Figura z.figura12@gmail.com wrote:
+static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) +{
- static const D3D11_INPUT_ELEMENT_DESC layout_desc[] =
- {
{"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
- };
- static const DWORD vs_code[] =
- {
+#if 0
float4 main(float4 position : POSITION) : SV_POSITION
{
return position;
}
+#endif
0x43425844, 0x06bbe9c8, 0x927aedde, 0xb3c454df, 0xd739785a, 0x00000001, 0x00000140, 0x00000004,
0x00000030, 0x00000094, 0x000000d8, 0x0000010c, 0x396e6f41, 0x0000005c, 0x0000005c, 0xfffe0200,
0x00000034, 0x00000028, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240001, 0x00000000,
0xfffe0200, 0x0200001f, 0x80000005, 0x900f0000, 0x04000004, 0xc0030000, 0x90ff0000, 0xa0e40000,
0x90e40000, 0x02000001, 0xc00c0000, 0x90e40000, 0x0000ffff, 0x52444853, 0x0000003c, 0x00010040,
0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001,
0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, 0x4e475349, 0x0000002c,
0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f,
0x49534f50, 0x4e4f4954, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49,
- };
- static const DWORD ps_code[] =
- {
+#if 0
float4 main() : sv_target
{
return float4(1.0, 1.0, 1.0, 1.0);
}
+#endif
0x43425844, 0xe8ed6039, 0xd42f2bf4, 0x38efe2fd, 0x9dc3406f, 0x00000001, 0x00000118, 0x00000004,
0x00000030, 0x00000094, 0x000000d4, 0x000000e4, 0x396e6f41, 0x0000005c, 0x0000005c, 0xffff0200,
0x00000038, 0x00000024, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0xffff0200,
0x05000051, 0xa00f0000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x02000001, 0x800f0000,
0xa0000000, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff, 0x52444853, 0x00000038, 0x00000040,
0x0000000e, 0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002,
0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, 0x4e475349, 0x00000008, 0x00000000,
0x00000008, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
0x00000003, 0x00000000, 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074,
- };
- static const struct vec3 tri[] =
- {
{ 0.9f, -0.5f, 0.0f},
{-0.8f, -0.9f, 0.0f},
{ 0.2f, 0.7f, 0.0f},
- };
Would it be possible to use draw_color_quad() in this test, perhaps in a similar way to e.g. test_stencil_separate() and test_face_culling()?
It's not a great fit, especially given the line tests, but also the different set and number of vertices. Of course it's unfortunate to duplicate the vertex shader, but it doesn't strike me as better to modify draw_color_quad().
Yes, but that's in part because of the way the test is currently written. I don't think there's an inherent reason you couldn't test the same functionality using a quad instead of a triangle. The different vertex positions aren't an issue; draw_quad_vs_() wiil create a default vertex buffer if one wasn't previously created, but it will also happily use an existing one if it exists. We use that in test_stencil_separate() and test_face_culling() mentioned above, among other tests. The line test should work fine as-is after a draw_color_quad() call, although it's true that it's perhaps not great to implicitly depend on state set by draw_color_quad().
Broadly, I'd like us to cut down on the boilerplate a bit, and move more towards the vkd3d/piglit shader runner model for tests like these, even if simply using equivalent function calls instead of .shader_test files. I was going to sign off on this regardless, but unfortunately it also fails here on Wine with the Vulkan renderer (Intel SKL):
d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff808080 at (338, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (339, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32732: Test succeeded inside todo block: Got unexpected color 0xff404040 at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407). d3d11.c:32746: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (336, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (337, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xffbfbfbf at (340, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (342, 407). d3d11.c:32746: Test succeeded inside todo block: Got unexpected color 0xff404040 at (343, 407).
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=89661
Your paranoid android.
=== w1064 (32 bit report) ===
d3d11: d3d11.c:5658: Test failed: Got unexpected query result 0x0000000000000000.
=== w10pro64 (32 bit report) ===
d3d11: d3d11.c:5811: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5812: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5813: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5816: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5817: Test failed: Got unexpected CPrimitives count: 0.
=== debiant2 (32 bit report) ===
d3d11: d3d11.c:9661: Test failed: d3d11.c:15005: Test marked todo: Got hr 0 for WRITE. d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit French report) ===
d3d11: d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit Japanese:Japan report) ===
d3d11: d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit Chinese:China report) ===
d3d11: d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (32 bit WoW report) ===
d3d11: d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407).
=== debiant2 (64 bit WoW report) ===
d3d11: d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (334, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (335, 407). d3d11.c:32599: Test failed: Got unexpected color 0xff404040 at (336, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407). d3d11.c:32613: Test failed: Got unexpected color 0xff404040 at (338, 407).
The actual effect of this is to change the algorithm for line multisampling.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d10core/tests/d3d10core.c | 10 ++++------ dlls/d3d11/device.c | 17 +++-------------- dlls/d3d11/state.c | 7 +++++++ dlls/d3d11/tests/d3d11.c | 10 ++++------ 4 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 6c0a1c04120..41a16d9e5b8 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -19056,9 +19056,8 @@ static void test_multisample_draw(void) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_tri != 0xff000000 && pixels[i].colour_tri != 0xffffffff) - ok(compare_color(color, pixels[i].colour_tri, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_tri, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D10Device_ClearRenderTargetView(device, rtv, black); @@ -19070,9 +19069,8 @@ static void test_multisample_draw(void) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_line != 0xff000000 && pixels[i].colour_line != 0xffffffff) - ok(compare_color(color, pixels[i].colour_line, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_line, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D10RasterizerState_Release(rs); diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index ee6ecd2c29c..a2c6c7a75ae 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1142,25 +1142,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon ID3D11RasterizerState *rasterizer_state) { struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d_rasterizer_state *rasterizer_state_impl; - const D3D11_RASTERIZER_DESC *desc;
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
wined3d_mutex_lock(); - if (!(rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state))) - { - wined3d_device_context_set_rasterizer_state(context->wined3d_context, NULL); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); - wined3d_mutex_unlock(); - return; - } - - wined3d_device_context_set_rasterizer_state(context->wined3d_context, rasterizer_state_impl->wined3d_state); - - desc = &rasterizer_state_impl->desc; - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); + rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state); + wined3d_device_context_set_rasterizer_state(context->wined3d_context, + rasterizer_state_impl ? rasterizer_state_impl->wined3d_state : NULL); wined3d_mutex_unlock(); }
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 6b287176536..d31ea16bbe8 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -1152,6 +1152,13 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str wined3d_desc.scissor = desc->ScissorEnable; wined3d_desc.line_antialias = desc->AntialiasedLineEnable;
+ if (desc->MultisampleEnable) + { + static unsigned int once; + if (!once++) + FIXME("Ignoring MultisampleEnable %#x.\n", desc->MultisampleEnable); + } + /* We cannot fail after creating a wined3d_rasterizer_state object. It * would lead to double free. */ if (FAILED(hr = wined3d_rasterizer_state_create(device->wined3d_device, &wined3d_desc, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index ddb49d4166b..7229f44d6d2 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -32595,9 +32595,8 @@ static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_tri != 0xff000000 && pixels[i].colour_tri != 0xffffffff) - ok(compare_color(color, pixels[i].colour_tri, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_tri, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D11DeviceContext_ClearRenderTargetView(context, rtv, black); @@ -32609,9 +32608,8 @@ static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_line != 0xff000000 && pixels[i].colour_line != 0xffffffff) - ok(compare_color(color, pixels[i].colour_line, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_line, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D11RasterizerState_Release(rs);
On Fri, 30 Apr 2021 at 18:09, Zebediah Figura z.figura12@gmail.com wrote:
dlls/d3d10core/tests/d3d10core.c | 10 ++++------ dlls/d3d11/device.c | 17 +++-------------- dlls/d3d11/state.c | 7 +++++++ dlls/d3d11/tests/d3d11.c | 10 ++++------ 4 files changed, 18 insertions(+), 26 deletions(-)
This introduces failures here on Wine (Intel SKL):
OpenGL: d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407).
Vulkan: d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff404040 at (333, 407). d3d11.c:32744: Test failed: Got unexpected color 0xff808080 at (335, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffffffff at (339, 407). d3d11.c:32744: Test failed: Got unexpected color 0xffbfbfbf at (341, 407).
And similar failures for the d3d10core test.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 4 +--- dlls/wined3d/wined3d.spec | 1 - include/wine/wined3d.h | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 813ee773478..fdde0a88cab 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1650,11 +1650,9 @@ struct wined3d_rasterizer_state * CDECL wined3d_device_context_get_rasterizer_st return context->state->rasterizer_state; }
-void CDECL wined3d_device_set_render_state(struct wined3d_device *device, +static void wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value) { - TRACE("device %p, state %s (%#x), value %#x.\n", device, debug_d3drenderstate(state), state, value); - if (state > WINEHIGHEST_RENDER_STATE) { WARN("Unhandled render state %#x.\n", state); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 1ea837cc59a..2879e1653d3 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -126,7 +126,6 @@ @ cdecl wined3d_device_set_ps_resource_view(ptr long ptr) @ cdecl wined3d_device_set_ps_sampler(ptr long ptr) @ cdecl wined3d_device_set_rasterizer_state(ptr ptr) -@ cdecl wined3d_device_set_render_state(ptr long long) @ cdecl wined3d_device_set_rendertarget_view(ptr long ptr long) @ cdecl wined3d_device_set_scissor_rects(ptr long ptr) @ cdecl wined3d_device_set_software_vertex_processing(ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 89c0d75c1eb..dd1c15f14ed 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2484,8 +2484,6 @@ void __cdecl wined3d_device_set_ps_resource_view(struct wined3d_device *device, void __cdecl wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler); void __cdecl wined3d_device_set_rasterizer_state(struct wined3d_device *device, struct wined3d_rasterizer_state *rasterizer_state); -void __cdecl wined3d_device_set_render_state(struct wined3d_device *device, - enum wined3d_render_state state, DWORD value); HRESULT __cdecl wined3d_device_set_rendertarget_view(struct wined3d_device *device, unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport); void __cdecl wined3d_device_set_scissor_rects(struct wined3d_device *device,
On Fri, 30 Apr 2021 at 18:09, Zebediah Figura z.figura12@gmail.com wrote:
-void CDECL wined3d_device_set_render_state(struct wined3d_device *device, +static void wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value) {
- TRACE("device %p, state %s (%#x), value %#x.\n", device, debug_d3drenderstate(state), state, value);
- if (state > WINEHIGHEST_RENDER_STATE) { WARN("Unhandled render state %#x.\n", state);
Arguably the TRACE is still somewhat useful, but if you're removing things, note that both the bounds check on "state" and the special handling for WINED3D_RS_POINTSIZE are superfluous now.