Insights - GPU event string names are not formatted properly

Hi,

We’re upgrading to 5.6 and noticed that in Unreal Insights, the GPU events recorded with macros like RDG_EVENT_SCOPE have their text not formatted properly if they are using printf-like arguments (%s, %i etc). For example in TemporalSuperResolution.cpp line 1973:

RDG_EVENT_SCOPE_STAT(GraphBuilder, TemporalSuperResolution, "TemporalSuperResolution(sg.AntiAliasingQuality=%d%s) %dx%d -> %dx%d", CVarAntiAliasingQuality->GetInt(), bSupportsAlpha ? TEXT(" AlphaChannel") : TEXT(""), InputRect.Width(), InputRect.Height(), OutputRect.Width(), OutputRect.Height());Produces an event with the text:

“TemporalSuperResolution(sg.AntiAliasingQuality=%d%s) %dx%d -> %ds%d”

So the arguments are not inserted in the string.

We have several RDG_EVENT_SCOPE_STAT in our own code and most suffer from the same issue, although there is at least one case where it’s properly formatted. I’m not sure why yet.

I’ve been able to reproduce easily on a vanilla project (First Person Template) with the EGS version of UE 5.6, both editor and on a Win64 Dev package. I’m joining a trace, and you should be able to reproduce easily on your side.

As a side question, i was wondering if the macro RDG_GPU_STAT_SCOPE() is doing anything at all in 5.6 now that the new GPU profiler is active. In most GPU stat events in Unreal code, i see RDG_EVENT_SCOPE_STAT macros are followed by RDG_GPU_STAT_SCOPE macros, but when i look in its definition (RenderGraphEvent.h line 544) it doesn’t appear to do anything.

Thank you !

Titouan

Steps to Reproduce

  • Launch any project in editor (for example the First Person Template)
  • Capture an Insights trace with the GPU track active
  • Observe events with printf-like strings for names are not formatted properly, for example:
    • “TemporalSuperResolution(sg.AntiAliasingQuality=%d%s) %dx%d -> %ds%d”

Hi Titouan,

Sorry this reply has been a bit delayed. I have confirmed the issue and raised it and was waiting on a bug report to be generated before replying, only to realize that Unreal Fest is going on, so there are some delays. When a bug report exists I will post it so that you can track its progress there.

Hi Graeme,

Thank you for raising this. I’ll be waiting for the bug report then !

Hi Titouan,

Epic has reopened their office after their summer break and I now have a bug report to share with you.

Please follow here for any further updates.