Changeset 271062 in webkit


Ignore:
Timestamp:
Dec 22, 2020 12:40:46 PM (3 years ago)
Author:
commit-queue@webkit.org
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 <kbr@chromium.org> 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):

Location:
trunk/Source/ThirdParty/ANGLE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r270899 r271062  
     12020-12-22  Kenneth Russell  <kbr@chromium.org>
     2
     3        [WebGL2] deqp/functional/gles3/texturespecification RGB4444 and RGB565 failures on Mac AMD
     4        https://bugs.webkit.org/show_bug.cgi?id=220093
     5
     6        Reviewed by Alex Christensen.
     7
     8        Promote the RGBA4444 and RGB565 texture formats to RGB[A]8 in
     9        order to work around OpenGL driver bugs on macOS with AMD GPUs.
     10
     11        * include/platform/FeaturesGL.h:
     12        * src/libANGLE/renderer/gl/formatutilsgl.cpp:
     13        (rx::nativegl::GetNativeInternalFormat):
     14        * src/libANGLE/renderer/gl/renderergl_utils.cpp:
     15        (rx::nativegl_gl::InitializeFeatures):
     16
    1172020-12-16  Fujii Hironori  <Hironori.Fujii@sony.com>
    218
  • trunk/Source/ThirdParty/ANGLE/include/platform/FeaturesGL.h

    r270351 r271062  
    506506        "glGenerateMipmap fails if the zero texture level is not set on some Mac drivers.",
    507507        &members};
     508
     509    // On macOS with AMD GPUs, most of the packed color formats like RGB565 and RGBA4444 are
     510    // buggy. Promote them to 8 bit per channel formats.
     511    Feature promotePackedFormatsTo8BitPerChannel = {
     512        "promote_packed_formats_to_8_bit_per_channel", FeatureCategory::OpenGLWorkarounds,
     513        "Packed color formats are buggy on Macs with AMD GPUs", &members, "https://anglebug.com/4849"};
    508514};
    509515
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp

    r266364 r271062  
    496496        }
    497497
    498         if (features.rgba4IsNotSupportedForColorRendering.enabled &&
    499             internalFormat.sizedInternalFormat == GL_RGBA4)
     498        if (internalFormat.sizedInternalFormat == GL_RGBA4 &&
     499            (features.rgba4IsNotSupportedForColorRendering.enabled ||
     500             features.promotePackedFormatsTo8BitPerChannel.enabled))
    500501        {
    501502            // Use an 8-bit format instead
     
    504505
    505506        if (internalFormat.sizedInternalFormat == GL_RGB565 &&
    506             !functions->isAtLeastGL(gl::Version(4, 1)) &&
    507             !functions->hasGLExtension("GL_ARB_ES2_compatibility"))
     507            ((!functions->isAtLeastGL(gl::Version(4, 1)) &&
     508              !functions->hasGLExtension("GL_ARB_ES2_compatibility")) ||
     509             features.promotePackedFormatsTo8BitPerChannel.enabled))
    508510        {
    509511            // GL_RGB565 is required for basic ES2 functionality but was not added to desktop GL
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp

    r270351 r271062  
    16131613    bool isQualcomm = IsQualcomm(vendor);
    16141614    bool isVMWare   = IsVMWare(vendor);
     1615    bool hasAMD     = systemInfo.hasAMDGPU();
    16151616
    16161617    std::array<int, 3> mesaVersion = {0, 0, 0};
     
    18631864
    18641865    ANGLE_FEATURE_CONDITION(features, setZeroLevelBeforeGenerateMipmap, IsApple());
     1866
     1867    ANGLE_FEATURE_CONDITION(features, promotePackedFormatsTo8BitPerChannel, IsApple() && hasAMD);
    18651868}
    18661869
Note: See TracChangeset for help on using the changeset viewer.