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

Make sure to copy all of the buffers into the resource array for dx12. #5091

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

dtzxporter
Copy link
Contributor

@dtzxporter dtzxporter commented Jan 18, 2024

Fixes #5088. Even though we're telling DX12 that the maximum frame latency should be our non-padded value, the swap chain may request any of the buffers allocated to it.

Connections
Issue #5088.

Description
DX will still request any swap chain buffer that was allocated to it.

Testing
No longer crashes on my machine, checked swap chain indices requested and it's now correct.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Fixes gfx-rs#5088. Even though we're telling DX12 that the maximum frame latency should be our non-padded value, the swap chain may request any of the buffers allocated to it.
@dtzxporter dtzxporter requested a review from a team as a code owner January 18, 2024 16:38
@Elabajaba
Copy link
Contributor

Fixes #5088 for me.

@nical nical merged commit 101e9a5 into gfx-rs:trunk Jan 19, 2024
27 checks passed
@dtzxporter dtzxporter deleted the fix-dx12-latency-crash branch January 19, 2024 17:34
@cwfitzgerald cwfitzgerald added the PR: needs back-porting PR with a fix that needs to land on crates label Jan 21, 2024
@torokati44
Copy link
Contributor

Can we expect wgpu-hal 0.19.1 with this in sometime soon? 👀😶

@cwfitzgerald
Copy link
Member

Yes - within the next day or so

cwfitzgerald pushed a commit to cwfitzgerald/wgpu that referenced this pull request Jan 21, 2024
gfx-rs#5091)

* Make sure to copy all of the buffers into the resource array for dx12.

Fixes gfx-rs#5088. Even though we're telling DX12 that the maximum frame latency should be our non-padded value, the swap chain may request any of the buffers allocated to it.

* Up the maximum frame latency on the DX12 backend to allow a larger range.
@cwfitzgerald cwfitzgerald removed the PR: needs back-porting PR with a fix that needs to land on crates label Jan 21, 2024
@torokati44
Copy link
Contributor

Well this was quick! c:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DX12 crash with wpgu 0.19 when desired_maximum_frame_latency < 3
5 participants