Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 6 +++--- dlls/wined3d/device.c | 7 ++++--- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d56be188cf6..29b5b11aebd 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2211,14 +2211,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceC static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetState(ID3D11DeviceContext1 *iface, ID3D11RasterizerState **rasterizer_state) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d_rasterizer_state *rasterizer_state_impl; struct wined3d_rasterizer_state *wined3d_state;
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
wined3d_mutex_lock(); - if ((wined3d_state = wined3d_device_get_rasterizer_state(device->wined3d_device))) + if ((wined3d_state = wined3d_device_context_get_rasterizer_state(context->wined3d_context))) { rasterizer_state_impl = wined3d_rasterizer_state_get_parent(wined3d_state); ID3D11RasterizerState_AddRef(*rasterizer_state = &rasterizer_state_impl->ID3D11RasterizerState_iface); @@ -5501,7 +5501,7 @@ static void STDMETHODCALLTYPE d3d10_device_RSGetState(ID3D10Device1 *iface, ID3D TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
wined3d_mutex_lock(); - if ((wined3d_state = wined3d_device_get_rasterizer_state(device->wined3d_device))) + if ((wined3d_state = wined3d_device_context_get_rasterizer_state(device->immediate_context.wined3d_context))) { rasterizer_state_impl = wined3d_rasterizer_state_get_parent(wined3d_state); ID3D10RasterizerState_AddRef(*rasterizer_state = &rasterizer_state_impl->ID3D10RasterizerState_iface); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c370c5dff7c..452c3b35414 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1642,11 +1642,12 @@ void CDECL wined3d_device_set_rasterizer_state(struct wined3d_device *device, wined3d_device_context_set_rasterizer_state(&device->cs->c, rasterizer_state); }
-struct wined3d_rasterizer_state * CDECL wined3d_device_get_rasterizer_state(struct wined3d_device *device) +struct wined3d_rasterizer_state * CDECL wined3d_device_context_get_rasterizer_state( + struct wined3d_device_context *context) { - TRACE("device %p.\n", device); + TRACE("context %p.\n", context);
- return device->cs->c.state->rasterizer_state; + return context->state->rasterizer_state; }
void CDECL wined3d_device_set_render_state(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index e9650c10024..2af21d5a31c 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -84,7 +84,6 @@ @ cdecl wined3d_device_get_ps_resource_view(ptr long) @ cdecl wined3d_device_get_ps_sampler(ptr long) @ cdecl wined3d_device_get_raster_status(ptr long ptr) -@ cdecl wined3d_device_get_rasterizer_state(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) @@ -171,6 +170,7 @@ @ cdecl wined3d_device_context_get_blend_state(ptr ptr ptr) @ 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_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 188a73cb694..6923b8ce9cb 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2417,7 +2417,6 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_get_ps_resource_vie struct wined3d_sampler * __cdecl wined3d_device_get_ps_sampler(const struct wined3d_device *device, UINT idx); HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_raster_status *raster_status); -struct wined3d_rasterizer_state * __cdecl wined3d_device_get_rasterizer_state(struct wined3d_device *device); 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); @@ -2567,6 +2566,8 @@ struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const enum wined3d_shader_type shader_type, unsigned int idx); struct wined3d_depth_stencil_state * __cdecl wined3d_device_context_get_depth_stencil_state( 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); 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_issue_query(struct wined3d_device_context *context,