Module: Mesa
Branch: 9.1
Commit: 38677efa3968e6fa063792de972e5b10cc9ed4f1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=38677efa3968e6fa063792de972e5b10cc9ed4f1

Author: Tom Stellard <thomas.stell...@amd.com>
Date:   Mon May 20 08:05:03 2013 -0700

r300g/compiler: Prevent regalloc from swizzling texture operands v2

https://bugs.freedesktop.org/show_bug.cgi?id=63520

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <mar...@gmail.com>
Reviewed-by: Alex Deucher <alexander.deuc...@amd.com>
(cherry picked from commit 24fa43675f32bc81c7252f3ddce4c80ed8c7737d)

---

 .../drivers/r300/compiler/radeon_pair_regalloc.c   |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c 
b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
index 6442e0d..1970a34 100644
--- a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
+++ b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
@@ -383,6 +383,14 @@ static enum rc_reg_class variable_get_class(
                                                        RC_INSTRUCTION_PAIR ) {
                                                old_swizzle = 
r.U.P.Arg->Swizzle;
                                        } else {
+                                               /* Source operands of TEX
+                                                * instructions can't be
+                                                * swizzle on r300/r400 GPUs.
+                                                */
+                                               if (!variable->C->is_r500) {
+                                                       can_change_writemask = 
0;
+                                                       break;
+                                               }
                                                old_swizzle = 
r.U.I.Src->Swizzle;
                                        }
                                        new_swizzle = rc_adjust_channels(

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to