Profiling a custom shader

Hi,

I have written shaders using this tutorial, and now I would like to know how much time it takes for this shader to run. The reason why is comparing it to other implementations (in CUDA or other Compute Shader implementations), and doing some kind of “unit test” on this shader, and not relying only final FPS count.

I have found some functions in the doc, but sadly I cannot find any way to use them:

  • I tried to use the FWindowedGPUTimer, bu sadly when I try to call GetElapsedAverage(&CmdList, &float), I have a LNK2019 “unresolved symbol” error.

  • I don’t understand how to use FGPUProfiler, and trying to call the BeginFrame()/EndFrame() functions also causes the LNK2019 error.

  • I don’t know how to use a more specific profiler as the FGPUProfiler have only children for OpenGL and Vulkan, and I’m running under Windows / DX11.

Do you know how can I time the run of the shader ?

NB: The shaders run, which means I actually added the RHI module, so it should not be the reason behind the LNK2019 error.