Mesa (master): mesa: Generate invalid operation in glGenerateMipMap for integer textures
Anuj Phogat
aphogat at kemper.freedesktop.org
Mon Nov 5 18:55:47 UTC 2012
Module: Mesa
Branch: master
Commit: c0a78d7d7b51e125d143e693fdfc78b90f2d68cf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0a78d7d7b51e125d143e693fdfc78b90f2d68cf
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date: Fri Nov 2 10:47:33 2012 -0700
mesa: Generate invalid operation in glGenerateMipMap for integer textures
Khronos has reached a conclusion and disallowed following texture formats in
glGenerateMipMap():
(a) ASTC textures
(b) integer internal formats (e.g., RGBA8UI, RG16I)
(c) textures with stencil formats (e.g., STENCIL_INDEX8)
(d) textures with packed depth/stencil formats (e.g, DEPTH24_STENCIL8)
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=9471
Note: This is a candidate for stable branches.
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/main/fbobject.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index fc5681c..2be61fb 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2637,6 +2637,15 @@ _mesa_GenerateMipmapEXT(GLenum target)
return;
}
+ if (_mesa_is_enum_format_integer(srcImage->InternalFormat) ||
+ _mesa_is_depthstencil_format(srcImage->InternalFormat) ||
+ _mesa_is_stencil_format(srcImage->InternalFormat)) {
+ _mesa_unlock_texture(ctx, texObj);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGenerateMipmap(invalid internal format)");
+ return;
+ }
+
if (target == GL_TEXTURE_CUBE_MAP) {
GLuint face;
for (face = 0; face < 6; face++)
More information about the mesa-commit
mailing list