diff options
author | marha <marha@users.sourceforge.net> | 2011-10-05 17:37:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-05 17:37:34 +0200 |
commit | f7025b4baa1ba35ee796785641f04eac5bedb0a6 (patch) | |
tree | 3df62b7b501a478e212397883657a8a8be4db7a3 /mesalib/src/mesa/main/texgetimage.c | |
parent | 60adbfdea1ee754341d64454274e7aa83bae8971 (diff) | |
download | vcxsrv-f7025b4baa1ba35ee796785641f04eac5bedb0a6.tar.gz vcxsrv-f7025b4baa1ba35ee796785641f04eac5bedb0a6.tar.bz2 vcxsrv-f7025b4baa1ba35ee796785641f04eac5bedb0a6.zip |
mkfontscale pixman xserver xtrans libX11 libXdmcp libxcb libXmu mesa git update 5 oct 2011
Diffstat (limited to 'mesalib/src/mesa/main/texgetimage.c')
-rw-r--r-- | mesalib/src/mesa/main/texgetimage.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c index d2f25b9f8..f9118860b 100644 --- a/mesalib/src/mesa/main/texgetimage.c +++ b/mesalib/src/mesa/main/texgetimage.c @@ -49,7 +49,7 @@ /** * Can the given type represent negative values? */ -static INLINE GLboolean +static inline GLboolean type_with_negative_values(GLenum type) { switch (type) { @@ -373,9 +373,9 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions, static GLboolean get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_object *texObj, struct gl_texture_image *texImage) { + const GLenum target = texImage->TexObject->Target; GLboolean memCopy = GL_FALSE; /* @@ -384,11 +384,11 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, * so we don't have to worry about those. * XXX more format combinations could be supported here. */ - if ((texObj->Target == GL_TEXTURE_1D || - texObj->Target == GL_TEXTURE_2D || - texObj->Target == GL_TEXTURE_RECTANGLE || - (texObj->Target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && - texObj->Target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { + if ((target == GL_TEXTURE_1D || + target == GL_TEXTURE_2D || + target == GL_TEXTURE_RECTANGLE || + (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && + target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { if ((texImage->TexFormat == MESA_FORMAT_ARGB8888 || texImage->TexFormat == MESA_FORMAT_SARGB8) && format == GL_BGRA && @@ -471,14 +471,13 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, * unmap with ctx->Driver.UnmapTextureImage(). */ void -_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level, +_mesa_get_teximage(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_object *texObj, struct gl_texture_image *texImage) { GLuint dimensions; - switch (target) { + switch (texImage->TexObject->Target) { case GL_TEXTURE_1D: dimensions = 1; break; @@ -511,7 +510,7 @@ _mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level, pixels = ADD_POINTERS(buf, pixels); } - if (get_tex_memcpy(ctx, format, type, pixels, texObj, texImage)) { + if (get_tex_memcpy(ctx, format, type, pixels, texImage)) { /* all done */ } else if (format == GL_DEPTH_COMPONENT) { @@ -772,8 +771,7 @@ _mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format, _mesa_lock_texture(ctx, texObj); { - ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels, - texObj, texImage); + ctx->Driver.GetTexImage(ctx, format, type, pixels, texImage); } _mesa_unlock_texture(ctx, texObj); } |