AO: single-pass depth pyramid + cheaper GTAO tier for Pascal (AO is 4.9 ms at 4K on a GTX 1080) #828

Closed
opened 2026-10-17 21:14:16 +00:00 by sky_line · 2 comments
Owner

The AO pass costs far more on Pascal than its work warrants.

Measured (GTX 1080, 4K, high settings, async queue): q_ao 4.9 ms. Of that, the depth mip pyramid (g_ao_depthmip) is 2.05 ms, the half-resolution GTAO kernel (g_gtao_half) 1.73 ms, plus blur. A depth mip chain should cost a small fraction of a millisecond even at 4K.

Plan

  1. Depth pyramid in a single pass: replace the per-level build (clean_ao_depth.comp, recorded before the g_ao_depthmip mark in llcleanrenderervk.cpp) with a single-dispatch downsample in the style of AMD's SPD (FidelityFX SPD is already in the tree for FSR). Use workgroup shared memory and one global atomic for the tail levels, building only the levels the AO kernel actually reads. Check what format and resolution it builds today. If it starts from full-resolution depth when the kernel runs at half resolution, start at half.
  2. GTAO cost on Pascal: check direction / step counts and register count. Offer a cheaper quality tier (fewer directions or steps, or quarter resolution with a depth-aware upsample) chosen by GPU class or the AO quality setting. Keep the current quality as the high tier.
  3. Keep the old path behind a setting for A/B; the AO image must match at equal quality (snapshot diff).

Measure

Serial A/B (async + overlaps off) on the GTX 1080 at 4K, high settings: g_ao_depthmip, the AO kernel, and the frame total. Also the RTX 5090. Expected 1.5-2.5 ms at high on Pascal.

The AO pass costs far more on Pascal than its work warrants. **Measured (GTX 1080, 4K, high settings, async queue):** `q_ao` 4.9 ms. Of that, the depth mip pyramid (`g_ao_depthmip`) is 2.05 ms, the half-resolution GTAO kernel (`g_gtao_half`) 1.73 ms, plus blur. A depth mip chain should cost a small fraction of a millisecond even at 4K. ### Plan 1. **Depth pyramid in a single pass:** replace the per-level build (`clean_ao_depth.comp`, recorded before the `g_ao_depthmip` mark in `llcleanrenderervk.cpp`) with a single-dispatch downsample in the style of AMD's SPD (FidelityFX SPD is already in the tree for FSR). Use workgroup shared memory and one global atomic for the tail levels, building only the levels the AO kernel actually reads. Check what format and resolution it builds today. If it starts from full-resolution depth when the kernel runs at half resolution, start at half. 2. **GTAO cost on Pascal:** check direction / step counts and register count. Offer a cheaper quality tier (fewer directions or steps, or quarter resolution with a depth-aware upsample) chosen by GPU class or the AO quality setting. Keep the current quality as the high tier. 3. Keep the old path behind a setting for A/B; the AO image must match at equal quality (snapshot diff). ### Measure Serial A/B (async + overlaps off) on the GTX 1080 at 4K, high settings: `g_ao_depthmip`, the AO kernel, and the frame total. Also the RTX 5090. Expected 1.5-2.5 ms at high on Pascal.
sky_line added this to the Slipstream project 2026-10-17 21:14:16 +00:00
Author
Owner

Merged (72511743b5). Measured on GTX 1080, 4K: no measurable change, and the ticket's premise was wrong.

  • Serial (AO inline on graphics): the whole AO pass is 1.23-1.24 ms with the SPD pyramid on or off.
  • On the async queue the same work reads q_ao 5.0-5.7 ms and "depth mip" 2.1-3.1 ms: these are wall-clock spans stretched by SM sharing with the shadow / reflection work, not cost.
  • GTAO quality tiers 1 / 2 showed no change either (1.24 / 1.32 ms). Check whether the GTAO path / caps apply at these settings before relying on them.

The changes are harmless (fewer groups / barriers, no per-tap size queries) and stay in. Related: on the 1080, async compute gives nothing at high (async 30.8 / 31.6 vs serial 29.9 / 31.8), so it is worth considering async off for Pascal in #824.

Merged (72511743b5). Measured on GTX 1080, 4K: **no measurable change**, and the ticket's premise was wrong. - Serial (AO inline on graphics): the whole AO pass is 1.23-1.24 ms with the SPD pyramid on or off. - On the async queue the same work reads q_ao 5.0-5.7 ms and "depth mip" 2.1-3.1 ms: these are wall-clock spans stretched by SM sharing with the shadow / reflection work, not cost. - GTAO quality tiers 1 / 2 showed no change either (1.24 / 1.32 ms). Check whether the GTAO path / caps apply at these settings before relying on them. The changes are harmless (fewer groups / barriers, no per-tap size queries) and stay in. Related: on the 1080, async compute gives nothing at high (async 30.8 / 31.6 vs serial 29.9 / 31.8), so it is worth considering async off for Pascal in #824.
Author
Owner

Fixed in Slipstream 1.3.0 (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0

If you still see this on 1.3.0, reply here and we'll reopen it.

Fixed in **Slipstream 1.3.0** (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0 If you still see this on 1.3.0, reply here and we'll reopen it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#828
No description provided.