R500_ALU_WMASK(dst->DstRegister.WriteMask);
}
- fs->instructions[i].inst0 |=
- R500_INST_TEX_SEM_WAIT |
- R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP;
+ fs->instructions[i].inst0 |= R500_INST_TEX_SEM_WAIT;
fs->instructions[i].inst4 =
R500_ALPHA_ADDRD(r300_fs_dst(assembler, &dst->DstRegister));
inst->Instruction.Opcode);
break;
}
+
+ /* Clamp, if saturation flags are set. */
+ if (inst->Instruction.Saturate == TGSI_SAT_ZERO_ONE) {
+ fs->instructions[fs->instruction_count - 1].inst0 |=
+ R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP;
+ }
}
static void r500_fs_finalize(struct r500_fragment_shader* fs,