[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
zmo at google.com
zmo at google.com
Mon Feb 21 00:34:21 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 4deb2045e6462e447e0845349158aaeca6abcf84
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 1 22:42:47 2011 +0000
2011-02-01 Zhenyao Mo <zmo at google.com>
Reviewed by Kenneth Russell.
getUniform should support SAMPLER_2D or SAMPLER_CUBE
https://bugs.webkit.org/show_bug.cgi?id=52190
* fast/canvas/webgl/gl-object-get-calls-expected.txt:
* fast/canvas/webgl/gl-object-get-calls.html: Test getUniform with sampler2D and samplerCube uniforms.
* fast/canvas/webgl/resources/noopUniformShader.vert: Added.
* fast/canvas/webgl/resources/samplerUniformShader.frag: Added.
2011-02-01 Patrick Gansterer <paroga at webkit.org>
Unreviewed WinCE build fix for r77286.
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::TransparentLayerDC::TransparentLayerDC):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c7884de..5349312 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-02-01 Zhenyao Mo <zmo at google.com>
+
+ Reviewed by Kenneth Russell.
+
+ getUniform should support SAMPLER_2D or SAMPLER_CUBE
+ https://bugs.webkit.org/show_bug.cgi?id=52190
+
+ * fast/canvas/webgl/gl-object-get-calls-expected.txt:
+ * fast/canvas/webgl/gl-object-get-calls.html: Test getUniform with sampler2D and samplerCube uniforms.
+ * fast/canvas/webgl/resources/noopUniformShader.vert: Added.
+ * fast/canvas/webgl/resources/samplerUniformShader.frag: Added.
+
2011-02-01 Chris Fleizach <cfleizach at apple.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt b/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt
index 38d433e..2a8f205 100644
--- a/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt
@@ -62,6 +62,10 @@ PASS gl.getUniform(floatProgram, fvalLoc) is 11
PASS gl.getUniform(floatProgram, fval2Loc) is [12, 13]
PASS gl.getUniform(floatProgram, fval3Loc) is [14, 15, 16]
PASS gl.getUniform(floatProgram, fval4Loc) is [17, 18, 19, 20]
+PASS gl.getProgramParameter(samplerProgram, gl.LINK_STATUS) is true
+PASS getError was expected value: NO_ERROR :
+PASS gl.getUniform(samplerProgram, s2DValLoc) is 0
+PASS gl.getUniform(samplerProgram, sCubeValLoc) is 1
PASS gl.getProgramParameter(matProgram, gl.LINK_STATUS) is true
PASS getError was expected value: NO_ERROR :
PASS gl.getUniform(matProgram, mval2Loc) is [1, 2, 3, 4]
diff --git a/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html b/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
index 073e169..2abbf19 100644
--- a/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
+++ b/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
@@ -182,6 +182,17 @@ shouldBe('gl.getUniform(floatProgram, fvalLoc)', '11');
shouldBe('gl.getUniform(floatProgram, fval2Loc)', '[12, 13]');
shouldBe('gl.getUniform(floatProgram, fval3Loc)', '[14, 15, 16]');
shouldBe('gl.getUniform(floatProgram, fval4Loc)', '[17, 18, 19, 20]');
+// Sampler uniform variables
+var samplerProgram = loadProgram(gl, "resources/noopUniformShader.vert", "resources/samplerUniformShader.frag");
+shouldBe('gl.getProgramParameter(samplerProgram, gl.LINK_STATUS)', 'true');
+var s2DValLoc = gl.getUniformLocation(samplerProgram, "s2D");
+var sCubeValLoc = gl.getUniformLocation(samplerProgram, "sCube");
+gl.useProgram(samplerProgram);
+gl.uniform1i(s2DValLoc, 0);
+gl.uniform1i(sCubeValLoc, 1);
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBe('gl.getUniform(samplerProgram, s2DValLoc)', '0');
+shouldBe('gl.getUniform(samplerProgram, sCubeValLoc)', '1');
// Matrix uniform variables
var matProgram = loadProgram(gl, "resources/matUniformShader.vert", "resources/noopUniformShader.frag");
shouldBe('gl.getProgramParameter(matProgram, gl.LINK_STATUS)', 'true');
diff --git a/LayoutTests/fast/canvas/webgl/resources/noopUniformShader.vert b/LayoutTests/fast/canvas/webgl/resources/noopUniformShader.vert
new file mode 100644
index 0000000..821e440
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/resources/noopUniformShader.vert
@@ -0,0 +1,4 @@
+void main()
+{
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/LayoutTests/fast/canvas/webgl/resources/samplerUniformShader.frag b/LayoutTests/fast/canvas/webgl/resources/samplerUniformShader.frag
new file mode 100644
index 0000000..11cba12
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/resources/samplerUniformShader.frag
@@ -0,0 +1,8 @@
+precision mediump float;
+uniform sampler2D s2D;
+uniform samplerCube sCube;
+void main()
+{
+ gl_FragColor = texture2D(s2D, vec2(0.5, 0.5)) +
+ textureCube(sCube, vec3(0.5, 0.5, 0.5));
+}
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 8a0fd77..ec7da28 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -28,6 +28,16 @@
2011-02-01 Zhenyao Mo <zmo at google.com>
+ Reviewed by Kenneth Russell.
+
+ getUniform should support SAMPLER_2D or SAMPLER_CUBE
+ https://bugs.webkit.org/show_bug.cgi?id=52190
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getUniform):
+
+2011-02-01 Zhenyao Mo <zmo at google.com>
+
Reviewed by Darin Adler.
Fix the incorrect usage of RetainPtr cases in GraphicsContext3DCG.cpp
diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
index 10ec7e3..f7df56c 100644
--- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -2318,9 +2318,13 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG
baseType = GraphicsContext3D::FLOAT;
length = 16;
break;
+ case GraphicsContext3D::SAMPLER_2D:
+ case GraphicsContext3D::SAMPLER_CUBE:
+ baseType = GraphicsContext3D::INT;
+ length = 1;
+ break;
default:
// Can't handle this type
- // FIXME: what to do about samplers?
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return WebGLGetInfo();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list