glsl: Add support for constant expression evaluation on trunc().
Fixes the glsl-1.30/compiler/built-in-functions/trunc-* tests under 1.30. Reviewed-by: Chad Versace <chad@chad-versace.us> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -1373,6 +1373,8 @@ ir_call::constant_expression_value()
|
||||
data.f[m*i+j] += op[0]->value.f[i+n*j];
|
||||
}
|
||||
}
|
||||
} else if (strcmp(callee, "trunc") == 0) {
|
||||
expr = new(mem_ctx) ir_expression(ir_unop_trunc, op[0]);
|
||||
} else {
|
||||
/* Unsupported builtin - some are not allowed in constant expressions. */
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user