[webkit-reviews] review granted: [Bug 220137] Failures of attribute location conformance tests with Metal backend : [Attachment 417121] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 6 15:04:15 PST 2021
Kenneth Russell <kbr at google.com> has granted Kyle Piddington
<kpiddington at apple.com>'s request for review:
Bug 220137: Failures of attribute location conformance tests with Metal backend
https://bugs.webkit.org/show_bug.cgi?id=220137
Attachment 417121: Patch
https://bugs.webkit.org/attachment.cgi?id=417121&action=review
--- Comment #4 from Kenneth Russell <kbr at google.com> ---
Comment on attachment 417121
--> https://bugs.webkit.org/attachment.cgi?id=417121
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=417121&action=review
Great work handling this! A few questions, but assuming this passes tests, r+.
>
Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/EmitMetal
.cpp:1229
> + mOut << " __unassigned_attribute__ ";
Is the indentaion off here?
>
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:15
1
> + //Build string to attrib map.
Nit: space after //.
>
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:15
2
> + const std::vector<sh::ShaderVariable> programAttributes =
programState.getProgramInputs();
How about "const auto&"? I think this will perform a copy as written.
>
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:16
3
> + stream << attribute.name << "_" << std::to_string(i) << "
__unassigned_attribute__";
How about a variable for the constant string " __unassigned_attribute__"?
>
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:17
7
> + for(std::unordered_map<std::string, uint32_t>::iterator it =
attributeBindings.begin(); it!=attributeBindings.end(); ++it)
Is "for (auto it = attributeBindings::begin(); ..." workable here?
>
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:18
6
> + }
What happens if a given attribute wasn't assigned a location via
glBindAttribLocation? Would the " __unassigned_attribute__" strings cause MSL
compilation failures?
More information about the webkit-reviews
mailing list