glsl: do not try to reserve explicit locations for buffer variables
authorTapani Pälli <tapani.palli@intel.com>
Tue, 20 Oct 2015 07:24:50 +0000 (10:24 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 21 Oct 2015 03:11:38 +0000 (06:11 +0300)
Explicit locations are only used with uniform variables.

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>
src/glsl/linker.cpp

index 247052bcf4f7134554d20cd10df1deb11dde1a81..07ea0e0c7e56e918d7702372c73aa45464246b8f 100644 (file)
@@ -3114,8 +3114,8 @@ check_explicit_uniform_locations(struct gl_context *ctx,
 
       foreach_in_list(ir_instruction, node, sh->ir) {
          ir_variable *var = node->as_variable();
-         if (var && (var->data.mode == ir_var_uniform || var->data.mode == ir_var_shader_storage) &&
-             var->data.explicit_location) {
+         if (var && (var->data.mode == ir_var_uniform &&
+                     var->data.explicit_location)) {
             bool ret;
             if (var->type->is_subroutine())
                ret = reserve_subroutine_explicit_locations(prog, sh, var);