[Webkit-unassigned] [Bug 220137] Failures of attribute location conformance tests with Metal backend

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 6 15:04:15 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=220137

Kenneth Russell <kbr at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #417121|review?                     |review+
              Flags|                            |

--- 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:151
> +    //Build string to attrib map.

Nit: space after //.

> Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:152
> +    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:163
> +                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:177
> +    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:186
> +    }

What happens if a given attribute wasn't assigned a location via glBindAttribLocation? Would the " __unassigned_attribute__" strings cause MSL compilation failures?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210106/cbf23c02/attachment.htm>


More information about the webkit-unassigned mailing list