Title: [189687] releases/WebKitGTK/webkit-2.10
Revision
189687
Author
carlo...@webkit.org
Date
2015-09-14 00:55:00 -0700 (Mon, 14 Sep 2015)

Log Message

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

Patch by Jinyoung Hur <hur....@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:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (189686 => 189687)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-09-14 07:53:04 UTC (rev 189686)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-09-14 07:55:00 UTC (rev 189687)
@@ -1,3 +1,15 @@
+2015-08-19  Jinyoung Hur  <hur....@navercorp.com>
+
+        GraphicsContext3D::activeTexture should not be called with zero-based index
+        https://bugs.webkit.org/show_bug.cgi?id=148020
+
+        Reviewed by Alex Christensen.
+
+        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:
+
 2015-08-21  Chris Dumez  <cdu...@apple.com>
 
         Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt (189686 => 189687)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt	2015-09-14 07:53:04 UTC (rev 189686)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt	2015-09-14 07:55:00 UTC (rev 189687)
@@ -2,6 +2,9 @@
 Checks that a texture that is not -texture-complete- does not draw if filtering needs mips
 
 PASS texture that is not -texture-complete- when TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255
+PASS getError was expected value: NO_ERROR : Should be no errors from setup.
+PASS meaningless change of the active texture should not affect the black-texture fallback.
+PASS getError was expected value: NO_ERROR : Should be no errors from setup.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/canvas/webgl/texture-complete.html (189686 => 189687)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/canvas/webgl/texture-complete.html	2015-09-14 07:53:04 UTC (rev 189686)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/canvas/webgl/texture-complete.html	2015-09-14 07:55:00 UTC (rev 189687)
@@ -90,7 +90,14 @@
   checkBuffer(0,0,0,255,
       "texture that is not -texture-complete- when " +
       "TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
+  glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
 
+  gl.activeTexture(gl.TEXTURE1);
+  checkBuffer(0,0,0,255,
+      "meaningless change of the active texture should not affect the black-texture fallback.");
+  glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+  gl.activeTexture(gl.TEXTURE0);
+
   function checkBuffer(r, g, b, a, msg) {
     gl.clearColor(1,1,1,1);
     gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (189686 => 189687)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2015-09-14 07:53:04 UTC (rev 189686)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2015-09-14 07:55:00 UTC (rev 189687)
@@ -1,3 +1,18 @@
+2015-08-19  Jinyoung Hur  <hur....@navercorp.com>
+
+        GraphicsContext3D::activeTexture should not be called with zero-based index
+        https://bugs.webkit.org/show_bug.cgi?id=148020
+
+        Reviewed by Alex Christensen.
+
+        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):
+
 2015-08-19  Brent Fulgham  <bfulg...@apple.com>
 
         Scrollable area container is not properly cleared when page is going into the PageCache

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (189686 => 189687)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2015-09-14 07:53:04 UTC (rev 189686)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2015-09-14 07:55:00 UTC (rev 189687)
@@ -4035,10 +4035,10 @@
         if ((m_textureUnits[ii].texture2DBinding && m_textureUnits[ii].texture2DBinding->needToUseBlackTexture(extensions))
             || (m_textureUnits[ii].textureCubeMapBinding && m_textureUnits[ii].textureCubeMapBinding->needToUseBlackTexture(extensions))) {
             if (ii != m_activeTextureUnit) {
-                m_context->activeTexture(ii);
+                m_context->activeTexture(ii + GraphicsContext3D::TEXTURE0);
                 resetActiveUnit = true;
             } else if (resetActiveUnit) {
-                m_context->activeTexture(ii);
+                m_context->activeTexture(ii + GraphicsContext3D::TEXTURE0);
                 resetActiveUnit = false;
             }
             WebGLTexture* tex2D;
@@ -4061,7 +4061,7 @@
         }
     }
     if (resetActiveUnit)
-        m_context->activeTexture(m_activeTextureUnit);
+        m_context->activeTexture(m_activeTextureUnit + GraphicsContext3D::TEXTURE0);
 }
 
 void WebGLRenderingContextBase::createFallbackBlackTextures1x1()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to