From ca11278067fb09491ad41ef5b64b296d49a879cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Tue, 9 Jan 2018 15:10:07 +0100 Subject: [PATCH] wined3d: Load buffer before applying state for indirect dispatches. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/drawprim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 17ce16adc31..7eccc8f7d62 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -750,6 +750,9 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state return; } + if (parameters->indirect) + wined3d_buffer_load(parameters->u.indirect.buffer, context, state); + context_apply_compute_state(context, device, state); if (!state->shader[WINED3D_SHADER_TYPE_COMPUTE]) @@ -764,7 +767,6 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state const struct wined3d_indirect_dispatch_parameters *indirect = ¶meters->u.indirect; struct wined3d_buffer *buffer = indirect->buffer; - wined3d_buffer_load(buffer, context, state); GL_EXTCALL(glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, buffer->buffer_object)); GL_EXTCALL(glDispatchComputeIndirect((GLintptr)indirect->offset)); GL_EXTCALL(glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0));