Mesa (master): ir_to_mesa: Translate ir_triop_lrp to OPCODE_LRP.
Matt Turner
mattst88 at kemper.freedesktop.org
Thu Feb 28 23:21:28 UTC 2013
Module: Mesa
Branch: master
Commit: c001985cbf299f283d64289e1ba5f2a236880ebb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c001985cbf299f283d64289e1ba5f2a236880ebb
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Feb 19 14:15:16 2013 -0800
ir_to_mesa: Translate ir_triop_lrp to OPCODE_LRP.
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/program/ir_to_mesa.cpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 30305d2..5432323 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1479,7 +1479,10 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
break;
case ir_triop_lrp:
- assert(!"ir_triop_lrp should have been lowered.");
+ /* ir_triop_lrp operands are (x, y, a) while
+ * OPCODE_LRP operands are (a, y, x) to match ARB_fragment_program.
+ */
+ emit(ir, OPCODE_LRP, result_dst, op[2], op[1], op[0]);
break;
case ir_quadop_vector:
@@ -2997,7 +3000,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
/* Lowering */
do_mat_op_to_vec(ir);
lower_instructions(ir, (MOD_TO_FRACT | DIV_TO_MUL_RCP | EXP_TO_EXP2
- | LOG_TO_LOG2 | INT_DIV_TO_MUL_RCP | LRP_TO_ARITH
+ | LOG_TO_LOG2 | INT_DIV_TO_MUL_RCP
| ((options->EmitNoPow) ? POW_TO_EXP2 : 0)));
progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress;
More information about the mesa-commit
mailing list