Skip to content

Commit

Permalink
[d3d11] Add bound compute shader UAV mask
Browse files Browse the repository at this point in the history
Will be used for efficient hazard tracking.
  • Loading branch information
doitsujin committed Aug 26, 2019
1 parent 8208ced commit 4064dd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/d3d11/d3d11_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ namespace dxvk {
m_state.cs.unorderedAccessViews[i] = nullptr;
}

m_state.cs.uavMask.clear();

// Default ID state
m_state.id.argBuffer = nullptr;

Expand Down Expand Up @@ -2478,6 +2480,7 @@ namespace dxvk {

if (m_state.cs.unorderedAccessViews[StartSlot + i] != uav || ctr != ~0u) {
m_state.cs.unorderedAccessViews[StartSlot + i] = uav;
m_state.cs.uavMask.set(StartSlot + i, uav != nullptr);

BindUnorderedAccessView(
uavSlotId + i, uav,
Expand Down
2 changes: 2 additions & 0 deletions src/d3d11/d3d11_context_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ namespace dxvk {
D3D11SamplerBindings samplers;
D3D11ShaderResourceBindings shaderResources;
D3D11UnorderedAccessBindings unorderedAccessViews;

DxvkBindingSet<D3D11_1_UAV_SLOT_COUNT> uavMask = { };
};


Expand Down

0 comments on commit 4064dd3

Please sign in to comment.