-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When binding resources for write, unbind all other write uses. Refs #503
* The D3D11 hazard tracking rules are then as follows: - When binding a resource for read, if it is bound for write anywhere then NULL is bound instead. If it's not, then any other read references are preserved. - When binding a resource for write, all other binds for read AND write are forced to zero. - The exception to the above: If a DSV is bound with depth read-only then any read binds reading the depth channel remain bound. Likewise for stencil read-only and stencil channel read binds. - Special case: When binding RTVs and UAVs at the same time, if there is a write overlap within that bind, the entire bind gets discarded (including any non-overlapping binds) and state remains unchanged. - When considering if a bind overlaps, it only overlaps if the view in question covers an overlapping subresource range. In other words, it is valid to have a write bind of mip 1 and a read bind of mip 0 at the same time (the classic case being mip generation). * This commit fixes the second point, other write binds weren't being NULL'd out. So binding a UAV to slot 0 then slot 1 in that order will cause slot 0 to become unbound. Or binding to an RTV will unbind a UAV or vice-versa.
- Loading branch information
Showing
3 changed files
with
220 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters