mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
r300-gallium: r500-fs: Clamp only when saturation flags are set.
This commit is contained in:
parent
3cce08e313
commit
567aead92a
1 changed files with 7 additions and 3 deletions
|
|
@ -228,9 +228,7 @@ static INLINE void r500_emit_alu(struct r500_fragment_shader* fs,
|
|||
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));
|
||||
|
|
@ -421,6 +419,12 @@ static void r500_fs_instruction(struct r500_fragment_shader* fs,
|
|||
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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue