Commit Graph

18 Commits

Author SHA1 Message Date
dan sinclair 7156d3e314 [wgsl-reader] Add parsing of named structs.
This CL adds the parsing of structs with names. The parsing of type
aliased structs remains to allow for migration to the new system. The
named struct format is always emitted.

Bug: tint:175
Change-Id: Ic0579dedbd2dd0edc7dfd30bc2ec02972091e718
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30341
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-19 15:31:47 +00:00
dan sinclair d2d7ce6e31 Fixup computeboids example.
This Cl converts the cast in computeboids to a type constructor.

Change-Id: Ie1e7183226bb2f629f25cb2d35fc917d8ca68564
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29140
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-30 14:00:10 +00:00
dan sinclair effd888d2f Convert computeboids to for().
This CL updates computeboids to use the `for()` sugar instead of the
loop/continuing block.

Change-Id: I13f416624821a87fbfa40b15669980bedc794ed4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28842
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-23 14:51:03 +00:00
dan sinclair d7abd76dea Update computeboids typing.
This Cl updates some of the literals and types in computeboids to be
stricter.

Bug: tint:248
Change-Id: I3bc42b8da7913677675d6e417b7f4ce19366eeb9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28840
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-23 14:40:54 +00:00
dan sinclair b4fee2f824 Update builtin methods.
This CL removes the import mechanism, the identifier paths and updates
all of the standard library methods to be builtins.

Bug: tint:242
Change-Id: If09b98a155ae49ced3986ba2c9b517a060693006
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28720
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-22 19:42:13 +00:00
dan sinclair 5f8126271d Remove EntryPoint.
This CL removes the EntryPoint node and transitions everything to the
stage decoration.

Change-Id: Ib2840155905c8fa60ff35870f0c4b6705efb73ff
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28705
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-22 14:53:03 +00:00
dan sinclair 35552f2a48 [wgsl-reader][wgsl-writer] Update variable decorations to new syntax.
This CL updates the variable decorations to require ()'s around
parameters.

Bug: tint:238
Change-Id: I835879f41349756ace553a52fc2d460173e70dce
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28583
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 23:02:48 +00:00
dan sinclair 077d16d5e1 [wgsl-reader][wgsl-writer] Update array decorations to new syntax.
This CL updates the array decorations to the new syntax requiring ()'s
around parameters.

Bug: tint:238
Change-Id: I5a8b19e302fbd3f78392553d8d1c5e882b900180
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28601
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-20 21:28:18 +00:00
dan sinclair 8b685866cd [wgsl-reader][wgsl-writer] Update struct decorations to new syntax.
This CL updates the parsing of struct decorations to require ()'s around
parameters.

Bug: tint:238
Change-Id: Ia35ca5c260c3c57b5fc95788bd1aef07f75edc39
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28600
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 19:14:28 +00:00
dan sinclair c8a85aa5a9 [wgsl-reader] Add stride support.
This CL adds stride support to the WGSL reader.

Bug: tint:178
Change-Id: Id6b5163438e562a371255ad3fb992d0a716543e7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26040
Reviewed-by: David Neto <dneto@google.com>
2020-07-30 16:50:25 +00:00
dan sinclair 32b41b79da Add block annotations to computeboids
Annotate structures with [[block]] annotations.

Change-Id: Ieb6d5cee203fa1e9c090dc147d2c8d1473abb224
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/21022
Reviewed-by: David Neto <dneto@google.com>
2020-05-05 14:21:43 +00:00
dan sinclair 265d5d0904 Unique method names in computeboids
WebGPU requires unique entry point names.

Change-Id: I0dc5123abdc1a4da343b60460443498f8611d7b9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/21021
Reviewed-by: David Neto <dneto@google.com>
2020-05-05 14:21:35 +00:00
dan sinclair de4259ef80 Fixup computeboids translation error.
There was a - that changed to a + while converting. Fixed.

Change-Id: Ic50a04624c5f4efdfc114459ccd5f42fc53c3ca2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20629
Reviewed-by: David Neto <dneto@google.com>
2020-05-01 19:06:03 +00:00
dan sinclair 64db1d9a9b Add mising computeboids casts.
This CL adds in missing casts from i32 to f32 when using the count
variables in computeboids to create vec3<f32> values.

Change-Id: I3e66e2db0fc626b94ae98142cd95a65feff7fc53
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20627
Reviewed-by: David Neto <dneto@google.com>
2020-05-01 19:05:43 +00:00
David Neto ac47807974 Fix compute_boids.wgsl literal types, storage class
Change-Id: I13279ab0db4c0a7587f4307bf923a59c59d5af2e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20624
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-05-01 19:02:35 +00:00
dan sinclair 75dbd8739e Add missing storage classes to compute boids.
This CL adds the missing storage classes to the module scoped variables
in compute boids.

Change-Id: I59cbe0f9bcc4b235f2f9157801dcbc445a6bd5eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20346
Reviewed-by: David Neto <dneto@google.com>
2020-04-24 00:41:23 +00:00
dan sinclair 32a68fec42 Fix type of gl_GlobalInvocationId in compute boids.
The variable was incorrectly set to be a `vec3<f32>` instead of a
`vec3<u32>`.

Bug: tint:24
Change-Id: I84262a185925c50adf3a149f5f93f45124499596
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18400
Reviewed-by: David Neto <dneto@google.com>
2020-03-31 15:06:07 +00:00
Dan Sinclair 6e581895a5 Initial commit 2020-03-02 15:47:43 -05:00