Commit d61c9998 authored by Conor McCarthy's avatar Conor McCarthy Committed by Alexandre Julliard

wined3d: Do not bind buffers in state_cb() if the shader is not set.

parent a6445025
......@@ -1768,6 +1768,9 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_shader *op = data;
/* CB binding may have been skipped earlier if the shader wasn't set, so make it happen. */
if (!cs->state.shader[op->type] && op->shader)
device_invalidate_state(cs->c.device, STATE_CONSTANT_BUFFER(op->type));
cs->state.shader[op->type] = op->shader;
device_invalidate_state(cs->c.device, STATE_SHADER(op->type));
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
......
......@@ -4579,6 +4579,10 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
else
shader_type = WINED3D_SHADER_TYPE_COMPUTE;
/* If a shader has not been set, buffer objects are not yet initialised. */
if (!state->shader[shader_type])
return;
wined3d_gl_limits_get_uniform_block_range(&gl_info->limits, shader_type, &base, &count);
for (i = 0; i < count; ++i)
{
......
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