From c422b965977f87352c7311b53cbad6752bcb8d0b Mon Sep 17 00:00:00 2001 From: shenjack-5600u <3695888@qq.com> Date: Wed, 1 May 2024 07:11:13 +0800 Subject: [PATCH] ruaaaa --- wgpu-mine/src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wgpu-mine/src/main.rs b/wgpu-mine/src/main.rs index 879eec9..877524f 100644 --- a/wgpu-mine/src/main.rs +++ b/wgpu-mine/src/main.rs @@ -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).