From eab7c2482ef0822009a2d5618dd228629ddf2b2e Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Thu, 26 May 2011 23:58:38 +0000 Subject: [PATCH] 2011-05-26 Syed Idris Shah Reviewed by Andreas Kling. [Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux https://bugs.webkit.org/show_bug.cgi?id=60377 LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html For an array of active uniform, we should be careful while truncating the name of the uniform. Currently we are truncating the last three characters of an array with out checking for [0]. As a result we are truncating the the actual name of the active uniforms i.e. color to co. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniform): Strip "[0]" from the name if it's an array and is part of the name. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87451 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 16 ++++++++++++++++ Source/WebCore/html/canvas/WebGLRenderingContext.cpp | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index b4530ac..3b5683f 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,19 @@ +2011-05-26 Syed Idris Shah + + Reviewed by Andreas Kling. + + [Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux + https://bugs.webkit.org/show_bug.cgi?id=60377 + + LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html + + For an array of active uniform, we should be careful while truncating the name of the uniform. + Currently we are truncating the last three characters of an array with out checking for [0]. + As a result we are truncating the the actual name of the active uniforms i.e. color to co. + + * html/canvas/WebGLRenderingContext.cpp: + (WebCore::WebGLRenderingContext::getUniform): Strip "[0]" from the name if it's an array and is part of the name. + 2011-05-26 Sheriff Bot Unreviewed, rolling out r87444. diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp index 5a9dc48..fd9d598 100644 --- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp +++ b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp @@ -2444,7 +2444,7 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG if (!m_context->getActiveUniform(objectOrZero(program), i, info)) return WebGLGetInfo(); // Strip "[0]" from the name if it's an array. - if (info.size > 1) + if (info.size > 1 && info.name.endsWith("[0]")) 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) { -- 2.7.4