Hi Luke, thanks for your reply.
I gave it a shot at fixing this and made it as far as “register” the categories, but not to actually fill the data to them. The registration of the drawcalls categories is done with DECLARE_GPU_DRAWCALL_STAT_NAMED and DECLARE_GPU_DRAWCALL_STAT_NAMED_EXTERN macros, which with New GPU Profiles uses the TGPUStatWithDrawcallCategory class. That class declares the draw category like this: “FRHIDrawStatsCategory DrawcallCategory;” but it doesn’t pass the name to it, so it’s not used. By changing in CPUProfiler.h inside TGPUStatWithDrawcallCategory class, the member from “FRHIDrawStatsCategory DrawcallCategory;” to “FRHIDrawStatsCategory DrawcallCategory = FRHIDrawStatsCategory(TNameProvider::GetStatName());” the DrawcallCategory will be correctly initialized with a name and added to the Global Manager (FRHIDrawStatsCategory::FManager).
That’s all good, now the list of drawcalls categories (NumCategory) is not zero, but then the macros that actually add stats to those drawcalls categories are not defined with the New GPU Profiler:
```
// Empty when using the new RHI GPU profiler. GPU stats are handled via RHI_BREADCRUMB_EVENT_STAT etc.
// @todo deprecate
#define SCOPED_GPU_STAT_VERBOSE(…)
#define SCOPED_GPU_STAT(…)
#define GPU_STATS_BEGINFRAME(…)
#define GPU_STATS_ENDFRAME(…)
#define GPU_STATS_SUSPENDFRAME(…)
```
And the RHI_BREADCRUMB_EVENT_STAT macros do not fill the info to the drawcalls categories. I stopped at this point as I didn’t see a simple way to fill the data. But I hope this helps to you or others. If you know what changes are necesary to RHI_BREADCRUMB_EVENT_STAT to make this work, please let me know.
> possibly disable the new GPU profiler by defining RHI_NEW_GPU_PROFILER to zero in your .Target.cs
We aim to take full advantage of the latest tools available to us, so disabling the New GPU Profiler is not a viable option.
There is one thing though that would be really useful for us, if you can tell me a way to achieve it. As I mentioned, we are currently using GNumDrawCallsRHI to get the total number of drawcalls, but unfortunately that number includes all the drawcalls to render the actual Editor (menus, buttons, etc). That’s what is more disrupting for us, because we want to know the number of drawcalls of the viewport, not the editor. If there was a change you can provide to not include Editor drawcalls in GNumDrawCallsRHI that’d be good enough for now.
Thanks!