Hash :
519d330c
Author :
Date :
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>
{
"src/libANGLE/renderer/angle_format.py":
"601bfb757e052c50ac8f4cb4e0b58eb5",
"src/libANGLE/renderer/angle_format_map.json":
"eab6744df71f7bf6bfe9e8bb39949b79",
"src/libANGLE/renderer/vulkan/gen_vk_format_table.py":
"6e4c403c145549c0baa69d65b5e73152",
"src/libANGLE/renderer/vulkan/vk_format_map.json":
"e6347f078d5ed2a225ba3834cd85778d",
"src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp":
"92531655e872af665b92c336b87258f1"
}