summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-12-11 13:22:19 +0100
committerMarek Olšák <maraeo@gmail.com>2010-12-16 17:29:32 +0100
commitccff6dcf0de864c27d3ac7c669604bb141975926 (patch)
treef495027232182441c4ed72ff9b8fcb88eff6aeab /src/mesa/drivers/dri
parentc547e230bbc7c57b511e5ad199666a538ea20775 (diff)
r300/compiler: fix swizzle lowering with a presubtract source operand
If a source operand has a non-native swizzle (e.g. the KIL instruction cannot have a swizzle other than .xyzw), the lowering pass uses one or more MOV instructions to move the operand to an intermediate temporary with native swizzles. This commit fixes that the presubtract information was lost during the lowering. NOTE: This is a candidate for both the 7.9 and 7.10 branches. (cherry picked from commit d0990db6bd7d6e9e1cd780dc6b50ce00408a3cbc)
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c
index a0f7bd81741..133a9f72ec7 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c
@@ -56,6 +56,7 @@ static void rewrite_source(struct radeon_compiler * c,
mov->U.I.DstReg.Index = tempreg;
mov->U.I.DstReg.WriteMask = split.Phase[phase];
mov->U.I.SrcReg[0] = inst->U.I.SrcReg[src];
+ mov->U.I.PreSub = inst->U.I.PreSub;
phase_refmask = 0;
for(unsigned int chan = 0; chan < 4; ++chan) {