Changeset 65279 in webkit


Ignore:
Timestamp:
Aug 12, 2010 4:14:19 PM (14 years ago)
Author:
zmo@google.com
Message:

2010-08-12 Zhenyao Mo <zmo@google.com>

Reviewed by Dimitri Glazkov.

getParameter(STENCIL_VALUE_MASK) (and others) returns the wrong value
https://bugs.webkit.org/show_bug.cgi?id=31842

  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUnsignedLongParameter): Casting from int to unsigned long correctly.

2010-08-12 Zhenyao Mo <zmo@google.com>

Reviewed by Dimitri Glazkov.

getParameter(STENCIL_VALUE_MASK) (and others) returns the wrong value
https://bugs.webkit.org/show_bug.cgi?id=31842

  • fast/canvas/webgl/gl-get-calls-expected.txt: Bring back the commented out STENCIL tests.
  • fast/canvas/webgl/gl-get-calls.html: Ditto.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r65277 r65279  
     12010-08-12  Zhenyao Mo  <zmo@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        getParameter(STENCIL_VALUE_MASK) (and others) returns the wrong value
     6        https://bugs.webkit.org/show_bug.cgi?id=31842
     7
     8        * fast/canvas/webgl/gl-get-calls-expected.txt: Bring back the commented out STENCIL tests.
     9        * fast/canvas/webgl/gl-get-calls.html: Ditto.
     10
    1112010-08-12  Zhenyao Mo  <zmo@google.com>
    212
  • trunk/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt

    r63460 r65279  
    3131PASS context.getParameter(context.CULL_FACE_MODE) is context.BACK
    3232PASS context.getParameter(context.CURRENT_PROGRAM) is null
     33PASS context.getParameter(context.DEPTH_CLEAR_VALUE) is 1
    3334PASS context.getParameter(context.DEPTH_FUNC) is context.LESS
    3435PASS context.getParameter(context.DEPTH_RANGE) is [0, 1]
     
    5455PASS context.getParameter(context.STENCIL_BACK_PASS_DEPTH_PASS) is context.KEEP
    5556PASS context.getParameter(context.STENCIL_BACK_REF) is 0
     57PASS context.getParameter(context.STENCIL_BACK_VALUE_MASK) is 0xFFFFFFFF
     58PASS context.getParameter(context.STENCIL_BACK_WRITEMASK) is 0xFFFFFFFF
    5659PASS context.getParameter(context.STENCIL_BITS) >= 0 is true
    5760PASS context.getParameter(context.STENCIL_CLEAR_VALUE) is 0
     
    6265PASS context.getParameter(context.STENCIL_REF) is 0
    6366PASS context.getParameter(context.STENCIL_TEST) is false
     67PASS context.getParameter(context.STENCIL_VALUE_MASK) is 0xFFFFFFFF
     68PASS context.getParameter(context.STENCIL_WRITEMASK) is 0xFFFFFFFF
    6469PASS context.getParameter(context.TEXTURE_BINDING_2D) is null
    6570PASS context.getParameter(context.TEXTURE_BINDING_CUBE_MAP) is null
     
    7277PASS context.getParameter(context.MAX_VARYING_VECTORS) >= 8 is true
    7378PASS context.getParameter(context.NUM_COMPRESSED_TEXTURE_FORMATS) is 0
    74 FAIL context.getParameter(context.SHADER_COMPILER) should be true (of type boolean). Was null (of type object).
    7579
    7680PASS successfullyParsed is true
  • trunk/LayoutTests/fast/canvas/webgl/gl-get-calls.html

    r63444 r65279  
    3232    else
    3333      testFailed("context is not correct type");
    34  
     34
    3535    debug("");
    3636    debug("Context contains getError");
     
    5959    shouldBe('context.getParameter(context.CULL_FACE_MODE)', 'context.BACK');
    6060    shouldBe('context.getParameter(context.CURRENT_PROGRAM)', 'null');
     61    shouldBe('context.getParameter(context.DEPTH_CLEAR_VALUE)', '1');
    6162    shouldBe('context.getParameter(context.DEPTH_FUNC)', 'context.LESS');
    6263    shouldBe('context.getParameter(context.DEPTH_RANGE)', '[0, 1]');
     
    8384    shouldBe('context.getParameter(context.STENCIL_BACK_REF)', '0');
    8485
    85     // FIXME: Current WebKit implementation returns the wrong value (https://bugs.webkit.org/show_bug.cgi?id=31842)
    86     // Re-enable these tests as soon as that bug has been fixed.
    87     // shouldBe('context.getParameter(context.STENCIL_BACK_VALUE_MASK)', '0xFFFFFFFF');
    88     // shouldBe('context.getParameter(context.STENCIL_BACK_WRITEMASK)', '0xFFFFFFFF');
     86    shouldBe('context.getParameter(context.STENCIL_BACK_VALUE_MASK)', '0xFFFFFFFF');
     87    shouldBe('context.getParameter(context.STENCIL_BACK_WRITEMASK)', '0xFFFFFFFF');
    8988
    9089    // If EXT_packed_depth_stencil is supported, STENCIL_BITS > 0; otherwise, STENCIL_BITS == 0.
     
    9897    shouldBe('context.getParameter(context.STENCIL_TEST)', 'false');
    9998
    100     // FIXME: Current WebKit implementation returns the wrong value (https://bugs.webkit.org/show_bug.cgi?id=31842)
    101     // Re-enable these tests as soon as that bug has been fixed.
    102     // shouldBe('context.getParameter(context.STENCIL_VALUE_MASK)', '0xFFFFFFFF');
    103     // shouldBe('context.getParameter(context.STENCIL_WRITEMASK)', '0xFFFFFFFF');
     99    shouldBe('context.getParameter(context.STENCIL_VALUE_MASK)', '0xFFFFFFFF');
     100    shouldBe('context.getParameter(context.STENCIL_WRITEMASK)', '0xFFFFFFFF');
    104101
    105102    shouldBe('context.getParameter(context.TEXTURE_BINDING_2D)', 'null');
     
    113110    shouldBeTrue('context.getParameter(context.MAX_VARYING_VECTORS) >= 8');
    114111    shouldBe('context.getParameter(context.NUM_COMPRESSED_TEXTURE_FORMATS)', '0');
    115     shouldBe('context.getParameter(context.SHADER_COMPILER)', 'true');
    116112}
    117113
  • trunk/WebCore/ChangeLog

    r65278 r65279  
     12010-08-12  Zhenyao Mo  <zmo@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        getParameter(STENCIL_VALUE_MASK) (and others) returns the wrong value
     6        https://bugs.webkit.org/show_bug.cgi?id=31842
     7
     8        * html/canvas/WebGLRenderingContext.cpp:
     9        (WebCore::WebGLRenderingContext::getUnsignedLongParameter): Casting from int to unsigned long correctly.
     10
    1112010-08-12  Pavel Feldman  <pfeldman@chromium.org>
    212
  • trunk/WebCore/html/canvas/WebGLRenderingContext.cpp

    r65192 r65279  
    29522952    int value;
    29532953    m_context->getIntegerv(pname, &value);
    2954     return WebGLGetInfo(static_cast<unsigned long>(value));
     2954    unsigned int uValue = static_cast<unsigned int>(value);
     2955    return WebGLGetInfo(static_cast<unsigned long>(uValue));
    29552956}
    29562957
Note: See TracChangeset for help on using the changeset viewer.