summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-17 10:50:39 -0600
committerBrian Paul <[email protected]>2012-08-18 07:39:51 -0600
commita6af24ee14a3e3cef99e96db539aa2abc911e6e0 (patch)
tree54b3d7457770825fcf147d9188da4237b6b3577e /src/mesa/main
parent34472a0d8713c4eb300c9d1de0844c8b78bcf1ab (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texparam.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 8a5abe5e1cc..5a5547daecb 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 */