Update Dawn tests to use group instead of set.

This Cl updates the WGSL used by Dawn to use the new `group` decoration
instead of the deprecated `set` decoration.

Change-Id: I145aaff7721dfafff986ddc429c9cdc9389c2110
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38141
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair
2021-01-19 14:18:51 +00:00
committed by Commit Bot service account
parent e45593cb08
commit 0f9c2d7b78
35 changed files with 214 additions and 212 deletions

View File

@@ -167,9 +167,9 @@ void initSim() {
[[block]] struct Particles {
[[offset(0)]] particles : [[stride(16)]] array<Particle>;
};
[[binding(0), set(0)]] var<uniform> params : SimParams;
[[binding(1), set(0)]] var<storage_buffer> particlesA : [[access(read)]] Particles;
[[binding(2), set(0)]] var<storage_buffer> particlesB : [[access(read_write)]] Particles;
[[binding(0), group(0)]] var<uniform> params : SimParams;
[[binding(1), group(0)]] var<storage_buffer> particlesA : [[access(read)]] Particles;
[[binding(2), group(0)]] var<storage_buffer> particlesB : [[access(read_write)]] Particles;
[[builtin(global_invocation_id)]] var<in> GlobalInvocationID : vec3<u32>;
// https://github.com/austinEng/Project6-Vulkan-Flocking/blob/master/data/shaders/computeparticles/particle.comp

View File

@@ -105,8 +105,8 @@ void init() {
wgpu::ShaderModule fsModule = utils::CreateShaderModuleFromWGSL(device, R"(
[[builtin(frag_coord)]] var<in> FragCoord : vec4<f32>;
[[set(0), binding(0)]] var<uniform_constant> mySampler: sampler;
[[set(0), binding(1)]] var<uniform_constant> myTexture : texture_2d<f32>;
[[group(0), binding(0)]] var<uniform_constant> mySampler: sampler;
[[group(0), binding(1)]] var<uniform_constant> myTexture : texture_2d<f32>;
[[location(0)]] var<out> FragColor : vec4<f32>;
[[stage(fragment)]] fn main() -> void {

View File

@@ -106,12 +106,12 @@ void init() {
[[offset(0)]] view : mat4x4<f32>;
[[offset(64)]] proj : mat4x4<f32>;
};
[[set(0), binding(0)]] var<uniform> camera : Camera;
[[group(0), binding(0)]] var<uniform> camera : Camera;
[[block]] struct Model {
[[offset(0)]] matrix : mat4x4<f32>;
};
[[set(0), binding(1)]] var<uniform> model : Model;
[[group(0), binding(1)]] var<uniform> model : Model;
[[location(0)]] var<in> pos : vec3<f32>;
[[location(1)]] var<in> col : vec3<f32>;