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

[d3d11] Implement depth bounds extension

This commit is contained in:
Philip Rebohle 2019-04-24 22:48:07 +02:00
parent 3867270812
commit a0c67191a7
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 14 additions and 1 deletions

View File

@ -108,7 +108,16 @@ namespace dxvk {
BOOL Enable,
FLOAT MinDepthBounds,
FLOAT MaxDepthBounds) {
D3D10DeviceLock lock = m_ctx->LockContext();
DxvkDepthBounds db;
db.enableDepthBounds = Enable;
db.minDepthBounds = MinDepthBounds;
db.maxDepthBounds = MaxDepthBounds;
m_ctx->EmitCs([cDepthBounds = db] (DxvkContext* ctx) {
ctx->setDepthBounds(cDepthBounds);
});
}

View File

@ -1411,6 +1411,7 @@ namespace dxvk {
enabled.core.features.robustBufferAccess = VK_TRUE;
enabled.core.features.shaderStorageImageExtendedFormats = VK_TRUE;
enabled.core.features.shaderStorageImageWriteWithoutFormat = VK_TRUE;
enabled.core.features.depthBounds = supported.core.features.depthBounds;
enabled.extMemoryPriority.memoryPriority = supported.extMemoryPriority.memoryPriority;
@ -1785,7 +1786,10 @@ namespace dxvk {
case D3D11_VK_EXT_MULTI_DRAW_INDIRECT_COUNT:
return deviceFeatures.core.features.multiDrawIndirect
&& deviceExtensions.khrDrawIndirectCount;
case D3D11_VK_EXT_DEPTH_BOUNDS:
return deviceFeatures.core.features.depthBounds;
default:
return false;
}