[webkit-reviews] review granted: [Bug 190452] [WHSL -> MSL] Annotate semantics correctly in generated MSL : [Attachment 352000] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 10 17:02:34 PDT 2018
Myles C. Maxfield <mmaxfield at apple.com> has granted Dean Jackson
<dino at apple.com>'s request for review:
Bug 190452: [WHSL -> MSL] Annotate semantics correctly in generated MSL
https://bugs.webkit.org/show_bug.cgi?id=190452
Attachment 352000: Patch
https://bugs.webkit.org/attachment.cgi?id=352000&action=review
--- Comment #3 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 352000
--> https://bugs.webkit.org/attachment.cgi?id=352000
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=352000&action=review
> Tools/WebGPUShadingLanguageRI/Metal/MSLBackend.js:338
> if (structTypeAttributes.isVertexAttribute)
> - annotations.push(`attribute(${index++})`);
> - if (structTypeAttributes.isVertexOutputOrFragmentInput &&
fieldName === "wsl_Position")
> + annotations.push(`attribute(${field._semantic._index})`);
> + if (structTypeAttributes.isVertexOutputOrFragmentInput &&
field._semantic._name === "SV_Position")
> annotations.push("position");
> - if (structTypeAttributes.isFragmentOutput && fieldName ===
"wsl_Color")
> - annotations.push("color(0)");
> + if (structTypeAttributes.isFragmentOutput &&
field._semantic._name == "SV_Target")
> +
annotations.push(`color(${field._semantic._extraArguments[0]})`);
Eventually we're going to need this to get much more complicated, but this is a
good start.
More information about the webkit-reviews
mailing list