From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- This supersedes patch 200186.
dlls/d3d11/device.c | 9 ++------- dlls/d3d11/tests/d3d11.c | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index a5d9dc1aa7be..c8ec35a59c0f 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2270,14 +2270,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11De wined3d_device_get_scissor_rects(device->wined3d_device, &actual_count, rects); wined3d_mutex_unlock();
- if (!rects) - { - *rect_count = actual_count; - return; - } - - if (*rect_count > actual_count) + if (rects && *rect_count > actual_count) memset(&rects[actual_count], 0, (*rect_count - actual_count) * sizeof(*rects)); + *rect_count = actual_count; }
static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D11DeviceContext1 *iface, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 2eff98fe8fcf..32a9dc2e5306 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -7235,7 +7235,7 @@ static void test_device_context_state(void) memset(tmp_rect, 0xa5, sizeof(tmp_rect)); count = 2; ID3D11DeviceContext1_RSGetScissorRects(context, &count, tmp_rect); - todo_wine ok(count == 0, "Got unexpected scissor rect count %u.\n", count); + ok(count == 0, "Got unexpected scissor rect count %u.\n", count);
tmp_sob = (ID3D11Buffer *)0xdeadbeef; ID3D11DeviceContext1_SOGetTargets(context, 1, &tmp_sob); @@ -7514,7 +7514,7 @@ static void test_device_context_state(void) memset(tmp_rect, 0xa5, sizeof(tmp_rect)); count = 2; ID3D11DeviceContext1_RSGetScissorRects(context, &count, tmp_rect); - todo_wine ok(count == 1, "Got scissor rect count %u, expected 1.\n", count); + ok(count == 1, "Got scissor rect count %u, expected 1.\n", count); ok(!memcmp(tmp_rect, &rect, sizeof(rect)), "Got scissor rect %s, expected %s.\n", wine_dbgstr_rect(tmp_rect), wine_dbgstr_rect(&rect));
@@ -7962,7 +7962,7 @@ static void test_device_context_state(void) memset(tmp_rect, 0xa5, sizeof(tmp_rect)); count = 2; ID3D11DeviceContext1_RSGetScissorRects(context, &count, tmp_rect); - todo_wine ok(count == 1, "Got scissor rect count %u, expected 1.\n", count); + ok(count == 1, "Got scissor rect count %u, expected 1.\n", count); ok(!memcmp(tmp_rect, &rect, sizeof(rect)), "Got scissor rect %s, expected %s.\n", wine_dbgstr_rect(tmp_rect), wine_dbgstr_rect(&rect));
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=86035
Your paranoid android.
=== w1064v1809 (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.
=== w1064 (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.