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 <tapani.palli@intel.com>
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
/* 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) {
/* 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;