Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 4 ++-- dlls/wined3d/device.c | 9 +++++---- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d93256e77ad..70d14c7f2c5 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2137,7 +2137,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargetsAndUnord static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11DeviceContext1 *iface, ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_blend_state *wined3d_state; struct d3d_blend_state *blend_state_impl;
@@ -2145,7 +2145,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11Devi iface, blend_state, blend_factor, sample_mask);
wined3d_mutex_lock(); - if ((wined3d_state = wined3d_device_get_blend_state(device->wined3d_device, + if ((wined3d_state = wined3d_device_context_get_blend_state(context->wined3d_context, (struct wined3d_color *)blend_factor, sample_mask))) { blend_state_impl = wined3d_blend_state_get_parent(wined3d_state); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 974db90037d..39701886450 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1603,12 +1603,12 @@ void CDECL wined3d_device_set_blend_state(struct wined3d_device *device, wined3d_device_context_set_blend_state(&device->cs->c, blend_state, blend_factor, sample_mask); }
-struct wined3d_blend_state * CDECL wined3d_device_get_blend_state(const struct wined3d_device *device, +struct wined3d_blend_state * CDECL wined3d_device_context_get_blend_state(const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state;
- TRACE("device %p, blend_factor %p, sample_mask %p.\n", device, blend_factor, sample_mask); + TRACE("context %p, blend_factor %p, sample_mask %p.\n", context, blend_factor, sample_mask);
*blend_factor = state->blend_factor; *sample_mask = state->sample_mask; @@ -3921,6 +3921,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, const struct wined3d_stateblock_state *state = &stateblock->stateblock_state; const struct wined3d_saved_states *changed = &stateblock->changed; const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT; + struct wined3d_device_context *context = &device->cs->c; unsigned int i, j, start, idx; struct wined3d_range range; uint32_t map; @@ -4153,7 +4154,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (wined3d_bitmap_is_set(changed->renderState, WINED3D_RS_BLENDFACTOR)) wined3d_color_from_d3dcolor(&colour, state->rs[WINED3D_RS_BLENDFACTOR]); else - wined3d_device_get_blend_state(device, &colour, &sample_mask); + wined3d_device_context_get_blend_state(context, &colour, &sample_mask);
if ((entry = wine_rb_get(&device->blend_states, &desc))) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 406e511c0f6..35fbc44ee64 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -55,7 +55,6 @@ @ cdecl wined3d_device_end_scene(ptr) @ cdecl wined3d_device_evict_managed_resources(ptr) @ cdecl wined3d_device_get_available_texture_mem(ptr) -@ cdecl wined3d_device_get_blend_state(ptr ptr) @ cdecl wined3d_device_get_clip_status(ptr ptr) @ cdecl wined3d_device_get_compute_shader(ptr) @ cdecl wined3d_device_get_creation_parameters(ptr ptr) @@ -170,6 +169,7 @@ @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) @ cdecl wined3d_device_context_flush(ptr) @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) +@ 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_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 1a58c671934..5b936017191 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2565,6 +2565,8 @@ void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context void __cdecl wined3d_device_context_flush(struct wined3d_device_context *context); void __cdecl wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view); +struct wined3d_blend_state * __cdecl wined3d_device_context_get_blend_state( + const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask); struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx); struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context,
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 4 ++-- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 70d14c7f2c5..d56be188cf6 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2161,7 +2161,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11Devi static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3D11DeviceContext1 *iface, ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_depth_stencil_state *wined3d_state; struct d3d_depthstencil_state *state_impl;
@@ -2169,7 +2169,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3 iface, depth_stencil_state, stencil_ref);
wined3d_mutex_lock(); - if ((wined3d_state = wined3d_device_get_depth_stencil_state(device->wined3d_device, stencil_ref))) + if ((wined3d_state = wined3d_device_context_get_depth_stencil_state(context->wined3d_context, stencil_ref))) { state_impl = wined3d_depth_stencil_state_get_parent(wined3d_state); ID3D11DepthStencilState_AddRef(*depth_stencil_state = &state_impl->ID3D11DepthStencilState_iface); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 39701886450..c370c5dff7c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1623,12 +1623,12 @@ void CDECL wined3d_device_set_depth_stencil_state(struct wined3d_device *device, wined3d_device_context_set_depth_stencil_state(&device->cs->c, depth_stencil_state, stencil_ref); }
-struct wined3d_depth_stencil_state * CDECL wined3d_device_get_depth_stencil_state(const struct wined3d_device *device, - unsigned int *stencil_ref) +struct wined3d_depth_stencil_state * CDECL wined3d_device_context_get_depth_stencil_state( + const struct wined3d_device_context *context, unsigned int *stencil_ref) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state;
- TRACE("device %p, stencil_ref %p.\n", device, stencil_ref); + TRACE("context %p, stencil_ref %p.\n", context, stencil_ref);
*stencil_ref = state->stencil_ref; return state->depth_stencil_state; @@ -4221,7 +4221,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (wined3d_bitmap_is_set(changed->renderState, WINED3D_RS_STENCILREF)) stencil_ref = state->rs[WINED3D_RS_STENCILREF]; else - wined3d_device_get_depth_stencil_state(device, &stencil_ref); + wined3d_device_context_get_depth_stencil_state(context, &stencil_ref);
if ((entry = wine_rb_get(&device->depth_stencil_states, &desc))) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 35fbc44ee64..e9650c10024 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -61,7 +61,6 @@ @ cdecl wined3d_device_get_cs_resource_view(ptr long) @ cdecl wined3d_device_get_cs_sampler(ptr long) @ cdecl wined3d_device_get_cs_uav(ptr long) -@ cdecl wined3d_device_get_depth_stencil_state(ptr) @ cdecl wined3d_device_get_depth_stencil_view(ptr) @ cdecl wined3d_device_get_device_caps(ptr ptr) @ cdecl wined3d_device_get_display_mode(ptr long ptr ptr) @@ -171,6 +170,7 @@ @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) @ 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_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 5b936017191..165e69b89f3 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2387,8 +2387,6 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_get_cs_resource_vie struct wined3d_sampler * __cdecl wined3d_device_get_cs_sampler(const struct wined3d_device *device, unsigned int idx); struct wined3d_unordered_access_view * __cdecl wined3d_device_get_cs_uav(const struct wined3d_device *device, unsigned int idx); -struct wined3d_depth_stencil_state * __cdecl wined3d_device_get_depth_stencil_state( - const struct wined3d_device *device, unsigned int *stencil_ref); struct wined3d_rendertarget_view * __cdecl wined3d_device_get_depth_stencil_view(const struct wined3d_device *device); HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps); HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx, @@ -2569,6 +2567,8 @@ struct wined3d_blend_state * __cdecl wined3d_device_context_get_blend_state( const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask); struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, 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_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,
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 165e69b89f3..5687b7e17df 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2419,7 +2419,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); @@ -2569,6 +2568,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,
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 7 ++++--- dlls/d3d8/device.c | 2 +- dlls/d3d9/device.c | 2 +- dlls/ddraw/device.c | 2 +- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 29b5b11aebd..a85201a66de 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2233,7 +2233,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetState(ID3D11DeviceCon static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11DeviceContext1 *iface, UINT *viewport_count, D3D11_VIEWPORT *viewports) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS]; unsigned int actual_count = ARRAY_SIZE(wined3d_vp), i;
@@ -2243,7 +2243,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11Devic return;
wined3d_mutex_lock(); - wined3d_device_get_viewports(device->wined3d_device, &actual_count, viewports ? wined3d_vp : NULL); + wined3d_device_context_get_viewports(context->wined3d_context, &actual_count, viewports ? wined3d_vp : NULL); wined3d_mutex_unlock();
if (!viewports) @@ -5526,7 +5526,8 @@ static void STDMETHODCALLTYPE d3d10_device_RSGetViewports(ID3D10Device1 *iface, return;
wined3d_mutex_lock(); - wined3d_device_get_viewports(device->wined3d_device, &actual_count, viewports ? wined3d_vp : NULL); + wined3d_device_context_get_viewports(device->immediate_context.wined3d_context, + &actual_count, viewports ? wined3d_vp : NULL); wined3d_mutex_unlock();
if (!viewports) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index b07c20f71a0..7e6f407df58 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -561,7 +561,7 @@ static void device_reset_viewport_state(struct d3d8_device *device) struct wined3d_viewport vp; RECT rect;
- wined3d_device_get_viewports(device->wined3d_device, NULL, &vp); + 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_stateblock_set_scissor_rect(device->state, &rect); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 25d98b4395a..71826cfe81d 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -587,7 +587,7 @@ static void device_reset_viewport_state(struct d3d9_device *device) struct wined3d_viewport vp; RECT rect;
- wined3d_device_get_viewports(device->wined3d_device, NULL, &vp); + 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_stateblock_set_scissor_rect(device->state, &rect); diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 52d20fc5a62..bf7ee1f22a0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -6972,7 +6972,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw) struct wined3d_viewport vp; RECT rect;
- wined3d_device_get_viewports(ddraw->wined3d_device, NULL, &vp); + 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_stateblock_set_scissor_rect(ddraw->state, &rect); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 452c3b35414..39b44831e25 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1560,13 +1560,13 @@ void CDECL wined3d_device_set_viewports(struct wined3d_device *device, unsigned wined3d_device_context_set_viewports(&device->cs->c, viewport_count, viewports); }
-void CDECL wined3d_device_get_viewports(const struct wined3d_device *device, unsigned int *viewport_count, - struct wined3d_viewport *viewports) +void CDECL wined3d_device_context_get_viewports(const struct wined3d_device_context *context, + unsigned int *viewport_count, struct wined3d_viewport *viewports) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state; unsigned int count;
- TRACE("device %p, viewport_count %p, viewports %p.\n", device, viewport_count, viewports); + TRACE("context %p, viewport_count %p, viewports %p.\n", context, viewport_count, viewports);
count = viewport_count ? min(*viewport_count, state->viewport_count) : 1; if (count && viewports) @@ -3536,7 +3536,7 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO TRACE("%.8e %.8e %.8e %.8e\n", world_mat._41, world_mat._42, world_mat._43, world_mat._44);
/* Get the viewport */ - wined3d_device_get_viewports(device, NULL, &vp); + wined3d_device_context_get_viewports(&device->cs->c, NULL, &vp); TRACE("viewport x %.8e, y %.8e, width %.8e, height %.8e, min_z %.8e, max_z %.8e.\n", vp.x, vp.y, vp.width, vp.height, vp.min_z, vp.max_z);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 2af21d5a31c..44cef466435 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -96,7 +96,6 @@ @ cdecl wined3d_device_get_unordered_access_view(ptr long) @ cdecl wined3d_device_get_vertex_declaration(ptr) @ cdecl wined3d_device_get_vertex_shader(ptr) -@ cdecl wined3d_device_get_viewports(ptr ptr ptr) @ cdecl wined3d_device_get_vs_resource_view(ptr long) @ cdecl wined3d_device_get_vs_sampler(ptr long) @ cdecl wined3d_device_get_wined3d(ptr) @@ -172,6 +171,7 @@ @ 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_get_viewports(ptr ptr ptr) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) @ cdecl wined3d_device_context_resolve_sub_resource(ptr ptr long ptr long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 5687b7e17df..c630a6c88c9 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2437,8 +2437,6 @@ struct wined3d_unordered_access_view * __cdecl wined3d_device_get_unordered_acce const struct wined3d_device *device, unsigned int idx); struct wined3d_vertex_declaration * __cdecl wined3d_device_get_vertex_declaration(const struct wined3d_device *device); struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(const struct wined3d_device *device); -void __cdecl wined3d_device_get_viewports(const struct wined3d_device *device, unsigned int *viewport_count, - struct wined3d_viewport *viewports); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_vs_resource_view(const struct wined3d_device *device, UINT idx); struct wined3d_sampler * __cdecl wined3d_device_get_vs_sampler(const struct wined3d_device *device, UINT idx); @@ -2572,6 +2570,8 @@ struct wined3d_rasterizer_state * __cdecl wined3d_device_context_get_rasterizer_ 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_get_viewports(const struct wined3d_device_context *context, + unsigned int *viewport_count, struct wined3d_viewport *viewports); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags); HRESULT __cdecl wined3d_device_context_map(struct wined3d_device_context *context,
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 c630a6c88c9..23e372aec6e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2422,8 +2422,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, @@ -2568,6 +2566,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,