RESOLVED FIXED 98470
[WebGL] [Mac] queried attributes and uniforms need to return the original variable name (not the mapped name)
https://bugs.webkit.org/show_bug.cgi?id=98470
Summary [WebGL] [Mac] queried attributes and uniforms need to return the original var...
Dean Jackson
Reported 2012-10-04 17:47:51 PDT
conformance/glsl/misc/glsl-long-variable-names.html is still failing on Mac, even after r130417. It seems that I didn't update the queried attribute name when recording the mapping.
Attachments
Patch (4.38 KB, patch)
2012-10-09 14:38 PDT, Roger Fong
no flags
Patch (4.74 KB, patch)
2012-10-09 15:06 PDT, Roger Fong
no flags
Patch (4.74 KB, patch)
2012-10-09 16:37 PDT, Roger Fong
thorton: review+
Radar WebKit Bug Importer
Comment 1 2012-10-04 17:48:32 PDT
Roger Fong
Comment 2 2012-10-09 14:38:39 PDT
Roger Fong
Comment 3 2012-10-09 14:40:34 PDT
Alternative I can add another hash map going the other way instead of searching through the current one (assuming that the mappings are one to one)
Dean Jackson
Comment 4 2012-10-09 14:42:22 PDT
They are 1:1, but I don't think should worry about a reverse map unless this turns out to be a hot path.
Dean Jackson
Comment 5 2012-10-09 14:48:04 PDT
Comment on attachment 167851 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167851&action=review > Source/WebCore/ChangeLog:7 > + Reviewed by NOBODY (OOPS!). > + I usually write a paragraph here saying what I did (although the title is pretty obvious in this case). For example "When a variable name in a shader is long, we translate it into a short form and keep a mapping between the new and old names. However, we were accidentally telling the client-side code the translated name. It should always use the original names" > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:635 > + String origName = originalSymbolName(program, SHADER_SYMBOL_TYPE_ATTRIBUTE, String(name.get(), nameLength)); > + > + info.name = origName; Use long names in variables: originalName > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:662 > + String origName = originalSymbolName(program, SHADER_SYMBOL_TYPE_UNIFORM, String(name.get(), nameLength)); > + > + info.name = origName; Ditto.
Tim Horton
Comment 6 2012-10-09 14:50:48 PDT
Comment on attachment 167851 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167851&action=review > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:712 > + if (symbolEntry->second.mappedName == name) > + return symbolEntry->first; Didn't we (first, second) -> (key, value)?
kov's GTK+ EWS bot
Comment 7 2012-10-09 14:52:28 PDT
Roger Fong
Comment 8 2012-10-09 15:06:57 PDT
Early Warning System Bot
Comment 9 2012-10-09 15:46:30 PDT
Tim Horton
Comment 10 2012-10-09 16:05:59 PDT
Comment on attachment 167855 [details] Patch r- so the bots stop trying
Roger Fong
Comment 11 2012-10-09 16:37:34 PDT
Tim Horton
Comment 12 2012-10-09 16:39:07 PDT
Comment on attachment 167875 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167875&action=review Carrying over Dino's r+ from before, assuming it builds now. > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:-660 > - ?
Roger Fong
Comment 13 2012-10-10 18:02:24 PDT
Note You need to log in before you can comment on or make changes to this bug.