Skip to content

Commit 0cd30c2

Browse files
authored
examples: fix pipeline layout in compute runner (#868)
* examples: fix pipeline layout in compute runner * fix CI lint failure
1 parent 132b960 commit 0cd30c2

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

examples/runners/wgpu/src/compute.rs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use wgpu::util::DeviceExt;
22

33
use super::Options;
44
use futures::future::join;
5-
use std::{convert::TryInto, future::Future, num::NonZeroU64, time::Duration};
5+
use std::{convert::TryInto, future::Future, time::Duration};
66

77
fn block_on<T>(future: impl Future<Output = T>) -> T {
88
cfg_if::cfg_if! {
@@ -63,20 +63,16 @@ pub async fn start_internal(
6363

6464
let bind_group_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
6565
label: None,
66-
entries: &[
67-
// XXX - some graphics cards do not support empty bind layout groups, so
68-
// create a dummy entry.
69-
wgpu::BindGroupLayoutEntry {
70-
binding: 0,
71-
count: None,
72-
visibility: wgpu::ShaderStages::COMPUTE,
73-
ty: wgpu::BindingType::Buffer {
74-
has_dynamic_offset: false,
75-
min_binding_size: Some(NonZeroU64::new(1).unwrap()),
76-
ty: wgpu::BufferBindingType::Storage { read_only: false },
77-
},
66+
entries: &[wgpu::BindGroupLayoutEntry {
67+
binding: 0,
68+
count: None,
69+
visibility: wgpu::ShaderStages::COMPUTE,
70+
ty: wgpu::BindingType::Buffer {
71+
has_dynamic_offset: false,
72+
min_binding_size: None,
73+
ty: wgpu::BufferBindingType::Storage { read_only: false },
7874
},
79-
],
75+
}],
8076
});
8177

8278
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {

0 commit comments

Comments
 (0)