Commit 594d4bc
committed
Port Vulkan backend to in-tree suballocator
Port the Vulkan backend off gpu-allocator onto the new in-repo
wgpu-block-pool / wgpu-offset-allocator crates via a new
vulkan/suballocation.rs (VMA-style memory-type selection, per-heap block
sizing, dedicated-allocation heuristics, budget gating, persistent
mapping). Vulkan no longer references lib.rs's shared AllocationSizes; it
uses a local BlockSizePolicy instead. Also hardens acceleration-structure
buffer alignment and fixes device-memory leaks on error paths.
The dx12 backend still uses gpu-allocator, so the shared gpu_allocator
glue in lib.rs (gated on any(dx12, vulkan)) is kept; the gpu-allocator
crate remains a wgpu-hal dependency (its vulkan feature is dropped, its
d3d12 feature retained). Removing that glue is a follow-up once dx12 is
ported too.1 parent 47c2eca commit 594d4bc
6 files changed
Lines changed: 2091 additions & 263 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | | - | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
2910 | 2910 | | |
2911 | 2911 | | |
2912 | 2912 | | |
| 2913 | + | |
2913 | 2914 | | |
2914 | 2915 | | |
2915 | 2916 | | |
| |||
2948 | 2949 | | |
2949 | 2950 | | |
2950 | 2951 | | |
2951 | | - | |
2952 | | - | |
| 2952 | + | |
2953 | 2953 | | |
2954 | 2954 | | |
2955 | | - | |
2956 | | - | |
2957 | | - | |
2958 | | - | |
2959 | | - | |
2960 | | - | |
2961 | | - | |
2962 | | - | |
2963 | | - | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
2964 | 2964 | | |
2965 | 2965 | | |
2966 | 2966 | | |
| |||
2974 | 2974 | | |
2975 | 2975 | | |
2976 | 2976 | | |
2977 | | - | |
2978 | 2977 | | |
2979 | 2978 | | |
2980 | 2979 | | |
| |||
0 commit comments