mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa/main: validate bgr formats
BGR and BGRA formats are either supported by desktop GL or by the EXT_texture_format_BGRA8888 extension. Either of these should always be supported, so let's just assert it and return true. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
This commit is contained in:
parent
e8226bda60
commit
87edfee086
1 changed files with 6 additions and 0 deletions
|
|
@ -1748,6 +1748,12 @@ valid_texture_format_enum(const struct gl_context *ctx, GLenum format)
|
|||
case GL_BLUE:
|
||||
return _mesa_is_desktop_gl(ctx);
|
||||
|
||||
case GL_BGR:
|
||||
case GL_BGRA:
|
||||
assert(_mesa_is_desktop_gl(ctx) ||
|
||||
_mesa_has_EXT_texture_format_BGRA8888(ctx));
|
||||
return true;
|
||||
|
||||
case GL_DEPTH_COMPONENT:
|
||||
return _mesa_is_desktop_gl(ctx) ||
|
||||
_mesa_has_OES_depth_texture(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue