mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
ir_reader: rvalues are instructions too!
This commit is contained in:
parent
3ea0582803
commit
46ef8f19d7
1 changed files with 8 additions and 6 deletions
|
|
@ -177,15 +177,17 @@ read_instruction(_mesa_glsl_parse_state *st, s_expression *expr)
|
|||
}
|
||||
|
||||
ir_instruction *inst = NULL;
|
||||
if (strcmp(tag->value(), "declare") == 0)
|
||||
if (strcmp(tag->value(), "declare") == 0) {
|
||||
inst = read_declaration(st, list);
|
||||
else if (strcmp(tag->value(), "if") == 0)
|
||||
} else if (strcmp(tag->value(), "if") == 0) {
|
||||
inst = read_if(st, list);
|
||||
else if (strcmp(tag->value(), "return") == 0)
|
||||
} else if (strcmp(tag->value(), "return") == 0) {
|
||||
inst = read_return(st, list);
|
||||
else
|
||||
ir_read_error(expr, "unrecognized instruction tag: %s", tag->value());
|
||||
|
||||
} else {
|
||||
inst = read_rvalue(st, list);
|
||||
if (inst == NULL)
|
||||
ir_read_error(list, "when reading instruction");
|
||||
}
|
||||
return inst;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue