diff options
author | Kenneth Graunke <[email protected]> | 2010-07-21 17:38:38 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-07-28 15:46:26 -0700 |
commit | 3b6c29b8f00a2475b24022cace69f372b470a9b1 (patch) | |
tree | 4dc040dcc6c187ad9ab4c554264b503af78bebca | |
parent | d6792a7f7c2b73486987d2bc07fc77d46456b65d (diff) |
ir_constant_expression: Add support for "asin" builtin.
-rw-r--r-- | src/glsl/ir_constant_expression.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index e4c4a4d8975..2276f4d32e2 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -818,7 +818,9 @@ ir_call::constant_expression_value() } return new(mem_ctx) ir_constant(false); } else if (strcmp(callee, "asin") == 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] = asinf(op[0]->value.f[c]); } else if (strcmp(callee, "atan") == 0) { return NULL; /* FINISHME: implement this */ } else if (strcmp(callee, "dFdx") == 0 || strcmp(callee, "dFdy") == 0) { |