mesa: add more driver support checks for more format queries

fixes #10641

cc: mesa-stable

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27698>
This commit is contained in:
Mike Blumenkrantz 2024-02-20 11:10:44 -05:00 committed by Marge Bot
parent 1e849b12f5
commit 1ab94ca17b

View file

@ -1030,6 +1030,14 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
baseformat = _mesa_base_fbo_format(ctx, internalformat);
}
/* If the internal format is unsupported, or if a particular component
* is not present in the format, 0 is written to params.
*/
if (!st_QueryTextureFormatSupport(ctx, target, internalformat)) {
buffer[0] = GL_NONE;
break;
}
/* Let the driver choose the texture format.
*
* Disclaimer: I am considering that drivers use for renderbuffers the