Match NVSDK Vulkan OutHandle logic with Dx counterparts

This commit is contained in:
cdozdil
2026-02-20 17:44:07 +03:00
parent 3b6e5bd42b
commit c8c8dcddd2
2 changed files with 11 additions and 7 deletions
+5 -1
View File
@@ -723,7 +723,11 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_CreateFeature1(VkDevice InDevice
State::Instance().api = Vulkan;
auto deviceContext = VkContexts[handleId].feature.get();
*OutHandle = deviceContext->Handle();
if (*OutHandle == nullptr)
*OutHandle = new NVSDK_NGX_Handle { handleId };
else
(*OutHandle)->Id = handleId;
State::Instance().AutoExposure.reset();
+6 -6
View File
@@ -201,6 +201,12 @@ bool DLSSFeatureVk::Evaluate(VkCommandBuffer InCmdBuffer, NVSDK_NGX_Parameter* I
nvResult = NVNGXProxy::VULKAN_EvaluateFeature()(InCmdBuffer, _p_dlssHandle, InParameters, NULL);
if (nvResult != NVSDK_NGX_Result_Success)
{
LOG_ERROR("_EvaluateFeature result: {0:X}", (unsigned int) nvResult);
return false;
}
if (useSS)
{
VkImageSubresourceRange range {};
@@ -221,12 +227,6 @@ bool DLSSFeatureVk::Evaluate(VkCommandBuffer InCmdBuffer, NVSDK_NGX_Parameter* I
OS->Dispatch(Device, InCmdBuffer, OS->GetImageView(), RCAS->GetImageView(), outExtent);
}
if (nvResult != NVSDK_NGX_Result_Success)
{
LOG_ERROR("_EvaluateFeature result: {0:X}", (unsigned int) nvResult);
return false;
}
if (rcasEnabled)
{
NVSDK_NGX_Resource_VK* paramVelocity = nullptr;