Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 4323e44

Browse files
committed
Request flush state at a higher level
1 parent 89ddc8c commit 4323e44

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

source/maindll/FFFrameInterpolator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ FfxErrorCode FFFrameInterpolator::Dispatch(void *CommandList, NGXInstanceParamet
7575
if (dispatchStatus == FFX_OK && gameRealOutputResource.resource && gameBackBufferResource.resource)
7676
CopyTexture(GetActiveCommandList(), &gameRealOutputResource, &gameBackBufferResource);
7777

78-
NGXParameters->Set4("DLSSG.FlushRequired", 0);
7978
return dispatchStatus;
8079
}
8180

source/maindll/FFFrameInterpolatorDX.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,20 @@ FFFrameInterpolatorDX::~FFFrameInterpolatorDX()
2424

2525
FfxErrorCode FFFrameInterpolatorDX::Dispatch(void *CommandList, NGXInstanceParameters *NGXParameters)
2626
{
27-
const bool enableInterpolation = NGXParameters->GetUIntOrDefault("DLSSG.EnableInterp", 0) != 0;
2827
const bool isRecordingCommands = NGXParameters->GetUIntOrDefault("DLSSG.IsRecording", 0) != 0;
2928
const auto cmdList12 = reinterpret_cast<ID3D12GraphicsCommandList *>(CommandList);
3029

30+
NGXParameters->Set4("DLSSG.FlushRequired", 0);
31+
3132
// Begin a new command list in the event our caller didn't set one up
3233
if (!isRecordingCommands)
3334
{
34-
void *recordingQueue = nullptr;
35-
NGXParameters->GetVoidPointer("DLSSG.CmdQueue", &recordingQueue);
35+
ID3D12CommandQueue *recordingQueue = nullptr;
36+
NGXParameters->GetVoidPointer("DLSSG.CmdQueue", reinterpret_cast<void **>(&recordingQueue));
3637

3738
ID3D12CommandAllocator *recordingAllocator = nullptr;
3839
NGXParameters->GetVoidPointer("DLSSG.CmdAlloc", reinterpret_cast<void **>(&recordingAllocator));
3940

40-
const static bool once = [&]()
41-
{
42-
spdlog::warn(
43-
"Command list wasn't recording. Resetting state: {} 0x{:X} 0x{:X} 0x{:X}",
44-
enableInterpolation,
45-
reinterpret_cast<uintptr_t>(CommandList),
46-
reinterpret_cast<uintptr_t>(recordingQueue),
47-
reinterpret_cast<uintptr_t>(recordingAllocator));
48-
49-
return false;
50-
}();
51-
5241
cmdList12->Reset(recordingAllocator, nullptr);
5342
}
5443

source/maindll/FFFrameInterpolatorVK.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ FfxErrorCode FFFrameInterpolatorVK::Dispatch(void *CommandList, NGXInstanceParam
3030
const bool isRecordingCommands = NGXParameters->GetUIntOrDefault("DLSSG.IsRecording", 0) != 0;
3131
const auto cmdListVk = reinterpret_cast<VkCommandBuffer>(CommandList);
3232

33+
NGXParameters->Set4("DLSSG.FlushRequired", 0);
34+
3335
// Begin a new command list in the event our caller didn't set one up
3436
if (!isRecordingCommands)
3537
{
3638
const static bool once = [&]()
3739
{
3840
spdlog::warn(
39-
"Command list wasn't recording. Resetting state: {} 0x{:X}",
41+
"Vulkan command list wasn't recording. Resetting state: {} 0x{:X}",
4042
enableInterpolation,
4143
reinterpret_cast<uintptr_t>(CommandList));
4244

0 commit comments

Comments
 (0)