summaryrefslogtreecommitdiff
path: root/ir_reader.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-04-28 13:16:31 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-28 18:14:54 -0700
commitbf783ecea69c6b4a3fb5f616e91707cf6d806040 (patch)
tree04cdca5666f0f6f9e8713d6a338d98490e27715b /ir_reader.cpp
parent92eb64cd33555e6bb960aa90d7d84cc9b4d332f8 (diff)
ir_reader: Slightly better error message when failing to read swizzles.
Diffstat (limited to 'ir_reader.cpp')
-rw-r--r--ir_reader.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ir_reader.cpp b/ir_reader.cpp
index e762573677..2c942914ae 100644
--- a/ir_reader.cpp
+++ b/ir_reader.cpp
@@ -725,8 +725,12 @@ read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
if (rvalue == NULL)
return NULL;
- return ir_swizzle::create(rvalue, swiz->value(),
- rvalue->type->vector_elements);
+ ir_swizzle *ir = ir_swizzle::create(rvalue, swiz->value(),
+ rvalue->type->vector_elements);
+ if (ir == NULL)
+ ir_read_error(st, list, "invalid swizzle");
+
+ return ir;
}
static ir_constant *