glsl: Assert that inputs have a location assigned
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 17 May 2016 01:01:10 +0000 (18:01 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 18 May 2016 17:53:34 +0000 (10:53 -0700)
This catches a problem previously undetected until deep in the backend.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/glsl/ir_set_program_inouts.cpp

index 6768d82f338ea80d757ee76a202dcdb39f9524a2..183b13b82e390c95afce7a421ef869e51ebd7372 100644 (file)
@@ -94,6 +94,8 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
     */
 
    for (int i = 0; i < len; i++) {
+      assert(var->data.location != -1);
+
       int idx = var->data.location + var->data.index + offset + i;
       bool is_patch_generic = var->data.patch &&
                               idx != VARYING_SLOT_TESS_LEVEL_INNER &&