Mesa (floating): mesa/st: use unclamped colors
Luca Barbieri
lb at kemper.freedesktop.org
Fri Aug 27 17:25:20 UTC 2010
Module: Mesa
Branch: floating
Commit: 2fd30a8a6f29f2ae37ac8ee827f8e88c7992f844
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2fd30a8a6f29f2ae37ac8ee827f8e88c7992f844
Author: Luca Barbieri <luca at luca-barbieri.com>
Date: Thu Aug 26 17:53:41 2010 +0200
mesa/st: use unclamped colors
This assumes that Gallium is to be interpreted as given drivers the
responsibility to clamp these colors if necessary.
---
src/mesa/state_tracker/st_atom_blend.c | 2 +-
src/mesa/state_tracker/st_atom_depth.c | 2 +-
src/mesa/state_tracker/st_cb_clear.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 2140360..f0cf243 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -270,7 +270,7 @@ update_blend( struct st_context *st )
{
struct pipe_blend_color bc;
- COPY_4FV(bc.color, st->ctx->Color.BlendColor);
+ COPY_4FV(bc.color, st->ctx->Color.BlendColorUnclamped);
cso_set_blend_color(st->cso_context, &bc);
}
}
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index 1616e94..1541e31 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -142,7 +142,7 @@ update_depth_stencil_alpha(struct st_context *st)
if (ctx->Color.AlphaEnabled) {
dsa->alpha.enabled = 1;
dsa->alpha.func = st_compare_func_to_pipe(ctx->Color.AlphaFunc);
- dsa->alpha.ref_value = ctx->Color.AlphaRef;
+ dsa->alpha.ref_value = ctx->Color.AlphaRefUnclamped;
}
cso_set_depth_stencil_alpha(st->cso_context, dsa);
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 246ab2e..a630266 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -297,7 +297,8 @@ clear_with_quad(GLcontext *ctx,
/* draw quad matching scissor rect (XXX verify coord round-off) */
draw_quad(st, x0, y0, x1, y1,
- (GLfloat) ctx->Depth.Clear, ctx->Color.ClearColor);
+ (GLfloat) ctx->Depth.Clear,
+ ctx->Color.ClearColorUnclamped);
/* Restore pipe state */
cso_restore_blend(st->cso_context);
@@ -547,8 +548,7 @@ st_Clear(GLcontext *ctx, GLbitfield mask)
(ctx->DrawBuffer->Visual.depthBits == 0 ||
ctx->DrawBuffer->Visual.stencilBits == 0))
clear_buffers |= PIPE_CLEAR_DEPTHSTENCIL;
- st->pipe->clear(st->pipe, clear_buffers, ctx->Color.ClearColor,
- ctx->Depth.Clear, ctx->Stencil.Clear);
+ st->pipe->clear(st->pipe, clear_buffers, ctx->Color.ClearColorUnclamped, ctx->Depth.Clear, ctx->Stencil.Clear);
}
if (mask & BUFFER_BIT_ACCUM)
st_clear_accum_buffer(ctx,
More information about the mesa-commit
mailing list