Hash :
dccc0f8c
        
        Author :
  
        
        Date :
2021-10-05T09:22:19
        
      
Add docs for DXGI and D3D11 format tables. Bug: angleproject:1691 Change-Id: I7a07228853aaf8f1536b145657a737dcf3e0e1f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3205798 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
This folder contains shared back-end-specific implementation files. The classes
and types in renderer are not specified by GLES. They instead are common to
all the various ANGLE implementations.
See renderer_utils.h for various cross back-end utilties.
The ANGLE format class, angle::Format, works as a union
between GLES and all the various back-end formats. It can represent any type
of format in ANGLE. e.g. Formats in Vulkan that don’t exist in GLES, or DXGI
formats that don’t exist in GLES, or Windows/Android surface configs that
don’t exist anywhere else.
The glInternalFormat member of angle::Format represents the “closest” GL
format for an ANGLE format. For formats that don’t exist in GLES this will
not be exactly what the format represents.
The back-ends also define their own format tables. See the Vulkan Format table docs and the [D3D11 format table docs][D23D11FormatDocs].
DXGI formats are used in both the GL and D3D11 back-end. Therefore the generated info table lives in this common shared location.
The DXGI info table is generated by gen_dxgi_format_table.py
and sources data from dxgi_format_data.json. The
main purpose of the table is to convert from a DXGI format to an ANGLE
format, where the ANGLE format should have all the necessary information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
# ANGLE back-ends
This folder contains shared back-end-specific implementation files. The classes
and types in `renderer` are not specified by GLES. They instead are common to
all the various ANGLE implementations.
See [`renderer_utils.h`](renderer_utils.h) for various cross back-end utilties.
## ANGLE Formats
The ANGLE format class, [`angle::Format`][ANGLEFormatDef], works as a union
between GLES and all the various back-end formats. It can represent any type
of format in ANGLE. e.g. Formats in Vulkan that don't exist in GLES, or DXGI
formats that don't exist in GLES, or Windows/Android surface configs that
don't exist anywhere else.
The `glInternalFormat` member of `angle::Format` represents the "closest" GL
format for an ANGLE format. For formats that don't exist in GLES this will
not be exactly what the format represents.
The back-ends also define their own format tables. See the
[Vulkan Format table docs][VulkanFormatDocs] and the
[D3D11 format table docs][D23D11FormatDocs].
## DXGI Format Info
DXGI formats are used in both the GL and D3D11 back-end. Therefore the
generated info table lives in this common shared location.
The DXGI info table is generated by [`gen_dxgi_format_table.py`](gen_dxgi_format_table.py)
and sources data from [`dxgi_format_data.json`](dxgi_format_data.json). The
main purpose of the table is to convert from a DXGI format to an ANGLE
format, where the ANGLE format should have all the necessary information.
[ANGLEFormatDef]: https://chromium.googlesource.com/angle/angle/+/f85ec039a7dcfde3b4a8d9ddfa8baa84ae5ce927/src/libANGLE/renderer/Format.h#24
[VulkanFormatDocs]: vulkan/doc/FormatTablesAndEmulation.md
[D3D11FormatDocs]: d3d/d3d11/FormatTables.md