Changeset 267811 in webkit


Ignore:
Timestamp:
Sep 30, 2020 5:01:35 PM (4 years ago)
Author:
James Darpinian
Message:

Expose pvrtc extension without vendor prefix and remove redundant WebGL 2 extensions
https://bugs.webkit.org/show_bug.cgi?id=217110

Reviewed by Kenneth Russell.

Extensions are tested in LayoutTests/webgl

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/webgl/2.0.0/conformance2/extensions/promoted-extensions-expected.txt

    r266953 r267811  
    22
    33Test: ../../resources/webgl_test_files/conformance2/extensions/promoted-extensions.html
    4 
    5 [ 1: PASS ] gl = wtu.create3DContext(undefined, undefined, 2) is non-null.
    6 [ 2: PASS ] ANGLE_instanced_arrays was not exposed in the WebGL 2.0 context
    7 [ 3: PASS ] EXT_blend_minmax was not exposed in the WebGL 2.0 context
    8 [ 4: PASS ] EXT_frag_depth was not exposed in the WebGL 2.0 context
    9 [ 5: PASS ] EXT_shader_texture_lod was not exposed in the WebGL 2.0 context
    10 [ 6: PASS ] EXT_sRGB was not exposed in the WebGL 2.0 context
    11 [ 7: PASS ] OES_element_index_uint was not exposed in the WebGL 2.0 context
    12 [ 8: PASS ] OES_standard_derivatives was not exposed in the WebGL 2.0 context
    13 [ 9: FAIL ] OES_texture_float was exposed in the WebGL 2.0 context but should not have been
    14 [ 10: FAIL ] OES_texture_half_float was exposed in the WebGL 2.0 context but should not have been
    15 [ 11: FAIL ] OES_texture_half_float_linear was exposed in the WebGL 2.0 context but should not have been
    16 [ 12: PASS ] OES_vertex_array_object was not exposed in the WebGL 2.0 context
    17 [ 13: FAIL ] WEBGL_depth_texture was exposed in the WebGL 2.0 context but should not have been
    18 [ 14: PASS ] WEBGL_draw_buffers was not exposed in the WebGL 2.0 context
    19 [ 15: PASS ] successfullyParsed is true
    20 [ FAIL ] 4 failures reported
     4[ PASS ] All tests passed
  • trunk/Source/WebCore/ChangeLog

    r267809 r267811  
     12020-09-30  James Darpinian  <jdarpinian@chromium.org>
     2
     3        Expose pvrtc extension without vendor prefix and remove redundant WebGL 2 extensions
     4        https://bugs.webkit.org/show_bug.cgi?id=217110
     5
     6        Reviewed by Kenneth Russell.
     7
     8        Extensions are tested in LayoutTests/webgl
     9
     10        * html/canvas/WebGL2RenderingContext.cpp:
     11        (WebCore::WebGL2RenderingContext::getExtension):
     12        (WebCore::WebGL2RenderingContext::getSupportedExtensions):
     13        * html/canvas/WebGLRenderingContext.cpp:
     14        (WebCore::WebGLRenderingContext::getExtension):
     15        (WebCore::WebGLRenderingContext::getSupportedExtensions):
     16
    1172020-09-30  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp

    r267601 r267811  
    4343#include "InspectorInstrumentation.h"
    4444#include "Logging.h"
    45 #include "OESTextureFloat.h"
    4645#include "OESTextureFloatLinear.h"
    47 #include "OESTextureHalfFloat.h"
    48 #include "OESTextureHalfFloatLinear.h"
    4946#include "RenderBox.h"
    5047#include "RuntimeEnabledFeatures.h"
     
    5956#include "WebGLDebugRendererInfo.h"
    6057#include "WebGLDebugShaders.h"
    61 #include "WebGLDepthTexture.h"
    6258#include "WebGLLoseContext.h"
    6359#include "WebGLQuery.h"
     
    26772673
    26782674    ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s));
    2679     ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", enableSupportedExtension("GL_OES_texture_float"_s));
    26802675    ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear"_s));
    2681     ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", enableSupportedExtension("GL_OES_texture_half_float"_s));
    2682     ENABLE_IF_REQUESTED(OESTextureHalfFloatLinear, m_oesTextureHalfFloatLinear, "OES_texture_half_float_linear", enableSupportedExtension("GL_OES_texture_half_float_linear"_s));
    26832676    ENABLE_IF_REQUESTED(WebGLLoseContext, m_webglLoseContext, "WEBGL_lose_context", true);
    26842677    ENABLE_IF_REQUESTED(WebGLCompressedTextureASTC, m_webglCompressedTextureASTC, "WEBGL_compressed_texture_astc", WebGLCompressedTextureASTC::supported(*this));
     
    26872680    ENABLE_IF_REQUESTED(WebGLCompressedTextureETC1, m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1", WebGLCompressedTextureETC1::supported(*this));
    26882681    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this));
     2682    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this));
    26892683    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc", WebGLCompressedTextureS3TC::supported(*this));
    26902684    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TCsRGB, m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb", WebGLCompressedTextureS3TCsRGB::supported(*this));
    2691     ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*graphicsContextGL()));
    26922685    ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true);
    26932686    ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s));
     
    27092702
    27102703    auto& extensions = m_context->getExtensions();
    2711     if (extensions.supports("GL_OES_texture_float"_s))
    2712         result.append("OES_texture_float"_s);
    27132704    if (extensions.supports("GL_OES_texture_float_linear"_s))
    27142705        result.append("OES_texture_float_linear"_s);
    2715     if (extensions.supports("GL_OES_texture_half_float"_s))
    2716         result.append("OES_texture_half_float"_s);
    2717     if (extensions.supports("GL_OES_texture_half_float_linear"_s))
    2718         result.append("OES_texture_half_float_linear"_s);
    27192706    if (extensions.supports("GL_EXT_texture_filter_anisotropic"_s))
    27202707        result.append("EXT_texture_filter_anisotropic"_s);
     
    27272714    if (WebGLCompressedTextureETC1::supported(*this))
    27282715        result.append("WEBGL_compressed_texture_etc1"_s);
    2729     if (WebGLCompressedTexturePVRTC::supported(*this))
     2716    if (WebGLCompressedTexturePVRTC::supported(*this)) {
    27302717        result.append("WEBKIT_WEBGL_compressed_texture_pvrtc"_s);
     2718        result.append("WEBGL_compressed_texture_pvrtc"_s);
     2719    }
    27312720    if (WebGLCompressedTextureS3TC::supported(*this))
    27322721        result.append("WEBGL_compressed_texture_s3tc"_s);
    27332722    if (WebGLCompressedTextureS3TCsRGB::supported(*this))
    27342723        result.append("WEBGL_compressed_texture_s3tc_srgb"_s);
    2735     if (WebGLDepthTexture::supported(*graphicsContextGL()))
    2736         result.append("WEBGL_depth_texture"_s);
    27372724    result.append("WEBGL_lose_context"_s);
    27382725    if (extensions.supports("GL_ANGLE_translated_shader_source"_s))
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r267613 r267811  
    168168    ENABLE_IF_REQUESTED(WebGLCompressedTextureETC1, m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1", WebGLCompressedTextureETC1::supported(*this));
    169169    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this));
     170    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this));
    170171    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc", WebGLCompressedTextureS3TC::supported(*this));
    171172    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TCsRGB, m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb", WebGLCompressedTextureS3TCsRGB::supported(*this));
     
    248249    if (WebGLCompressedTextureETC1::supported(*this))
    249250        result.append("WEBGL_compressed_texture_etc1"_s);
    250     if (WebGLCompressedTexturePVRTC::supported(*this))
     251    if (WebGLCompressedTexturePVRTC::supported(*this)) {
    251252        result.append("WEBKIT_WEBGL_compressed_texture_pvrtc"_s);
     253        result.append("WEBGL_compressed_texture_pvrtc"_s);
     254    }
    252255    if (WebGLCompressedTextureS3TC::supported(*this))
    253256        result.append("WEBGL_compressed_texture_s3tc"_s);
Note: See TracChangeset for help on using the changeset viewer.