Henri Verbeet : d3d11/tests: Rebind the pixel shader between runs with different sample counts in test_sampleinfo_instruction ().

Alexandre Julliard julliard at winehq.org
Tue May 22 15:37:14 CDT 2018


Module: wine
Branch: master
Commit: cf4baf95a30633abfd9fa85255a4d250afb43d41
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cf4baf95a30633abfd9fa85255a4d250afb43d41

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue May 22 17:26:48 2018 +0430

d3d11/tests: Rebind the pixel shader between runs with different sample counts in test_sampleinfo_instruction().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/tests/d3d11.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 894c744..09301c7 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -20005,7 +20005,6 @@ static void test_sampleinfo_instruction(void)
 
     hr = ID3D11Device_CreatePixelShader(device, ps_rt_code, sizeof(ps_rt_code), NULL, &ps_rt);
     ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr);
-    ID3D11DeviceContext_PSSetShader(context, ps_rt, NULL, 0);
     for (sample_count = 1; sample_count <= 8; sample_count *= 2)
     {
         texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
@@ -20026,6 +20025,11 @@ static void test_sampleinfo_instruction(void)
         ok(hr == S_OK, "Failed to create render target view, hr %#x.\n", hr);
         ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rtv, NULL);
 
+        /* Some drivers (AMD Radeon HD 6310) return stale sample counts if we
+         * don't rebind the pixel shader between runs with different sample
+         * counts. */
+        ID3D11DeviceContext_PSSetShader(context, NULL, NULL, 0);
+        ID3D11DeviceContext_PSSetShader(context, ps_rt, NULL, 0);
         draw_quad(&test_context);
 
         if (sample_count != 1)




More information about the wine-cvs mailing list