Path: blob/21.2-virgl/docs/_extra/specs/MESA_bgra.txt
4566 views
Name12MESA_bgra34Name Strings56GL_MESA_bgra78Contact910Gert Wollny (gert.wollny 'at' collabora.com)1112Notice1314Copyright (c) 2021 Collabora LTD15Copyright (c) 2009-2013 The Khronos Group Inc. Copyright terms at16http://www.khronos.org/registry/speccopyright.html1718Version1920Version 1, 2021/04/30.21Based on EXT_bgra version 1, modified 1997/05/19.2223Number2425TBD2627Dependencies2829OpenGL ES 2.0 is required.30Written based on the wording of the OpenGL ES 3.2 specification.31There are interactions with the extensions EXT_clear_texture.3233Overview3435MESA_bgra extends the list of combinations host-memory color formats36with internal formats to include BGRA and BGR as acceptable formats37with RGB8/SRGB8 and RGBA/sRGB8_ALPHA8 as internal formats respectively.38This feature is of interest in virtualized environments, where the host39supports OpenGL ES only, and the virtualized guest is supposed to support40a subset of OpenGL including textures created with the format BGRA.4142IP Status4344Open-source; freely implementable.4546Issues4748None.4950New Procedures and Functions5152None5354New Tokens5556Accepted by the <format> parameter of TexImage2D and TexSubImage2D:5758GL_BGR_EXT 0x80E059GL_BGRA_EXT 0x80E16061Additions to Chapter 8 of the GLES 3.2 Specification (Textures and Samplers)6263Add to table 8.2 (Pixels data formats, valid combinations of format,64type, and unsized internalformat).6566Format Type External Internal Format67Bytes68per Pixel69-------------------------------------------------------------70BGRA UNSIGNED_BYTE 4 RGBA71BGR UNSIGNED_BYTE 3 RGB72737475Add to table 8.5 (Pixels data formats).7677Format Name Elements Meaning and Order Target Buffer78-------------------------------------------------------------79BGR_EXT B, G, R Color80BGRA_EXT B, G, R, A Color818283Add to table 8.9 (Effective internal format correspondig to84external format).8586Format Type Effective87Internal format88-------------------------------------------------------------89BGRA_EXT UNSIGNED_BYTE RGBA890BGR_EXT UNSIGNED_BYTE RGB89192Interactions with EXT_clear_texture9394When EXT_clear_texture is supported the accepted formats for95ClearTextureEXT and ClearSubTextureEXT are extended to include96the entries added above.979899Revision History100101Original draft, revision 1.0, May 4, 2021 (Gert Wollny)102rewrite EXT_bgra against OpenGL ES 3.2 instead of OpenGL 1,0.103104Revision 1.1 (May 5. 2021): Add the new tokens, and fix105Clear*Texture function names.106107108