Mesa (9.1): r300g/compiler: Prevent regalloc from swizzling texture operands v2
Tom Stellard
tstellar at kemper.freedesktop.org
Mon Jul 1 04:53:02 UTC 2013
Module: Mesa
Branch: 9.1
Commit: 38677efa3968e6fa063792de972e5b10cc9ed4f1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=38677efa3968e6fa063792de972e5b10cc9ed4f1
Author: Tom Stellard <thomas.stellard at 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 <maraeo at gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher at 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(
More information about the mesa-commit
mailing list