Mesa (master): mesa: querying GL_TEXTURE_COMPRESSED_IMAGE_SIZE for a buffer obj is illegal
Brian Paul
brianp at kemper.freedesktop.org
Sat Aug 18 13:44:19 UTC 2012
Module: Mesa
Branch: master
Commit: a6af24ee14a3e3cef99e96db539aa2abc911e6e0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6af24ee14a3e3cef99e96db539aa2abc911e6e0
Author: Brian Paul <brianp at vmware.com>
Date: Fri Aug 17 10:50:39 2012 -0600
mesa: querying GL_TEXTURE_COMPRESSED_IMAGE_SIZE for a buffer obj is illegal
GL_INVALID_OPERATION is to be raised when querying a non-compressed
image/buffer. Since a buffer object can't have a compressed format this
query always generates an error.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/main/texparam.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 8a5abe5..5a5547d 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1136,13 +1136,9 @@ get_tex_level_parameter_buffer(struct gl_context *ctx,
/* GL_ARB_texture_compression */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
- if (_mesa_is_format_compressed(texFormat) &&
- !_mesa_is_proxy_texture(target)) {
- *params = _mesa_format_image_size(texFormat, bo->Size, 0, 0);
- } else {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetTexLevelParameter[if]v(pname)");
- }
+ /* Always illegal for GL_TEXTURE_BUFFER */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetTexLevelParameter[if]v(pname)");
break;
/* GL_ARB_texture_float */
More information about the mesa-commit
mailing list