This commit is contained in:
shenjack-5600u 2024-05-01 07:11:13 +08:00
parent 751f551141
commit c422b96597
Signed by: shenjack
GPG Key ID: FDF9864E11C7E79F

View File

@ -118,6 +118,14 @@ async fn execute_gpu_inner(device: &wgpu::Device, queue: &wgpu::Queue, works: Wo
mapped_at_creation: false,
});
let input_buffer_name_len = device.create_buffer_init(
&wgpu::util::BufferInitDescriptor {
label: Some("input buffer name len"),
contents: bytemuck::cast_slice(&[works.team.len() as u32]),
usage: wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::MAP_READ,
}
);
// Instantiates buffer with data (`numbers`).
// Usage allowing the buffer to be:
// A storage buffer (can be bound within a bind group and thus available to a shader).