d3d12 Command warning spam during commandlets

Everytime I run a commandlet for example PCG world partition builder on 5.7.1 i’m seeing these warnings come up in horde:

LogConsoleManager: Warning: Console object named ‘d3d12.AllowDiscardResources’ already exists but is being registered again, but we weren’t expected it to be! (FConsoleManager::AddConsoleObject)

LogConsoleManager: Warning: Console object named ‘d3d12.DisableDiscardOfDepthResources’ already exists but is being registered again, but we weren’t expected it to be! (FConsoleManager::AddConsoleObject)

LogConsoleManager: Warning: Console object named ‘d3d12.BatchResourceBarriers’ already exists but is being registered again, but we weren’t expected it to be! (FConsoleManager::AddConsoleObject)

Is this intentional? It would be great if this was not getting spammed making the build yellow on every run.

Steps to Reproduce

  1. Run Any commandlet such as world partition pcg builder
  2. Notice that 3 commands are spammed as being registered again

Hello,

I ran a few test in a local project and I’m not seeing multiple registrations of those console objects. Can you share the log from the commandlet and the uproject file? I suspect this might be linked to a plugin that I didn’t activate.

Regards,

Martin

Hi [mention removed]​ ,

No problem, I will post it in a few minutes

Here is the log

Here is the uproject file, i removed the name from it

Thanks for sharing.

As suspected, the problem is caused by a plugin I didn’t have: FSR4. The problem is that FFXD3D12Backend.cpp is including 2 private headers from the engine and this results in including ID3D12Barriers.h. This creates the duplicate CVars in the produced DLL. The fix is to stop including the private headers and add the missing public one:

//In FFXD3D12Backend.cpp. 
 
//#include "D3D12RHIPrivate.h"
//#include "D3D12Util.h"
 
#include "ID3D12DynamicRHI.h"

I’ll check if we have some contacts with AMD so this can be addressed on their end.

Regarding the Warnings, they are benign and should not cause issues other than the log output.

Martin

Thanks a lot for looking into this [mention removed]​ .

I will make the change locally for us, but if you can reach out to AMD for them to fix it on their side, that would be lovely.

(Yup, I’m not concerned about it, just they make our builds flagged as warning which we follow all green)