Bug 188773

Summary: [WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, fpizlo, rmorisset, saam, tdenney, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 176199    
Attachments:
Description Flags
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
Needs tests
none
Setting .type in Checker will break TypeDefResolver
none
Patch none

Description Myles C. Maxfield 2018-08-20 19:39:12 PDT
[WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
Comment 1 Myles C. Maxfield 2018-08-20 19:39:46 PDT
Created attachment 347598 [details]
WIP
Comment 2 Myles C. Maxfield 2018-08-21 13:03:52 PDT
Created attachment 347673 [details]
WIP
Comment 3 Myles C. Maxfield 2018-08-21 15:58:46 PDT
Created attachment 347718 [details]
WIP
Comment 4 Myles C. Maxfield 2018-08-21 19:26:12 PDT
Created attachment 347754 [details]
WIP
Comment 5 Myles C. Maxfield 2018-08-21 19:39:20 PDT
Created attachment 347757 [details]
WIP
Comment 6 Myles C. Maxfield 2018-08-21 21:55:51 PDT
Comment on attachment 347757 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=347757&action=review

> Tools/WebGPUShadingLanguageRI/Checker.js:257
> +        if (!node.type || !node.type.visit)

node.type.visit

> Tools/WebGPUShadingLanguageRI/checkTypesWithArguments.js:27
> +function checkTypesWithArguments(program)

File name needs to be capitalized
Comment 7 Myles C. Maxfield 2018-08-21 21:57:58 PDT
Comment on attachment 347757 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=347757&action=review

> Tools/WebGPUShadingLanguageRI/Checker.js:259
> +        if (!(node.type instanceof StructType)) // FIXME: Why don't we recurse on StructTypes?

Can we fix this?

> Tools/WebGPUShadingLanguageRI/Intrinsics.js:68
> +            // FIXME: Make this math obey IEEE 754.

Test this

> Tools/WebGPUShadingLanguageRI/Intrinsics.js:316
> +                    // FIXME: Figure out what to put here.

Perhaps delete the comment

> Tools/WebGPUShadingLanguageRI/StandardLibrary.js:205
>  // FIXME: Once the standard library has been replaced with a new version, this comments should be removed.

bugzilla link?

> Tools/WebGPUShadingLanguageRI/TypeRef.js:101
> +                // FIXME: This is probably wrong.

Let's see if we can figure out a way to do this better.
Comment 8 Myles C. Maxfield 2018-08-22 13:32:58 PDT
Created attachment 347837 [details]
Needs tests
Comment 9 Myles C. Maxfield 2018-08-22 14:21:52 PDT
Created attachment 347846 [details]
Setting .type in Checker will break TypeDefResolver
Comment 10 Myles C. Maxfield 2018-08-22 15:48:59 PDT
Created attachment 347863 [details]
Patch
Comment 11 WebKit Commit Bot 2018-08-23 12:52:23 PDT
Comment on attachment 347863 [details]
Patch

Clearing flags on attachment: 347863

Committed r235237: <https://trac.webkit.org/changeset/235237>
Comment 12 WebKit Commit Bot 2018-08-23 12:52:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Radar WebKit Bug Importer 2018-08-23 12:53:34 PDT
<rdar://problem/43654376>
Comment 14 Myles C. Maxfield 2018-10-13 15:26:19 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/92