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/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 7 +++---- 6 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index ef15dc71af7..ada668e3164 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1387,7 +1387,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D ID3D11Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource; enum wined3d_format_id wined3d_format;
@@ -1400,7 +1400,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource); wined3d_format = wined3dformat_from_dxgi_format(format); wined3d_mutex_lock(); - wined3d_device_resolve_sub_resource(device->wined3d_device, + wined3d_device_context_resolve_sub_resource(context->wined3d_context, wined3d_dst_resource, dst_subresource_idx, wined3d_src_resource, src_subresource_idx, wined3d_format); wined3d_mutex_unlock(); @@ -4991,7 +4991,7 @@ static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device1 *ifa wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource); wined3d_format = wined3dformat_from_dxgi_format(format); wined3d_mutex_lock(); - wined3d_device_resolve_sub_resource(device->wined3d_device, + wined3d_device_context_resolve_sub_resource(device->immediate_context.wined3d_context, wined3d_dst_resource, dst_subresource_idx, wined3d_src_resource, src_subresource_idx, wined3d_format); wined3d_mutex_unlock(); diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index f69b56acc37..b07c20f71a0 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1932,7 +1932,7 @@ static void resolve_depth_buffer(struct d3d8_device *device) return; d3d8_dsv = wined3d_rendertarget_view_get_sub_resource_parent(wined3d_dsv);
- wined3d_device_resolve_sub_resource(device->wined3d_device, dst_resource, 0, + wined3d_device_context_resolve_sub_resource(device->immediate_context, dst_resource, 0, wined3d_rendertarget_view_get_resource(wined3d_dsv), d3d8_dsv->sub_resource_idx, desc.format); }
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2b63f458a5d..6492eecc7b9 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2429,7 +2429,7 @@ static void resolve_depth_buffer(struct d3d9_device *device) return; d3d9_dsv = wined3d_rendertarget_view_get_sub_resource_parent(wined3d_dsv);
- wined3d_device_resolve_sub_resource(device->wined3d_device, dst_resource, 0, + wined3d_device_context_resolve_sub_resource(device->immediate_context, dst_resource, 0, wined3d_rendertarget_view_get_resource(wined3d_dsv), d3d9_dsv->sub_resource_idx, desc.format); }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 78fbe668857..e21e22a46f7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1590,7 +1590,7 @@ static void resolve_depth_buffer(struct wined3d_device *device) if (!(src_view = state->fb.depth_stencil)) return;
- wined3d_device_resolve_sub_resource(device, dst_resource, 0, + wined3d_device_context_resolve_sub_resource(&device->cs->c, dst_resource, 0, src_view->resource, src_view->sub_resource_idx, dst_resource->format->id); }
@@ -5152,7 +5152,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); }
-void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, +void CDECL wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id) @@ -5162,9 +5162,9 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, struct wined3d_blt_fx fx = {0}; RECT dst_rect, src_rect;
- TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, " + TRACE("context %p, dst_resource %p, dst_sub_resource_idx %u, " "src_resource %p, src_sub_resource_idx %u, format %s.\n", - device, dst_resource, dst_sub_resource_idx, + context, dst_resource, dst_sub_resource_idx, src_resource, src_sub_resource_idx, debug_d3dformat(format_id));
if (wined3d_format_is_typeless(dst_resource->format) @@ -5197,7 +5197,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, src_level = src_sub_resource_idx % src_texture->level_count; SetRect(&src_rect, 0, 0, wined3d_texture_get_level_width(src_texture, src_level), wined3d_texture_get_level_height(src_texture, src_level)); - wined3d_device_context_blt(&device->cs->c, dst_texture, dst_sub_resource_idx, &dst_rect, + wined3d_device_context_blt(context, dst_texture, dst_sub_resource_idx, &dst_rect, src_texture, src_sub_resource_idx, &src_rect, 0, &fx, WINED3D_TEXF_POINT); }
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index d15b56b89d4..34eca80a94e 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -111,7 +111,6 @@ @ cdecl wined3d_device_process_vertices(ptr long long long ptr ptr long long) @ cdecl wined3d_device_release_focus_window(ptr) @ cdecl wined3d_device_reset(ptr ptr ptr ptr long) -@ cdecl wined3d_device_resolve_sub_resource(ptr ptr long ptr long long) @ cdecl wined3d_device_set_base_vertex_index(ptr long) @ cdecl wined3d_device_set_blend_state(ptr ptr ptr) @ cdecl wined3d_device_set_clip_status(ptr ptr) @@ -172,6 +171,7 @@ @ cdecl wined3d_device_context_draw_indirect(ptr ptr long long) @ cdecl wined3d_device_context_dispatch(ptr long long long) @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) +@ cdecl wined3d_device_context_resolve_sub_resource(ptr ptr long ptr long long) @ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long) @ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr) @ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index e3667cd3f60..0e356aa7ecb 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2461,10 +2461,6 @@ void __cdecl wined3d_device_release_focus_window(struct wined3d_device *device); HRESULT __cdecl wined3d_device_reset(struct wined3d_device *device, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode, wined3d_device_reset_cb callback, BOOL reset_state); -void __cdecl wined3d_device_resolve_sub_resource(struct wined3d_device *device, - struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, - struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, - enum wined3d_format_id format_id); void __cdecl wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index); void __cdecl wined3d_device_set_blend_state(struct wined3d_device *device, struct wined3d_blend_state *blend_state, const struct wined3d_color *blend_factor, unsigned int sample_mask); @@ -2571,6 +2567,9 @@ void __cdecl wined3d_device_context_draw_indexed(struct wined3d_device_context * unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count); void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context *context, struct wined3d_buffer *buffer, unsigned int offset, bool indexed); +void __cdecl wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, + struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, + struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id); void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask); void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context,