mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +01:00
[d3d11] Skip unnecessary iterations when binding graphics UAVs
Some games will unconditionally use a high index for UAVStartSlot.
This commit is contained in:
parent
9f9d51d52c
commit
20dc389ab7
@ -5275,10 +5275,14 @@ namespace dxvk {
|
||||
|
||||
if (unlikely(NumUAVs || m_state.om.maxUav)) {
|
||||
if (likely(NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS)) {
|
||||
uint32_t newMaxUav = NumUAVs ? UAVStartSlot + NumUAVs : 0;
|
||||
uint32_t newMinUav = NumUAVs ? UAVStartSlot : D3D11_1_UAV_SLOT_COUNT;
|
||||
uint32_t newMaxUav = NumUAVs ? UAVStartSlot + NumUAVs : 0u;
|
||||
|
||||
uint32_t oldMinUav = std::exchange(m_state.om.minUav, newMinUav);
|
||||
uint32_t oldMaxUav = std::exchange(m_state.om.maxUav, newMaxUav);
|
||||
|
||||
for (uint32_t i = 0; i < std::max(oldMaxUav, newMaxUav); i++) {
|
||||
for (uint32_t i = std::min(oldMinUav, newMinUav);
|
||||
i < std::max(oldMaxUav, newMaxUav); i++) {
|
||||
D3D11UnorderedAccessView* uav = nullptr;
|
||||
uint32_t ctr = ~0u;
|
||||
|
||||
|
@ -199,6 +199,7 @@ namespace dxvk {
|
||||
UINT stencilRef = D3D11_DEFAULT_STENCIL_REFERENCE;
|
||||
|
||||
UINT maxRtv = 0u;
|
||||
UINT minUav = 0u;
|
||||
UINT maxUav = 0u;
|
||||
|
||||
void reset() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user