Bug 189175 - [WHLSL] Fix array indexing behavior
Summary: [WHLSL] Fix array indexing behavior
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thomas Denney
URL:
Keywords: InRadar
Depends on: 189099
Blocks: 176199
  Show dependency treegraph
 
Reported: 2018-08-30 14:46 PDT by Thomas Denney
Modified: 2018-10-13 14:42 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.17 KB, patch)
2018-08-30 16:47 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff
Patch (3.35 KB, patch)
2018-08-30 16:56 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff
Patch (3.25 KB, patch)
2018-08-30 16:59 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Denney 2018-08-30 14:46:42 PDT
Currently WHLSL parses the declaration "int[2][3] array” as an array of length 3 of arrays of 2 integers; we need the reverse to match C.
Comment 1 Thomas Denney 2018-08-30 16:47:34 PDT
Created attachment 348568 [details]
Patch
Comment 2 Myles C. Maxfield 2018-08-30 16:50:34 PDT
Comment on attachment 348568 [details]
Patch

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

> Tools/ChangeLog:7
> +
> +        Reviewed by NOBODY (OOPS!).
> +

Need some description

> Tools/WebGPUShadingLanguageRI/Parse.js:266
> +            // token is updated each iteration, so constructors must use the token associated with their iteration.
> +            const tokenCopy = token;

can you fix this by saying "while (let token = ...)"?
Comment 3 Thomas Denney 2018-08-30 16:56:50 PDT
Created attachment 348570 [details]
Patch
Comment 4 Thomas Denney 2018-08-30 16:59:12 PDT
Created attachment 348571 [details]
Patch
Comment 5 WebKit Commit Bot 2018-08-30 17:39:16 PDT
Comment on attachment 348571 [details]
Patch

Clearing flags on attachment: 348571

Committed r235533: <https://trac.webkit.org/changeset/235533>
Comment 6 WebKit Commit Bot 2018-08-30 17:39:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-08-31 08:56:56 PDT
<rdar://problem/43941968>
Comment 8 Myles C. Maxfield 2018-10-13 14:42:09 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/50