From fcb7658bfd34cc2c65450263b70792ecce819e35 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Thu, 26 Sep 2024 14:22:12 -0400 Subject: [PATCH] squash! use 2 destination buffers for indirect dispatch validation Co-Authored-By: Erich Gubler --- tests/tests/dispatch_workgroups_indirect.rs | 4 ++-- wgpu-core/src/indirect_validation.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tests/dispatch_workgroups_indirect.rs b/tests/tests/dispatch_workgroups_indirect.rs index cf7f096fa16..0e11186eccf 100644 --- a/tests/tests/dispatch_workgroups_indirect.rs +++ b/tests/tests/dispatch_workgroups_indirect.rs @@ -95,8 +95,8 @@ async fn run_test( var out: array; @compute @workgroup_size(1) - fn main(@builtin(num_workgroups) num_workgroups: vec3, @builtin(workgroup_id) workgroup_id: vec3) { - if (all(workgroup_id == vec3())) { + fn main(@builtin(num_workgroups) num_workgroups: vec3u, @builtin(workgroup_id) workgroup_id: vec3u) { + if (all(workgroup_id == vec3u())) { out[0] = num_workgroups.x + test_offset.inner; out[1] = num_workgroups.y + test_offset.inner; out[2] = num_workgroups.z + test_offset.inner; diff --git a/wgpu-core/src/indirect_validation.rs b/wgpu-core/src/indirect_validation.rs index cbd283d2d15..62ac68b3236 100644 --- a/wgpu-core/src/indirect_validation.rs +++ b/wgpu-core/src/indirect_validation.rs @@ -74,7 +74,7 @@ impl IndirectValidation { @compute @workgroup_size(1) fn main() {{ let src = vec3(src[offset.inner], src[offset.inner + 1], src[offset.inner + 2]); - let res = select(src, vec3(), src > vec3({max_compute_workgroups_per_dimension}u)); + let res = select(src, vec3u(), src > vec3({max_compute_workgroups_per_dimension}u)); dst[0] = res.x; dst[1] = res.y; dst[2] = res.z;