summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_reader.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 22009eebcb9..10bf72aeeb8 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -820,6 +820,11 @@ ir_reader::read_constant(s_expression *expr)
}
++k;
}
+ if (k != type->components()) {
+ ir_read_error(values, "expected %d constant values, found %d",
+ type->components(), k);
+ return NULL;
+ }
return new(mem_ctx) ir_constant(type, &data);
}