RDG_EVENT_NAME not showing names in Unreal Insights

This question was created in reference to: [Insights - GPU event string names are not formatted [Content removed]

Hi,

When I capture a trace in Unreal Insights, all RDG events appear simply as RDGEvent, without the actual name from RDG_EVENT_NAME. Is this expected behavior, or is it a bug?

Do I need to enable something (stats.namedevents doesn’t help) to see the event names?

Thanks!

Hello,

I wasn’t able to replicate this in a Development or Test build with breadcrumbs enabled (not minimal breadcrumbs). What build configuration are you using and do you have breadcrumbs/profiling enabled for that configuration?

Apologies for the delay, I’ve been looking into why this might be broken and the system in 5.6 is more complex and I haven’t isolated the problem.

*I have the same issue described [Content removed]

The issue with RDG_EVENT_SCOPE and RDG_EVENT_SCOPE_STAT is known and covered by Unreal Engine Issues and Bug Tracker (UE\-298245) but I haven’t been able to replicate the behavior in your screenshot where it just shows RDGEvent for some parts of the trace and not for others. It looks like some of the events are using WITH_RHI_BREADCRUMBS_MINIMAL and some are using WITH_RHI_BREADCRUMBS_FULL, but using a Development configuration it should use WITH_RHI_BREADCRUMBS_FULL because of this logic in RHIBreadcrumbs.h

#ifndef WITH_RHI_BREADCRUMBS
#define WITH_RHI_BREADCRUMBS (UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT || WITH_PROFILEGPU || (HAS_GPU_STATS && RHI_NEW_GPU_PROFILER))
#endif
 
// Enables all RDG/RHI breadcrumb scopes, and features such as Insights markers.
#define WITH_RHI_BREADCRUMBS_FULL    (WITH_RHI_BREADCRUMBS && (UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT || WITH_PROFILEGPU))

If you recently upgraded from a previous engine version I would check for unintended changes to these files:

Engine\Source\Runtime\RHI\Public\RHIBreadcrumbs.h

Engine\Source\Runtime\RHI\Private\RHIBreadcrumbs.cpp

If you are able to replicate this behavior in vanilla UE please let me know what steps you take so we can investigate.

Hi Alex.

I’m able to repro this on PS5. Set “r.rhisetgpucaptureoptions 1” while doing a GPU capture, and you’ll see what’s posted in the first post.

I’ve tracked this down to FRDGBuilder::SetupParameterPass() which uses:

RDG_EVENT_SCOPE_CONDITIONAL_NAME(*this, ScopeState.ScopeMode == ERDGScopeMode::AllEventsAndPassNames, Pass->GetEventName());Now if you go look at that macro:

#define RDG_EVENT_SCOPE_CONDITIONAL_NAME(GraphBuilder, Condition, EventName ) RDG_EVENT_SCOPE_IMPL(GraphBuilder, Condition, ERDGScopeFlags::None , RHI_GPU_STAT_ARGS_NONE , TEXT("RDGEvent"), EventName)you can see where the RDGEvent text is coming from, which is the StaticName. I’ve been trying to go through all the macros and C++ types to see where it goes wrong, but it’s difficult to untangle. I see the special case for RDGEventName in RDG_BREADCRUMB_DESC_FORWARD_VALUES, and also the TValue<FRDGEventName> specialization to resolve the name.

Ultimately, the workaround I’m using now is changing the above macro to:

#define RDG_EVENT_SCOPE_CONDITIONAL_NAME(GraphBuilder, Condition, EventName ) RDG_EVENT_SCOPE_IMPL(GraphBuilder, Condition, ERDGScopeFlags::None , RHI_GPU_STAT_ARGS_NONE , TEXT("RDGEvent"), RDG_SCOPE_ARGS("%s", EventName))and that makes it work. I really haven’t tested this on Windows, so I don’t know if this is clang-specific.

Ernesto.

Thanks for the added info! I was able to reproduce the issue on Windows with r.rhisetgpucaptureoptions=1 (r.RDG.Events=3) and have created a separate issue for tracking this here https://issues.unrealengine.com/issue/UE-356499

Sorry, I didn’t mention the configuration earlier - in this case I was viewing the trace captured directly from the editor running in Development configuration.

I also tried enabling breadcrumbs (bAllowProfileGPUInShipping and bAllowProfileGPUInTest), but that didn’t make a difference.

I have the same issue described here: [Content removed]

- RDG_EVENT_SCOPE formatting isn’t parsed or displayed properly in Insights.

We’re currently using anengine based on 5.6.1.

Hi Ernesto,

Changing the macro helped. Thanks to you and Alex for resolving this issue.