diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4c914f6adc1..5ff11f15b13 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index ae4244bcbfd..762cbd97f7c 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -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) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 60625eda5c5..82cce3d0251 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -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,