Title: [271062] trunk/Source/ThirdParty/ANGLE
- Revision
- 271062
- Author
- [email protected]
- Date
- 2020-12-22 12:40:46 -0800 (Tue, 22 Dec 2020)
Log Message
[WebGL2] deqp/functional/gles3/texturespecification RGB4444 and RGB565 failures on Mac AMD
https://bugs.webkit.org/show_bug.cgi?id=220093
Patch by Kenneth Russell <[email protected]> on 2020-12-22
Reviewed by Alex Christensen.
Promote the RGBA4444 and RGB565 texture formats to RGB[A]8 in
order to work around OpenGL driver bugs on macOS with AMD GPUs.
* include/platform/FeaturesGL.h:
* src/libANGLE/renderer/gl/formatutilsgl.cpp:
(rx::nativegl::GetNativeInternalFormat):
* src/libANGLE/renderer/gl/renderergl_utils.cpp:
(rx::nativegl_gl::InitializeFeatures):
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (271061 => 271062)
--- trunk/Source/ThirdParty/ANGLE/ChangeLog 2020-12-22 20:30:23 UTC (rev 271061)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2020-12-22 20:40:46 UTC (rev 271062)
@@ -1,3 +1,19 @@
+2020-12-22 Kenneth Russell <[email protected]>
+
+ [WebGL2] deqp/functional/gles3/texturespecification RGB4444 and RGB565 failures on Mac AMD
+ https://bugs.webkit.org/show_bug.cgi?id=220093
+
+ Reviewed by Alex Christensen.
+
+ Promote the RGBA4444 and RGB565 texture formats to RGB[A]8 in
+ order to work around OpenGL driver bugs on macOS with AMD GPUs.
+
+ * include/platform/FeaturesGL.h:
+ * src/libANGLE/renderer/gl/formatutilsgl.cpp:
+ (rx::nativegl::GetNativeInternalFormat):
+ * src/libANGLE/renderer/gl/renderergl_utils.cpp:
+ (rx::nativegl_gl::InitializeFeatures):
+
2020-12-16 Fujii Hironori <[email protected]>
[WinCairo] Enable USE_ANGLE
Modified: trunk/Source/ThirdParty/ANGLE/include/platform/FeaturesGL.h (271061 => 271062)
--- trunk/Source/ThirdParty/ANGLE/include/platform/FeaturesGL.h 2020-12-22 20:30:23 UTC (rev 271061)
+++ trunk/Source/ThirdParty/ANGLE/include/platform/FeaturesGL.h 2020-12-22 20:40:46 UTC (rev 271062)
@@ -505,6 +505,12 @@
"set_zero_level_before_generating_mipmap", FeatureCategory::OpenGLWorkarounds,
"glGenerateMipmap fails if the zero texture level is not set on some Mac drivers.",
&members};
+
+ // On macOS with AMD GPUs, most of the packed color formats like RGB565 and RGBA4444 are
+ // buggy. Promote them to 8 bit per channel formats.
+ Feature promotePackedFormatsTo8BitPerChannel = {
+ "promote_packed_formats_to_8_bit_per_channel", FeatureCategory::OpenGLWorkarounds,
+ "Packed color formats are buggy on Macs with AMD GPUs", &members, "https://anglebug.com/4849"};
};
inline FeaturesGL::FeaturesGL() = default;
Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp (271061 => 271062)
--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp 2020-12-22 20:30:23 UTC (rev 271061)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp 2020-12-22 20:40:46 UTC (rev 271062)
@@ -495,8 +495,9 @@
result = GL_RGBA8;
}
- if (features.rgba4IsNotSupportedForColorRendering.enabled &&
- internalFormat.sizedInternalFormat == GL_RGBA4)
+ if (internalFormat.sizedInternalFormat == GL_RGBA4 &&
+ (features.rgba4IsNotSupportedForColorRendering.enabled ||
+ features.promotePackedFormatsTo8BitPerChannel.enabled))
{
// Use an 8-bit format instead
result = GL_RGBA8;
@@ -503,8 +504,9 @@
}
if (internalFormat.sizedInternalFormat == GL_RGB565 &&
- !functions->isAtLeastGL(gl::Version(4, 1)) &&
- !functions->hasGLExtension("GL_ARB_ES2_compatibility"))
+ ((!functions->isAtLeastGL(gl::Version(4, 1)) &&
+ !functions->hasGLExtension("GL_ARB_ES2_compatibility")) ||
+ features.promotePackedFormatsTo8BitPerChannel.enabled))
{
// GL_RGB565 is required for basic ES2 functionality but was not added to desktop GL
// until 4.1.
Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp (271061 => 271062)
--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp 2020-12-22 20:30:23 UTC (rev 271061)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp 2020-12-22 20:40:46 UTC (rev 271062)
@@ -1612,6 +1612,7 @@
bool isNvidia = IsNvidia(vendor);
bool isQualcomm = IsQualcomm(vendor);
bool isVMWare = IsVMWare(vendor);
+ bool hasAMD = systemInfo.hasAMDGPU();
std::array<int, 3> mesaVersion = {0, 0, 0};
bool isMesa = IsMesa(functions, &mesaVersion);
@@ -1862,6 +1863,8 @@
ANGLE_FEATURE_CONDITION(features, keepBufferShadowCopy, !CanMapBufferForRead(functions));
ANGLE_FEATURE_CONDITION(features, setZeroLevelBeforeGenerateMipmap, IsApple());
+
+ ANGLE_FEATURE_CONDITION(features, promotePackedFormatsTo8BitPerChannel, IsApple() && hasAMD);
}
void InitializeFrontendFeatures(const FunctionsGL *functions, angle::FrontendFeatures *features)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes