-
Notifications
You must be signed in to change notification settings - Fork 935
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
New DX12 backend (unfinished) #1602
Conversation
Out of interest, what benefits does the |
Related discussion in winit - rust-windowing/winit#1938 |
222c97d
to
07847fb
Compare
I think it's at the point where we can merge and follow-up. I'm not able to test it thoroughly because of Naga's HLSL backend, which needs work. I'll be collaborating with @Gordon-F on this one, and in the meantime DX12 is removed from the Another thing missing is rebinding all the bindings. Currently, the only lazy state is vertex buffers, because of gpuweb/gpuweb#1921. However, DX12 prescribes all the bindings to be reset on any layout change. This is unfortunate, since wgpu-core's handling of Vulkan pipeline compatibility is wasted, and we have to have more lazy state in DX12 now... See also - gpuweb/gpuweb#1926 . More specifically, this makes the whole binding model to be one giant lazy state. |
bors r+ |
1661: dx12/hal: invalidate root elements on signature change r=kvark a=kvark **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. Co-authored-by: Dzmitry Malyshau <[email protected]>
1663: hal/dx12: flip the root signature upside down r=kvark a=kvark **Connections** Another follow-up to #1602 **Description** Apparently, Microsoft recommends putting most frequently changed stuff at the bottom of root signature. **Testing** Unable to test yet. Co-authored-by: Dzmitry Malyshau <[email protected]>
1664: hal/dx12: reset scissor and viewport r=kvark a=kvark **Connections** Follow-up to #1602 that actually makes it render! **Description** "hello-triange" and "msaa-line" examples work now. Everything else is blocked on Naga's HLSL output, starting from gfx-rs/naga#1086 **Testing** Ran the examples :) Co-authored-by: Dzmitry Malyshau <[email protected]>
Connections
Continuation of #1471
Description
Mostly fresh implementation on DX12 backend for wgpu-hal
Core changes:
create_texture_view
, so that wgpu-hal can assume every bit is important.Testing
Examples (not running yet)