Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 7 ++++--- dlls/wined3d/device.c | 8 ++++---- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e84f88ff5f2..dfe3b60c369 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1237,7 +1237,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion(ID3D static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceContext1 *iface, ID3D11Resource *dst_resource, ID3D11Resource *src_resource) { - 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;
TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource); @@ -1245,7 +1245,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceC wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource); wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource); wined3d_mutex_lock(); - wined3d_device_copy_resource(device->wined3d_device, wined3d_dst_resource, wined3d_src_resource); + wined3d_device_context_copy_resource(context->wined3d_context, wined3d_dst_resource, wined3d_src_resource); wined3d_mutex_unlock(); }
@@ -4896,7 +4896,8 @@ static void STDMETHODCALLTYPE d3d10_device_CopyResource(ID3D10Device1 *iface, wined3d_dst_resource = wined3d_resource_from_d3d10_resource(dst_resource); wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource); wined3d_mutex_lock(); - wined3d_device_copy_resource(device->wined3d_device, wined3d_dst_resource, wined3d_src_resource); + wined3d_device_context_copy_resource(device->immediate_context.wined3d_context, + wined3d_dst_resource, wined3d_src_resource); wined3d_mutex_unlock(); }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 004d3ec8d2a..18f5d5e89a2 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4839,7 +4839,7 @@ static bool resources_format_compatible(const struct wined3d_resource *src_resou return false; }
-void CDECL wined3d_device_copy_resource(struct wined3d_device *device, +void CDECL wined3d_device_context_copy_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource) { unsigned int src_row_block_count, dst_row_block_count; @@ -4848,7 +4848,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, struct wined3d_box src_box, dst_box; unsigned int i, j;
- TRACE("device %p, dst_resource %p, src_resource %p.\n", device, dst_resource, src_resource); + TRACE("context %p, dst_resource %p, src_resource %p.\n", context, dst_resource, src_resource);
if (src_resource == dst_resource) { @@ -4893,7 +4893,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, if (dst_resource->type == WINED3D_RTYPE_BUFFER) { wined3d_box_set(&src_box, 0, 0, src_resource->size, 1, 0, 1); - wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, 0, &src_box, + wined3d_device_context_emit_blt_sub_resource(context, dst_resource, 0, &src_box, src_resource, 0, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); return; } @@ -4918,7 +4918,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, { unsigned int idx = j * dst_texture->level_count + i;
- wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, idx, &dst_box, + wined3d_device_context_emit_blt_sub_resource(context, dst_resource, idx, &dst_box, src_resource, idx, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); } } diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 3ea90e0c925..79170de8032 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -44,7 +44,6 @@ @ cdecl wined3d_device_clear(ptr long ptr long ptr float long) @ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr long ptr float long) @ cdecl wined3d_device_clear_unordered_access_view_uint(ptr ptr ptr) -@ cdecl wined3d_device_copy_resource(ptr ptr ptr) @ cdecl wined3d_device_copy_sub_resource_region(ptr ptr long long long long ptr long ptr long) @ cdecl wined3d_device_create(ptr ptr long ptr long long ptr long ptr ptr) @ cdecl wined3d_device_decref(ptr) @@ -165,6 +164,7 @@ @ cdecl wined3d_device_update_texture(ptr ptr ptr) @ cdecl wined3d_device_validate_device(ptr ptr)
+@ cdecl wined3d_device_context_copy_resource(ptr ptr ptr) @ cdecl wined3d_device_context_copy_uav_counter(ptr ptr long ptr) @ cdecl wined3d_device_context_draw(ptr long long long long) @ cdecl wined3d_device_context_draw_indexed(ptr long long long long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index bff77b2b949..9540c3a631f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2357,8 +2357,6 @@ HRESULT __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *de const struct wined3d_color *color, float depth, DWORD stencil); void __cdecl wined3d_device_clear_unordered_access_view_uint(struct wined3d_device *device, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value); -void __cdecl wined3d_device_copy_resource(struct wined3d_device *device, - struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource); HRESULT __cdecl wined3d_device_copy_sub_resource_region(struct wined3d_device *device, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, @@ -2555,6 +2553,8 @@ HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device, struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture); HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes);
+void __cdecl wined3d_device_context_copy_resource(struct wined3d_device_context *context, + struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource); void __cdecl wined3d_device_context_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav); void __cdecl wined3d_device_context_dispatch(struct wined3d_device_context *context,