Increase WGPU limits to what's supported by the adapter (#1251)

* Increase Wgpu limits

* Fix compilation of shaders

* Unbreak debug options
This commit is contained in:
Dennis Kobert 2023-05-28 00:23:47 +02:00 committed by Keavon Chambers
parent 7148b199ec
commit 6289d92e02
5 changed files with 14 additions and 5 deletions

View file

@ -16,6 +16,10 @@ impl Context {
// `request_adapter` instantiates the general connection to the GPU
let adapter = instance.request_adapter(&wgpu::RequestAdapterOptions::default()).await?;
let limits = adapter.limits();
log::trace!("Adapter limits: {:?}", limits);
// `request_device` instantiates the feature specific connection to the GPU, defining some parameters,
// `features` being the available features.
let (device, queue) = adapter
@ -23,7 +27,7 @@ impl Context {
&wgpu::DeviceDescriptor {
label: None,
features: wgpu::Features::empty(),
limits: wgpu::Limits::downlevel_defaults(),
limits,
},
None,
)