From f6ea9dfe473ccb0b5121461653696fe07ee4f328 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 21 Jul 2010 17:39:47 -0700 Subject: [PATCH] ir_constant_expression: Add support for "acos" builtin. --- src/glsl/ir_constant_expression.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 2276f4d32e2..301bfa80251 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -817,6 +817,10 @@ ir_call::constant_expression_value() return new(mem_ctx) ir_constant(true); } return new(mem_ctx) ir_constant(false); + } else if (strcmp(callee, "acos") == 0) { + assert(op[0]->type->is_float()); + for (unsigned c = 0; c < op[0]->type->components(); c++) + data.f[c] = acosf(op[0]->value.f[c]); } else if (strcmp(callee, "asin") == 0) { assert(op[0]->type->is_float()); for (unsigned c = 0; c < op[0]->type->components(); c++) -- 2.30.2