src/libANGLE/renderer/dxgi_format_map_autogen.cpp


Log

Author Commit Date CI Message
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>
Jamie Madill 4d3a0f60 2020-09-11T12:36:05 GN: Componentize D3D format tables. These tables are used by both the GL and D3D11 back-ends. Also moves them to renderer_utils to be in a shared place. Bug: angleproject:3943 Change-Id: I1f5d79842396a87e795547fa03c6855d6f9c5e9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405805 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>