summaryrefslogtreecommitdiff
path: root/src/glsl/ir_constant_expression.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-07-21 17:49:56 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-07-28 15:46:27 -0700
commit5d551daf38e30d6cb863038afe1a8e32c806e6ae (patch)
treefec1eab1bf4285ac4571c9e04b738f902a1cad13 /src/glsl/ir_constant_expression.cpp
parentba4178345a1eb8e697a8cb01b5594c0a3b4b1d29 (diff)
ir_constant_expression: Add support for the "sinh" builtin.
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r--src/glsl/ir_constant_expression.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index ee99ed2cdd..b7ceefc393 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -916,7 +916,9 @@ ir_call::constant_expression_value()
} else if (strcmp(callee, "sin") == 0) {
expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL);
} else if (strcmp(callee, "sinh") == 0) {
- return NULL; /* FINISHME: implement this */
+ assert(op[0]->type->is_float());
+ for (unsigned c = 0; c < op[0]->type->components(); c++)
+ data.f[c] = sinhf(op[0]->value.f[c]);
} else if (strcmp(callee, "smoothstep") == 0) {
return NULL; /* FINISHME: implement this */
} else if (strcmp(callee, "sqrt") == 0) {