src/libANGLE/renderer/FormatID_autogen.h


Log

Author Commit Date CI Message
Shashank Sharma c6b3440b 2025-06-06T23:34:33 Vulkan: Add G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 support. Add support for YCBCR_P010 format. Bug: b/408996471 Change-Id: I899533b604e5b2fd0ad1fb1e940dd1f119179794 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6628658 Reviewed-by: Solti Ho <solti@google.com> Auto-Submit: Shashank Sharma <shawshanks@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Xin Yuan cdcf6a63 2025-04-22T10:19:33 Add R10X6G10X6B10X6A10X6 support on angle Bug: angleproject:409355677 Change-Id: I8115ca73a038360f673552532e9d9b87ff846867 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6438114 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov 31ccf78b 2025-01-07T15:46:15 Inline GetVertexFormatID using lookup tables Before this change the switch produced >1KB of assembly due to all the branching. This reduces the .so size by ~3KB and avoids the function call into a seemingly cold page. No obvious perf improvement in my tests from just this change. Changing underlying enum type to minimize table sizes. Bug: b/383305597 Change-Id: I724aa093ab5edf7af016b5b04764437a345517d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6153395 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Panfeng Hou a504b6a2 2024-11-25T15:59:05 Support GL_OES_required_internalformat Enable GL_OES_required_internalformat GLES extension. Bug: angleproject:364069034 Change-Id: Ia57548469abff189472aa20b13ca99179c45f2c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038448 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Panfeng Hou <panfeng.hou@arm.com>
Charlie Lao 3870655e 2023-10-10T17:04:04 Vulkan: Add 8 external format ID for external_format_resolve For external formats ANGLE does not know the exact that is. The idea is we reserve 8 external format ID for these driver defined formats. Each ID represents one uniquely defined external format. Then we will use this format ID pass around ANGLE just like any other format ID. Eventually vulkan backend will convert this formatID to the actual external format structure that returned from driver. Right now we reserved 8 IDs for this usage. Based on our survey, this is more than enough for now. We will deal with it if we need more than 8 in future. This CL is split from Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: I9cf442179af95e04a44796125e0c03dde702a8f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4929749 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 519d330c 2023-08-28T15:41:18 Add GL_RGBX8_SRGB_ANGLEX and GL_BGRX8_SRGB_ANGLEX formats If app creates AHB with sRGBX format, and then create a EGLImage, Image::initialize() will retrieve the sized format from AHB, which is GL_RGBX_ANGLE, and then try to convert to sRGB color space. The bug here is that GetNonLinearFormat will pick GL_SRGB8 for all these formats :GL_RGB8, GL_BGRX8_ANGLEX, GL_RGBX8_ANGLE. This means that different AHBS with these three different format will end up createing a tetxure with same format which sRGB. I think the reason somone did it this way initially simply because there is no sRGB corresponding format available for BGRX8 and RGBX8. This CL adds sRGB internal version of these two formats, thus make it straight forward to pick the correct sRGB format. The other change here is for AHBs, right now we are always force mRequiredImageAccess to be Renderable. This actually workedaround the bug that mentioned earlier that we are picking the wrong format. Because of forced renderable, we end up with SRGB fallback to SRGBA. But external images should not fallback, we should use its existing format as is since it can be accessed via AHB interface directly. Bug: b/298037344 Change-Id: I6119c4015cc5bf0effdf0530cb756b6c4656c38f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819053 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Constantine Shablya e82eaff9 2022-09-22T16:01:06 Stubs for paletted images Bug: angleproject:7599 Change-Id: Idb49f8ba07ebd3b6cad461fa9e90b856af666183 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3909396 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Constantine Shablya <constantine.shablya@collabora.com>
Alexis Hetu c0aa6108 2021-09-17T16:22:55 Add new GL_RGBX8_ANGLEX format Currently, IOSurface objects using {GL_RGB, GL_UNSIGNED_BYTE} are natively represented with GL_BGRX8_ANGLEX, which we use instead of other RGBA formats in order to avoid issues when a canvas uses 'no alpha': https://source.chromium.org/chromium/chromium/src/+/main:third_party/swiftshader/third_party/angle/angle/src/libANGLE/renderer/vulkan/mac/IOSurfaceSurfaceVkMac.mm;l=44 This unfortunately causes some other issues because of the implicit RGB <-> BGR conversion like type mismatches in subresource updates. This CL adds a new type, RGBX8, which will be usable by IOSurface objects and which behaves exactly like the BGRX8 format with the B and R channels flipped. Bug: chromium:1209250 Change-Id: I345eadc8addd05a0964cae30d89c20005479e37b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3188910 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 835bcb1e 2021-05-08T13:24:58 Vulkan: Support GL_EXT_texture_sRGB_RG8 For completeness, added mappings of R8_SRGB and R8G8_SRGB to OpenGL and Metal. Bug: angleproject:4932 Change-Id: Ic8e44e3a94c114e985f6965fcd43fbcb8071432d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2880661 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev f2b47418 2021-04-22T18:32:37 Align BPTC format names in angle::FormatID Use the same naming convention as other similar formats. Bug: angleproject:5731 Change-Id: I187881f4bc4691a0963502ed41f42ab0ebf4171c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2846824 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Mohan Maiya f54191ab 2021-03-25T12:27:02 Vulkan: Add YUV G8_B8R8_2PLANE_420_UNORM support. Add support for YCbCr_420_888 and YCrCb_420_888 formats, more commonly known as NV12 and NV21. Bug: angleproject:5773 Change-Id: I1568d543c221ad110e7f199eb2ffd5df23a6134e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2787251 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 2e9161e4 2021-01-12T11:29:29 Vulkan: Add YUV G8_B8_R8_3PLANE_420_UNORM format. Bug: angleproject:5438 Change-Id: I525a51256a5ee83fa69c8705aa90790fb32a6602 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2623813 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 8d4331ee 2020-09-16T00:42:08 Vulkan: Free up 5 bits in RenderPassDesc Leveraging the fact that there are only a handful of depth/stencil formats, the last element of RenderPassDesc::mAttachmentFormats can contain other information in addition to the depth/stencil format ID. The FormatID enum is rearranged such that depth/stencil formats are placed first, as a result occupying values in [1, 7]. These values take up 3 bits in an element of RenderPassDesc::mAttachmentFormats (which could be the last element if all color draw buffers are attached). As a result, the upper 5 bits of the last element of RenderPassDesc::mAttachmentFormats is unused. It is intended for these bits to be used in the implementation of multisampled-render-to-texture depth/stencil renderbuffers. Bug: angleproject:4836 Change-Id: I0786e0712539cdbbf5494ec83aeee1dd93f936dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2413165 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 49108a12 2020-06-30T11:53:23 Support BGRA_1010102 IOSurfaces in CGL and Vulkan. Bug: chromium:1100599 Change-Id: I7bc2c2e35490e28e9f6fe8f2e0c26cdea50650b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275731 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brandon Schade a156df23 2020-03-20T08:12:34 Vulkan: add support for EXT_texture_sRGB_R8 Added support for EXT_texture_sRGB_R8. The GL_SR8_EXT format will be available if the VK ICD supports VK_FORMAT_R8_SRGB. This does not add support for emulation of this format. Bug: angleproject:4503 Bug: angleproject:3609 Test: dEQP-GLES3.functional.texture.*.srgb_r8_* Change-Id: Ifaec92ac1a8561881f54ddb7fdf0975112711736 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2135853 Commit-Queue: Brandon Schade <b.schade@samsung.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Alexey Knyazev 58fc8b11 2020-01-31T19:03:12 Implement RGTC (BC4, BC5) compressed texture formats gl.xml was modified as two enums were missing from their proper group. dxgi_support_data.json was fixed to not expect BC4 and BC5 on FL9_3 Bug: angleproject:3149 Change-Id: Ieb97a8cf8e92258c1b44e090e823fac227997174 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033068 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Le Quyen 6e653981 2019-10-09T15:19:02 Added PVRTC compression extension needed for Metal on iOS. Bug: angleproject:2634 Change-Id: I413f754fe5551b1e248bc2b824b327b92d8c70f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849076 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya fea65766 2019-09-19T09:30:38 Vulkan: Add support for OES_vertex_type_10_10_10_2 - Add support to CPU/GPU convert vertex formats - Add test cases for type conversion in angle_end2end_tests - Fix a bug in shader script by adding a ceil when calculating bytes Bug: angleproject:3192 Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed1010102* Change-Id: I57bab9fc1c1041cd734746d0e52a33717b635ec0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1788495 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jaedon Lee 3b46885e 2019-07-30T16:50:36 Vulkan: Implement EXT_texture_type_2_10_10_10_REV - Expose GLES 3.0 feature of 2_10_10_10_REV texture type on GLES 2.0 as EXT. - Handle alpha channel value as 1.0 when used with RGB format. - Add test for "RGB+UNSIGNED_INT_2_10_10_10_REV" case into TextureUploadFormatTest. BUG=angleproject:3232. Test: dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_texture_type_2_10_10_10_REV dEQP-GLES2.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev dEQP-GLES3.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev KHR-GLES2.core.internalformat.*2_10_10_10_rev* KHR-GLES3.core.internalformat.*2_10_10_10_rev* Change-Id: Iac00517971f9242161115c7256117a69093fb5df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1732618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d9c17107 2019-07-10T14:56:26 Add support for GL_OES_texture_compression_astc This extension adds 3D compressed texture formats, something ANGLE has not seen before. This requires tracking a compressed block depth for validation and image size computations. Update the ldr and hdr extension checks to be in line with the spec. HDR requires LDR and is not detectable by texture formats alone. Expose all of the ASTC extensions on the GL backend. BUG=angleproject:3675 Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill dbc605ce 2019-01-04T16:39:14 Vulkan: Optimize VBO state changes. Also has some minor optimizations for the front-end. 12% improvement on the Vulkan VBO change test. Bug: angleproject:3014 Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4 Reviewed-on: https://chromium-review.googlesource.com/c/1369286 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>