summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
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/mesa/state_tracker
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/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c4
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 6affb4d84d5..69e26cb6c26 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -234,11 +234,11 @@ static void st_bind_ubos(struct st_context *st,
if (!shader)
return;
- for (i = 0; i < shader->NumUniformBlocks; i++) {
+ for (i = 0; i < shader->NumBufferInterfaceBlocks; i++) {
struct gl_uniform_buffer_binding *binding;
struct st_buffer_object *st_obj;
- binding = &st->ctx->UniformBufferBindings[shader->UniformBlocks[i].Binding];
+ binding = &st->ctx->UniformBufferBindings[shader->BufferInterfaceBlocks[i].Binding];
st_obj = st_buffer_object(binding->BufferObject);
cb.buffer = st_obj->buffer;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index cdd80f167d0..06f510db536 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5388,10 +5388,10 @@ st_translate_program(
}
if (program->shader) {
- unsigned num_ubos = program->shader->NumUniformBlocks;
+ unsigned num_ubos = program->shader->NumBufferInterfaceBlocks;
for (i = 0; i < num_ubos; i++) {
- unsigned size = program->shader->UniformBlocks[i].UniformBufferSize;
+ unsigned size = program->shader->BufferInterfaceBlocks[i].UniformBufferSize;
unsigned num_const_vecs = (size + 15) / 16;
unsigned first, last;
assert(num_const_vecs > 0);