Define device limits in App, and raise buffer size limits
This commit is contained in:
parent
6d9fc9b0b8
commit
71d547cd62
|
@ -28,7 +28,15 @@ impl App {
|
|||
.build(&event_loop)
|
||||
.unwrap();
|
||||
|
||||
let render_ctx = render::Context::new(&window).await;
|
||||
let render_ctx = render::Context::new(
|
||||
&window,
|
||||
wgpu::Limits {
|
||||
max_storage_buffer_binding_size: 1 << 29,
|
||||
max_buffer_size: 1 << 29,
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
Self {
|
||||
window,
|
||||
|
|
|
@ -11,7 +11,7 @@ pub struct Context {
|
|||
}
|
||||
|
||||
impl Context {
|
||||
pub async fn new(window: &Window) -> Self {
|
||||
pub async fn new(window: &Window, limits: wgpu::Limits) -> Self {
|
||||
log::info!("Initialising WGPU context...");
|
||||
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||
backends: wgpu::Backends::VULKAN,
|
||||
|
@ -42,7 +42,7 @@ impl Context {
|
|||
&wgpu::DeviceDescriptor {
|
||||
label: None,
|
||||
features: wgpu::Features::empty(),
|
||||
limits: wgpu::Limits::default(),
|
||||
limits,
|
||||
},
|
||||
None,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue