Changeset 189838 in webkit


Ignore:
Timestamp:
Sep 15, 2015, 6:54:47 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[WebGL] Only require that the stencil value and write masks have as many bits set as the stencil buffer is deep
https://bugs.webkit.org/show_bug.cgi?id=149174

Patch by Jinyoung Hur <hur.ims@navercorp.com> on 2015-09-15
Reviewed by Dean Jackson.

Copied the stencil mask related tests from the webgl/1.0.2/resources/webgl_test_files/conformance/state/gl-get-calls.html.

It seems that there is a difference in the way that glGetIntegerV returns an unsigned int type value among
OpenGL implementatios. Some return the whole bits of value(e.g., 0xffffffff -> 0xffffffff), whereas some(e.g., ANGLE)
return a max-int-clamped value(e.g., 0xffffffff -> 0x7fffffff).

It would be good to make this test independent on the OpenGL implementations.

  • fast/canvas/webgl/gl-get-calls-expected.txt:
  • fast/canvas/webgl/gl-get-calls.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r189837 r189838  
     12015-09-15  Jinyoung Hur  <hur.ims@navercorp.com>
     2
     3        [WebGL] Only require that the stencil value and write masks have as many bits set as the stencil buffer is deep
     4        https://bugs.webkit.org/show_bug.cgi?id=149174
     5
     6        Reviewed by Dean Jackson.
     7
     8        Copied the stencil mask related tests from the webgl/1.0.2/resources/webgl_test_files/conformance/state/gl-get-calls.html.
     9
     10        It seems that there is a difference in the way that glGetIntegerV returns an unsigned int type value among
     11        OpenGL implementatios. Some return the whole bits of value(e.g., 0xffffffff -> 0xffffffff), whereas some(e.g., ANGLE)
     12        return a max-int-clamped value(e.g., 0xffffffff -> 0x7fffffff).
     13
     14        It would be good to make this test independent on the OpenGL implementations.
     15
     16        * fast/canvas/webgl/gl-get-calls-expected.txt:
     17        * fast/canvas/webgl/gl-get-calls.html:
     18
    1192015-09-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
    220
  • trunk/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt

    r107107 r189838  
    5555PASS context.getParameter(context.STENCIL_BACK_PASS_DEPTH_PASS) is context.KEEP
    5656PASS context.getParameter(context.STENCIL_BACK_REF) is 0
    57 PASS context.getParameter(context.STENCIL_BACK_VALUE_MASK) is 0xFFFFFFFF
    58 PASS context.getParameter(context.STENCIL_BACK_WRITEMASK) is 0xFFFFFFFF
     57PASS context.getParameter(context.STENCIL_BACK_VALUE_MASK) & minimumRequiredStencilMask is minimumRequiredStencilMask
     58PASS context.getParameter(context.STENCIL_BACK_WRITEMASK) & minimumRequiredStencilMask is minimumRequiredStencilMask
    5959PASS context.getParameter(context.STENCIL_BITS) >= 0 is true
    6060PASS context.getParameter(context.STENCIL_CLEAR_VALUE) is 0
     
    6565PASS context.getParameter(context.STENCIL_REF) is 0
    6666PASS context.getParameter(context.STENCIL_TEST) is false
    67 PASS context.getParameter(context.STENCIL_VALUE_MASK) is 0xFFFFFFFF
    68 PASS context.getParameter(context.STENCIL_WRITEMASK) is 0xFFFFFFFF
     67PASS context.getParameter(context.STENCIL_VALUE_MASK) & minimumRequiredStencilMask is minimumRequiredStencilMask
     68PASS context.getParameter(context.STENCIL_WRITEMASK) & minimumRequiredStencilMask is minimumRequiredStencilMask
    6969PASS context.getParameter(context.TEXTURE_BINDING_2D) is null
    7070PASS context.getParameter(context.TEXTURE_BINDING_CUBE_MAP) is null
  • trunk/LayoutTests/fast/canvas/webgl/gl-get-calls.html

    r177772 r189838  
    1818debug("Canvas.getContext");
    1919
     20var minimumRequiredStencilMask = 0;
    2021var context = create3DContext(document.getElementById("canvas"));
    2122if (!context)
     
    8283    shouldBe('context.getParameter(context.STENCIL_BACK_REF)', '0');
    8384
    84     shouldBe('context.getParameter(context.STENCIL_BACK_VALUE_MASK)', '0xFFFFFFFF');
    85     shouldBe('context.getParameter(context.STENCIL_BACK_WRITEMASK)', '0xFFFFFFFF');
     85    var stencilBits = context.getParameter(context.STENCIL_BITS);
     86    minimumRequiredStencilMask = (1 << stencilBits) - 1;
     87
     88    shouldBe('context.getParameter(context.STENCIL_BACK_VALUE_MASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
     89    shouldBe('context.getParameter(context.STENCIL_BACK_WRITEMASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
    8690
    8791    // If EXT_packed_depth_stencil is supported, STENCIL_BITS > 0; otherwise, STENCIL_BITS == 0.
     
    9599    shouldBe('context.getParameter(context.STENCIL_TEST)', 'false');
    96100
    97     shouldBe('context.getParameter(context.STENCIL_VALUE_MASK)', '0xFFFFFFFF');
    98     shouldBe('context.getParameter(context.STENCIL_WRITEMASK)', '0xFFFFFFFF');
     101    shouldBe('context.getParameter(context.STENCIL_VALUE_MASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
     102    shouldBe('context.getParameter(context.STENCIL_WRITEMASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
    99103
    100104    shouldBe('context.getParameter(context.TEXTURE_BINDING_2D)', 'null');
Note: See TracChangeset for help on using the changeset viewer.