mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d11] Implement MultiDrawIndirectCount extension
This commit is contained in:
parent
492b7db07b
commit
3867270812
@ -69,7 +69,17 @@ namespace dxvk {
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT ByteOffsetForArgs,
|
||||
UINT ByteStrideForArgs) {
|
||||
|
||||
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||
m_ctx->SetDrawBuffers(pBufferForArgs, pBufferForCount);
|
||||
|
||||
m_ctx->EmitCs([
|
||||
cMaxCount = MaxDrawCount,
|
||||
cArgOffset = ByteOffsetForArgs,
|
||||
cCntOffset = ByteOffsetForCount,
|
||||
cStride = ByteStrideForArgs
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->drawIndirectCount(cArgOffset, cCntOffset, cMaxCount, cStride);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +90,17 @@ namespace dxvk {
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT ByteOffsetForArgs,
|
||||
UINT ByteStrideForArgs) {
|
||||
|
||||
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||
m_ctx->SetDrawBuffers(pBufferForArgs, pBufferForCount);
|
||||
|
||||
m_ctx->EmitCs([
|
||||
cMaxCount = MaxDrawCount,
|
||||
cArgOffset = ByteOffsetForArgs,
|
||||
cCntOffset = ByteOffsetForCount,
|
||||
cStride = ByteStrideForArgs
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->drawIndexedIndirectCount(cArgOffset, cCntOffset, cMaxCount, cStride);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -1773,6 +1773,7 @@ namespace dxvk {
|
||||
BOOL STDMETHODCALLTYPE D3D11DeviceExt::GetExtensionSupport(
|
||||
D3D11_VK_EXTENSION Extension) {
|
||||
const auto& deviceFeatures = m_device->GetDXVKDevice()->features();
|
||||
const auto& deviceExtensions = m_device->GetDXVKDevice()->extensions();
|
||||
|
||||
switch (Extension) {
|
||||
case D3D11_VK_EXT_BARRIER_CONTROL:
|
||||
@ -1781,6 +1782,10 @@ namespace dxvk {
|
||||
case D3D11_VK_EXT_MULTI_DRAW_INDIRECT:
|
||||
return deviceFeatures.core.features.multiDrawIndirect;
|
||||
|
||||
case D3D11_VK_EXT_MULTI_DRAW_INDIRECT_COUNT:
|
||||
return deviceFeatures.core.features.multiDrawIndirect
|
||||
&& deviceExtensions.khrDrawIndirectCount;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user