let (device, queue) = adapter.request_device(
&wgpu::DeviceDescriptor {
required_features: wgpu::Features::empty(),
// WebGL doesn't support all of wgpu's features, so if
// we're building for the web, we'll have to disable some.
required_limits: if cfg!(target_arch = "wasm32") {
wgpu::Limits::downlevel_webgl2_defaults()
} else {
wgpu::Limits::default()
},
label: None,
// rust is complaining that a field named memory_hints is missing here
},
None, // Trace path
).await.unwrap();
so i decided it add it like so
let (device, queue) = adapter.request_device(
&wgpu::DeviceDescriptor {
// blah blah blah
// ....
memory_hints: Default::default(), // guess they forgot this
},
None,).await.unwrap();
I set it to the default. Apparently, this determines how much memory wgpu consumes. Cool!
In this part of the code, this is missing a field
so i decided it add it like so
I set it to the default. Apparently, this determines how much memory wgpu consumes. Cool!