summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-11-20 17:52:40 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-11-20 17:52:40 +0000
commite31ac052236ea615b4995f9ec301d8af4b864531 (patch)
tree5f0229e4a01b25078b710cbc4d288c0c37fc83c3 /src/mesa/drivers
parent22db53577603afef8fdf62c324ff5977de76b9d8 (diff)
Make Saturate a 2-bit field again, renamed to SaturateMode with three
possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index eed27677f9..5dd6671a9e 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -177,7 +177,7 @@ static GLuint get_result_flags( const struct prog_instruction *inst )
{
GLuint flags = 0;
- if (inst->Saturate) flags |= A0_DEST_SATURATE;
+ if (inst->Saturate == SATURATE_ZERO_ONE) flags |= A0_DEST_SATURATE;
if (inst->DstReg.WriteMask & WRITEMASK_X) flags |= A0_DEST_CHANNEL_X;
if (inst->DstReg.WriteMask & WRITEMASK_Y) flags |= A0_DEST_CHANNEL_Y;
if (inst->DstReg.WriteMask & WRITEMASK_Z) flags |= A0_DEST_CHANNEL_Z;
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index abcff64235..aef574b869 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -757,7 +757,7 @@ static GLboolean parse_program(struct r300_fragment_program *rp)
}
for (fpi=mp->Base.Instructions; fpi->Opcode != OPCODE_END; fpi++) {
- if (fpi->Saturate) {
+ if (fpi->SaturateMode == SATURATE_ZERO_ONE) {
flags = PFS_FLAG_SAT;
}