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) |             .build(&event_loop) | ||||||
|             .unwrap(); |             .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 { |         Self { | ||||||
|             window, |             window, | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ pub struct Context { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| impl 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..."); |         log::info!("Initialising WGPU context..."); | ||||||
|         let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { |         let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { | ||||||
|             backends: wgpu::Backends::VULKAN, |             backends: wgpu::Backends::VULKAN, | ||||||
|  | @ -42,7 +42,7 @@ impl Context { | ||||||
|                 &wgpu::DeviceDescriptor { |                 &wgpu::DeviceDescriptor { | ||||||
|                     label: None, |                     label: None, | ||||||
|                     features: wgpu::Features::empty(), |                     features: wgpu::Features::empty(), | ||||||
|                     limits: wgpu::Limits::default(), |                     limits, | ||||||
|                 }, |                 }, | ||||||
|                 None, |                 None, | ||||||
|             ) |             ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue