summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-09-03 16:14:40 -0700
committerKenneth Graunke <[email protected]>2010-09-04 02:19:38 -0700
commitb758de16e3e6e27e9ead24aa6241b5d4db0d8836 (patch)
tree55f0e03bc905b33aba8301bc16be770d1d00be52 /src
parenta878107d6cfc7e815f343613341c7924d0789d0b (diff)
ir_reader: Drop support for reading the old assignment format.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ir_reader.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index c94d4b44138..1b081572725 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -581,8 +581,7 @@ static ir_assignment *
read_assignment(_mesa_glsl_parse_state *st, s_list *list)
{
void *ctx = st;
- const unsigned list_length = list->length();
- if (list_length < 4 || list_length > 5) {
+ if (list->length() != 5) {
ir_read_error(st, list, "expected (assign <condition> (<write mask>) "
"<lhs> <rhs>)");
return NULL;
@@ -590,8 +589,7 @@ read_assignment(_mesa_glsl_parse_state *st, s_list *list)
s_expression *cond_expr = (s_expression*) list->subexpressions.head->next;
s_list *mask_list = SX_AS_LIST(cond_expr->next);
- s_expression *lhs_expr = (s_expression*)
- (list_length == 4 ? cond_expr->next : cond_expr->next->next);
+ s_expression *lhs_expr = (s_expression*) cond_expr->next->next;
s_expression *rhs_expr = (s_expression*) lhs_expr->next;
ir_rvalue *condition = read_rvalue(st, cond_expr);
@@ -600,13 +598,13 @@ read_assignment(_mesa_glsl_parse_state *st, s_list *list)
return NULL;
}
- if (list_length == 5 && mask_list == NULL || mask_list->length() > 1) {
+ if (mask_list == NULL || mask_list->length() > 1) {
ir_read_error(st, mask_list, "expected () or (<write mask>)");
return NULL;
}
unsigned mask = 0;
- if (list_length == 5 && mask_list->length() == 1) {
+ if (mask_list->length() == 1) {
s_symbol *mask_symbol = SX_AS_SYMBOL(mask_list->subexpressions.head);
if (mask_symbol == NULL) {
ir_read_error(st, list, "expected a write mask; found non-symbol");