Mesa (10.4): ir_to_mesa: Remove sat to clamp lowering pass

Emil Velikov evelikov at kemper.freedesktop.org
Thu Dec 11 14:10:07 UTC 2014


Module: Mesa
Branch: 10.4
Commit: 65f03e673310fe1cdf1416d30f14a7f3edc2cd4e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=65f03e673310fe1cdf1416d30f14a7f3edc2cd4e

Author: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
Date:   Mon Dec  8 13:26:28 2014 +0200

ir_to_mesa: Remove sat to clamp lowering pass

Fixes an infinite loop in swrast where the lowering pass unpacks saturate into
clamp but the opt_algebraic pass tries to do the opposite.

v3 (Ian):
This is a revert of commit cfa8c1cb "ir_to_mesa: lower ir_unop_saturate" on
the ir_to_mesa.cpp portion. prog_execute.c can handle saturates in vertex
shaders, so classic swrast shouldn't need this lowering pass.

Cc: "10.4" <mesa-stable at lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83463
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
(cherry picked from commit 39f7b72428d1a55357a24cd26c43880595602090)

---

 src/mesa/program/ir_to_mesa.cpp |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 5cd9058..68e2597 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2946,9 +2946,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
 	 GLenum target = _mesa_shader_stage_to_program(prog->_LinkedShaders[i]->Stage);
 	 lower_instructions(ir, (MOD_TO_FRACT | DIV_TO_MUL_RCP | EXP_TO_EXP2
 				 | LOG_TO_LOG2 | INT_DIV_TO_MUL_RCP
-				 | ((options->EmitNoPow) ? POW_TO_EXP2 : 0)
-				 | ((target == GL_VERTEX_PROGRAM_ARB) ? SAT_TO_CLAMP
-                                    : 0)));
+				 | ((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