Mesa (map-texture-image-v5): meta: check if compressed format is unsigned
Brian Paul
brianp at kemper.freedesktop.org
Thu Sep 1 03:31:01 UTC 2011
Module: Mesa
Branch: map-texture-image-v5
Commit: dd1ac5a60d60b75ce13ddb051d8cc7e43b6d93f1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd1ac5a60d60b75ce13ddb051d8cc7e43b6d93f1
Author: Brian Paul <brianp at vmware.com>
Date: Wed Aug 31 20:04:15 2011 -0600
meta: check if compressed format is unsigned
For now, the decompress-with-textured-quad approach only works with unsigned
compressed formats. Add a check for that.
---
src/mesa/drivers/common/meta.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 7171916..3d0aa80 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3284,7 +3284,9 @@ _mesa_meta_GetTexImage(struct gl_context *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- if (_mesa_is_format_compressed(texImage->TexFormat)) {
+ if (_mesa_is_format_compressed(texImage->TexFormat) &&
+ _mesa_get_format_datatype(texImage->TexFormat)
+ == GL_UNSIGNED_NORMALIZED) {
const GLuint slice = 0; /* only 2D compressed textures for now */
/* Need to unlock the texture here to prevent deadlock... */
_mesa_unlock_texture(ctx, texObj);
More information about the mesa-commit
mailing list