xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/README.md (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# ANGLE back-ends
2*8975f5c5SAndroid Build Coastguard Worker
3*8975f5c5SAndroid Build Coastguard WorkerThis folder contains shared back-end-specific implementation files. The classes
4*8975f5c5SAndroid Build Coastguard Workerand types in `renderer` are not specified by GLES. They instead are common to
5*8975f5c5SAndroid Build Coastguard Workerall the various ANGLE implementations.
6*8975f5c5SAndroid Build Coastguard Worker
7*8975f5c5SAndroid Build Coastguard WorkerSee [`renderer_utils.h`](renderer_utils.h) for various cross back-end utilties.
8*8975f5c5SAndroid Build Coastguard Worker
9*8975f5c5SAndroid Build Coastguard Worker## ANGLE Formats
10*8975f5c5SAndroid Build Coastguard Worker
11*8975f5c5SAndroid Build Coastguard WorkerThe ANGLE format class, [`angle::Format`][ANGLEFormatDef], works as a union
12*8975f5c5SAndroid Build Coastguard Workerbetween GLES and all the various back-end formats. It can represent any type
13*8975f5c5SAndroid Build Coastguard Workerof format in ANGLE. e.g. Formats in Vulkan that don't exist in GLES, or DXGI
14*8975f5c5SAndroid Build Coastguard Workerformats that don't exist in GLES, or Windows/Android surface configs that
15*8975f5c5SAndroid Build Coastguard Workerdon't exist anywhere else.
16*8975f5c5SAndroid Build Coastguard Worker
17*8975f5c5SAndroid Build Coastguard WorkerThe `glInternalFormat` member of `angle::Format` represents the "closest" GL
18*8975f5c5SAndroid Build Coastguard Workerformat for an ANGLE format. For formats that don't exist in GLES this will
19*8975f5c5SAndroid Build Coastguard Workernot be exactly what the format represents.
20*8975f5c5SAndroid Build Coastguard Worker
21*8975f5c5SAndroid Build Coastguard WorkerThe back-ends also define their own format tables. See the
22*8975f5c5SAndroid Build Coastguard Worker[Vulkan Format table docs][VulkanFormatDocs] and the
23*8975f5c5SAndroid Build Coastguard Worker[D3D11 format table docs][D23D11FormatDocs].
24*8975f5c5SAndroid Build Coastguard Worker
25*8975f5c5SAndroid Build Coastguard Worker## DXGI Format Info
26*8975f5c5SAndroid Build Coastguard Worker
27*8975f5c5SAndroid Build Coastguard WorkerDXGI formats are used in both the GL and D3D11 back-end. Therefore the
28*8975f5c5SAndroid Build Coastguard Workergenerated info table lives in this common shared location.
29*8975f5c5SAndroid Build Coastguard Worker
30*8975f5c5SAndroid Build Coastguard WorkerThe DXGI info table is generated by [`gen_dxgi_format_table.py`](gen_dxgi_format_table.py)
31*8975f5c5SAndroid Build Coastguard Workerand sources data from [`dxgi_format_data.json`](dxgi_format_data.json). The
32*8975f5c5SAndroid Build Coastguard Workermain purpose of the table is to convert from a DXGI format to an ANGLE
33*8975f5c5SAndroid Build Coastguard Workerformat, where the ANGLE format should have all the necessary information.
34*8975f5c5SAndroid Build Coastguard Worker
35*8975f5c5SAndroid Build Coastguard Worker[ANGLEFormatDef]: https://chromium.googlesource.com/angle/angle/+/f85ec039a7dcfde3b4a8d9ddfa8baa84ae5ce927/src/libANGLE/renderer/Format.h#24
36*8975f5c5SAndroid Build Coastguard Worker[VulkanFormatDocs]: vulkan/doc/FormatTablesAndEmulation.md
37*8975f5c5SAndroid Build Coastguard Worker[D3D11FormatDocs]: d3d/d3d11/FormatTables.md
38