radeon/r200: fix set tex offset functions
authorDave Airlie <airlied@redhat.com>
Fri, 13 Feb 2009 13:29:27 +0000 (23:29 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 13 Feb 2009 13:29:27 +0000 (23:29 +1000)
src/mesa/drivers/dri/r200/r200_texstate.c
src/mesa/drivers/dri/radeon/radeon_texstate.c

index e47c7cc0ca9c44c94cfecc89e083f4eb255d4510..e6aff022b3db3c34444cbfee4d5e6a084d7fe428 100644 (file)
@@ -733,13 +733,11 @@ void r200SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
        r200ContextPtr rmesa = pDRICtx->driverPrivate;
        struct gl_texture_object *tObj =
            _mesa_lookup_texture(rmesa->radeon.glCtx, texname);
-       radeonTexObjPtr t;
+       radeonTexObjPtr t = radeon_tex_obj(tObj);
 
        if (!tObj)
                return;
 
-       t = (radeonTexObjPtr) tObj->DriverData;
-
        t->image_override = GL_TRUE;
 
        if (!offset)
index cabac6c13d57be9cc30ebfd1b2bee95d15f4e9a2..2e064cf0973a5281286f51df2b6a76b228b88f09 100644 (file)
@@ -605,13 +605,11 @@ void radeonSetTexOffset(__DRIcontext * pDRICtx, GLint texname,
        r100ContextPtr rmesa = pDRICtx->driverPrivate;
        struct gl_texture_object *tObj =
            _mesa_lookup_texture(rmesa->radeon.glCtx, texname);
-       radeonTexObjPtr t;
+       radeonTexObjPtr t = radeon_tex_obj(tObj);
 
        if (tObj == NULL)
                return;
 
-       t = (radeonTexObjPtr) tObj->DriverData;
-
        t->image_override = GL_TRUE;
 
        if (!offset)