wined3d: Introduce wined3d_device_context_set_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-03-18 23:16:38 -05:00 committed by Alexandre Julliard
parent 874ff93c04
commit 8f32fbee9b
3 changed files with 25 additions and 14 deletions

View File

@ -2404,6 +2404,27 @@ HRESULT CDECL wined3d_device_context_set_depth_stencil_view(struct wined3d_devic
return WINED3D_OK;
}
void CDECL wined3d_device_context_set_predication(struct wined3d_device_context *context,
struct wined3d_query *predicate, BOOL value)
{
struct wined3d_state *state = context->state;
struct wined3d_query *prev;
TRACE("context %p, predicate %p, value %#x.\n", context, predicate, value);
prev = state->predicate;
if (predicate)
{
FIXME("Predicated rendering not implemented.\n");
wined3d_query_incref(predicate);
}
state->predicate = predicate;
state->predicate_value = value;
wined3d_device_context_emit_set_predication(context, predicate, value);
if (prev)
wined3d_query_decref(prev);
}
void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader)
{
TRACE("device %p, shader %p.\n", device, shader);
@ -4386,22 +4407,9 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
void CDECL wined3d_device_set_predication(struct wined3d_device *device,
struct wined3d_query *predicate, BOOL value)
{
struct wined3d_state *state = device->cs->c.state;
struct wined3d_query *prev;
TRACE("device %p, predicate %p, value %#x.\n", device, predicate, value);
prev = state->predicate;
if (predicate)
{
FIXME("Predicated rendering not implemented.\n");
wined3d_query_incref(predicate);
}
state->predicate = predicate;
state->predicate_value = value;
wined3d_device_context_emit_set_predication(&device->cs->c, predicate, value);
if (prev)
wined3d_query_decref(prev);
wined3d_device_context_set_predication(&device->cs->c, predicate, value);
}
struct wined3d_query * CDECL wined3d_device_get_predication(struct wined3d_device *device, BOOL *value)

View File

@ -170,6 +170,7 @@
@ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr)
@ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long)
@ cdecl wined3d_device_context_set_depth_stencil_view(ptr ptr)
@ cdecl wined3d_device_context_set_predication(ptr ptr long)
@ cdecl wined3d_device_context_set_rasterizer_state(ptr ptr)
@ cdecl wined3d_device_context_set_rendertarget_view(ptr long ptr long)
@ cdecl wined3d_device_context_set_sampler(ptr long long ptr)

View File

@ -2563,6 +2563,8 @@ void __cdecl wined3d_device_context_set_depth_stencil_state(struct wined3d_devic
struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref);
HRESULT __cdecl wined3d_device_context_set_depth_stencil_view(struct wined3d_device_context *context,
struct wined3d_rendertarget_view *view);
void __cdecl wined3d_device_context_set_predication(struct wined3d_device_context *context,
struct wined3d_query *predicate, BOOL value);
void __cdecl wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context,
struct wined3d_rasterizer_state *rasterizer_state);
HRESULT __cdecl wined3d_device_context_set_rendertarget_view(struct wined3d_device_context *context,