summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-09-14 11:08:57 +0100
committerDave Airlie <[email protected]>2011-09-14 11:18:08 +0100
commit81a86aea4f0990a1b8795f9e00e7a6c4ba368281 (patch)
tree9798a61c65a74aba6790849544afcd6b32e15f51 /src/mesa/drivers/dri/r200
parent093dc9e548537e6c77e33064a584f849ad90dfa5 (diff)
mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.
This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as suggested by Brian. It uses it in a few places I noticed from previous color changes, and also some core mesa places. I haven't updated other places yet. 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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index ee13179c2be..b3755d8ddfe 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1734,10 +1734,7 @@ static void r200ClearColor( struct gl_context *ctx,
rrb = radeon_get_colorbuffer(&rmesa->radeon);
if (!rrb)
return;
- 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]);
+ _mesa_unclamped_float_rgba_to_ubyte(color, c.f);
rmesa->radeon.state.color.clear = radeonPackColor( rrb->cpp,
color[0], color[1],
color[2], color[3] );