Changeset 188666 in webkit


Ignore:
Timestamp:
Aug 19, 2015 5:27:00 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

GraphicsContext3D::activeTexture should not be called with zero-based index
https://bugs.webkit.org/show_bug.cgi?id=148020

Patch by Jinyoung Hur <hur.ims@navercorp.com> on 2015-08-19
Reviewed by Alex Christensen.

Source/WebCore:

GraphicsContext3D::activeTexture should be called with an argument that is greater than or equal to
GraphicsContext3D::TEXTURE0.

Test: fast/canvas/webgl/texture-complete.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::checkTextureCompleteness):

LayoutTests:

Insert WebGLRenderingContext.activeTexture call during the texture complete test to verify
a meaningless change of the active texture doesn't make any gl errors.

  • fast/canvas/webgl/texture-complete.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r188658 r188666  
     12015-08-19  Jinyoung Hur  <hur.ims@navercorp.com>
     2
     3        GraphicsContext3D::activeTexture should not be called with zero-based index
     4        https://bugs.webkit.org/show_bug.cgi?id=148020
     5
     6        Reviewed by Alex Christensen.
     7
     8        Insert WebGLRenderingContext.activeTexture call during the texture complete test to verify
     9        a meaningless change of the active texture doesn't make any gl errors.
     10
     11        * fast/canvas/webgl/texture-complete.html:
     12
    1132015-08-19  Zalan Bujtas  <zalan@apple.com>
    214
  • trunk/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt

    r63253 r188666  
    33
    44PASS texture that is not -texture-complete- when TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255
     5PASS getError was expected value: NO_ERROR : Should be no errors from setup.
     6PASS meaningless change of the active texture should not affect the black-texture fallback.
     7PASS getError was expected value: NO_ERROR : Should be no errors from setup.
    58PASS successfullyParsed is true
    69
  • trunk/LayoutTests/fast/canvas/webgl/texture-complete.html

    r177772 r188666  
    9191      "texture that is not -texture-complete- when " +
    9292      "TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
     93  glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
     94
     95  gl.activeTexture(gl.TEXTURE1);
     96  checkBuffer(0,0,0,255,
     97      "meaningless change of the active texture should not affect the black-texture fallback.");
     98  glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
     99  gl.activeTexture(gl.TEXTURE0);
    93100
    94101  function checkBuffer(r, g, b, a, msg) {
  • trunk/Source/WebCore/ChangeLog

    r188663 r188666  
     12015-08-19  Jinyoung Hur  <hur.ims@navercorp.com>
     2
     3        GraphicsContext3D::activeTexture should not be called with zero-based index
     4        https://bugs.webkit.org/show_bug.cgi?id=148020
     5
     6        Reviewed by Alex Christensen.
     7
     8        GraphicsContext3D::activeTexture should be called with an argument that is greater than or equal to
     9        GraphicsContext3D::TEXTURE0.
     10
     11        Test: fast/canvas/webgl/texture-complete.html
     12
     13        * html/canvas/WebGLRenderingContextBase.cpp:
     14        (WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
     15
    1162015-08-19  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

    r187189 r188666  
    40364036            || (m_textureUnits[ii].textureCubeMapBinding && m_textureUnits[ii].textureCubeMapBinding->needToUseBlackTexture(extensions))) {
    40374037            if (ii != m_activeTextureUnit) {
    4038                 m_context->activeTexture(ii);
     4038                m_context->activeTexture(ii + GraphicsContext3D::TEXTURE0);
    40394039                resetActiveUnit = true;
    40404040            } else if (resetActiveUnit) {
    4041                 m_context->activeTexture(ii);
     4041                m_context->activeTexture(ii + GraphicsContext3D::TEXTURE0);
    40424042                resetActiveUnit = false;
    40434043            }
     
    40624062    }
    40634063    if (resetActiveUnit)
    4064         m_context->activeTexture(m_activeTextureUnit);
     4064        m_context->activeTexture(m_activeTextureUnit + GraphicsContext3D::TEXTURE0);
    40654065}
    40664066
Note: See TracChangeset for help on using the changeset viewer.