dusk: abilibity to reference global decl after current decl

This commit is contained in:
Ali Chraghi 2023-03-21 11:08:06 +03:30 committed by Stephen Gutekanst
parent 2025ac8d17
commit 9f58497771
4 changed files with 826 additions and 504 deletions

View file

@ -1,5 +1,9 @@
const NUM_PARTICLES: u32 = 1500u;
struct Particles {
particles : array<Particle>
}
struct Particle {
pos : vec2<f32>,
vel : vec2<f32>,
@ -15,10 +19,6 @@ struct SimParams {
rule3Scale : f32,
}
struct Particles {
particles : array<Particle>
}
@group(0) @binding(0) var<uniform> params : SimParams;
@group(0) @binding(1) var<storage> particlesSrc : Particles;
@group(0) @binding(2) var<storage,read_write> particlesDst : Particles;

View file

@ -183,6 +183,7 @@ test "boids" {
const source = @embedFile("boids.wgsl");
var ir = try expectIR(source);
defer ir.deinit();
// try ir.print(std.io.getStdOut().writer());
}
test "gkurve" {