Mesa (7.9): r300/compiler: propagate SaturateMode down to the result of shadow comparison
Marek Olšák
mareko at kemper.freedesktop.org
Mon Apr 4 17:14:54 UTC 2011
Module: Mesa
Branch: 7.9
Commit: 897e464a5d39146e4b35525240e102f26b8cffe4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=897e464a5d39146e4b35525240e102f26b8cffe4
Author: Marek Olšák <maraeo at gmail.com>
Date: Mon Apr 4 18:35:16 2011 +0200
r300/compiler: propagate SaturateMode down to the result of shadow comparison
NOTE: This is a candidate for the stable branches.
(cherry picked from commit 2679760834e9c04c81cc9af4bc19d312530ea055)
---
.../drivers/dri/r300/compiler/radeon_program_tex.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
index 8643884..6ca18eb 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
@@ -154,9 +154,11 @@ int radeonTransformTEX(
/* Save the output register. */
struct rc_dst_register output_reg = inst->U.I.DstReg;
+ unsigned saturate_mode = inst->U.I.SaturateMode;
/* Redirect TEX to a new temp. */
tmp_texsample = rc_find_free_temporary(c);
+ inst->U.I.SaturateMode = 0;
inst->U.I.DstReg.File = RC_FILE_TEMPORARY;
inst->U.I.DstReg.Index = tmp_texsample;
inst->U.I.DstReg.WriteMask = RC_MASK_XYZW;
@@ -232,6 +234,7 @@ int radeonTransformTEX(
inst_cmp = rc_insert_new_instruction(c, inst_add);
inst_cmp->U.I.Opcode = RC_OPCODE_CMP;
+ inst_cmp->U.I.SaturateMode = saturate_mode;
inst_cmp->U.I.DstReg = output_reg;
inst_cmp->U.I.SrcReg[0].File = RC_FILE_TEMPORARY;
inst_cmp->U.I.SrcReg[0].Index = tmp_sum;
More information about the mesa-commit
mailing list