Changeset 266953 in webkit


Ignore:
Timestamp:
Sep 11, 2020 3:24:30 PM (4 years ago)
Author:
James Darpinian
Message:

[WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts
https://bugs.webkit.org/show_bug.cgi?id=216010

Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

  • src/libANGLE/formatutils.cpp:

(gl::SizedHalfFloatRGTextureAttachmentSupport):
(gl::SizedHalfFloatRGBTextureAttachmentSupport):
(gl::SizedHalfFloatRGBRenderbufferSupport):
(gl::SizedHalfFloatRGBATextureAttachmentSupport):

Source/WebCore:

Added test webgl/2.0.0/conformance2/extensions/ext-color-buffer-half-float.html

  • html/canvas/WebGL2RenderingContext.cpp:

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

LayoutTests:

  • webgl/2.0.0/conformance2/extensions/ext-color-buffer-half-float-expected.txt: Added.
  • webgl/2.0.0/conformance2/extensions/ext-color-buffer-half-float.html: Added.
  • webgl/2.0.0/conformance2/extensions/promoted-extensions-expected.txt:
  • webgl/2.0.0/resources/webgl_test_files/conformance2/extensions/ext-color-buffer-half-float.html: Added.
  • webgl/2.0.0/resources/webgl_test_files/conformance2/extensions/promoted-extensions.html:
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r266934 r266953  
     12020-09-11  James Darpinian  <jdarpinian@chromium.org>
     2
     3        [WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=216010
     5
     6        Reviewed by Kenneth Russell.
     7
     8        * webgl/2.0.0/conformance2/extensions/ext-color-buffer-half-float-expected.txt: Added.
     9        * webgl/2.0.0/conformance2/extensions/ext-color-buffer-half-float.html: Added.
     10        * webgl/2.0.0/conformance2/extensions/promoted-extensions-expected.txt:
     11        * webgl/2.0.0/resources/webgl_test_files/conformance2/extensions/ext-color-buffer-half-float.html: Added.
     12        * webgl/2.0.0/resources/webgl_test_files/conformance2/extensions/promoted-extensions.html:
     13
    1142020-09-11  Devin Rousso  <drousso@apple.com>
    215
  • trunk/LayoutTests/webgl/2.0.0/conformance2/extensions/promoted-extensions-expected.txt

    r265534 r266953  
    66[ 2: PASS ] ANGLE_instanced_arrays was not exposed in the WebGL 2.0 context
    77[ 3: PASS ] EXT_blend_minmax was not exposed in the WebGL 2.0 context
    8 [ 4: PASS ] EXT_color_buffer_half_float was not exposed in the WebGL 2.0 context
    9 [ 5: PASS ] EXT_frag_depth was not exposed in the WebGL 2.0 context
    10 [ 6: PASS ] EXT_shader_texture_lod was not exposed in the WebGL 2.0 context
    11 [ 7: PASS ] EXT_sRGB was not exposed in the WebGL 2.0 context
    12 [ 8: PASS ] OES_element_index_uint was not exposed in the WebGL 2.0 context
    13 [ 9: PASS ] OES_standard_derivatives was not exposed in the WebGL 2.0 context
    14 [ 10: FAIL ] OES_texture_float was exposed in the WebGL 2.0 context but should not have been
    15 [ 11: FAIL ] OES_texture_half_float was exposed in the WebGL 2.0 context but should not have been
    16 [ 12: FAIL ] OES_texture_half_float_linear was exposed in the WebGL 2.0 context but should not have been
    17 [ 13: PASS ] OES_vertex_array_object was not exposed in the WebGL 2.0 context
    18 [ 14: FAIL ] WEBGL_depth_texture was exposed in the WebGL 2.0 context but should not have been
    19 [ 15: PASS ] WEBGL_draw_buffers was not exposed in the WebGL 2.0 context
    20 [ 16: PASS ] successfullyParsed is true
     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
    2120[ FAIL ] 4 failures reported
  • trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/extensions/promoted-extensions.html

    r232783 r266953  
    6060    "ANGLE_instanced_arrays",
    6161    "EXT_blend_minmax",
    62     "EXT_color_buffer_half_float",
    6362    "EXT_frag_depth",
    6463    "EXT_shader_texture_lod",
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r266539 r266953  
     12020-09-11  James Darpinian  <jdarpinian@chromium.org>
     2
     3        [WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=216010
     5
     6        Reviewed by Kenneth Russell.
     7
     8        * src/libANGLE/formatutils.cpp:
     9        (gl::SizedHalfFloatRGTextureAttachmentSupport):
     10        (gl::SizedHalfFloatRGBTextureAttachmentSupport):
     11        (gl::SizedHalfFloatRGBRenderbufferSupport):
     12        (gl::SizedHalfFloatRGBATextureAttachmentSupport):
     13
    1142020-09-03  Kimmo Kinnunen  <kkinnunen@apple.com>
    215
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp

    r266445 r266953  
    187187    if (clientVersion >= Version(3, 0))
    188188    {
    189         return extensions.colorBufferFloat;
     189        return extensions.colorBufferFloat || (extensions.webglCompatibility && extensions.colorBufferHalfFloat);
    190190    }
    191191    // HALF_FLOAT_OES
     
    254254        // dEQP GLES3 es3fFboColorbufferTests.cpp verifies that texture attachment of GL_RGB16F
    255255        // is possible, so assume that all GLES implementations support it.
    256         return extensions.colorBufferHalfFloat;
     256        return extensions.colorBufferHalfFloat && !extensions.webglCompatibility;
    257257    }
    258258    // HALF_FLOAT_OES
     
    266266                                                 const Extensions &extensions)
    267267{
    268     return (clientVersion >= Version(3, 0) || extensions.textureHalfFloat) &&
    269            extensions.colorBufferHalfFloat;
     268    return !extensions.webglCompatibility && ((clientVersion >= Version(3, 0) || extensions.textureHalfFloat) &&
     269           extensions.colorBufferHalfFloat);
    270270}
    271271
     
    276276    if (clientVersion >= Version(3, 0))
    277277    {
    278         return extensions.colorBufferFloat;
     278        return extensions.colorBufferFloat || (extensions.webglCompatibility && extensions.colorBufferHalfFloat);
    279279    }
    280280    // HALF_FLOAT_OES
  • trunk/Source/WebCore/ChangeLog

    r266951 r266953  
     12020-09-11  James Darpinian  <jdarpinian@chromium.org>
     2
     3        [WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=216010
     5
     6        Reviewed by Kenneth Russell.
     7
     8        Added test webgl/2.0.0/conformance2/extensions/ext-color-buffer-half-float.html
     9
     10        * html/canvas/WebGL2RenderingContext.cpp:
     11        (WebCore::WebGL2RenderingContext::getExtension):
     12        (WebCore::WebGL2RenderingContext::getSupportedExtensions):
     13        (WebCore::WebGL2RenderingContext::renderbufferStorageImpl):
     14
    1152020-09-11  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp

    r266840 r266953  
    3131#include "CachedImage.h"
    3232#include "EXTColorBufferFloat.h"
     33#include "EXTColorBufferHalfFloat.h"
    3334#include "EXTTextureFilterAnisotropic.h"
    3435#include "EventLoop.h"
     
    26892690    ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s));
    26902691    ENABLE_IF_REQUESTED(EXTColorBufferFloat, m_extColorBufferFloat, "EXT_color_buffer_float", EXTColorBufferFloat::supported(*this));
     2692    ENABLE_IF_REQUESTED(EXTColorBufferHalfFloat, m_extColorBufferHalfFloat, "EXT_color_buffer_half_float", EXTColorBufferHalfFloat::supported(*this));
    26912693    return nullptr;
    26922694}
     
    27332735    if (EXTColorBufferFloat::supported(*this))
    27342736        result.append("EXT_color_buffer_float"_s);
     2737    if (EXTColorBufferHalfFloat::supported(*this))
     2738        result.append("EXT_color_buffer_half_float"_s);
    27352739
    27362740    return result;
     
    29622966    case GraphicsContextGL::RG16F:
    29632967    case GraphicsContextGL::RGBA16F:
     2968        if (!extensionIsEnabled("EXT_color_buffer_float"_s) && !extensionIsEnabled("EXT_color_buffer_half_float"_s)) {
     2969            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "EXT_color_buffer_float or EXT_color_buffer_half_float not enabled");
     2970            return;
     2971        }
     2972        renderbufferStorageHelper(target, samples, internalformat, width, height);
     2973        break;
    29642974    case GraphicsContextGL::R32F:
    29652975    case GraphicsContextGL::RG32F:
Note: See TracChangeset for help on using the changeset viewer.