summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2013-05-20 08:05:03 -0700
committerTom Stellard <[email protected]>2013-06-30 21:41:57 -0700
commit38677efa3968e6fa063792de972e5b10cc9ed4f1 (patch)
treeb992769f8d1a79736acb27f4b304be194ea4a676
parent18a04f50de1b7da9663ebbb73380f2fced223b1e (diff)
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (cherry picked from commit 24fa43675f32bc81c7252f3ddce4c80ed8c7737d)
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c8
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 6442e0dca80..1970a346d1d 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(