RESOLVED FIXED 190452
[WHSL -> MSL] Annotate semantics correctly in generated MSL
https://bugs.webkit.org/show_bug.cgi?id=190452
Summary [WHSL -> MSL] Annotate semantics correctly in generated MSL
Dean Jackson
Reported 2018-10-10 16:54:59 PDT
[WHSL -> MSL] Annotate semantics correctly in generated MSL
Attachments
Patch (3.74 KB, patch)
2018-10-10 16:58 PDT, Dean Jackson
mmaxfield: review+
Radar WebKit Bug Importer
Comment 1 2018-10-10 16:55:21 PDT
Dean Jackson
Comment 2 2018-10-10 16:58:12 PDT
Myles C. Maxfield
Comment 3 2018-10-10 17:02:34 PDT
Comment on attachment 352000 [details] 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.
Dean Jackson
Comment 4 2018-10-10 18:10:44 PDT
Note You need to log in before you can comment on or make changes to this bug.