diff --git a/src/nvapi_vulkan.cpp b/src/nvapi_vulkan.cpp index 892d3b17..939ee663 100644 --- a/src/nvapi_vulkan.cpp +++ b/src/nvapi_vulkan.cpp @@ -216,17 +216,15 @@ extern "C" { auto markerType = pSetLatencyMarkerParams->markerType; auto marker = NvapiVulkanLowLatencyDevice::ToVkLatencyMarkerNV(markerType); - if (marker == VK_LATENCY_MARKER_MAX_ENUM_NV) { + if (marker != VK_LATENCY_MARKER_MAX_ENUM_NV) { + lowLatencyDevice->SetLatencyMarker(pSetLatencyMarkerParams->frameID, marker); + } else { thread_local std::unordered_set unsupportedMarkerTypes{}; if (auto [it, inserted] = unsupportedMarkerTypes.insert(markerType); inserted) log::info(str::format("unsupported NV_VULKAN_LATENCY_MARKER_TYPE (", markerType, "), ignoring")); - - return Ok(n); } - lowLatencyDevice->SetLatencyMarker(pSetLatencyMarkerParams->frameID, marker); - return Ok(n, alreadyLoggedOk); }