GPU performance tuning of "HZB SetupMips" (As seen in GPU Visualizer)

Hi guys,

I need to optimize the GPU performance of a mobile VR game and tried “ProfileGPU” to view the GPU Vizualizer.
This is what it looks like:

Now I’m wondering about how to optimize the top offender “HZB SetupMips…” that costs 3.21ms.
Any ideas where that cost comes from and how I improve it?

The level is mainly a big landscape that’s dynamically tesselated and obviously got a lot of texture repeats until the horizon line. And I use lightmapping.

I tried to change the Mip settings of the terrain textures I used (“Mip Gen Settings” and “Global Force Resident Mip Levels”) but that did not change much. (Or anything…)

Any other ideas?
Thank you.

I am interested in this as well. Could not find any documentation or answers clarifying this.

Also getting this using the SteamVR template made from Proteus:

but it’s taking 5.38 ms

Hi guys, I am also experiencing this issue.
I think it may be a 4.12 regression, as we upgraded from a 4.11 build, and this was not an issue in that version. 5ms for this pass on an i7 with a 980ti is insane!
It seems that it’s a problem that gets worse the longer the editor is running.

Also having this issue.

I am getting the same with out HTC Vive and a GTX 1080

Anyone have any idea what this is yet?

the same,some one can help?

Has anyone from staff acknowledged this problem?

I had this problem as well. Out of nowhere, my build started seeing HZB Setup Mips of 8ms to 10ms. Luckily I had that build in Perforce, so I just downloaded a fresh build from scrtach, rebuilt my code and reloaded in editor. Now the HZB Setup is down to 0.5ms for the exact same level. Somehow something must get corrupted. Can anyone shed some light? I still have my old broken build.

It’s happening on my project as well, but restarting the editor appears to help. At least temporarily.

+1 also experiencing the same issue, Titan X and the Vive

Same in my game. Updated from 4.11 and issue indeed is getting worse the longer editor is running.

looking at DeferredShadingRenderer.cpp and SceneOcclusion.cpp (the latter is where that stat is charged via BuildHZB). The following seems to trigger it:

if (bSSAO || bHZBOcclusion || bSSR)
		BuildHZB(RHICmdList, Views[ViewIndex]);

so you might need the following to disable the call but this might disable screenSpace reflections and ambient occlusion.

r.SSR 0
r.HZBOcclusion 0
r.SSR.quality 0
r.AmbientOcclusionLevels 0

That looks like a good way to side step the problem by disabling the features we wish to use, but it doesn’t address the problem where something seems to get corrupted and inflates HZB SetupMips improperly. Like I mentioned earlier, I saw this problem in my build. I got the exact same content/code from my Perforce depot, rebuilt, and the problem went away. It seems that some data is getting corrupted and causing HZB SetupMips to take excessive amounts of time.

yeah I was wondering if you disabled HZB entirely, would the time slowdown still show up but perhaps in the next step – is previous step messing up the state or seem internal to that SetupMips?

Bump, this is a serious problem with 4.12, staff please notice! :smiley:

I’ve submitted UE-33448 for this to be investigated. It does seem higher when in the Editor/PIE modes, but when I tried in Standalone game the levels were closer to what I would expect.

Thanks for reporting.

Cheers !

I am seeing this on 4.12 too in the Reflections (subway) example project (edit: just tested and am seeing it in other maps as well)