From ca1d79c4692a13e9669e6a42dc136dd92c1197d3 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Sun, 3 Oct 2021 00:32:38 +0200 Subject: [PATCH] nvapi-d3d12: Add stub for NvAPI_D3D12_SetDepthBoundsTestValues --- src/nvapi_d3d12.cpp | 12 ++++++++++++ src/nvapi_interface.cpp | 1 + 2 files changed, 13 insertions(+) diff --git a/src/nvapi_d3d12.cpp b/src/nvapi_d3d12.cpp index 548a8b9b..9ce0943a 100644 --- a/src/nvapi_d3d12.cpp +++ b/src/nvapi_d3d12.cpp @@ -157,4 +157,16 @@ extern "C" { pDevice->CreateGraphicsPipelineState(pPSODesc, __uuidof(ID3D12PipelineState), reinterpret_cast(ppPSO)); return Ok(str::format(n, " ", (*ppExtensions)->psoExtension, " (", fromPsoExtension((*ppExtensions)->psoExtension), ")"), alreadyLoggedOk); } + + NvAPI_Status __cdecl NvAPI_D3D12_SetDepthBoundsTestValues(ID3D12GraphicsCommandList *pCommandList, const float minDepth, const float maxDepth) { + static bool alreadyLoggedOk = false; + constexpr auto n = __func__; + + if (pCommandList == nullptr) + return InvalidArgument(n); + + // TODO: Add an actual implementation once VKD3D-Proton supports it. + + return Ok(n, alreadyLoggedOk); + } } diff --git a/src/nvapi_interface.cpp b/src/nvapi_interface.cpp index 0f001899..7626dd0e 100644 --- a/src/nvapi_interface.cpp +++ b/src/nvapi_interface.cpp @@ -66,6 +66,7 @@ extern "C" { INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D12_GetGraphicsCapabilities) INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D12_IsFatbinPTXSupported) INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D12_CreateGraphicsPipelineState) + INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D12_SetDepthBoundsTestValues) INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D_GetObjectHandleForResource) INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D_SetResourceHint) INSERT_AND_RETURN_WHEN_EQUALS(NvAPI_D3D_GetCurrentSLIState)