Commit 182aa4071abccfffb12136ef353c7930309f210b

Le Hoang Quyen 2024-08-14T19:52:30

Reland "Metal: translate IOSurface pbuffer's GL_RGB to RGBX/BGRX format." This is a reland of commit f102d75a39ec8980a617c179034c24f337b12d1c Nothing changed, it's just that the root cause was already fixed in https://chromium-review.googlesource.com/c/angle/angle/+/5937060. Original change's description: > 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> Bug: angleproject:42261786 Bug: chromium:358957665 Change-Id: I1e090886ed493eafce35d2ba98010c3be7bc16c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5937061 Reviewed-by: Kenneth Russell <kbr@chromium.org> Auto-Submit: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>