summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_tex.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-03-11 19:03:30 -0600
committerBrian Paul <brianp@vmware.com>2009-04-01 20:24:23 -0600
commit79c55e55f808d77cb0dff7cda826719d5fda3c7d (patch)
treec3de124ca2430e92763a0e727eedaec0be06b252 /src/mesa/drivers/dri/radeon/radeon_tex.c
parent7aed2b0c30c6d29d70efd2402a68a8e3de98418c (diff)
dri: use BorderColor instead of _BorderChan
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_tex.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index b0aec21670..f2b6deb9c0 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -239,8 +239,13 @@ static void radeonSetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf )
}
}
-static void radeonSetTexBorderColor( radeonTexObjPtr t, GLubyte c[4] )
+static void radeonSetTexBorderColor( radeonTexObjPtr t, const GLfloat color[4] )
{
+ GLubyte c[4];
+ CLAMPED_FLOAT_TO_UBYTE(c[0], color[0]);
+ CLAMPED_FLOAT_TO_UBYTE(c[1], color[1]);
+ CLAMPED_FLOAT_TO_UBYTE(c[2], color[2]);
+ CLAMPED_FLOAT_TO_UBYTE(c[3], color[3]);
t->pp_border_color = radeonPackColor( 4, c[0], c[1], c[2], c[3] );
}
@@ -276,7 +281,7 @@ static radeonTexObjPtr radeonAllocTexObj( struct gl_texture_object *texObj )
radeonSetTexWrap( t, texObj->WrapS, texObj->WrapT );
radeonSetTexMaxAnisotropy( t, texObj->MaxAnisotropy );
radeonSetTexFilter( t, texObj->MinFilter, texObj->MagFilter );
- radeonSetTexBorderColor( t, texObj->_BorderChan );
+ radeonSetTexBorderColor( t, texObj->BorderColor );
}
return t;
@@ -755,7 +760,7 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- radeonSetTexBorderColor( t, texObj->_BorderChan );
+ radeonSetTexBorderColor( t, texObj->BorderColor );
break;
case GL_TEXTURE_BASE_LEVEL: