...
Ima do this next.
Created attachment 321158 [details] almost done
Created attachment 321178 [details] the patch
Created attachment 321179 [details] the ptach
Comment on attachment 321179 [details] the ptach View in context: https://bugs.webkit.org/attachment.cgi?id=321179&action=review > Tools/WebGPUShadingLanguageRI/Intrinsics.js:111 > + type.formatValueFromDoubleLiteral = value => value; No rounding? > Tools/WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js:27 > +function synthesizeEnumFunctions(program) Wow, this is cool! Dynamically generating functions! I wish I knew how to do this with clang (without emitting a giant string) > Tools/WebGPUShadingLanguageRI/Test.js:3929 > + Foo war() > + { > + return Foo.War; > + } > + Foo famine() > + { > + return Foo.Famine; > + } > + Foo pestilence() > + { > + return Foo.Pestilence; > + } > + Foo death() > + { > + return Foo.Death; > + } Couldn't you do, like, months of the year or something?
(In reply to Myles C. Maxfield from comment #5) > Comment on attachment 321179 [details] > the ptach > > View in context: > https://bugs.webkit.org/attachment.cgi?id=321179&action=review > > > Tools/WebGPUShadingLanguageRI/Intrinsics.js:111 > > + type.formatValueFromDoubleLiteral = value => value; > > No rounding? Oh! Fixed. > > > Tools/WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js:27 > > +function synthesizeEnumFunctions(program) > > Wow, this is cool! Dynamically generating functions! > > I wish I knew how to do this with clang (without emitting a giant string) > > > Tools/WebGPUShadingLanguageRI/Test.js:3929 > > + Foo war() > > + { > > + return Foo.War; > > + } > > + Foo famine() > > + { > > + return Foo.Famine; > > + } > > + Foo pestilence() > > + { > > + return Foo.Pestilence; > > + } > > + Foo death() > > + { > > + return Foo.Death; > > + } > > Couldn't you do, like, months of the year or something? ;-)
Landed in https://trac.webkit.org/changeset/222200/webkit
<rdar://problem/34693578>
Migrated to https://github.com/gpuweb/WHLSL/issues/133