From ee29789685d0cdded90a1d94089fc0145b6fa266 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B3zef=20Kucia?= Date: Wed, 13 Jul 2016 10:52:00 +0200 Subject: [PATCH] d3d11: Implement d3d11_immediate_context_RSGetScissorRects(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d11/device.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e0e12a15cbe..7f819db8089 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1789,7 +1789,24 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11Devic static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11DeviceContext *iface, UINT *rect_count, D3D11_RECT *rects) { - FIXME("iface %p, rect_count %p, rects %p stub!\n", iface, rect_count, rects); + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + + TRACE("iface %p, rect_count %p, rects %p.\n", iface, rect_count, rects); + + if (!rects) + { + *rect_count = 1; + return; + } + + if (!*rect_count) + return; + + wined3d_mutex_lock(); + wined3d_device_get_scissor_rect(device->wined3d_device, rects); + wined3d_mutex_unlock(); + if (*rect_count > 1) + memset(&rects[1], 0, (*rect_count - 1) * sizeof(*rects)); } static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D11DeviceContext *iface, -- 2.11.4.GIT