mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[d3d11] Remove templated SetUnorderedAccessViews
Not needed because the CS and OM paths are separate anyway.
This commit is contained in:
parent
08e3500beb
commit
5ae5053a2a
@ -2469,11 +2469,21 @@ namespace dxvk {
|
||||
const UINT* pUAVInitialCounts) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetUnorderedAccessViews<DxbcProgramType::ComputeShader>(
|
||||
m_state.cs.unorderedAccessViews,
|
||||
StartSlot, NumUAVs,
|
||||
ppUnorderedAccessViews,
|
||||
pUAVInitialCounts);
|
||||
uint32_t uavSlotId = computeUavBinding (DxbcProgramType::ComputeShader, StartSlot);
|
||||
uint32_t ctrSlotId = computeUavCounterBinding(DxbcProgramType::ComputeShader, StartSlot);
|
||||
|
||||
for (uint32_t i = 0; i < NumUAVs; i++) {
|
||||
auto uav = static_cast<D3D11UnorderedAccessView*>(ppUnorderedAccessViews[i]);
|
||||
auto ctr = pUAVInitialCounts ? pUAVInitialCounts[i] : ~0u;
|
||||
|
||||
if (m_state.cs.unorderedAccessViews[StartSlot + i] != uav || ctr != ~0u) {
|
||||
m_state.cs.unorderedAccessViews[StartSlot + i] = uav;
|
||||
|
||||
BindUnorderedAccessView(
|
||||
uavSlotId + i, uav,
|
||||
ctrSlotId + i, ctr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3522,31 +3532,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void D3D11DeviceContext::SetUnorderedAccessViews(
|
||||
D3D11UnorderedAccessBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts) {
|
||||
uint32_t uavSlotId = computeUavBinding (ShaderStage, StartSlot);
|
||||
uint32_t ctrSlotId = computeUavCounterBinding(ShaderStage, StartSlot);
|
||||
|
||||
for (uint32_t i = 0; i < NumUAVs; i++) {
|
||||
auto uav = static_cast<D3D11UnorderedAccessView*>(ppUnorderedAccessViews[i]);
|
||||
auto ctr = pUAVInitialCounts ? pUAVInitialCounts[i] : ~0u;
|
||||
|
||||
if (Bindings[StartSlot + i] != uav || ctr != ~0u) {
|
||||
Bindings[StartSlot + i] = uav;
|
||||
|
||||
BindUnorderedAccessView(
|
||||
uavSlotId + i, uav,
|
||||
ctrSlotId + i, ctr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GetConstantBuffers(
|
||||
const D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
|
@ -770,14 +770,6 @@ namespace dxvk {
|
||||
UINT NumResources,
|
||||
ID3D11ShaderResourceView* const* ppResources);
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void SetUnorderedAccessViews(
|
||||
D3D11UnorderedAccessBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts);
|
||||
|
||||
void GetConstantBuffers(
|
||||
const D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
|
Loading…
Reference in New Issue
Block a user