Skip to content

Commit

Permalink
squash! use 2 destination buffers for indirect dispatch validation
Browse files Browse the repository at this point in the history
Co-Authored-By: Erich Gubler <erichdongubler@gmail.com>
  • Loading branch information
ErichDonGubler committed Oct 2, 2024
1 parent 36a91c5 commit 1624e99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/tests/dispatch_workgroups_indirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ async fn run_test(
var<storage, read_write> out: array<u32, 3>;
@compute @workgroup_size(1)
fn main(@builtin(num_workgroups) num_workgroups: vec3<u32>, @builtin(workgroup_id) workgroup_id: vec3<u32>) {
if (all(workgroup_id == vec3<u32>())) {
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;
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/indirect_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32>(), 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;
Expand Down

0 comments on commit 1624e99

Please sign in to comment.