mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
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@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
34472a0d87
commit
a6af24ee14
1 changed files with 3 additions and 7 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue