From 3ba541fde68e0623949e2c94830c783fbff4e4b9 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 16 Sep 2019 16:22:52 +0200 Subject: [PATCH] [d3d11] Implement D3D11.4 feature queries --- src/d3d11/d3d11_device.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 0408e8a3c..586fff205 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1625,6 +1625,34 @@ namespace dxvk { info->UnifiedMemoryArchitecture = FALSE; // Maybe on some APUs? } return S_OK; + case D3D11_FEATURE_D3D11_OPTIONS3: { + if (FeatureSupportDataSize != sizeof(D3D11_FEATURE_DATA_D3D11_OPTIONS3)) + return E_INVALIDARG; + + const auto& extensions = m_dxvkDevice->extensions(); + + auto info = static_cast(pFeatureSupportData); + info->VPAndRTArrayIndexFromAnyShaderFeedingRasterizer = extensions.extShaderViewportIndexLayer; + } return S_OK; + + case D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT: { + if (FeatureSupportDataSize != sizeof(D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT)) + return E_INVALIDARG; + + // These numbers are not accurate, but it should not have any effect on D3D11 apps + auto info = static_cast(pFeatureSupportData); + info->MaxGPUVirtualAddressBitsPerResource = 32; + info->MaxGPUVirtualAddressBitsPerProcess = 40; + } return S_OK; + + case D3D11_FEATURE_D3D11_OPTIONS4: { + if (FeatureSupportDataSize != sizeof(D3D11_FEATURE_DATA_D3D11_OPTIONS4)) + return E_INVALIDARG; + + auto info = static_cast(pFeatureSupportData); + info->ExtendedNV12SharedTextureSupported = FALSE; + } return S_OK; + default: Logger::err(str::format( "D3D11Device: CheckFeatureSupport: Unknown feature: ",