diff options
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_texstate.c')
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_texstate.c | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_texstate.c b/src/mesa/drivers/dri/sis/sis_texstate.c index b5da62cd7c5..021919b0a42 100644 --- a/src/mesa/drivers/dri/sis/sis_texstate.c +++ b/src/mesa/drivers/dri/sis/sis_texstate.c @@ -383,14 +383,21 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj, case GL_REPEAT: current->texture[hw_unit].hwTextureSet |= MASK_TextureWrapU; break; + case GL_MIRRORED_REPEAT: + current->texture[hw_unit].hwTextureSet |= MASK_TextureMirrorU; + break; case GL_CLAMP: current->texture[hw_unit].hwTextureSet |= MASK_TextureClampU; + /* XXX: GL_CLAMP isn't conformant, but falling back makes the situation + * worse in other programs at the moment. + */ + /*ok = 0;*/ break; case GL_CLAMP_TO_EDGE: - /* - * ?? not support yet - */ - ok = 0; + current->texture[hw_unit].hwTextureSet |= MASK_TextureClampU; + break; + case GL_CLAMP_TO_BORDER: + current->texture[hw_unit].hwTextureSet |= MASK_TextureBorderU; break; } @@ -399,34 +406,30 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj, case GL_REPEAT: current->texture[hw_unit].hwTextureSet |= MASK_TextureWrapV; break; + case GL_MIRRORED_REPEAT: + current->texture[hw_unit].hwTextureSet |= MASK_TextureMirrorV; + break; case GL_CLAMP: current->texture[hw_unit].hwTextureSet |= MASK_TextureClampV; + /* XXX: GL_CLAMP isn't conformant, but falling back makes the situation + * worse in other programs at the moment. + */ + /*ok = 0;*/ break; case GL_CLAMP_TO_EDGE: - /* - * ?? not support yet - */ - ok = 0; + current->texture[hw_unit].hwTextureSet |= MASK_TextureClampV; break; - } - -/* - if (current->texture[hw_unit].hwTextureSet & MASK_TextureClampU) { - current->texture[hw_unit].hwTextureSet &= ~MASK_TextureClampU; - current->texture[hw_unit].hwTextureSet |= MASK_TextureBorderU; - } - - if (current->texture[hw_unit].hwTextureSet & MASK_TextureClampV) { - current->texture[hw_unit].hwTextureSet &= ~MASK_TextureClampV; + case GL_CLAMP_TO_BORDER: current->texture[hw_unit].hwTextureSet |= MASK_TextureBorderV; + break; } -*/ + current->texture[hw_unit].hwTextureBorderColor = - ((GLuint) texObj->BorderColor[3] << 24) + - ((GLuint) texObj->BorderColor[0] << 16) + - ((GLuint) texObj->BorderColor[1] << 8) + - ((GLuint) texObj->BorderColor[2]); - + ((GLuint) texObj->_BorderChan[3] << 24) + + ((GLuint) texObj->_BorderChan[0] << 16) + + ((GLuint) texObj->_BorderChan[1] << 8) + + ((GLuint) texObj->_BorderChan[2]); + if (current->texture[hw_unit].hwTextureBorderColor != prev->texture[hw_unit].hwTextureBorderColor) { |