mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-25 09:20:30 +01:00
ir_reader: Fix for swizzles.
This commit is contained in:
parent
8df335d7f9
commit
951632253f
1 changed files with 3 additions and 3 deletions
|
|
@ -645,8 +645,7 @@ read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
unsigned num_components = strlen(swiz->value());
|
||||
if (num_components > 4) {
|
||||
if (strlen(swiz->value()) > 4) {
|
||||
ir_read_error(st, list, "expected a valid swizzle; found %s",
|
||||
swiz->value());
|
||||
return NULL;
|
||||
|
|
@ -663,7 +662,8 @@ read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
|
|||
if (rvalue == NULL)
|
||||
return NULL;
|
||||
|
||||
return ir_swizzle::create(rvalue, swiz->value(), num_components);
|
||||
return ir_swizzle::create(rvalue, swiz->value(),
|
||||
rvalue->type->vector_elements);
|
||||
}
|
||||
|
||||
static ir_constant *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue