Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 6 +++--- dlls/d3d8/device.c | 2 +- dlls/d3d9/device.c | 2 +- dlls/ddraw/device.c | 2 +- dlls/wined3d/device.c | 7 ++++--- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 7 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index a85201a66de..9fd144c0fb6 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2270,7 +2270,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11Devic static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11DeviceContext1 *iface, UINT *rect_count, D3D11_RECT *rects) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int actual_count;
TRACE("iface %p, rect_count %p, rects %p.\n", iface, rect_count, rects); @@ -2281,7 +2281,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11De actual_count = *rect_count;
wined3d_mutex_lock(); - wined3d_device_get_scissor_rects(device->wined3d_device, &actual_count, rects); + wined3d_device_context_get_scissor_rects(context->wined3d_context, &actual_count, rects); wined3d_mutex_unlock();
if (rects && *rect_count > actual_count) @@ -5564,7 +5564,7 @@ static void STDMETHODCALLTYPE d3d10_device_RSGetScissorRects(ID3D10Device1 *ifac actual_count = *rect_count;
wined3d_mutex_lock(); - wined3d_device_get_scissor_rects(device->wined3d_device, &actual_count, rects); + wined3d_device_context_get_scissor_rects(device->immediate_context.wined3d_context, &actual_count, rects); wined3d_mutex_unlock();
if (!rects) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 7e6f407df58..fe36f70c075 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -563,7 +563,7 @@ static void device_reset_viewport_state(struct d3d8_device *device)
wined3d_device_context_get_viewports(device->immediate_context, NULL, &vp); wined3d_stateblock_set_viewport(device->state, &vp); - wined3d_device_get_scissor_rects(device->wined3d_device, NULL, &rect); + wined3d_device_context_get_scissor_rects(device->immediate_context, NULL, &rect); wined3d_stateblock_set_scissor_rect(device->state, &rect); }
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 71826cfe81d..139e4f3f6e4 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -589,7 +589,7 @@ static void device_reset_viewport_state(struct d3d9_device *device)
wined3d_device_context_get_viewports(device->immediate_context, NULL, &vp); wined3d_stateblock_set_viewport(device->state, &vp); - wined3d_device_get_scissor_rects(device->wined3d_device, NULL, &rect); + wined3d_device_context_get_scissor_rects(device->immediate_context, NULL, &rect); wined3d_stateblock_set_scissor_rect(device->state, &rect); }
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index bf7ee1f22a0..0a0d1edd848 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -6974,7 +6974,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
wined3d_device_context_get_viewports(ddraw->immediate_context, NULL, &vp); wined3d_stateblock_set_viewport(ddraw->state, &vp); - wined3d_device_get_scissor_rects(ddraw->wined3d_device, NULL, &rect); + wined3d_device_context_get_scissor_rects(ddraw->immediate_context, NULL, &rect); wined3d_stateblock_set_scissor_rect(ddraw->state, &rect); }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 39b44831e25..f4ba0573c24 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1714,12 +1714,13 @@ void CDECL wined3d_device_set_scissor_rects(struct wined3d_device *device, unsig wined3d_device_context_set_scissor_rects(&device->cs->c, rect_count, rects); }
-void CDECL wined3d_device_get_scissor_rects(const struct wined3d_device *device, unsigned int *rect_count, RECT *rects) +void CDECL wined3d_device_context_get_scissor_rects(const struct wined3d_device_context *context, + unsigned int *rect_count, RECT *rects) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state; unsigned int count;
- TRACE("device %p, rect_count %p, rects %p.\n", device, rect_count, rects); + TRACE("context %p, rect_count %p, rects %p.\n", context, rect_count, rects);
count = rect_count ? min(*rect_count, state->scissor_rect_count) : 1; if (count && rects) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 44cef466435..012f24e6556 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -86,7 +86,6 @@ @ cdecl wined3d_device_get_raster_status(ptr long ptr) @ cdecl wined3d_device_get_render_state(ptr long) @ cdecl wined3d_device_get_rendertarget_view(ptr long) -@ cdecl wined3d_device_get_scissor_rects(ptr ptr ptr) @ cdecl wined3d_device_get_software_vertex_processing(ptr) @ cdecl wined3d_device_get_state(ptr) @ cdecl wined3d_device_get_stream_output(ptr long ptr) @@ -170,6 +169,7 @@ @ cdecl wined3d_device_context_get_constant_buffer(ptr long long) @ cdecl wined3d_device_context_get_depth_stencil_state(ptr ptr) @ cdecl wined3d_device_context_get_rasterizer_state(ptr) +@ cdecl wined3d_device_context_get_scissor_rects(ptr ptr ptr) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_get_viewports(ptr ptr ptr) @ cdecl wined3d_device_context_issue_query(ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index cff06bbfc6b..9b7ff4041fc 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2420,8 +2420,6 @@ HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *de DWORD __cdecl wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state); struct wined3d_rendertarget_view * __cdecl wined3d_device_get_rendertarget_view(const struct wined3d_device *device, unsigned int view_idx); -void __cdecl wined3d_device_get_scissor_rects(const struct wined3d_device *device, unsigned int *rect_count, - RECT *rect); BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_device *device); struct wined3d_state * __cdecl wined3d_device_get_state(struct wined3d_device *device); struct wined3d_buffer * __cdecl wined3d_device_get_stream_output(struct wined3d_device *device, @@ -2566,6 +2564,8 @@ struct wined3d_depth_stencil_state * __cdecl wined3d_device_context_get_depth_st const struct wined3d_device_context *context, unsigned int *stencil_ref); struct wined3d_rasterizer_state * __cdecl wined3d_device_context_get_rasterizer_state( struct wined3d_device_context *context); +void __cdecl wined3d_device_context_get_scissor_rects(const struct wined3d_device_context *context, + unsigned int *rect_count, RECT *rects); struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context, enum wined3d_shader_type type); void __cdecl wined3d_device_context_get_viewports(const struct wined3d_device_context *context,