From: Kenneth Graunke Date: Thu, 22 Jul 2010 00:39:47 +0000 (-0700) Subject: ir_constant_expression: Add support for "acos" builtin. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6ea9dfe473ccb0b5121461653696fe07ee4f328;p=mesa.git ir_constant_expression: Add support for "acos" builtin. --- 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++)