From 2ef4b5bc932bac100570d377551959c5655e37a3 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 16 May 2016 18:01:10 -0700 Subject: [PATCH] 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 --- src/compiler/glsl/ir_set_program_inouts.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 && -- 2.30.2