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>
This commit is contained in:
dan sinclair 2020-05-05 14:21:43 +00:00
parent 265d5d0904
commit 32b41b79da

View File

@ -41,12 +41,12 @@ fn frag_main() -> void {
entry_point fragment as "frag_main" = frag_main; entry_point fragment as "frag_main" = frag_main;
# compute shader # compute shader
type Particle = struct { type Particle = [[block]] struct {
[[offset 0]] pos : vec2<f32>; [[offset 0]] pos : vec2<f32>;
[[offset 8]] vel : vec2<f32>; [[offset 8]] vel : vec2<f32>;
}; };
type SimParams = struct { type SimParams = [[block]] struct {
[[offset 0]] deltaT : f32; [[offset 0]] deltaT : f32;
[[offset 4]] rule1Distance : f32; [[offset 4]] rule1Distance : f32;
[[offset 8]] rule2Distance : f32; [[offset 8]] rule2Distance : f32;
@ -56,7 +56,7 @@ type SimParams = struct {
[[offset 24]] rule3Scale : f32; [[offset 24]] rule3Scale : f32;
}; };
type Particles = struct { type Particles = [[block]] struct {
[[offset 0]] particles : array<Particle, 5>; [[offset 0]] particles : array<Particle, 5>;
}; };