mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
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:
parent
265d5d0904
commit
32b41b79da
@ -41,12 +41,12 @@ fn frag_main() -> void {
|
||||
entry_point fragment as "frag_main" = frag_main;
|
||||
|
||||
# compute shader
|
||||
type Particle = struct {
|
||||
type Particle = [[block]] struct {
|
||||
[[offset 0]] pos : vec2<f32>;
|
||||
[[offset 8]] vel : vec2<f32>;
|
||||
};
|
||||
|
||||
type SimParams = struct {
|
||||
type SimParams = [[block]] struct {
|
||||
[[offset 0]] deltaT : f32;
|
||||
[[offset 4]] rule1Distance : f32;
|
||||
[[offset 8]] rule2Distance : f32;
|
||||
@ -56,7 +56,7 @@ type SimParams = struct {
|
||||
[[offset 24]] rule3Scale : f32;
|
||||
};
|
||||
|
||||
type Particles = struct {
|
||||
type Particles = [[block]] struct {
|
||||
[[offset 0]] particles : array<Particle, 5>;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user