Mesa (master): mesa: use _mesa_get_current_tex_object()

Brian Paul brianp at kemper.freedesktop.org
Tue Nov 3 04:04:31 UTC 2009


Module: Mesa
Branch: master
Commit: 1afe60e802e22318a7a10a8ab2fa4f8222f98e31
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1afe60e802e22318a7a10a8ab2fa4f8222f98e31

Author: Brian Paul <brianp at vmware.com>
Date:   Sat Oct 31 08:07:46 2009 -0600

mesa: use _mesa_get_current_tex_object()

---

 src/mesa/main/texgetimage.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index e4a9ac1..2f88718 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -559,7 +559,6 @@ static GLboolean
 getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
                         GLenum format, GLenum type, GLvoid *pixels )
 {
-   const struct gl_texture_unit *texUnit;
    struct gl_texture_object *texObj;
    struct gl_texture_image *texImage;
    const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
@@ -613,8 +612,7 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
       return GL_TRUE;
    }
 
-   texUnit = _mesa_get_current_tex_unit(ctx);
-   texObj = _mesa_select_tex_object(ctx, texUnit, target);
+   texObj = _mesa_get_current_tex_object(ctx, target);
 
    if (!texObj || _mesa_is_proxy_texture(target)) {
       _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)");
@@ -703,7 +701,6 @@ void GLAPIENTRY
 _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
                    GLenum type, GLvoid *pixels )
 {
-   const struct gl_texture_unit *texUnit;
    struct gl_texture_object *texObj;
    struct gl_texture_image *texImage;
    GET_CURRENT_CONTEXT(ctx);
@@ -718,8 +715,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
       return;
    }
 
-   texUnit = _mesa_get_current_tex_unit(ctx);
-   texObj = _mesa_select_tex_object(ctx, texUnit, target);
+   texObj = _mesa_get_current_tex_object(ctx, target);
    texImage = _mesa_select_tex_image(ctx, texObj, target, level);
 
    if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
@@ -749,7 +745,6 @@ static GLboolean
 getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
                                   GLvoid *img)
 {
-   const struct gl_texture_unit *texUnit;
    struct gl_texture_object *texObj;
    struct gl_texture_image *texImage;
    const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
@@ -773,9 +768,7 @@ getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
       return GL_TRUE;
    }
 
-   texUnit = _mesa_get_current_tex_unit(ctx);
-   texObj = _mesa_select_tex_object(ctx, texUnit, target);
-
+   texObj = _mesa_get_current_tex_object(ctx, target);
    if (!texObj) {
       _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)");
       return GL_TRUE;
@@ -827,7 +820,6 @@ getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
 void GLAPIENTRY
 _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
 {
-   const struct gl_texture_unit *texUnit;
    struct gl_texture_object *texObj;
    struct gl_texture_image *texImage;
    GET_CURRENT_CONTEXT(ctx);
@@ -842,8 +834,7 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
       return;
    }
 
-   texUnit = _mesa_get_current_tex_unit(ctx);
-   texObj = _mesa_select_tex_object(ctx, texUnit, target);
+   texObj = _mesa_get_current_tex_object(ctx, target);
    texImage = _mesa_select_tex_image(ctx, texObj, target, level);
 
    if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {




More information about the mesa-commit mailing list