glsl: Assert that inputs have a location assigned

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>
This commit is contained in:
Ian Romanick 2016-05-16 18:01:10 -07:00
parent cf9220b11f
commit 2ef4b5bc93

View file

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