From: Brian Paul Date: Sat, 17 Sep 2011 22:12:33 +0000 (-0600) Subject: radeon: use _mesa_unclamped_float_rgba_to_ubyte() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=499f0685e8236eca410fce516de0e9bab7e25be8;p=mesa.git radeon: use _mesa_unclamped_float_rgba_to_ubyte() --- diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 979bb65f0be..77a06df408e 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 c5282aee615..611c717dc95 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] );