mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d11] Move *SetConstantBuffers methods to D3D11CommonContext
This commit is contained in:
parent
26ac57f688
commit
bfaa21dccc
@ -1284,36 +1284,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::VSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::VertexShader>(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::VSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::VertexShader>(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::VSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1340,37 +1310,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::VSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::VSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::VSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1406,36 +1345,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::HSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::HullShader>(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::HSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::HullShader>(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::HSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
@ -1449,37 +1358,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::HSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::HSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::HSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1515,36 +1393,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::DSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::DomainShader>(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::DSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::DomainShader>(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::DSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
@ -1558,37 +1406,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::DSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::DSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::DSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1611,36 +1428,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::GSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::GeometryShader>(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::GSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::GeometryShader>(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::GSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1667,37 +1454,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::GSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::GSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::GSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1720,36 +1476,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::PSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::PixelShader>(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::PSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::PixelShader>(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::PSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1776,37 +1502,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::PSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::PSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::PSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1829,36 +1524,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::CSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::ComputeShader>(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::CSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::ComputeShader>(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::CSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -1941,37 +1606,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::CSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::CSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::CSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -3304,105 +2938,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void D3D11DeviceContext::SetConstantBuffers(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
uint32_t slotId = computeConstantBufferBinding(ShaderStage, StartSlot);
|
||||
|
||||
for (uint32_t i = 0; i < NumBuffers; i++) {
|
||||
auto newBuffer = static_cast<D3D11Buffer*>(ppConstantBuffers[i]);
|
||||
|
||||
UINT constantCount = 0;
|
||||
|
||||
if (likely(newBuffer != nullptr))
|
||||
constantCount = std::min(newBuffer->Desc()->ByteWidth / 16, UINT(D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT));
|
||||
|
||||
if (Bindings[StartSlot + i].buffer != newBuffer
|
||||
|| Bindings[StartSlot + i].constantBound != constantCount) {
|
||||
Bindings[StartSlot + i].buffer = newBuffer;
|
||||
Bindings[StartSlot + i].constantOffset = 0;
|
||||
Bindings[StartSlot + i].constantCount = constantCount;
|
||||
Bindings[StartSlot + i].constantBound = constantCount;
|
||||
|
||||
BindConstantBuffer<ShaderStage>(slotId + i, newBuffer, 0, constantCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void D3D11DeviceContext::SetConstantBuffers1(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
uint32_t slotId = computeConstantBufferBinding(ShaderStage, StartSlot);
|
||||
|
||||
for (uint32_t i = 0; i < NumBuffers; i++) {
|
||||
auto newBuffer = static_cast<D3D11Buffer*>(ppConstantBuffers[i]);
|
||||
|
||||
UINT constantOffset;
|
||||
UINT constantCount;
|
||||
UINT constantBound;
|
||||
|
||||
if (likely(newBuffer != nullptr)) {
|
||||
UINT bufferConstantsCount = newBuffer->Desc()->ByteWidth / 16;
|
||||
constantBound = std::min(bufferConstantsCount, UINT(D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT));
|
||||
|
||||
if (likely(pFirstConstant && pNumConstants)) {
|
||||
constantOffset = pFirstConstant[i];
|
||||
constantCount = pNumConstants [i];
|
||||
|
||||
if (unlikely(constantCount > D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT))
|
||||
continue;
|
||||
|
||||
constantBound = (constantOffset + constantCount > bufferConstantsCount)
|
||||
? bufferConstantsCount - std::min(constantOffset, bufferConstantsCount)
|
||||
: constantCount;
|
||||
} else {
|
||||
constantOffset = 0;
|
||||
constantCount = constantBound;
|
||||
}
|
||||
} else {
|
||||
constantOffset = 0;
|
||||
constantCount = 0;
|
||||
constantBound = 0;
|
||||
}
|
||||
|
||||
// Do a full rebind if either the buffer changes, or if either the current or
|
||||
// the previous number of bound constants were zero, since we're binding a null
|
||||
// buffer to the backend in that case.
|
||||
bool needsUpdate = Bindings[StartSlot + i].buffer != newBuffer;
|
||||
|
||||
if (!needsUpdate) {
|
||||
needsUpdate |= !constantBound;
|
||||
needsUpdate |= !Bindings[StartSlot + i].constantBound;
|
||||
}
|
||||
|
||||
if (needsUpdate) {
|
||||
Bindings[StartSlot + i].buffer = newBuffer;
|
||||
Bindings[StartSlot + i].constantOffset = constantOffset;
|
||||
Bindings[StartSlot + i].constantCount = constantCount;
|
||||
Bindings[StartSlot + i].constantBound = constantBound;
|
||||
|
||||
BindConstantBuffer<ShaderStage>(slotId + i, newBuffer, constantOffset, constantBound);
|
||||
} else if (Bindings[StartSlot + i].constantOffset != constantOffset
|
||||
|| Bindings[StartSlot + i].constantCount != constantCount) {
|
||||
Bindings[StartSlot + i].constantOffset = constantOffset;
|
||||
Bindings[StartSlot + i].constantCount = constantCount;
|
||||
Bindings[StartSlot + i].constantBound = constantBound;
|
||||
|
||||
BindConstantBufferRange<ShaderStage>(slotId + i, constantOffset, constantBound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void D3D11DeviceContext::SetSamplers(
|
||||
D3D11SamplerBindings& Bindings,
|
||||
@ -3451,37 +2986,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GetConstantBuffers(
|
||||
const D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
for (uint32_t i = 0; i < NumBuffers; i++) {
|
||||
const bool inRange = StartSlot + i < Bindings.size();
|
||||
|
||||
if (ppConstantBuffers != nullptr) {
|
||||
ppConstantBuffers[i] = inRange
|
||||
? Bindings[StartSlot + i].buffer.ref()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
if (pFirstConstant != nullptr) {
|
||||
pFirstConstant[i] = inRange
|
||||
? Bindings[StartSlot + i].constantOffset
|
||||
: 0u;
|
||||
}
|
||||
|
||||
if (pNumConstants != nullptr) {
|
||||
pNumConstants[i] = inRange
|
||||
? Bindings[StartSlot + i].constantCount
|
||||
: 0u;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GetShaderResources(
|
||||
const D3D11ShaderResourceBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
|
@ -208,18 +208,6 @@ namespace dxvk {
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs);
|
||||
|
||||
void STDMETHODCALLTYPE VSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE VSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE VSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -230,18 +218,6 @@ namespace dxvk {
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE VSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE VSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE VSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -257,35 +233,11 @@ namespace dxvk {
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews);
|
||||
|
||||
void STDMETHODCALLTYPE HSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE HSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE HSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE HSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE HSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE HSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -301,35 +253,11 @@ namespace dxvk {
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews);
|
||||
|
||||
void STDMETHODCALLTYPE DSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE DSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE DSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE DSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE DSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE DSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -340,18 +268,6 @@ namespace dxvk {
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE GSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE GSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE GSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -362,18 +278,6 @@ namespace dxvk {
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE GSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE GSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE GSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -384,18 +288,6 @@ namespace dxvk {
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE PSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE PSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE PSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -406,18 +298,6 @@ namespace dxvk {
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE PSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE PSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE PSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -428,18 +308,6 @@ namespace dxvk {
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers);
|
||||
|
||||
void STDMETHODCALLTYPE CSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE CSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE CSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -456,18 +324,6 @@ namespace dxvk {
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts);
|
||||
|
||||
void STDMETHODCALLTYPE CSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE CSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE CSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
@ -682,22 +538,6 @@ namespace dxvk {
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
ID3D11Buffer* pBufferForCount);
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void SetConstantBuffers(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void SetConstantBuffers1(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void SetSamplers(
|
||||
D3D11SamplerBindings& Bindings,
|
||||
@ -712,14 +552,6 @@ namespace dxvk {
|
||||
UINT NumResources,
|
||||
ID3D11ShaderResourceView* const* ppResources);
|
||||
|
||||
void GetConstantBuffers(
|
||||
const D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void GetShaderResources(
|
||||
const D3D11ShaderResourceBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
|
@ -265,6 +265,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::VSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::VertexShader>(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::VSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::VertexShader>(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::VSGetShader(
|
||||
ID3D11VertexShader** ppVertexShader,
|
||||
@ -280,6 +312,39 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::VSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::VSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.vs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::HSSetShader(
|
||||
ID3D11HullShader* pHullShader,
|
||||
@ -300,6 +365,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::HSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::HullShader>(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::HSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::HullShader>(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::HSGetShader(
|
||||
ID3D11HullShader** ppHullShader,
|
||||
@ -315,6 +412,39 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::HSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::HSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.hs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DSSetShader(
|
||||
ID3D11DomainShader* pDomainShader,
|
||||
@ -335,6 +465,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::DomainShader>(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::DomainShader>(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DSGetShader(
|
||||
ID3D11DomainShader** ppDomainShader,
|
||||
@ -350,6 +512,39 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ds.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::GSSetShader(
|
||||
ID3D11GeometryShader* pShader,
|
||||
@ -370,6 +565,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::GSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::GeometryShader>(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::GSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::GeometryShader>(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::GSGetShader(
|
||||
ID3D11GeometryShader** ppGeometryShader,
|
||||
@ -385,6 +612,39 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::GSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::GSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.gs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::PSSetShader(
|
||||
ID3D11PixelShader* pPixelShader,
|
||||
@ -405,6 +665,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::PSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::PixelShader>(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::PSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::PixelShader>(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::PSGetShader(
|
||||
ID3D11PixelShader** ppPixelShader,
|
||||
@ -420,6 +712,39 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::PSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::PSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.ps.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CSSetShader(
|
||||
ID3D11ComputeShader* pComputeShader,
|
||||
@ -440,6 +765,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers<DxbcProgramType::ComputeShader>(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
SetConstantBuffers1<DxbcProgramType::ComputeShader>(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CSGetShader(
|
||||
ID3D11ComputeShader** ppComputeShader,
|
||||
@ -455,6 +812,39 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
GetConstantBuffers(
|
||||
m_state.cs.constantBuffers,
|
||||
StartSlot, NumBuffers,
|
||||
ppConstantBuffers,
|
||||
pFirstConstant,
|
||||
pNumConstants);
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::OMSetRenderTargets(
|
||||
UINT NumViews,
|
||||
@ -883,6 +1273,38 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void D3D11CommonContext<ContextType>::GetConstantBuffers(
|
||||
const D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants) {
|
||||
for (uint32_t i = 0; i < NumBuffers; i++) {
|
||||
const bool inRange = StartSlot + i < Bindings.size();
|
||||
|
||||
if (ppConstantBuffers) {
|
||||
ppConstantBuffers[i] = inRange
|
||||
? Bindings[StartSlot + i].buffer.ref()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
if (pFirstConstant) {
|
||||
pFirstConstant[i] = inRange
|
||||
? Bindings[StartSlot + i].constantOffset
|
||||
: 0u;
|
||||
}
|
||||
|
||||
if (pNumConstants) {
|
||||
pNumConstants[i] = inRange
|
||||
? Bindings[StartSlot + i].constantCount
|
||||
: 0u;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
template<DxbcProgramType ShaderStage, typename T>
|
||||
void D3D11CommonContext<ContextType>::ResolveSrvHazards(
|
||||
@ -980,6 +1402,107 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void D3D11CommonContext<ContextType>::SetConstantBuffers(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
uint32_t slotId = computeConstantBufferBinding(ShaderStage, StartSlot);
|
||||
|
||||
for (uint32_t i = 0; i < NumBuffers; i++) {
|
||||
auto newBuffer = static_cast<D3D11Buffer*>(ppConstantBuffers[i]);
|
||||
|
||||
UINT constantCount = 0;
|
||||
|
||||
if (likely(newBuffer != nullptr))
|
||||
constantCount = std::min(newBuffer->Desc()->ByteWidth / 16, UINT(D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT));
|
||||
|
||||
if (Bindings[StartSlot + i].buffer != newBuffer
|
||||
|| Bindings[StartSlot + i].constantBound != constantCount) {
|
||||
Bindings[StartSlot + i].buffer = newBuffer;
|
||||
Bindings[StartSlot + i].constantOffset = 0;
|
||||
Bindings[StartSlot + i].constantCount = constantCount;
|
||||
Bindings[StartSlot + i].constantBound = constantCount;
|
||||
|
||||
BindConstantBuffer<ShaderStage>(slotId + i, newBuffer, 0, constantCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void D3D11CommonContext<ContextType>::SetConstantBuffers1(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants) {
|
||||
uint32_t slotId = computeConstantBufferBinding(ShaderStage, StartSlot);
|
||||
|
||||
for (uint32_t i = 0; i < NumBuffers; i++) {
|
||||
auto newBuffer = static_cast<D3D11Buffer*>(ppConstantBuffers[i]);
|
||||
|
||||
UINT constantOffset;
|
||||
UINT constantCount;
|
||||
UINT constantBound;
|
||||
|
||||
if (likely(newBuffer != nullptr)) {
|
||||
UINT bufferConstantsCount = newBuffer->Desc()->ByteWidth / 16;
|
||||
constantBound = std::min(bufferConstantsCount, UINT(D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT));
|
||||
|
||||
if (likely(pFirstConstant && pNumConstants)) {
|
||||
constantOffset = pFirstConstant[i];
|
||||
constantCount = pNumConstants [i];
|
||||
|
||||
if (unlikely(constantCount > D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT))
|
||||
continue;
|
||||
|
||||
constantBound = (constantOffset + constantCount > bufferConstantsCount)
|
||||
? bufferConstantsCount - std::min(constantOffset, bufferConstantsCount)
|
||||
: constantCount;
|
||||
} else {
|
||||
constantOffset = 0;
|
||||
constantCount = constantBound;
|
||||
}
|
||||
} else {
|
||||
constantOffset = 0;
|
||||
constantCount = 0;
|
||||
constantBound = 0;
|
||||
}
|
||||
|
||||
// Do a full rebind if either the buffer changes, or if either the current or
|
||||
// the previous number of bound constants were zero, since we're binding a null
|
||||
// buffer to the backend in that case.
|
||||
bool needsUpdate = Bindings[StartSlot + i].buffer != newBuffer;
|
||||
|
||||
if (!needsUpdate) {
|
||||
needsUpdate |= !constantBound;
|
||||
needsUpdate |= !Bindings[StartSlot + i].constantBound;
|
||||
}
|
||||
|
||||
if (needsUpdate) {
|
||||
Bindings[StartSlot + i].buffer = newBuffer;
|
||||
Bindings[StartSlot + i].constantOffset = constantOffset;
|
||||
Bindings[StartSlot + i].constantCount = constantCount;
|
||||
Bindings[StartSlot + i].constantBound = constantBound;
|
||||
|
||||
BindConstantBuffer<ShaderStage>(slotId + i, newBuffer, constantOffset, constantBound);
|
||||
} else if (Bindings[StartSlot + i].constantOffset != constantOffset
|
||||
|| Bindings[StartSlot + i].constantCount != constantCount) {
|
||||
Bindings[StartSlot + i].constantOffset = constantOffset;
|
||||
Bindings[StartSlot + i].constantCount = constantCount;
|
||||
Bindings[StartSlot + i].constantBound = constantBound;
|
||||
|
||||
BindConstantBufferRange<ShaderStage>(slotId + i, constantOffset, constantBound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void D3D11CommonContext<ContextType>::SetRenderTargetsAndUnorderedAccessViews(
|
||||
UINT NumRTVs,
|
||||
|
@ -126,61 +126,205 @@ namespace dxvk {
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE VSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE VSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE VSGetShader(
|
||||
ID3D11VertexShader** ppVertexShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE VSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE VSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE HSSetShader(
|
||||
ID3D11HullShader* pHullShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE HSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE HSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE HSGetShader(
|
||||
ID3D11HullShader** ppHullShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE HSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE HSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE DSSetShader(
|
||||
ID3D11DomainShader* pDomainShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE DSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE DSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE DSGetShader(
|
||||
ID3D11DomainShader** ppDomainShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE DSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE DSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE GSSetShader(
|
||||
ID3D11GeometryShader* pShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE GSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE GSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE GSGetShader(
|
||||
ID3D11GeometryShader** ppGeometryShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE GSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE GSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE PSSetShader(
|
||||
ID3D11PixelShader* pPixelShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE PSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE PSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE PSGetShader(
|
||||
ID3D11PixelShader** ppPixelShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE PSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE PSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE CSSetShader(
|
||||
ID3D11ComputeShader* pComputeShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE CSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE CSSetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE CSGetShader(
|
||||
ID3D11ComputeShader** ppComputeShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances);
|
||||
|
||||
void STDMETHODCALLTYPE CSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers);
|
||||
|
||||
void STDMETHODCALLTYPE CSGetConstantBuffers1(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
void STDMETHODCALLTYPE OMSetRenderTargets(
|
||||
UINT NumViews,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
@ -289,6 +433,14 @@ namespace dxvk {
|
||||
UINT CtrSlot,
|
||||
UINT Counter);
|
||||
|
||||
void GetConstantBuffers(
|
||||
const D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers,
|
||||
UINT* pFirstConstant,
|
||||
UINT* pNumConstants);
|
||||
|
||||
template<DxbcProgramType ShaderStage, typename T>
|
||||
void ResolveSrvHazards(
|
||||
T* pView,
|
||||
@ -308,6 +460,22 @@ namespace dxvk {
|
||||
void ResolveOmUavHazards(
|
||||
D3D11RenderTargetView* pView);
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void SetConstantBuffers(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers);
|
||||
|
||||
template<DxbcProgramType ShaderStage>
|
||||
void SetConstantBuffers1(
|
||||
D3D11ConstantBufferBindings& Bindings,
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers,
|
||||
const UINT* pFirstConstant,
|
||||
const UINT* pNumConstants);
|
||||
|
||||
void SetRenderTargetsAndUnorderedAccessViews(
|
||||
UINT NumRTVs,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
|
Loading…
x
Reference in New Issue
Block a user