diff options
author | Tapani Pälli <[email protected]> | 2015-10-20 08:32:15 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2015-10-21 06:10:52 +0300 |
commit | 96bbb3707f402149ae48bc3991febeed86c4fa21 (patch) | |
tree | 24ec3397030522f5ed514cc51ae2be623779ce05 /src/glsl | |
parent | f1682fdafa54bb2e710707c441ed652358e57502 (diff) |
glsl: skip buffer variables when filling UniformRemapTable
UniformRemapTable is used only for remapping user specified uniform
locations to driver internally used ones, shader storage buffer
variables should not utilize uniform locations.
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Marta Lofstedt <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/link_uniforms.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index fe00aa30d07..f7b87a1811a 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -1180,7 +1180,8 @@ link_assign_uniform_locations(struct gl_shader_program *prog, /* Reserve all the explicit locations of the active uniforms. */ for (unsigned i = 0; i < num_uniforms; i++) { - if (uniforms[i].type->is_subroutine()) + if (uniforms[i].type->is_subroutine() || + uniforms[i].is_shader_storage) continue; if (uniforms[i].remap_location != UNMAPPED_UNIFORM_LOC) { @@ -1200,8 +1201,10 @@ link_assign_uniform_locations(struct gl_shader_program *prog, /* Reserve locations for rest of the uniforms. */ for (unsigned i = 0; i < num_uniforms; i++) { - if (uniforms[i].type->is_subroutine()) + if (uniforms[i].type->is_subroutine() || + uniforms[i].is_shader_storage) continue; + /* Built-in uniforms should not get any location. */ if (uniforms[i].builtin) continue; |