diff options
author | Kenneth Graunke <[email protected]> | 2010-07-21 20:12:43 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-07-28 15:46:28 -0700 |
commit | a7650af706b359056db8b9da6d1d83669106d463 (patch) | |
tree | bffda0854755b7fe76e80cda78ec0bc3566ea826 /src/glsl/ir_constant_expression.cpp | |
parent | 5489ad086f77e548905c98ccd27cd626d706d5f9 (diff) |
ir_constant_expression: Simplify code that implements the "dot" builtin.
There's no need to use an ir_expression; we have a handy C function.
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r-- | src/glsl/ir_constant_expression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 83d1b34bed6..d20d1953e24 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -858,7 +858,7 @@ ir_call::constant_expression_value() } return new(mem_ctx) ir_constant(sqrtf(length_squared)); } else if (strcmp(callee, "dot") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_dot, type, op[0], op[1]); + return new(mem_ctx) ir_constant(dot(op[0], op[1])); } else if (strcmp(callee, "equal") == 0) { assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); for (unsigned c = 0; c < op[0]->type->components(); c++) { |