summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-05-16 18:01:10 -0700
committerIan Romanick <[email protected]>2016-05-18 10:53:34 -0700
commit2ef4b5bc932bac100570d377551959c5655e37a3 (patch)
tree508518dbae1d4c6350c67740b6fc084402125c07 /src/compiler
parentcf9220b11f599ca77134528f5b4ad505f1345e1c (diff)
glsl: Assert that inputs have a location assigned
This catches a problem previously undetected until deep in the backend. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/ir_set_program_inouts.cpp2
1 files changed, 2 insertions, 0 deletions
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 &&