mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
Merge #627
627: Fixed size in "boids" example r=kvark a=infinitesnow Buffer size is specified in number of items instead of bytes and fails validation against compiled SPIR-V Co-authored-by: infinitesnow <3xplosive.g@gmail.com>
This commit is contained in:
1 file changed
+2
-2
@@ -66,7 +66,7 @@ impl framework::Example for Example {
|
||||
visibility: wgpu::ShaderStage::COMPUTE,
|
||||
ty: wgpu::BindingType::UniformBuffer {
|
||||
dynamic: false,
|
||||
min_binding_size: wgpu::BufferSize::new(sim_param_data.len() as _),
|
||||
min_binding_size: wgpu::BufferSize::new((sim_param_data.len()*std::mem::size_of::<f32>()) as _),
|
||||
},
|
||||
count: None,
|
||||
},
|
||||
@@ -151,7 +151,7 @@ impl framework::Example for Example {
|
||||
// create compute pipeline
|
||||
|
||||
let compute_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
|
||||
label: None,
|
||||
label: Some("Compute pipeline"),
|
||||
layout: Some(&compute_pipeline_layout),
|
||||
compute_stage: wgpu::ProgrammableStageDescriptor {
|
||||
module: &boids_module,
|
||||
|
||||
Reference in new issue
Block a user