summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/link_uniform_initializers.cpp2
-rw-r--r--src/glsl/link_uniforms.cpp4
-rw-r--r--src/glsl/linker.cpp10
-rw-r--r--src/glsl/standalone_scaffolding.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/glsl/link_uniform_initializers.cpp b/src/glsl/link_uniform_initializers.cpp
index 05000fc39ef..34830829b4a 100644
--- a/src/glsl/link_uniform_initializers.cpp
+++ b/src/glsl/link_uniform_initializers.cpp
@@ -48,7 +48,7 @@ static unsigned
get_uniform_block_index(const gl_shader_program *shProg,
const char *uniformBlockName)
{
- for (unsigned i = 0; i < shProg->NumUniformBlocks; i++) {
+ for (unsigned i = 0; i < shProg->NumBufferInterfaceBlocks; i++) {
if (!strcmp(shProg->UniformBlocks[i].Name, uniformBlockName))
return i;
}
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 94d7287221a..47d49c84e65 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -500,7 +500,7 @@ public:
if (var->is_interface_instance() && var->type->is_array()) {
unsigned l = strlen(var->get_interface_type()->name);
- for (unsigned i = 0; i < prog->NumUniformBlocks; i++) {
+ for (unsigned i = 0; i < prog->NumBufferInterfaceBlocks; i++) {
if (strncmp(var->get_interface_type()->name,
prog->UniformBlocks[i].Name,
l) == 0
@@ -510,7 +510,7 @@ public:
}
}
} else {
- for (unsigned i = 0; i < prog->NumUniformBlocks; i++) {
+ for (unsigned i = 0; i < prog->NumBufferInterfaceBlocks; i++) {
if (strcmp(var->get_interface_type()->name,
prog->UniformBlocks[i].Name) == 0) {
ubo_block_index = i;
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 75396fb3936..9bacd22b9d4 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1187,7 +1187,7 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog)
for (unsigned int j = 0; j < sh->NumUniformBlocks; j++) {
int index = link_cross_validate_uniform_block(prog,
&prog->UniformBlocks,
- &prog->NumUniformBlocks,
+ &prog->NumBufferInterfaceBlocks,
&sh->UniformBlocks[j]);
if (index == -1) {
@@ -2802,7 +2802,7 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
unsigned shader_blocks[MESA_SHADER_STAGES] = {0};
unsigned total_shader_storage_blocks = 0;
- for (unsigned i = 0; i < prog->NumUniformBlocks; i++) {
+ for (unsigned i = 0; i < prog->NumBufferInterfaceBlocks; i++) {
/* Don't check SSBOs for Uniform Block Size */
if (!prog->UniformBlocks[i].IsShaderStorage &&
prog->UniformBlocks[i].UniformBufferSize > ctx->Const.MaxUniformBlockSize) {
@@ -2836,7 +2836,7 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
if (total_uniform_blocks > ctx->Const.MaxCombinedUniformBlocks) {
linker_error(prog, "Too many combined uniform blocks (%d/%d)\n",
- prog->NumUniformBlocks,
+ prog->NumBufferInterfaceBlocks,
ctx->Const.MaxCombinedUniformBlocks);
} else {
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
@@ -2939,7 +2939,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
total_image_units += sh->NumImages;
- for (unsigned j = 0; j < prog->NumUniformBlocks; j++) {
+ for (unsigned j = 0; j < prog->NumBufferInterfaceBlocks; j++) {
int stage_index = prog->UniformBlockStageIndex[i][j];
if (stage_index != -1 && sh->UniformBlocks[stage_index].IsShaderStorage)
total_shader_storage_blocks++;
@@ -3418,7 +3418,7 @@ build_program_resource_list(struct gl_shader_program *shProg)
}
/* Add program uniform blocks and shader storage blocks. */
- for (unsigned i = 0; i < shProg->NumUniformBlocks; i++) {
+ for (unsigned i = 0; i < shProg->NumBufferInterfaceBlocks; i++) {
bool is_shader_storage = shProg->UniformBlocks[i].IsShaderStorage;
GLenum type = is_shader_storage ? GL_SHADER_STORAGE_BLOCK : GL_UNIFORM_BLOCK;
if (!add_program_resource(shProg, type,
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index e52869f288e..ea9334fd7b7 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -101,7 +101,7 @@ _mesa_clear_shader_program_data(struct gl_shader_program *shProg)
ralloc_free(shProg->UniformBlocks);
shProg->UniformBlocks = NULL;
- shProg->NumUniformBlocks = 0;
+ shProg->NumBufferInterfaceBlocks = 0;
for (i = 0; i < MESA_SHADER_STAGES; i++) {
ralloc_free(shProg->UniformBlockStageIndex[i]);
shProg->UniformBlockStageIndex[i] = NULL;