From b792c3897927c1d89968bc0040faef02ec976184 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Sat, 5 Nov 2016 08:44:22 +1100 Subject: st/mesa/glsl/i965: set num_ubos directly in shader_info This also removes the duplicate field in gl_linked_shader, and gets num_ubos from shader_info instead. Reviewed-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c') diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 34fec7e7d94..e3a6033e01a 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1383,7 +1383,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw, uint32_t *ubo_surf_offsets = &stage_state->surf_offset[prog_data->binding_table.ubo_start]; - for (int i = 0; i < shader->NumUniformBlocks; i++) { + for (int i = 0; i < shader->Program->info.num_ubos; i++) { struct gl_uniform_buffer_binding *binding = &ctx->UniformBufferBindings[shader->UniformBlocks[i]->Binding]; @@ -1430,7 +1430,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw, } } - if (shader->NumUniformBlocks || shader->NumShaderStorageBlocks) + if (shader->Program->info.num_ubos || shader->NumShaderStorageBlocks) brw->ctx.NewDriverState |= BRW_NEW_SURFACES; } -- cgit v1.2.3