summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorAlejandro Piñeiro <[email protected]>2018-03-23 12:35:48 +0100
committerAlejandro Piñeiro <[email protected]>2019-07-12 23:42:41 +0200
commit691cee751a93aa100594a8fcede0869047d86674 (patch)
treed42786b868dba415997d20f48eddc7d3c3997ee0 /src/compiler
parenta638971929a4f7a3f3f4796f92c4edec8ec4c8ae (diff)
nir/linker: add ubo/ssbo to the program resource list
v2: "nir/linker: Use the stageref when adding UBO/SSBO resources" squashed on this one (Timothy) Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/gl_nir_linker.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c
index 92e90714e10..49ba9501f7a 100644
--- a/src/compiler/glsl/gl_nir_linker.c
+++ b/src/compiler/glsl/gl_nir_linker.c
@@ -65,5 +65,19 @@ nir_build_program_resource_list(struct gl_context *ctx,
}
+ for (unsigned i = 0; i < prog->data->NumUniformBlocks; i++) {
+ if (!link_util_add_program_resource(prog, resource_set, GL_UNIFORM_BLOCK,
+ &prog->data->UniformBlocks[i],
+ prog->data->UniformBlocks[i].stageref))
+ return;
+ }
+
+ for (unsigned i = 0; i < prog->data->NumShaderStorageBlocks; i++) {
+ if (!link_util_add_program_resource(prog, resource_set, GL_SHADER_STORAGE_BLOCK,
+ &prog->data->ShaderStorageBlocks[i],
+ prog->data->ShaderStorageBlocks[i].stageref))
+ return;
+ }
+
_mesa_set_destroy(resource_set, NULL);
}