diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 6bf9827d3e1..12db34d1d0f 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -891,22 +891,21 @@ static void acquire_compute_pipeline_resources(const struct wined3d_state *state state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]); } -void wined3d_cs_emit_dispatch(struct wined3d_cs *cs, +void CDECL wined3d_device_context_dispatch(struct wined3d_device_context *context, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) { - const struct wined3d_state *state = cs->c.state; struct wined3d_cs_dispatch *op; - op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_DISPATCH; op->parameters.indirect = FALSE; op->parameters.u.direct.group_count_x = group_count_x; op->parameters.u.direct.group_count_y = group_count_y; op->parameters.u.direct.group_count_z = group_count_z; - acquire_compute_pipeline_resources(state); + acquire_compute_pipeline_resources(context->state); - wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4041a7c0d7f..b96a0382c6a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4401,7 +4401,7 @@ void CDECL wined3d_device_dispatch_compute(struct wined3d_device *device, TRACE("device %p, group_count_x %u, group_count_y %u, group_count_z %u.\n", device, group_count_x, group_count_y, group_count_z); - wined3d_cs_emit_dispatch(device->cs, group_count_x, group_count_y, group_count_z); + wined3d_device_context_dispatch(&device->cs->c, group_count_x, group_count_y, group_count_z); } void CDECL wined3d_device_dispatch_compute_indirect(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 289716d1ae2..c735587abc6 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -166,6 +166,7 @@ @ cdecl wined3d_device_update_texture(ptr ptr ptr) @ cdecl wined3d_device_validate_device(ptr ptr) +@ cdecl wined3d_device_context_dispatch(ptr long long long) @ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long) @ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr) @ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4c15f6ab178..dd6d2cbab5c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4735,8 +4735,6 @@ void wined3d_cs_emit_clear_unordered_access_view_uint(struct wined3d_cs *cs, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value) DECLSPEC_HIDDEN; void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav) DECLSPEC_HIDDEN; -void wined3d_cs_emit_dispatch(struct wined3d_cs *cs, - unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) DECLSPEC_HIDDEN; void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs, struct wined3d_buffer *buffer, unsigned int offset) DECLSPEC_HIDDEN; void wined3d_cs_emit_draw(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 385ac7a8a07..f4fafafa80a 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2555,6 +2555,8 @@ 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); +void __cdecl wined3d_device_context_dispatch(struct wined3d_device_context *context, + unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z); void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask); void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context,