From 24f575d4003902d99b8d48077215fc56b4927f61 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 58eb0d86..5d5ed900 100644 --- a/src/nvapi_d3d12.cpp +++ b/src/nvapi_d3d12.cpp @@ -404,7 +404,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) {