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:
parent
9e57b03e64
commit
117b7b1ba1
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user