1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Implement MultiDrawIndirect extension

This commit is contained in:
Philip Rebohle 2019-04-24 20:26:21 +02:00
parent 9e57b03e64
commit 117b7b1ba1
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 23 additions and 0 deletions

View File

@ -31,7 +31,16 @@ namespace dxvk {
ID3D11Buffer* pBufferForArgs,
UINT ByteOffsetForArgs,
UINT ByteStrideForArgs) {
D3D10DeviceLock lock = m_ctx->LockContext();
m_ctx->SetDrawBuffer(pBufferForArgs);
m_ctx->EmitCs([
cCount = DrawCount,
cOffset = ByteOffsetForArgs,
cStride = ByteStrideForArgs
] (DxvkContext* ctx) {
ctx->drawIndirect(cOffset, cCount, cStride);
});
}
@ -40,7 +49,16 @@ namespace dxvk {
ID3D11Buffer* pBufferForArgs,
UINT ByteOffsetForArgs,
UINT ByteStrideForArgs) {
D3D10DeviceLock lock = m_ctx->LockContext();
m_ctx->SetDrawBuffer(pBufferForArgs);
m_ctx->EmitCs([
cCount = DrawCount,
cOffset = ByteOffsetForArgs,
cStride = ByteStrideForArgs
] (DxvkContext* ctx) {
ctx->drawIndexedIndirect(cOffset, cCount, cStride);
});
}

View File

@ -1772,9 +1772,14 @@ namespace dxvk {
BOOL STDMETHODCALLTYPE D3D11DeviceExt::GetExtensionSupport(
D3D11_VK_EXTENSION Extension) {
const auto& deviceFeatures = m_device->GetDXVKDevice()->features();
switch (Extension) {
case D3D11_VK_EXT_BARRIER_CONTROL:
return true;
case D3D11_VK_EXT_MULTI_DRAW_INDIRECT:
return deviceFeatures.core.features.multiDrawIndirect;
default:
return false;