summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_ubo_reference.cpp
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-10-01 09:08:20 +0200
committerIago Toral Quiroga <[email protected]>2015-10-14 08:11:13 +0200
commit27dccf097d053b085c498a7bcab47197a5e83525 (patch)
tree76d76a360c20638612405e323bc6d34149a2fd2a /src/glsl/lower_ubo_reference.cpp
parent9de651b261286f15ae000e4a698587b805b95d2b (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/glsl/lower_ubo_reference.cpp')
-rw-r--r--src/glsl/lower_ubo_reference.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/lower_ubo_reference.cpp b/src/glsl/lower_ubo_reference.cpp
index c8ec5c19f41..6886f1439ec 100644
--- a/src/glsl/lower_ubo_reference.cpp
+++ b/src/glsl/lower_ubo_reference.cpp
@@ -279,8 +279,8 @@ lower_ubo_reference_visitor::setup_for_load_or_store(ir_variable *var,
/* Locate the ubo block by interface name */
this->uniform_block = NULL;
- for (unsigned i = 0; i < shader->NumUniformBlocks; i++) {
- if (strcmp(field_name, shader->UniformBlocks[i].Name) == 0) {
+ for (unsigned i = 0; i < shader->NumBufferInterfaceBlocks; i++) {
+ if (strcmp(field_name, shader->BufferInterfaceBlocks[i].Name) == 0) {
ir_constant *index = new(mem_ctx) ir_constant(i);
@@ -292,9 +292,9 @@ lower_ubo_reference_visitor::setup_for_load_or_store(ir_variable *var,
this->uniform_block = index;
}
- this->is_shader_storage = shader->UniformBlocks[i].IsShaderStorage;
+ this->is_shader_storage = shader->BufferInterfaceBlocks[i].IsShaderStorage;
- struct gl_uniform_block *block = &shader->UniformBlocks[i];
+ struct gl_uniform_block *block = &shader->BufferInterfaceBlocks[i];
this->ubo_var = var->is_interface_instance()
? &block->Uniforms[0] : &block->Uniforms[var->data.location];