summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_emit.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_emit.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index 285ba46..7367cca 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -146,38 +146,7 @@ void
fs_visitor::generate_math(fs_inst *inst,
struct brw_reg dst, struct brw_reg *src)
{
- int op;
-
- switch (inst->opcode) {
- case SHADER_OPCODE_RCP:
- op = BRW_MATH_FUNCTION_INV;
- break;
- case SHADER_OPCODE_RSQ:
- op = BRW_MATH_FUNCTION_RSQ;
- break;
- case SHADER_OPCODE_SQRT:
- op = BRW_MATH_FUNCTION_SQRT;
- break;
- case SHADER_OPCODE_EXP2:
- op = BRW_MATH_FUNCTION_EXP;
- break;
- case SHADER_OPCODE_LOG2:
- op = BRW_MATH_FUNCTION_LOG;
- break;
- case SHADER_OPCODE_POW:
- op = BRW_MATH_FUNCTION_POW;
- break;
- case SHADER_OPCODE_SIN:
- op = BRW_MATH_FUNCTION_SIN;
- break;
- case SHADER_OPCODE_COS:
- op = BRW_MATH_FUNCTION_COS;
- break;
- default:
- assert(!"not reached: unknown math function");
- op = 0;
- break;
- }
+ int op = brw_math_function(inst->opcode);
if (intel->gen >= 6) {
assert(inst->mlen == 0);