Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / drivers / dri / sis / sis_texstate.c
index a507173b2188f0a087a015f29c1bef2f2b28134c..daec2393211b3809cd0241aceebbfbbcab59032e 100644 (file)
@@ -38,7 +38,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/macros.h"
 
 #include "sis_context.h"
-#include "sis_state.h"
 #include "sis_tex.h"
 #include "sis_tris.h"
 #include "sis_alloc.h"
@@ -47,7 +46,7 @@ static GLint TransferTexturePitch (GLint dwPitch);
 
 /* Handle texenv stuff, called from validate_texture (renderstart) */
 static void
-sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
+sis_set_texture_env0( struct gl_context *ctx, struct gl_texture_object *texObj,
    int unit )
 {
    sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -183,7 +182,7 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
 
 /* Handle texenv stuff, called from validate_texture (renderstart) */
 static void
-sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
+sis_set_texture_env1( struct gl_context *ctx, struct gl_texture_object *texObj,
    int unit)
 {
    sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -319,7 +318,7 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
 
 /* Returns 0 if a software fallback is necessary */
 static GLboolean
-sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj,
+sis_set_texobj_parm( struct gl_context *ctx, struct gl_texture_object *texObj,
    int hw_unit )
 {
    sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -457,10 +456,10 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj,
 
    {
       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]);
+      CLAMPED_FLOAT_TO_UBYTE(c[0], texObj->BorderColor.f[0]);
+      CLAMPED_FLOAT_TO_UBYTE(c[1], texObj->BorderColor.f[1]);
+      CLAMPED_FLOAT_TO_UBYTE(c[2], texObj->BorderColor.f[2]);
+      CLAMPED_FLOAT_TO_UBYTE(c[3], texObj->BorderColor.f[3]);
 
       current->texture[hw_unit].hwTextureBorderColor = 
          PACK_COLOR_8888(c[3], c[0], c[1], c[2]);
@@ -584,7 +583,7 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj,
 
 /* Disable a texture unit, called from validate_texture */
 static void
-sis_reset_texture_env (GLcontext *ctx, int hw_unit)
+sis_reset_texture_env (struct gl_context *ctx, int hw_unit)
 {
    sisContextPtr smesa = SIS_CONTEXT(ctx);
 
@@ -621,7 +620,7 @@ sis_reset_texture_env (GLcontext *ctx, int hw_unit)
    }
 }
 
-static void updateTextureUnit( GLcontext *ctx, int unit )
+static void updateTextureUnit( struct gl_context *ctx, int unit )
 {
    sisContextPtr smesa = SIS_CONTEXT( ctx );
    const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -657,7 +656,7 @@ static void updateTextureUnit( GLcontext *ctx, int unit )
 }
 
 
-void sisUpdateTextureState( GLcontext *ctx )
+void sisUpdateTextureState( struct gl_context *ctx )
 {
    sisContextPtr smesa = SIS_CONTEXT( ctx );
    int i;