- Revision
- 188666
- Author
- commit-qu...@webkit.org
- Date
- 2015-08-19 17:27:00 -0700 (Wed, 19 Aug 2015)
Log 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....@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: trunk/LayoutTests/ChangeLog (188665 => 188666)
--- trunk/LayoutTests/ChangeLog 2015-08-20 00:23:26 UTC (rev 188665)
+++ trunk/LayoutTests/ChangeLog 2015-08-20 00:27:00 UTC (rev 188666)
@@ -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-19 Zalan Bujtas <za...@apple.com>
outline-style: auto leaves bits behind on strava's flyby view.
Modified: trunk/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt (188665 => 188666)
--- trunk/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt 2015-08-20 00:23:26 UTC (rev 188665)
+++ trunk/LayoutTests/fast/canvas/webgl/texture-complete-expected.txt 2015-08-20 00:27:00 UTC (rev 188666)
@@ -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: trunk/LayoutTests/fast/canvas/webgl/texture-complete.html (188665 => 188666)
--- trunk/LayoutTests/fast/canvas/webgl/texture-complete.html 2015-08-20 00:23:26 UTC (rev 188665)
+++ trunk/LayoutTests/fast/canvas/webgl/texture-complete.html 2015-08-20 00:27:00 UTC (rev 188666)
@@ -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: trunk/Source/WebCore/ChangeLog (188665 => 188666)
--- trunk/Source/WebCore/ChangeLog 2015-08-20 00:23:26 UTC (rev 188665)
+++ trunk/Source/WebCore/ChangeLog 2015-08-20 00:27:00 UTC (rev 188666)
@@ -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 Chris Dumez <cdu...@apple.com>
Avoid double hash lookup in our JS bindings named property getter code
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (188665 => 188666)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2015-08-20 00:23:26 UTC (rev 188665)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2015-08-20 00:27:00 UTC (rev 188666)
@@ -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()