From fdc0f124cec2e1977baf58b29685d736e157f6a3 Mon Sep 17 00:00:00 2001 From: Krzysztof Bogacki Date: Sun, 21 May 2023 19:45:27 +0200 Subject: [PATCH] nvapi-d3d12: Fallback to core CheckDriverMatchingIdentifier for RTAS --- src/nvapi_d3d12.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/nvapi_d3d12.cpp b/src/nvapi_d3d12.cpp index 4621ed70..cb3f936b 100644 --- a/src/nvapi_d3d12.cpp +++ b/src/nvapi_d3d12.cpp @@ -367,7 +367,15 @@ extern "C" { } } - return NoImplementation(n); + if (pParams->version != NVAPI_CHECK_DRIVER_MATCHING_IDENTIFIER_EX_PARAMS_VER1) + return IncompatibleStructVersion(n); + + if (pParams->serializedDataType == NVAPI_D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE_EX) { + pParams->checkStatus = pDevice->CheckDriverMatchingIdentifier(D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE, pParams->pIdentifierToCheck); + return Ok(n, alreadyLoggedOk); + } + + return NotSupported(n); } static bool ConvertBuildRaytracingAccelerationStructureInputs(const NVAPI_D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS_EX* nvDesc, std::vector& geometryDescs, D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS* d3dDesc) {