mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 04:24:11 +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) {
|
const UINT* pUAVInitialCounts) {
|
||||||
D3D10DeviceLock lock = LockContext();
|
D3D10DeviceLock lock = LockContext();
|
||||||
|
|
||||||
SetUnorderedAccessViews<DxbcProgramType::ComputeShader>(
|
uint32_t uavSlotId = computeUavBinding (DxbcProgramType::ComputeShader, StartSlot);
|
||||||
m_state.cs.unorderedAccessViews,
|
uint32_t ctrSlotId = computeUavCounterBinding(DxbcProgramType::ComputeShader, StartSlot);
|
||||||
StartSlot, NumUAVs,
|
|
||||||
ppUnorderedAccessViews,
|
for (uint32_t i = 0; i < NumUAVs; i++) {
|
||||||
pUAVInitialCounts);
|
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(
|
void D3D11DeviceContext::GetConstantBuffers(
|
||||||
const D3D11ConstantBufferBindings& Bindings,
|
const D3D11ConstantBufferBindings& Bindings,
|
||||||
UINT StartSlot,
|
UINT StartSlot,
|
||||||
|
@ -770,14 +770,6 @@ namespace dxvk {
|
|||||||
UINT NumResources,
|
UINT NumResources,
|
||||||
ID3D11ShaderResourceView* const* ppResources);
|
ID3D11ShaderResourceView* const* ppResources);
|
||||||
|
|
||||||
template<DxbcProgramType ShaderStage>
|
|
||||||
void SetUnorderedAccessViews(
|
|
||||||
D3D11UnorderedAccessBindings& Bindings,
|
|
||||||
UINT StartSlot,
|
|
||||||
UINT NumUAVs,
|
|
||||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
|
||||||
const UINT* pUAVInitialCounts);
|
|
||||||
|
|
||||||
void GetConstantBuffers(
|
void GetConstantBuffers(
|
||||||
const D3D11ConstantBufferBindings& Bindings,
|
const D3D11ConstantBufferBindings& Bindings,
|
||||||
UINT StartSlot,
|
UINT StartSlot,
|
||||||
|
Loading…
Reference in New Issue
Block a user