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

fix(dxgi): DX12 exception handler lifetime based on device not adapter #6828

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

fryeb
Copy link
Contributor

@fryeb fryeb commented Dec 26, 2024

Connections
Closes #4247

Description
Instead of registering/unregistering the dxgi exception handler on the instance creation/drop. We instead use the device lifetime.
This fixes the issue where we get DX12 errors popping up on Vulkan hardware.

Testing
Locally this seems to fix the issue. I've manually ran a bunch of the benchmarks. Manually selecting backends is working as it was before, auto-selection no longer produces spurious error messages. However I'm not sure how to test to make sure that we're still getting the error messages when we want them. If theres a better way to test this I'm all ears!

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • 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.

@fryeb fryeb requested a review from a team as a code owner December 26, 2024 10:27
@fryeb
Copy link
Contributor Author

fryeb commented Dec 26, 2024

When I run cargo xtask test I do get some errors, but I also get similar failures on the trunk branch. So it might be an unrelated issue?

On trunk:
image

On this feature branch:
image

If anyone has an idea what might be able to fix this I'm happy to make some adjustments. Otherwise I can raise it as a follow up issue.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cwfitzgerald cwfitzgerald merged commit 4772cd8 into gfx-rs:trunk Dec 26, 2024
27 checks passed
@cwfitzgerald
Copy link
Member

Do file another issue - I don't see those errors

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.

dxgi exception with Vulkan backend on Windows
2 participants