Commit Graph

859 Commits

Author SHA1 Message Date
dan sinclair 5b853eebc6 Support the zero initializer syntax.
This Cl updates the system to allow zero initializers. This allows:

```
var a : vec3<f32> = vec3<f32>();
```

Bug: tint:34
Change-Id: I84d6b431914c4ddf112ed375fae028d912f4a080
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/23660
Reviewed-by: David Neto <dneto@google.com>
2020-06-22 20:44:27 +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