Commit 5b96316be9158e5302ff8a5375fdc727ad0606d6

Geoff Lang 2024-10-17T14:00:41

Revert "Metal: translate IOSurface pbuffer's GL_RGB to RGBX/BGRX format." This reverts commit f102d75a39ec8980a617c179034c24f337b12d1c. Reason for revert: Suspecting this caused an GPU memory regression on Mac. Bug: chromium:374072906 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: I29238588f78f2d01c77a317b2a22670a8036d2e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5939455 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>