| 1 |
Name |
| 2 |
|
| 3 |
MESA_bgra |
| 4 |
|
| 5 |
Name Strings |
| 6 |
|
| 7 |
GL_MESA_bgra |
| 8 |
|
| 9 |
Contact |
| 10 |
|
| 11 |
Gert Wollny (gert.wollny 'at' collabora.com) |
| 12 |
|
| 13 |
Notice |
| 14 |
|
| 15 |
Copyright (c) 2021 Collabora LTD |
| 16 |
Copyright (c) 2009-2013 The Khronos Group Inc. Copyright terms at |
| 17 |
http://www.khronos.org/registry/speccopyright.html |
| 18 |
|
| 19 |
Version |
| 20 |
|
| 21 |
Version 1, 2021/04/30. |
| 22 |
Based on EXT_bgra version 1, modified 1997/05/19. |
| 23 |
|
| 24 |
Number |
| 25 |
|
| 26 |
TBD |
| 27 |
|
| 28 |
Dependencies |
| 29 |
|
| 30 |
OpenGL ES 2.0 is required. |
| 31 |
Written based on the wording of the OpenGL ES 3.2 specification. |
| 32 |
There are interactions with the extensions EXT_clear_texture. |
| 33 |
|
| 34 |
Overview |
| 35 |
|
| 36 |
MESA_bgra extends the list of combinations host-memory color formats |
| 37 |
with internal formats to include BGRA and BGR as acceptable formats |
| 38 |
with RGB8/SRGB8 and RGBA/sRGB8_ALPHA8 as internal formats respectively. |
| 39 |
This feature is of interest in virtualized environments, where the host |
| 40 |
supports OpenGL ES only, and the virtualized guest is supposed to support |
| 41 |
a subset of OpenGL including textures created with the format BGRA. |
| 42 |
|
| 43 |
IP Status |
| 44 |
|
| 45 |
Open-source; freely implementable. |
| 46 |
|
| 47 |
Issues |
| 48 |
|
| 49 |
None. |
| 50 |
|
| 51 |
New Procedures and Functions |
| 52 |
|
| 53 |
None |
| 54 |
|
| 55 |
New Tokens |
| 56 |
|
| 57 |
Accepted by the <format> parameter of TexImage2D and TexSubImage2D: |
| 58 |
|
| 59 |
GL_BGR_EXT 0x80E0 |
| 60 |
GL_BGRA_EXT 0x80E1 |
| 61 |
|
| 62 |
Additions to Chapter 8 of the GLES 3.2 Specification (Textures and Samplers) |
| 63 |
|
| 64 |
Add to table 8.2 (Pixels data formats, valid combinations of format, |
| 65 |
type, and unsized internalformat). |
| 66 |
|
| 67 |
Format Type External Internal Format |
| 68 |
Bytes |
| 69 |
per Pixel |
| 70 |
------------------------------------------------------------- |
| 71 |
BGRA UNSIGNED_BYTE 4 RGBA |
| 72 |
BGR UNSIGNED_BYTE 3 RGB |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
Add to table 8.5 (Pixels data formats). |
| 77 |
|
| 78 |
Format Name Elements Meaning and Order Target Buffer |
| 79 |
------------------------------------------------------------- |
| 80 |
BGR_EXT B, G, R Color |
| 81 |
BGRA_EXT B, G, R, A Color |
| 82 |
|
| 83 |
|
| 84 |
Add to table 8.9 (Effective internal format corresponding to |
| 85 |
external format). |
| 86 |
|
| 87 |
Format Type Effective |
| 88 |
Internal format |
| 89 |
------------------------------------------------------------- |
| 90 |
BGRA_EXT UNSIGNED_BYTE RGBA8 |
| 91 |
BGR_EXT UNSIGNED_BYTE RGB8 |
| 92 |
|
| 93 |
Interactions with EXT_clear_texture |
| 94 |
|
| 95 |
When EXT_clear_texture is supported the accepted formats for |
| 96 |
ClearTextureEXT and ClearSubTextureEXT are extended to include |
| 97 |
the entries added above. |
| 98 |
|
| 99 |
|
| 100 |
Revision History |
| 101 |
|
| 102 |
Original draft, revision 1.0, May 4, 2021 (Gert Wollny) |
| 103 |
rewrite EXT_bgra against OpenGL ES 3.2 instead of OpenGL 1,0. |
| 104 |
|
| 105 |
Revision 1.1 (May 5. 2021): Add the new tokens, and fix |
| 106 |
Clear*Texture function names. |