d3d11: Always return the rectangle count in d3d11_immediate_context_RSGetScissorRects().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7b487c38d0
commit
fbed47422a
|
@ -2270,14 +2270,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11De
|
||||||
wined3d_device_get_scissor_rects(device->wined3d_device, &actual_count, rects);
|
wined3d_device_get_scissor_rects(device->wined3d_device, &actual_count, rects);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
if (!rects)
|
if (rects && *rect_count > actual_count)
|
||||||
{
|
|
||||||
*rect_count = actual_count;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*rect_count > actual_count)
|
|
||||||
memset(&rects[actual_count], 0, (*rect_count - actual_count) * sizeof(*rects));
|
memset(&rects[actual_count], 0, (*rect_count - actual_count) * sizeof(*rects));
|
||||||
|
*rect_count = actual_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D11DeviceContext1 *iface,
|
static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D11DeviceContext1 *iface,
|
||||||
|
|
|
@ -7235,7 +7235,7 @@ static void test_device_context_state(void)
|
||||||
memset(tmp_rect, 0xa5, sizeof(tmp_rect));
|
memset(tmp_rect, 0xa5, sizeof(tmp_rect));
|
||||||
count = 2;
|
count = 2;
|
||||||
ID3D11DeviceContext1_RSGetScissorRects(context, &count, tmp_rect);
|
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;
|
tmp_sob = (ID3D11Buffer *)0xdeadbeef;
|
||||||
ID3D11DeviceContext1_SOGetTargets(context, 1, &tmp_sob);
|
ID3D11DeviceContext1_SOGetTargets(context, 1, &tmp_sob);
|
||||||
|
@ -7514,7 +7514,7 @@ static void test_device_context_state(void)
|
||||||
memset(tmp_rect, 0xa5, sizeof(tmp_rect));
|
memset(tmp_rect, 0xa5, sizeof(tmp_rect));
|
||||||
count = 2;
|
count = 2;
|
||||||
ID3D11DeviceContext1_RSGetScissorRects(context, &count, tmp_rect);
|
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",
|
ok(!memcmp(tmp_rect, &rect, sizeof(rect)), "Got scissor rect %s, expected %s.\n",
|
||||||
wine_dbgstr_rect(tmp_rect), wine_dbgstr_rect(&rect));
|
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));
|
memset(tmp_rect, 0xa5, sizeof(tmp_rect));
|
||||||
count = 2;
|
count = 2;
|
||||||
ID3D11DeviceContext1_RSGetScissorRects(context, &count, tmp_rect);
|
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",
|
ok(!memcmp(tmp_rect, &rect, sizeof(rect)), "Got scissor rect %s, expected %s.\n",
|
||||||
wine_dbgstr_rect(tmp_rect), wine_dbgstr_rect(&rect));
|
wine_dbgstr_rect(tmp_rect), wine_dbgstr_rect(&rect));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue