summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/compiler
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2013-03-19 22:39:31 -0400
committerTom Stellard <[email protected]>2013-04-12 08:33:31 -0700
commitc6a86fb5639977f37a1403012669cdee86bbd89f (patch)
tree06261a03baceaed89f68a77660aafbd3c37bdccf /src/gallium/drivers/r300/compiler
parentac1118d53c0b22db8dcd6fcdcd2d1a245037dbc1 (diff)
r300g: Fix bug in OMOD optimization
https://bugs.freedesktop.org/show_bug.cgi?id=60503 NOTE: This is a candidate for the stable branches.
Diffstat (limited to 'src/gallium/drivers/r300/compiler')
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_optimize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c
index b626e33540c..3bbfe898cc2 100644
--- a/src/gallium/drivers/r300/compiler/radeon_optimize.c
+++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c
@@ -725,6 +725,7 @@ static int peephole_mul_omod(
struct rc_list * writer_list;
struct rc_variable * var;
struct peephole_mul_cb_data cb_data;
+ unsigned writemask_sum;
for (i = 0; i < 2; i++) {
unsigned int j;
@@ -832,10 +833,11 @@ static int peephole_mul_omod(
}
/* Rewrite the instructions */
+ writemask_sum = rc_variable_writemask_sum(writer_list->Item);
for (var = writer_list->Item; var; var = var->Friend) {
struct rc_variable * writer = var;
unsigned conversion_swizzle = rc_make_conversion_swizzle(
- writer->Inst->U.I.DstReg.WriteMask,
+ writemask_sum,
inst_mul->U.I.DstReg.WriteMask);
writer->Inst->U.I.Omod = omod_op;
writer->Inst->U.I.DstReg.File = inst_mul->U.I.DstReg.File;