diff options
author | Dave Airlie <[email protected]> | 2011-09-12 10:57:40 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-09-14 11:18:07 +0100 |
commit | 093dc9e548537e6c77e33064a584f849ad90dfa5 (patch) | |
tree | 4a3ecd84f123cd89a29fea6700603a5da53d62cb /src/mesa/drivers/dri/r200 | |
parent | b06613c6cc029c3ff200430b0706b5229c4508bd (diff) |
mesa: introduce a clear color union to be used for int/unsigned buffers
This introduces a new gl_color_union union and moves the current
ClearColorUnclamped to use it, it removes current ClearColor completely and
renames CCU to CC, then all drivers are modified to expected unclamped floats instead.
also fixes st to use translated color in one place it wasn't.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_state.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 0a1e0b47577..ee13179c2be 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -1724,7 +1724,8 @@ void r200UpdateViewportOffset( struct gl_context *ctx ) * Miscellaneous */ -static void r200ClearColor( struct gl_context *ctx, const GLfloat c[4] ) +static void r200ClearColor( struct gl_context *ctx, + const union gl_color_union c ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); GLubyte color[4]; @@ -1733,10 +1734,10 @@ static void r200ClearColor( struct gl_context *ctx, const GLfloat c[4] ) rrb = radeon_get_colorbuffer(&rmesa->radeon); if (!rrb) return; - CLAMPED_FLOAT_TO_UBYTE(color[0], c[0]); - CLAMPED_FLOAT_TO_UBYTE(color[1], c[1]); - CLAMPED_FLOAT_TO_UBYTE(color[2], c[2]); - CLAMPED_FLOAT_TO_UBYTE(color[3], c[3]); + UNCLAMPED_FLOAT_TO_UBYTE(color[0], c.f[0]); + UNCLAMPED_FLOAT_TO_UBYTE(color[1], c.f[1]); + UNCLAMPED_FLOAT_TO_UBYTE(color[2], c.f[2]); + UNCLAMPED_FLOAT_TO_UBYTE(color[3], c.f[3]); rmesa->radeon.state.color.clear = radeonPackColor( rrb->cpp, color[0], color[1], color[2], color[3] ); |