use adapter max texture size for multi-monitor surfaces
- SHA
32f667071d444cc9d7e670dce27515dd6427b392- Parents
-
8367e78 - Tree
6af3c84
32f6670
32f667071d444cc9d7e670dce27515dd6427b3928367e78
6af3c84| Status | File | + | - |
|---|---|---|---|
| M |
garchomp/src/render/gpu.rs
|
6 | 2 |
garchomp/src/render/gpu.rsmodified@@ -122,13 +122,17 @@ impl GpuContext { | ||
| 122 | 122 | adapter_info.backend |
| 123 | 123 | ); |
| 124 | 124 | |
| 125 | - // Request device with default limits | |
| 125 | + // Request device - use adapter's actual max texture size for multi-monitor setups | |
| 126 | + let adapter_limits = adapter.limits(); | |
| 126 | 127 | let (device, queue) = adapter |
| 127 | 128 | .request_device( |
| 128 | 129 | &wgpu::DeviceDescriptor { |
| 129 | 130 | label: Some("garchomp"), |
| 130 | 131 | required_features: wgpu::Features::empty(), |
| 131 | - required_limits: wgpu::Limits::default(), | |
| 132 | + required_limits: wgpu::Limits { | |
| 133 | + max_texture_dimension_2d: adapter_limits.max_texture_dimension_2d, | |
| 134 | + ..wgpu::Limits::default() | |
| 135 | + }, | |
| 132 | 136 | memory_hints: wgpu::MemoryHints::Performance, |
| 133 | 137 | }, |
| 134 | 138 | None, |