wined3d: Pass a wined3d_device_context to wined3d_device_update_sub_resource().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9840a1751e
commit
e4721f0c1e
|
@ -1253,7 +1253,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De
|
|||
ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box,
|
||||
const void *data, UINT row_pitch, UINT depth_pitch)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
struct wined3d_resource *wined3d_resource;
|
||||
struct wined3d_box wined3d_box;
|
||||
|
||||
|
@ -1265,7 +1265,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De
|
|||
|
||||
wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
|
||||
wined3d_mutex_lock();
|
||||
wined3d_device_update_sub_resource(device->wined3d_device, wined3d_resource,
|
||||
wined3d_device_context_update_sub_resource(context->wined3d_context, wined3d_resource,
|
||||
subresource_idx, box ? &wined3d_box : NULL, data, row_pitch, depth_pitch, 0);
|
||||
wined3d_mutex_unlock();
|
||||
}
|
||||
|
@ -2704,7 +2704,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource1(ID3D11D
|
|||
ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box, const void *data,
|
||||
UINT row_pitch, UINT depth_pitch, UINT flags)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
struct wined3d_resource *wined3d_resource;
|
||||
struct wined3d_box wined3d_box;
|
||||
|
||||
|
@ -2717,7 +2717,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource1(ID3D11D
|
|||
|
||||
wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
|
||||
wined3d_mutex_lock();
|
||||
wined3d_device_update_sub_resource(device->wined3d_device, wined3d_resource, subresource_idx,
|
||||
wined3d_device_context_update_sub_resource(context->wined3d_context, wined3d_resource, subresource_idx,
|
||||
box ? &wined3d_box : NULL, data, row_pitch, depth_pitch, flags);
|
||||
wined3d_mutex_unlock();
|
||||
}
|
||||
|
|
|
@ -5085,16 +5085,15 @@ HRESULT CDECL wined3d_device_context_copy_sub_resource_region(struct wined3d_dev
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||
unsigned int depth_pitch, unsigned int flags)
|
||||
void CDECL wined3d_device_context_update_sub_resource(struct wined3d_device_context *context,
|
||||
struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box,
|
||||
const void *data, unsigned int row_pitch, unsigned int depth_pitch, unsigned int flags)
|
||||
{
|
||||
unsigned int width, height, depth;
|
||||
struct wined3d_box b;
|
||||
|
||||
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u, "
|
||||
"flags %#x.\n",
|
||||
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch, flags);
|
||||
TRACE("context %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u, flags %#x.\n",
|
||||
context, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch, flags);
|
||||
|
||||
if (flags)
|
||||
FIXME("Ignoring flags %#x.\n", flags);
|
||||
|
@ -5149,7 +5148,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
|||
|
||||
wined3d_resource_wait_idle(resource);
|
||||
|
||||
wined3d_device_context_emit_update_sub_resource(&device->cs->c, resource,
|
||||
wined3d_device_context_emit_update_sub_resource(context, resource,
|
||||
sub_resource_idx, box, data, row_pitch, depth_pitch);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,6 @@
|
|||
@ cdecl wined3d_device_set_vs_resource_view(ptr long ptr)
|
||||
@ cdecl wined3d_device_set_vs_sampler(ptr long ptr)
|
||||
@ cdecl wined3d_device_show_cursor(ptr long)
|
||||
@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long long)
|
||||
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
|
||||
@ cdecl wined3d_device_validate_device(ptr ptr)
|
||||
|
||||
|
@ -190,6 +189,7 @@
|
|||
@ cdecl wined3d_device_context_set_unordered_access_view(ptr long long ptr long)
|
||||
@ cdecl wined3d_device_context_set_vertex_declaration(ptr ptr)
|
||||
@ cdecl wined3d_device_context_set_viewports(ptr long ptr)
|
||||
@ cdecl wined3d_device_context_update_sub_resource(ptr ptr long ptr ptr long long long)
|
||||
|
||||
@ cdecl wined3d_output_find_closest_matching_mode(ptr ptr)
|
||||
@ cdecl wined3d_output_get_adapter(ptr)
|
||||
|
|
|
@ -2533,9 +2533,6 @@ void __cdecl wined3d_device_set_vs_resource_view(struct wined3d_device *device,
|
|||
UINT idx, struct wined3d_shader_resource_view *view);
|
||||
void __cdecl wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler);
|
||||
BOOL __cdecl wined3d_device_show_cursor(struct wined3d_device *device, BOOL show);
|
||||
void __cdecl wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||
unsigned int depth_pitch, unsigned int flags);
|
||||
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);
|
||||
|
@ -2607,6 +2604,9 @@ void __cdecl wined3d_device_context_set_vertex_declaration(struct wined3d_device
|
|||
struct wined3d_vertex_declaration *declaration);
|
||||
void __cdecl wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
|
||||
const struct wined3d_viewport *viewports);
|
||||
void __cdecl wined3d_device_context_update_sub_resource(struct wined3d_device_context *context,
|
||||
struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box,
|
||||
const void *data, unsigned int row_pitch, unsigned int depth_pitch, unsigned int flags);
|
||||
|
||||
HRESULT __cdecl wined3d_output_find_closest_matching_mode(const struct wined3d_output *output,
|
||||
struct wined3d_display_mode *mode);
|
||||
|
|
Loading…
Reference in New Issue