summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp1
-rw-r--r--src/compiler/glsl/link_uniforms.cpp2
-rw-r--r--src/compiler/glsl/linker.cpp14
-rw-r--r--src/compiler/glsl/lower_ubo_reference.cpp2
4 files changed, 9 insertions, 10 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 2620b417498..cf3511e10b9 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -150,7 +150,6 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
if (shader_prog->Label)
shader->info->label = ralloc_strdup(shader, shader_prog->Label);
shader->info->num_textures = util_last_bit(sh->Program->SamplersUsed);
- shader->info->num_ssbos = sh->NumShaderStorageBlocks;
shader->info->clip_distance_array_size = sh->Program->ClipDistanceArraySize;
shader->info->cull_distance_array_size = sh->Program->CullDistanceArraySize;
shader->info->has_transform_feedback_varyings =
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index f614b9a98bc..dba46771ec2 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -901,7 +901,7 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader,
var->data.mode == ir_var_shader_storage);
unsigned num_blocks = var->data.mode == ir_var_uniform ?
- shader->Program->info.num_ubos : shader->NumShaderStorageBlocks;
+ shader->Program->info.num_ubos : shader->Program->info.num_ssbos;
struct gl_uniform_block **blks = var->data.mode == ir_var_uniform ?
shader->Program->sh.UniformBlocks : shader->ShaderStorageBlocks;
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index c4e221ee369..9de89f40abd 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1137,7 +1137,7 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog,
if (prog->_LinkedShaders[i]) {
if (validate_ssbo) {
max_num_buffer_blocks +=
- prog->_LinkedShaders[i]->NumShaderStorageBlocks;
+ prog->_LinkedShaders[i]->Program->info.num_ssbos;
} else {
max_num_buffer_blocks +=
prog->_LinkedShaders[i]->Program->info.num_ubos;
@@ -1158,7 +1158,7 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog,
unsigned sh_num_blocks;
struct gl_uniform_block **sh_blks;
if (validate_ssbo) {
- sh_num_blocks = prog->_LinkedShaders[i]->NumShaderStorageBlocks;
+ sh_num_blocks = prog->_LinkedShaders[i]->Program->info.num_ssbos;
sh_blks = sh->ShaderStorageBlocks;
} else {
sh_num_blocks = prog->_LinkedShaders[i]->Program->info.num_ubos;
@@ -2287,7 +2287,7 @@ link_intrastage_shaders(void *mem_ctx,
for (unsigned i = 0; i < num_ssbo_blocks; i++) {
linked->ShaderStorageBlocks[i] = &ssbo_blocks[i];
}
- linked->NumShaderStorageBlocks = num_ssbo_blocks;
+ linked->Program->info.num_ssbos = num_ssbo_blocks;
/* At this point linked should contain all of the linked IR, so
* validate it to make sure nothing went wrong.
@@ -3099,7 +3099,7 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
}
}
- total_shader_storage_blocks += sh->NumShaderStorageBlocks;
+ total_shader_storage_blocks += sh->Program->info.num_ssbos;
total_uniform_blocks += sh->Program->info.num_ubos;
const unsigned max_uniform_blocks =
@@ -3112,10 +3112,10 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
const unsigned max_shader_storage_blocks =
ctx->Const.Program[i].MaxShaderStorageBlocks;
- if (max_shader_storage_blocks < sh->NumShaderStorageBlocks) {
+ if (max_shader_storage_blocks < sh->Program->info.num_ssbos) {
linker_error(prog, "Too many %s shader storage blocks (%d/%d)\n",
_mesa_shader_stage_to_string(i),
- sh->NumShaderStorageBlocks, max_shader_storage_blocks);
+ sh->Program->info.num_ssbos, max_shader_storage_blocks);
}
}
@@ -3224,7 +3224,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
ctx->Const.Program[i].MaxImageUniforms);
total_image_units += sh->NumImages;
- total_shader_storage_blocks += sh->NumShaderStorageBlocks;
+ total_shader_storage_blocks += sh->Program->info.num_ssbos;
if (i == MESA_SHADER_FRAGMENT) {
foreach_in_list(ir_instruction, node, sh->ir) {
diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp
index 5beda458667..02a97bd352e 100644
--- a/src/compiler/glsl/lower_ubo_reference.cpp
+++ b/src/compiler/glsl/lower_ubo_reference.cpp
@@ -289,7 +289,7 @@ lower_ubo_reference_visitor::setup_for_load_or_store(void *mem_ctx,
unsigned num_blocks;
struct gl_uniform_block **blocks;
if (this->buffer_access_type != ubo_load_access) {
- num_blocks = shader->NumShaderStorageBlocks;
+ num_blocks = shader->Program->info.num_ssbos;
blocks = shader->ShaderStorageBlocks;
} else {
num_blocks = shader->Program->info.num_ubos;