[Mesa-dev] [PATCH 6/8] glsl: Assert that inputs have a location assigned
Ian Romanick
idr at freedesktop.org
Tue May 17 22:11:55 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
This catches a problem previously undetected until deep in the backend.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
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 6768d82..183b13b 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.5.5
More information about the mesa-dev
mailing list