Update to 31.0
It's a pretty small update for the tutorial, so let's get into it!
Texture descriptors can now specify view dimensions
If the ARBITRARY_BINDING_VIEW_DIMENSIONS feature is not set when requesting an adapter, Wgpu needs to know what dimensions a view can use.
wgpu::TextureDescriptor now has a new texture_binding_view_dimension field that you can specify this. For our purposes we'll just use None to have Wgpu infer the list from the textures description.
let desc = wgpu::TextureDescriptor {
// ...
// NEW
texture_binding_view_dimension: None,
};
New has_srgb_suffix
TextureFormat::is_srgb() has be renamed to has_srgb_suffix()
let surface_format = surface_caps
.formats
.iter()
.copied()
.find(|f| f.has_srgb_suffix())
.unwrap_or(surface_caps.formats[0]);
QueueDescriptor required when requesting device
As of writing QueueDescriptor just has a label as it's only field. I'd imagine this is a place holder for future work and also allows you to debug what queue gets selected using a program like RenderDoc.
let (device, queue) = adapter
.request_device(&wgpu::DeviceDescriptor {
// ...
// NEW
default_queue: wgpu::QueueDescriptor::default(),
})
Supporters
Special thanks to these Patreons on patreon!
- David Laban
- Ian Gowen
- Aron Granberg
- 折登 樹
- Julius Liu
- Jani Turkia
- Filip
- Lions Heart
- IC
- Kosuke Ohira
- Eliot Bolduc
- yutani
- Ben Anderson
- Ken
- Danny McGee
- Craft Links
- Thunk
- 大典 加藤
- Paul E Hansen
- Tema
- Davide Prati
- Gunstein Vatnar
- Felix
- dadofboi
- charlesk
- Andrea Postal
- Youngsuk Kim
- Alexander Kabirov
- Dude
- Zeh Fernando
- Ryan
- Nico Arbogast
- Lennart
- Bernard Llanos