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

dx12/hal: invalidate root elements on signature change #1661

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

kvark
Copy link
Member

@kvark kvark commented Jul 15, 2021

Connections
A follow-up to #1602, which I hesitated to implement, but now it doesn't sound like there is any choice we have.

Description
D3D12's root signature is internally mapped to device's physical descriptors. But this mapping isn't guaranteed to have any properties. That is, any changes to the root signature mean that all of the bound resources need to be invalidated...

It's a bit unfortunate. gfx-backend-dx12 did a lazy flushing approach at draw call. In wgpu-hal I tried to be more aggressive, and we are rebinding everything as it goes. We can choose to go lazy if we want - this PR introduces the necessary logic and infrastructure to do so.

Testing
Untested.

@kvark
Copy link
Member Author

kvark commented Jul 15, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 15, 2021

@bors bors bot merged commit 37bf7d8 into gfx-rs:master Jul 15, 2021
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.

1 participant