commit | 5873575b390f402588ff93c975af24d9ccba39bd | [log] [tgz] |
---|---|---|
author | Brian Ho <hob@chromium.org> | Wed Aug 10 13:42:28 2022 -0400 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Thu Aug 11 20:38:09 2022 +0000 |
tree | c676904b5928ad2980ad00679d85159c9b3a5389 | |
parent | 683a7ce892579bafe85b881100f21ecc4e8c8ba6 [diff] |
Disable BGRA MSAA on Mesa When a client attempts to wrap a GPU-backed texture into an SkSurface with MSAA, Ganesh will create a MSAA renderbuffer to first render to before resolving to the single-sampled texture [1]. Mesa claims to support EXT_texture_format_BGRA8888, and according to the spec [2], this should imply support for both BGRA textures and renderbuffers. In practice, however, Mesa only supports BGRA textures and will error on glRenderbufferStorage* if the internalformat is BGRA [3]. This causes issues on Chromebooks running mesa, so this CL disables BGRA MSAA in Skia. This will in turn be read by Chrome to stop antialiased rasterization of BGRA content. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/gpu/ganesh/gl/GrGLGpu.cpp;l=1298;drc=ee5503bf7e1ef7d95d7ff7b248fe82c2ab20d53a [2] https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt [3] https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/mesa/main/fbobject.c#L2326 Bug: b/240075426 Change-Id: Ie6f0d44325ec37567f2156936b273abb9a79a0cd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/567638 Commit-Queue: Brian Ho <hob@chromium.org> Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>