diff options
author | Iago Toral Quiroga <[email protected]> | 2015-10-01 09:08:20 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-10-14 08:11:13 +0200 |
commit | 27dccf097d053b085c498a7bcab47197a5e83525 (patch) | |
tree | 76d76a360c20638612405e323bc6d34149a2fd2a /src/mesa/drivers | |
parent | 9de651b261286f15ae000e4a698587b805b95d2b (diff) |
mesa: Rename {Num}UniformBlocks to {Num}BufferInterfaceBlocks
Currently, these arrays in gl_shader and gl_shader_program hold both
UBOs and SSBOs, so this looks like a better name. We were already
using NumBufferInterfaceBlocks in gl_shader_program, so this makes
things more consistent as well.
In a later patch we will add {Num}UniformBlocks and
{Num}ShaderStorageBlocks which will contain only references to
UBOs and SSBOs respectively that will provide backends with
a separate index space for both types of objects.
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 0f743fb43c1..b41e842005a 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -1128,9 +1128,9 @@ brw_assign_common_binding_table_offsets(gl_shader_stage stage, next_binding_table_offset += num_textures; if (shader) { - assert(shader->NumUniformBlocks <= BRW_MAX_COMBINED_UBO_SSBO); + assert(shader->NumBufferInterfaceBlocks <= BRW_MAX_COMBINED_UBO_SSBO); stage_prog_data->binding_table.ubo_start = next_binding_table_offset; - next_binding_table_offset += shader->NumUniformBlocks; + next_binding_table_offset += shader->NumBufferInterfaceBlocks; } else { stage_prog_data->binding_table.ubo_start = 0xd0d0d0d0; } 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 d73f657edc7..3c019771603 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -929,17 +929,17 @@ brw_upload_ubo_surfaces(struct brw_context *brw, uint32_t *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->NumBufferInterfaceBlocks; i++) { struct intel_buffer_object *intel_bo; /* Because behavior for referencing outside of the binding's size in the * glBindBufferRange case is undefined, we can just bind the whole buffer * glBindBufferBase wants and be a correct implementation. */ - if (!shader->UniformBlocks[i].IsShaderStorage) { + if (!shader->BufferInterfaceBlocks[i].IsShaderStorage) { struct gl_uniform_buffer_binding *binding; binding = - &ctx->UniformBufferBindings[shader->UniformBlocks[i].Binding]; + &ctx->UniformBufferBindings[shader->BufferInterfaceBlocks[i].Binding]; if (binding->BufferObject == ctx->Shared->NullBufferObj) { brw->vtbl.emit_null_surface_state(brw, 1, 1, 1, &surf_offsets[i]); } else { @@ -956,7 +956,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw, } else { struct gl_shader_storage_buffer_binding *binding; binding = - &ctx->ShaderStorageBufferBindings[shader->UniformBlocks[i].Binding]; + &ctx->ShaderStorageBufferBindings[shader->BufferInterfaceBlocks[i].Binding]; if (binding->BufferObject == ctx->Shared->NullBufferObj) { brw->vtbl.emit_null_surface_state(brw, 1, 1, 1, &surf_offsets[i]); } else { @@ -973,7 +973,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw, } } - if (shader->NumUniformBlocks) + if (shader->NumBufferInterfaceBlocks) brw->ctx.NewDriverState |= BRW_NEW_SURFACES; } |