Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suballocate DX12 buffer creation #3163

Merged
merged 28 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e9192d9
Suballocate buffers
Elabajaba Oct 27, 2022
a9d5189
Error handling stub
Elabajaba Nov 1, 2022
1868f26
Suballocate Textures
Elabajaba Nov 1, 2022
baea831
cleanup
Elabajaba Nov 1, 2022
f9e44f2
cargo.toml workspace
Elabajaba Nov 1, 2022
34c42b4
Appease CI, cast ptr instead of as
Elabajaba Nov 1, 2022
ffce250
Merge remote-tracking branch 'origin/master' into temp-dx12alloc
Elabajaba Nov 21, 2022
029318c
unsafe_op_in_unsafe_fn
Elabajaba Nov 21, 2022
a782dfc
dx12 handle gpu-allocator errors
Elabajaba Nov 21, 2022
2ee1a41
Stick gpu-allocator behind a feature until #3207 lands
Elabajaba Nov 26, 2022
c24ecf8
gpu-allocator 0.21
Elabajaba Nov 26, 2022
6d3d10f
move gpu-allocator stuff into it's own file
Elabajaba Dec 8, 2022
b574495
clippy
Elabajaba Dec 8, 2022
89b13fc
Merge remote-tracking branch 'origin/master' into temp-dx12alloc
Elabajaba Dec 8, 2022
ef83d0f
Merge remote-tracking branch 'origin/master' into temp-dx12alloc
Elabajaba Dec 8, 2022
edb3b49
cargo update so it builds
Elabajaba Dec 8, 2022
fdff34a
Merge remote-tracking branch 'origin/master' into temp-dx12alloc
Elabajaba Dec 8, 2022
2dace15
cleanup
Elabajaba Dec 9, 2022
757b841
unwrap_unchecked when getting the allocator
Elabajaba Dec 19, 2022
079a343
changelog
Elabajaba Dec 19, 2022
40e4912
Merge remote-tracking branch 'origin/master' into temp-dx12alloc
Elabajaba Dec 19, 2022
1afd89f
can't use workspace inheritance :(
Elabajaba Dec 19, 2022
53b4309
Merge remote-tracking branch 'origin/master' into temp-dx12alloc
Elabajaba Dec 20, 2022
35c5830
Implement strict_assert for unwrap_unchecked
Elabajaba Dec 20, 2022
1481854
split suballocation into 2 inline modules for readability
Elabajaba Dec 20, 2022
744bc0a
fmt
Elabajaba Dec 20, 2022
10ef37c
comments on why suballocation.rs exists, point out which is the fast …
Elabajaba Dec 20, 2022
719d26c
default windows_rs enabled for wgpu-hal
Elabajaba Dec 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ Additionally `Surface::get_default_config` now returns an Option and returns Non

`Instance::create_surface()` now returns `Result<Surface, CreateSurfaceError>` instead of `Surface`. This allows an error to be returned instead of panicking if the given window is a HTML canvas and obtaining a WebGPU or WebGL 2 context fails. (No other platforms currently report any errors through this path.) By @kpreid in [#3052](https://github.com/gfx-rs/wgpu/pull/3052/)

#### Suballocate DX12 buffers and textures

`wgpu`'s DX12 backend can now suballocate buffers and textures when the `windows_rs` feature is enabled, which can give a significant increase in performance (in testing I've seen a 10000%+ improvement in a simple scene with 200 `write_buffer` calls per frame, and a 40%+ improvement in [Bistro using Bevy](https://github.com/vleue/bevy_bistro_playground)). Previously `wgpu-hal`'s DX12 backend created a new heap on the GPU every time you called write_buffer (by calling `CreateCommittedResource`), whereas now with the `windows_rs` feature enabled it uses [`gpu_allocator`](https://crates.io/crates/gpu-allocator) to manage GPU memory (and calls `CreatePlacedResource` with a suballocated heap). By @Elabajaba in [#3163](https://github.com/gfx-rs/wgpu/pull/3163)

### Changes

#### General
Expand Down
Loading