wined3d: Do not bind buffers in state_cb() if the shader is not set.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52020 Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a6445025a3
commit
d61c9998d9
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue