Title: [161247] trunk
- Revision
- 161247
- Author
- [email protected]
- Date
- 2014-01-02 18:11:58 -0800 (Thu, 02 Jan 2014)
Log Message
[WebGL] Correct symbol lookup logic to handle 1-element arrays
https://bugs.webkit.org/show_bug.cgi?id=126411
<rdar://problem/15394564>
Reviewed by Dean Jackson.
Source/WebCore:
Tested by revisions to webgl/1.0.2/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniformLocation): Revise to
handle access to zeroeth element of the array.
LayoutTests:
* webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html: Add test for accessing the
single-element array.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (161246 => 161247)
--- trunk/LayoutTests/ChangeLog 2014-01-03 02:09:25 UTC (rev 161246)
+++ trunk/LayoutTests/ChangeLog 2014-01-03 02:11:58 UTC (rev 161247)
@@ -1,3 +1,14 @@
+2014-01-02 Brent Fulgham <[email protected]>
+
+ [WebGL] Correct symbol lookup logic to handle 1-element arrays
+ https://bugs.webkit.org/show_bug.cgi?id=126411
+ <rdar://problem/15394564>
+
+ Reviewed by Dean Jackson.
+
+ * webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html: Add test for accessing the
+ single-element array.
+
2014-01-02 Jinwoo Song <[email protected]>
Unreviewed EFL gardening. Rebaselining after r161140.
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html (161246 => 161247)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html 2014-01-03 02:09:25 UTC (rev 161246)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html 2014-01-03 02:11:58 UTC (rev 161247)
@@ -109,6 +109,8 @@
var program = wtu.setupProgram(gl, ["vshader", "fshader-with-one-element-arrays"], ["a_position"]);
var green_loc = gl.getUniformLocation(program, "u_colors[0].color[0]");
+var zeroth_color = gl.getUniformLocation(program, "u_colors[0].color");
+shouldBeTrue("zeroth_color != undefined");
gl.uniform4fv(green_loc, [0, 1, 0, 1]);
wtu.clearAndDrawUnitQuad(gl);
wtu.checkCanvas(gl, [0, 255, 0, 255], "Should be green");
Modified: trunk/Source/WebCore/ChangeLog (161246 => 161247)
--- trunk/Source/WebCore/ChangeLog 2014-01-03 02:09:25 UTC (rev 161246)
+++ trunk/Source/WebCore/ChangeLog 2014-01-03 02:11:58 UTC (rev 161247)
@@ -1,3 +1,17 @@
+2014-01-02 Brent Fulgham <[email protected]>
+
+ [WebGL] Correct symbol lookup logic to handle 1-element arrays
+ https://bugs.webkit.org/show_bug.cgi?id=126411
+ <rdar://problem/15394564>
+
+ Reviewed by Dean Jackson.
+
+ Tested by revisions to webgl/1.0.2/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getUniformLocation): Revise to
+ handle access to zeroeth element of the array.
+
2014-01-02 Myles C. Maxfield <[email protected]>
Crash in WebCore::translateIntersectionPointsToSkipInkBoundaries
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (161246 => 161247)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2014-01-03 02:09:25 UTC (rev 161246)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2014-01-03 02:11:58 UTC (rev 161247)
@@ -3174,16 +3174,11 @@
info.name = info.name.left(info.name.length() - 3);
// If it's an array, we need to iterate through each element, appending "[index]" to the name.
for (GC3Dint index = 0; index < info.size; ++index) {
- if (info.size > 1) {
- String arrayBrackets = "[" + String::number(index) + "]";
- String uniformName = info.name + arrayBrackets;
+ String arrayBrackets = "[" + String::number(index) + "]";
+ String uniformName = info.name + arrayBrackets;
- if (name == uniformName || name == info.name)
- return WebGLUniformLocation::create(program, uniformLocation, info.type);
- } else {
- if (name == info.name)
- return WebGLUniformLocation::create(program, uniformLocation, info.type);
- }
+ if (name == uniformName || name == info.name)
+ return WebGLUniformLocation::create(program, uniformLocation, info.type);
}
}
return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes