Mesa (master): mesa: test against MESA_FORMAT_NONE in _mesa_GetTexLevelParameteriv()
Brian Paul
brianp at kemper.freedesktop.org
Thu Jul 28 23:38:35 UTC 2011
Module: Mesa
Branch: master
Commit: 26684e0b1a857cc16a2c6f2b542e5ccf3da5acf5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26684e0b1a857cc16a2c6f2b542e5ccf3da5acf5
Author: Brian Paul <brianp at vmware.com>
Date: Thu Jul 28 09:43:09 2011 -0600
mesa: test against MESA_FORMAT_NONE in _mesa_GetTexLevelParameteriv()
---
src/mesa/main/texparam.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index c4ec295..3f771f0 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -888,7 +888,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
texObj = _mesa_select_tex_object(ctx, texUnit, target);
img = _mesa_select_tex_image(ctx, texObj, target, level);
- if (!img || !img->TexFormat) {
+ if (!img || img->TexFormat == MESA_FORMAT_NONE) {
/* undefined texture image */
if (pname == GL_TEXTURE_COMPONENTS)
*params = 1;
More information about the mesa-commit
mailing list