Commit daa19c0a by Alexis Hetu Committed by Angle LUCI CQ

Fix alpha setting of WebGL contexts with SwANGLE on MacOS

The emulation of the "alpha: false" setting was done with an RGBA format under the hood, which caused some unexpected results, which included non constant alpha values. Replacing GL_BGRA8_EXT with GL_BGRX8_ANGLEX solves this issue. This was discovered while debugging the following test: conformance/context/context-no-alpha-fbo-with-alpha.html but it may fix many other tests (I will update the expectations file after this fix rolls into Chromium) Bug: chromium:1099960 Change-Id: Ib7b2d352a8e920983d3398de28a8c1dde3b97130 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3010579Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
parent 19ea3d11
......@@ -41,8 +41,8 @@ constexpr std::array<IOSurfaceFormatInfo, 9> kIOSurfaceFormats = {{
{GL_R16UI, GL_UNSIGNED_SHORT, 2, GL_R16UI },
{GL_RG, GL_UNSIGNED_BYTE, 2, GL_RG8 },
{GL_RG, GL_UNSIGNED_SHORT, 4, GL_RG16_EXT },
{GL_RGB, GL_UNSIGNED_BYTE, 4, GL_BGRA8_EXT},
{GL_BGRA_EXT, GL_UNSIGNED_BYTE, 4, GL_BGRA8_EXT},
{GL_RGB, GL_UNSIGNED_BYTE, 4, GL_BGRX8_ANGLEX },
{GL_BGRA_EXT, GL_UNSIGNED_BYTE, 4, GL_BGRA8_EXT },
{GL_RGB10_A2, GL_UNSIGNED_INT_2_10_10_10_REV, 4, GL_BGR10_A2_ANGLEX },
{GL_RGBA, GL_HALF_FLOAT, 8, GL_RGBA16F },
}};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment