[Mesa-dev] [PATCH 10/15] radeon: use _mesa_unclamped_float_rgba_to_ubyte()
Brian Paul
brian.e.paul at gmail.com
Sat Sep 17 15:41:23 PDT 2011
From: Brian Paul <brianp at vmware.com>
---
src/mesa/drivers/dri/radeon/radeon_state.c | 4 ++--
src/mesa/drivers/dri/radeon/radeon_tex.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 979bb65..77a06df 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -331,7 +331,7 @@ static void radeonFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *pa
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
union { int i; float f; } c, d;
- GLchan col[4];
+ GLubyte col[4];
switch (pname) {
case GL_FOG_MODE:
@@ -395,7 +395,7 @@ static void radeonFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *pa
break;
case GL_FOG_COLOR:
RADEON_STATECHANGE( rmesa, ctx );
- UNCLAMPED_FLOAT_TO_RGB_CHAN( col, ctx->Fog.Color );
+ _mesa_unclamped_float_rgba_to_ubyte(col, ctx->Fog.Color );
rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] &= ~RADEON_FOG_COLOR_MASK;
rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] |=
radeonPackColor( 4, col[0], col[1], col[2], 0 );
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index c5282ae..611c717 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -270,7 +270,7 @@ static void radeonTexEnv( struct gl_context *ctx, GLenum target,
case GL_TEXTURE_ENV_COLOR: {
GLubyte c[4];
GLuint envColor;
- UNCLAMPED_FLOAT_TO_RGBA_CHAN( c, texUnit->EnvColor );
+ _mesa_unclamped_float_rgba_to_ubyte(c, texUnit->EnvColor);
envColor = radeonPackColor( 4, c[0], c[1], c[2], c[3] );
if ( rmesa->hw.tex[unit].cmd[TEX_PP_TFACTOR] != envColor ) {
RADEON_STATECHANGE( rmesa, tex[unit] );
--
1.7.3.4
More information about the mesa-dev
mailing list