wined3d: Pass a wined3d_device_context to wined3d_device_get_predication().

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-19 23:38:09 -05:00 committed by Alexandre Julliard
parent a313daea70
commit 90dd2572a3
4 changed files with 9 additions and 8 deletions

View File

@ -1973,14 +1973,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11Device
static void STDMETHODCALLTYPE d3d11_immediate_context_GetPredication(ID3D11DeviceContext1 *iface,
ID3D11Predicate **predicate, BOOL *value)
{
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct wined3d_query *wined3d_predicate;
struct d3d_query *predicate_impl;
TRACE("iface %p, predicate %p, value %p.\n", iface, predicate, value);
wined3d_mutex_lock();
if (!(wined3d_predicate = wined3d_device_get_predication(device->wined3d_device, value)))
if (!(wined3d_predicate = wined3d_device_context_get_predication(context->wined3d_context, value)))
{
wined3d_mutex_unlock();
*predicate = NULL;
@ -5329,7 +5329,7 @@ static void STDMETHODCALLTYPE d3d10_device_GetPredication(ID3D10Device1 *iface,
TRACE("iface %p, predicate %p, value %p.\n", iface, predicate, value);
wined3d_mutex_lock();
if (!(wined3d_predicate = wined3d_device_get_predication(device->wined3d_device, value)))
if (!(wined3d_predicate = wined3d_device_context_get_predication(device->immediate_context.wined3d_context, value)))
{
wined3d_mutex_unlock();
*predicate = NULL;

View File

@ -4459,11 +4459,11 @@ void CDECL wined3d_device_set_predication(struct wined3d_device *device,
wined3d_device_context_set_predication(&device->cs->c, predicate, value);
}
struct wined3d_query * CDECL wined3d_device_get_predication(struct wined3d_device *device, BOOL *value)
struct wined3d_query * CDECL wined3d_device_context_get_predication(struct wined3d_device_context *context, BOOL *value)
{
struct wined3d_state *state = device->cs->c.state;
struct wined3d_state *state = context->state;
TRACE("device %p, value %p.\n", device, value);
TRACE("context %p, value %p.\n", context, value);
if (value)
*value = state->predicate_value;

View File

@ -78,7 +78,6 @@
@ cdecl wined3d_device_get_max_frame_latency(ptr)
@ cdecl wined3d_device_get_npatch_mode(ptr)
@ cdecl wined3d_device_get_pixel_shader(ptr)
@ cdecl wined3d_device_get_predication(ptr ptr)
@ cdecl wined3d_device_get_primitive_type(ptr ptr ptr)
@ cdecl wined3d_device_get_ps_resource_view(ptr long)
@ cdecl wined3d_device_get_ps_sampler(ptr long)
@ -167,6 +166,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_depth_stencil_view(ptr)
@ cdecl wined3d_device_context_get_predication(ptr ptr)
@ cdecl wined3d_device_context_get_rasterizer_state(ptr)
@ cdecl wined3d_device_context_get_rendertarget_view(ptr long)
@ cdecl wined3d_device_context_get_sampler(ptr long long)

View File

@ -2410,7 +2410,6 @@ struct wined3d_buffer * __cdecl wined3d_device_get_index_buffer(const struct win
unsigned int __cdecl wined3d_device_get_max_frame_latency(const struct wined3d_device *device);
float __cdecl wined3d_device_get_npatch_mode(const struct wined3d_device *device);
struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct wined3d_device *device);
struct wined3d_query * __cdecl wined3d_device_get_predication(struct wined3d_device *device, BOOL *value);
void __cdecl wined3d_device_get_primitive_type(const struct wined3d_device *device,
enum wined3d_primitive_type *primitive_topology, unsigned int *patch_vertex_count);
struct wined3d_shader_resource_view * __cdecl wined3d_device_get_ps_resource_view(const struct wined3d_device *device,
@ -2561,6 +2560,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_query * __cdecl wined3d_device_context_get_predication(struct wined3d_device_context *context,
BOOL *value);
struct wined3d_rasterizer_state * __cdecl wined3d_device_context_get_rasterizer_state(
struct wined3d_device_context *context);
struct wined3d_rendertarget_view * __cdecl wined3d_device_context_get_rendertarget_view(