wined3d: Reference the constant buffer bo in context_gl_load_shader_resources().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-12-02 19:59:59 +03:30 committed by Alexandre Julliard
parent e29877ee42
commit 5a9c2f2de1
1 changed files with 6 additions and 2 deletions

View File

@ -3703,8 +3703,12 @@ static void context_gl_load_shader_resources(struct wined3d_context_gl *context_
for (j = 0; j < WINED3D_MAX_CBS; ++j)
{
if (state->cb[i][j])
wined3d_buffer_load(state->cb[i][j], &context_gl->c, state);
if (!state->cb[i][j])
continue;
buffer_gl = wined3d_buffer_gl(state->cb[i][j]);
wined3d_buffer_load(&buffer_gl->b, &context_gl->c, state);
wined3d_context_gl_reference_bo(context_gl, &buffer_gl->bo);
}
for (j = 0; j < shader->reg_maps.sampler_map.count; ++j)