You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to get this to reproduce on metal, what code did you use, I used
let indirect_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
label: None,
contents: bytemuck::cast_slice(&[numbers.len() as u32, 1, 1]),
usage: wgpu::BufferUsages::INDIRECT,
});
// A command encoder executes one or many pipelines.
// It is to WebGPU what a command buffer is to Vulkan.
let mut encoder =
device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
{
let mut cpass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: None });
cpass.set_pipeline(&compute_pipeline);
cpass.set_bind_group(0, &bind_group, &[]);
cpass.insert_debug_marker("compute collatz iterations");
cpass.dispatch_workgroups_indirect(&indirect_buffer, 0); // Number of cells to run, the (x,y,z) size of item being processed
}
Description
I tried to update the wgpu-native to the latest wgpu-core, but the test case of
dispatch_workgroups_indirect
in the downstream wgpu-py can't pass.Then I tried to modify this example: "https://github.com/gfx-rs/wgpu/blob/master/wgpu/examples/hello-compute/main.rs" , create an indirect buffer and replace
dispatch_workgroups
withdispatch_workgroups_indirect
for testing, the result is not correct also.Repro steps
modify this example: "https://github.com/gfx-rs/wgpu/blob/master/wgpu/examples/hello-compute/main.rs", use
dispatch_workgroups_indirect
instead.Expected vs observed behavior
The output value is always equal to the input. No computes seem to have been made.
Platform
wgpu master branch. Windows10, vulkan backend
The text was updated successfully, but these errors were encountered: