mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-28 09:07:11 +00:00
add condutions for signatures
This commit is contained in:
@@ -129,7 +129,7 @@ static int64_t GetTicks()
|
||||
|
||||
static void hkSetComputeRootSignature(ID3D12GraphicsCommandList* commandList, ID3D12RootSignature* pRootSignature)
|
||||
{
|
||||
if (!contextRendering && commandList != nullptr && pRootSignature != nullptr)
|
||||
if (Config::Instance()->RestoreComputeSignature.value_or(true) && !contextRendering && commandList != nullptr && pRootSignature != nullptr)
|
||||
{
|
||||
std::unique_lock<std::shared_mutex> lock(computeSigatureMutex);
|
||||
computeSignatures.insert_or_assign(commandList, pRootSignature);
|
||||
@@ -140,7 +140,7 @@ static void hkSetComputeRootSignature(ID3D12GraphicsCommandList* commandList, ID
|
||||
|
||||
static void hkSetGraphicRootSignature(ID3D12GraphicsCommandList* commandList, ID3D12RootSignature* pRootSignature)
|
||||
{
|
||||
if (!contextRendering && commandList != nullptr && pRootSignature != nullptr)
|
||||
if (Config::Instance()->RestoreGraphicSignature.value_or(false) && !contextRendering && commandList != nullptr && pRootSignature != nullptr)
|
||||
{
|
||||
std::unique_lock<std::shared_mutex> lock(graphSigatureMutex);
|
||||
graphicSignatures.insert_or_assign(commandList, pRootSignature);
|
||||
@@ -279,8 +279,7 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_Init_Ext(unsigned long long InApp
|
||||
}
|
||||
|
||||
// early hooking for signatures
|
||||
if (orgSetComputeRootSignature == nullptr &&
|
||||
(Config::Instance()->RestoreComputeSignature.value_or(true) || Config::Instance()->RestoreGraphicSignature.value_or(false)))
|
||||
if (orgSetComputeRootSignature == nullptr)
|
||||
{
|
||||
ID3D12CommandAllocator* alloc = nullptr;
|
||||
ID3D12GraphicsCommandList* gcl = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user