diff options
author | Tom Stellard <[email protected]> | 2011-10-01 15:21:05 -0700 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2011-10-02 15:21:15 -0700 |
commit | 13814b0103812adbb5aba0dba4664249e8566290 (patch) | |
tree | 0ccfa212e8aec3deefbb14a2a1379735c94d779a /src/gallium/drivers/r300/compiler | |
parent | 8b0418e478f9def2783060d90d1b267a54a9c6c3 (diff) |
r300/compiler: Rewrite source swizzles when using OMOD
Diffstat (limited to 'src/gallium/drivers/r300/compiler')
-rw-r--r-- | src/gallium/drivers/r300/compiler/radeon_optimize.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c index 7df9681bee7..b7a0e20797c 100644 --- a/src/gallium/drivers/r300/compiler/radeon_optimize.c +++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c @@ -801,8 +801,13 @@ static int peephole_mul_omod( /* Rewrite the instructions */ for (var = writer_list->Item; var; var = var->Friend) { struct rc_variable * writer = writer_list->Item; + unsigned conversion_swizzle = rc_make_conversion_swizzle( + writer->Inst->U.I.DstReg.WriteMask, + inst_mul->U.I.DstReg.WriteMask); writer->Inst->U.I.Omod = omod_op; - writer->Inst->U.I.DstReg = inst_mul->U.I.DstReg; + writer->Inst->U.I.DstReg.File = inst_mul->U.I.DstReg.File; + writer->Inst->U.I.DstReg.Index = inst_mul->U.I.DstReg.Index; + rc_normal_rewrite_writemask(writer->Inst, conversion_swizzle); writer->Inst->U.I.SaturateMode = inst_mul->U.I.SaturateMode; } |