WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98966
[WebGL] [Mac] only the mapped symbol for the first element of a uniform/attribute array is stored
https://bugs.webkit.org/show_bug.cgi?id=98966
Summary
[WebGL] [Mac] only the mapped symbol for the first element of a uniform/attri...
Roger Fong
Reported
2012-10-10 16:24:04 PDT
We currently only created a mapped symbol name for the first element of a uniform/attribute variable array. So for example: float color_imagine_really_long_name_here[4] We only create a mapped name for color_imagine_really_long_name_here[0]. This is because the TCompiler only creates one uniform for "color_imagine_really_long_name_here" not 4 and when we look for this uniform using ShGetActiveUniform (as we compile in AngleWebKitBridge::compileShaderSource) it only gives us the name we get back is just color_imagine_really_long_name_here[0] and color_short_name[0]. While we only get this one uniform for the symbol, we also get the size of the symbol, which corresponds to the size of the array (if it isn't an array the size is just 1). Using this information we know what the corresponding name and mapped names are. color_imagine_really_long_name_here[1] and color_short_name[1] color_imagine_really_long_name_here[2] and color_short_name[2] etc... Note that the compiler did correctly map the other entries of the array to their shorter names, but just that it doesn't think of each entry as a separate uniform. The only thing that seems to differ between the shorter names of entries of an array is the [index] at the end.
Attachments
Patch
(2.99 KB, patch)
2012-10-11 14:36 PDT
,
Roger Fong
dino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2012-10-10 16:24:46 PDT
<
rdar://problem/12474910
>
Roger Fong
Comment 2
2012-10-11 14:36:04 PDT
Created
attachment 168279
[details]
Patch
Dean Jackson
Comment 3
2012-10-11 14:53:34 PDT
Comment on
attachment 168279
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168279&action=review
> Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp:104 > + name.replace(name.length()-2, 1, String::number(i)); > + mappedName.replace(mappedName.length()-2, 1, String::number(i));
Nit: space needed each side of -
Tim Horton
Comment 4
2012-11-28 11:37:08 PST
http://trac.webkit.org/changeset/131105
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug