wined3d: Pass a wined3d_device_context to wined3d_device_get_constant_buffer().

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:
Zebediah Figura 2021-04-14 23:58:57 -05:00 committed by Alexandre Julliard
parent 8cd9754b07
commit 14920064cd
4 changed files with 9 additions and 9 deletions

View File

@ -407,7 +407,7 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceConte
static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *iface,
enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
unsigned int i;
wined3d_mutex_lock();
@ -416,7 +416,7 @@ static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *i
struct wined3d_buffer *wined3d_buffer;
struct d3d_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_constant_buffer(device->wined3d_device,
if (!(wined3d_buffer = wined3d_device_context_get_constant_buffer(context->wined3d_context,
type, start_slot + i)))
{
buffers[i] = NULL;
@ -4358,7 +4358,7 @@ static void d3d10_device_get_constant_buffers(ID3D10Device1 *iface,
struct wined3d_buffer *wined3d_buffer;
struct d3d_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_constant_buffer(device->wined3d_device,
if (!(wined3d_buffer = wined3d_device_context_get_constant_buffer(device->immediate_context.wined3d_context,
type, start_slot + i)))
{
buffers[i] = NULL;

View File

@ -2451,10 +2451,10 @@ void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device,
return wined3d_device_context_set_constant_buffer(&device->cs->c, type, idx, buffer);
}
struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device,
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)
{
TRACE("device %p, shader_type %#x, idx %u.\n", device, shader_type, idx);
TRACE("context %p, shader_type %#x, idx %u.\n", context, shader_type, idx);
if (idx >= MAX_CONSTANT_BUFFERS)
{
@ -2462,7 +2462,7 @@ struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wi
return NULL;
}
return device->cs->c.state->cb[shader_type][idx];
return context->state->cb[shader_type][idx];
}
void CDECL wined3d_device_set_vs_resource_view(struct wined3d_device *device,

View File

@ -58,7 +58,6 @@
@ 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_constant_buffer(ptr long long)
@ cdecl wined3d_device_get_creation_parameters(ptr ptr)
@ cdecl wined3d_device_get_cs_resource_view(ptr long)
@ cdecl wined3d_device_get_cs_sampler(ptr long)
@ -171,6 +170,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_constant_buffer(ptr long long)
@ 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)

View File

@ -2380,8 +2380,6 @@ struct wined3d_blend_state * __cdecl wined3d_device_get_blend_state(const struct
HRESULT __cdecl wined3d_device_get_clip_status(const struct wined3d_device *device,
struct wined3d_clip_status *clip_status);
struct wined3d_shader * __cdecl wined3d_device_get_compute_shader(const struct wined3d_device *device);
struct wined3d_buffer * __cdecl wined3d_device_get_constant_buffer(const struct wined3d_device *device,
enum wined3d_shader_type shader_type, unsigned int idx);
void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device,
struct wined3d_device_creation_parameters *creation_parameters);
struct wined3d_shader_resource_view * __cdecl wined3d_device_get_cs_resource_view(const struct wined3d_device *device,
@ -2567,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_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,
enum wined3d_shader_type type);
void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context,