r500: Set Saturate correctly in radeon_program_pair
authorNicolai Haehnle <nhaehnle@gmail.com>
Sat, 12 Jul 2008 10:04:28 +0000 (12:04 +0200)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sat, 12 Jul 2008 10:04:28 +0000 (12:04 +0200)
src/mesa/drivers/dri/r300/radeon_program_pair.c

index 4eaac50412e7d410a28c2df6a962a8dae45b38e5..85ddf1dc50e9fe7b865a2455af6526b8f85ce1db 100644 (file)
@@ -682,9 +682,14 @@ static GLboolean fill_instruction_into_pair(struct pair_state *s, struct radeon_
                        pair->RGB.Opcode = OPCODE_REPL_ALPHA;
                else
                        pair->RGB.Opcode = inst->Opcode;
+               if (inst->SaturateMode == SATURATE_ZERO_ONE)
+                       pair->RGB.Saturate = 1;
        }
-       if (pairinst->NeedAlpha)
+       if (pairinst->NeedAlpha) {
                pair->Alpha.Opcode = inst->Opcode;
+               if (inst->SaturateMode == SATURATE_ZERO_ONE)
+                       pair->Alpha.Saturate = 1;
+       }
 
        int nargs = _mesa_num_inst_src_regs(inst->Opcode);
        int i;