diff options
author | Brian Paul <[email protected]> | 2009-03-11 19:03:30 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-04-01 20:24:23 -0600 |
commit | 79c55e55f808d77cb0dff7cda826719d5fda3c7d (patch) | |
tree | c3de124ca2430e92763a0e727eedaec0be06b252 /src/mesa/drivers/dri/sis | |
parent | 7aed2b0c30c6d29d70efd2402a68a8e3de98418c (diff) |
dri: use BorderColor instead of _BorderChan
Diffstat (limited to 'src/mesa/drivers/dri/sis')
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_texstate.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_texstate.c b/src/mesa/drivers/dri/sis/sis_texstate.c index 63f23fc0149..46417ce414c 100644 --- a/src/mesa/drivers/dri/sis/sis_texstate.c +++ b/src/mesa/drivers/dri/sis/sis_texstate.c @@ -456,11 +456,16 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj, break; } - current->texture[hw_unit].hwTextureBorderColor = - ((GLuint) texObj->_BorderChan[3] << 24) + - ((GLuint) texObj->_BorderChan[0] << 16) + - ((GLuint) texObj->_BorderChan[1] << 8) + - ((GLuint) texObj->_BorderChan[2]); + { + GLubyte c[4]; + CLAMPED_FLOAT_TO_UBYTE(c[0], texObj->BorderColor[0]); + CLAMPED_FLOAT_TO_UBYTE(c[1], texObj->BorderColor[1]); + CLAMPED_FLOAT_TO_UBYTE(c[2], texObj->BorderColor[2]); + CLAMPED_FLOAT_TO_UBYTE(c[3], texObj->BorderColor[3]); + + current->texture[hw_unit].hwTextureBorderColor = + PACK_COLOR_8888(c[3], c[0], c[1], c[2]); + } if (current->texture[hw_unit].hwTextureBorderColor != prev->texture[hw_unit].hwTextureBorderColor) |