Commit 40e2784e authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Check for a bound compute shader in wined3d_cs_exec_dispatch().

parent 552b335a
......@@ -3901,13 +3901,6 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state
wined3d_context_gl_apply_compute_state(context_gl, device, state);
if (!state->shader[WINED3D_SHADER_TYPE_COMPUTE])
{
context_release(&context_gl->c);
WARN("No compute shader bound, skipping dispatch.\n");
return;
}
if (parameters->indirect)
{
const struct wined3d_indirect_dispatch_parameters *indirect = &parameters->u.indirect;
......
......@@ -785,7 +785,10 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
const struct wined3d_cs_dispatch *op = data;
struct wined3d_state *state = &cs->state;
cs->device->adapter->adapter_ops->adapter_dispatch_compute(cs->device, state, &op->parameters);
if (!state->shader[WINED3D_SHADER_TYPE_COMPUTE])
WARN("No compute shader bound, skipping dispatch.\n");
else
cs->device->adapter->adapter_ops->adapter_dispatch_compute(cs->device, state, &op->parameters);
if (op->parameters.indirect)
wined3d_resource_release(&op->parameters.u.indirect.buffer->resource);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment