summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ir_constant_expression.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 56a423761b5..b3fe6cf9675 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -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;