removed unnecessary shared fence

This commit is contained in:
cdozdil
2023-12-31 00:56:23 +03:00
parent eeccbb2708
commit 46037cda1f
2 changed files with 2 additions and 29 deletions
+1 -28
View File
@@ -51,8 +51,6 @@ static ID3D11Texture2D* tmShared = nullptr;
static ID3D11Texture2D* expShared = nullptr;
ID3D12Fence* d3d12Fence = nullptr;
ID3D11Fence* d3d11Fence = nullptr;
HANDLE fenceHandle = NULL;
xess_d3d12_execute_params_t params{};
@@ -791,7 +789,6 @@ NVSDK_NGX_Result NVSDK_NGX_D3D11_ReleaseFeature(NVSDK_NGX_Handle* InHandle)
{
ReleaseSharedResources();
CyberXessContext::instance()->Shutdown(true, false);
}
isDeviceBusy.store(false);
@@ -926,7 +923,7 @@ NVSDK_NGX_Result NVSDK_NGX_D3D11_EvaluateFeature(ID3D11DeviceContext* InDevCtx,
// Fence for syncing
if (d3d12Fence == nullptr)
{
result = instance->Dx12Device->CreateFence(0, D3D12_FENCE_FLAG_SHARED, IID_PPV_ARGS(&d3d12Fence));
result = instance->Dx12Device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&d3d12Fence));
if (result != S_OK)
{
@@ -936,30 +933,6 @@ NVSDK_NGX_Result NVSDK_NGX_D3D11_EvaluateFeature(ID3D11DeviceContext* InDevCtx,
}
}
if (fenceHandle == NULL)
{
result = instance->Dx12Device->CreateSharedHandle(d3d12Fence, NULL, GENERIC_ALL, nullptr, &fenceHandle);
if (result != S_OK)
{
LOG("NVSDK_NGX_D3D11_EvaluateFeature CreateFence fenceHandle result: " + int_to_hex(result), LEVEL_DEBUG);
isDeviceBusy.store(false);
return NVSDK_NGX_Result_FAIL_InvalidParameter;
}
}
if (d3d11Fence == nullptr)
{
result = instance->Dx11Device->OpenSharedFence(fenceHandle, IID_PPV_ARGS(&d3d11Fence));
if (result != S_OK)
{
LOG("NVSDK_NGX_D3D11_EvaluateFeature CreateFence d3d11fence result: " + int_to_hex(result), LEVEL_DEBUG);
isDeviceBusy.store(false);
return NVSDK_NGX_Result_FAIL_InvalidParameter;
}
}
// creatimg params for XeSS
xess_result_t xessResult;
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include "framework.h"
#define LOGGING_ACTIVE
//#define LOGGING_ACTIVE
typedef enum _log_level_t
{