From: Ian Romanick Date: Tue, 17 May 2016 01:01:10 +0000 (-0700) Subject: glsl: Assert that inputs have a location assigned X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ef4b5bc932bac100570d377551959c5655e37a3;p=mesa.git glsl: Assert that inputs have a location assigned This catches a problem previously undetected until deep in the backend. Signed-off-by: Ian Romanick Reviewed-by: Timothy Arceri --- diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp index 6768d82f338..183b13b82e3 100644 --- a/src/compiler/glsl/ir_set_program_inouts.cpp +++ b/src/compiler/glsl/ir_set_program_inouts.cpp @@ -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 &&