Hash :
f102d75a
Author :
Date :
2024-08-14T19:52:30
Metal: translate IOSurface pbuffer's GL_RGB to RGBX/BGRX format. Currently when IOSurface is bound to a pbuffer with GL_RGB internal format, we asign angle format=B8G8R8A8_UNORM/R8G8B8A8_UNORM to it. And then disable alpha write to the respective MTLTexture. However, when an implicit MSAA texture is created for the above pbuffer, it will be assigned B8G8R8A8_UNORM/R8G8B8A8_UNORM angle format but has no knowledge about alpha write disable. Consequently, when a render pass uses this implicit MSAA texture, its alpha channel won't be cleared properly and would contain garbage values. In order to avoid the above bug, we should use B8G8R8X8_UNORM/R8G8B8X8_UNORM angle format for the IOSurface pbuffer. This will fix the render corruptions found in chromium:358957665. Bug: angleproject:42261786 Bug: chromium:358957665 Change-Id: I8aa1e24ace2de80dd08e21711445515ba4b339ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5788801 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
{
"src/libANGLE/renderer/angle_format.py":
"40f30bec0e6854efcd766d6d4542ea1a",
"src/libANGLE/renderer/angle_format_map.json":
"eab6744df71f7bf6bfe9e8bb39949b79",
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":
"3416880a331afddfc5c4501b1c86ba2b",
"src/libANGLE/renderer/metal/mtl_format_map.json":
"fb572fc58da6cdbe0e95b615cdfa4cb2",
"src/libANGLE/renderer/metal/mtl_format_table_autogen.mm":
"433a4c227780b7419fcf8cee0e249385"
}