[rendering] Cluster LOD perf: close the gap to legacy in avatar-heavy scenes (RT cut, shadow rig cull, pre-cluster pass, raster) #1008

Open
opened 2026-10-24 01:31:07 +00:00 by sky_line · 3 comments
Owner

Measured at a busy party; full numbers below. Goal: CLOD at or below legacy so it can replace legacy (#642). Refs #928.

Build d75c207bb2. DLSS RR at 1280x696 render. Half-res RT signals (RenderVKGIScale 0.5,
RenderVKDlssFullResSignalsMode 0). GI 3, ReSTIR DI 3, emissive on, RenderVKGILatencyFrame 1.
65 avatars traced. CLOD was turned on live at 01:24:49 UTC. The LOD controller climbed to
tolerance level 3 (8 px) because the cluster+rigged GPU time (~5.2 ms) was over its 5 ms budget.
Probes were turned off at 01:27:22.

ms/frame (GPU) legacy (probes on) CLOD + probes CLOD, probes off
GPU total 22.48 25.51 24.65
FPS 44.1 39.0 40.5
g_join_gi (gfx waits) 8.46 3.94 9.99
q_rt_build 3.62 4.62 4.54
c_blas_refit 1.94 0.09 0.07
c_preskin 0.93 0.01 0.01
c_cl_rt_select -- 2.05 2.11
c_cl_rig_clas -- 1.93 1.87
c_cl_blas_build -- 0.45 0.46
c_cl_sk_skin -- 0.74 0.75
c_cl_sk_weld -- 0.53 0.43
c_shadow_rigcull 0.03 1.23 1.29
g_term_tri+g_prepass+g_gbuf_rigged 2.73 ~0.11 ~0.10
g_gbuf_cluster_t1 -- 2.27 2.24
g_pre_cl_end -- 1.50 1.34
g_p2_post_rig 0.63 1.27 1.19
q_frontend (CPU, own clock) 2.66 3.07 2.93
g_fe_wait 2.38 2.86 2.81

Reading

  • On the critical path CLOD is about +2.2 ms behind legacy with probes off. Legacy here
    still had probes on, which cost it about 0.7 ms (pr_trace). So the real gap is closer to
    ~3 ms.
  • Raster (graphics): the cluster G-buffer plus g_pre_cl_end take ~3.6 ms, against
    ~2.7 ms for legacy's terrain tris, prepass and rigged G-buffer. The post-pass rigged draw
    costs +0.6 ms.
  • RT build (async, ahead of the lighting chain): cluster RT select + rigged CLAS + cluster
    BLAS build + skin + weld total ~5.6 ms, against ~2.9 ms for legacy refit + preskin. The RT
    cut is re-selected and rebuilt every frame.
  • Shadow rig cull: +1.26 ms, with no legacy equivalent at this cost.
  • CPU front end: +0.3-0.4 ms.

Probe capture under CLOD (collect later; probes are going away under GI)

With CLOD on, these became large: pr_rt_alpha ~6.3, pr_rt_gbuf ~4.7, pr_alpha ~4.6 and
pr_rt_rigcull ~1.3 ms, against ~0 under legacy. They mostly ran beside the GI chain:
q_gi_beside was 8.0, and turning probes off moved that wait into g_join_gi. So the
critical-path cost was only ~0.9 ms.

Probe faces (128 px) seem to draw and trace the cluster cut at view detail, and take alpha
paths that legacy probe capture skipped.

To do if probes stay for the non-GI tiers:

  • give probe capture a coarse fixed cluster tier;
  • skip the cluster alpha paths;
  • cull aggressively (rigcull per face).

Targets (in order)

  1. RT cut decoupled from the raster cut: coarser and slower-updating. Rebuild CLAS only for
    clusters that changed. Reuse #1007's cadence and pose-skip rules for rigged staleness.
  2. c_shadow_rigcull (1.3 ms) and g_pre_cl_end (1.3-1.5 ms): find what they do that legacy
    didn't.
  3. Cluster raster parity: g_gbuf_cluster_t1 + post-rig against legacy.
  4. Front-end CPU cost of the cut.

Related ticket: #928 (user: FPS loss in avatar-heavy scenes, CLOD on).

Measured at a busy party; full numbers below. Goal: CLOD at or below legacy so it can replace legacy (#642). Refs #928. Build d75c207bb2. DLSS RR at 1280x696 render. Half-res RT signals (RenderVKGIScale 0.5, RenderVKDlssFullResSignalsMode 0). GI 3, ReSTIR DI 3, emissive on, RenderVKGILatencyFrame 1. 65 avatars traced. CLOD was turned on live at 01:24:49 UTC. The LOD controller climbed to tolerance level 3 (8 px) because the cluster+rigged GPU time (~5.2 ms) was over its 5 ms budget. Probes were turned off at 01:27:22. | ms/frame (GPU) | legacy (probes on) | CLOD + probes | CLOD, probes off | |---------------------------|-------------------:|--------------:|-----------------:| | GPU total | 22.48 | 25.51 | 24.65 | | FPS | 44.1 | 39.0 | 40.5 | | g_join_gi (gfx waits) | 8.46 | 3.94 | 9.99 | | q_rt_build | 3.62 | 4.62 | 4.54 | | c_blas_refit | 1.94 | 0.09 | 0.07 | | c_preskin | 0.93 | 0.01 | 0.01 | | c_cl_rt_select | -- | 2.05 | 2.11 | | c_cl_rig_clas | -- | 1.93 | 1.87 | | c_cl_blas_build | -- | 0.45 | 0.46 | | c_cl_sk_skin | -- | 0.74 | 0.75 | | c_cl_sk_weld | -- | 0.53 | 0.43 | | c_shadow_rigcull | 0.03 | 1.23 | 1.29 | | g_term_tri+g_prepass+g_gbuf_rigged | 2.73 | ~0.11 | ~0.10 | | g_gbuf_cluster_t1 | -- | 2.27 | 2.24 | | g_pre_cl_end | -- | 1.50 | 1.34 | | g_p2_post_rig | 0.63 | 1.27 | 1.19 | | q_frontend (CPU, own clock) | 2.66 | 3.07 | 2.93 | | g_fe_wait | 2.38 | 2.86 | 2.81 | ## Reading - On the critical path CLOD is about **+2.2 ms** behind legacy with probes off. Legacy here still had probes on, which cost it about 0.7 ms (pr_trace). So the real gap is closer to ~3 ms. - **Raster** (graphics): the cluster G-buffer plus `g_pre_cl_end` take ~3.6 ms, against ~2.7 ms for legacy's terrain tris, prepass and rigged G-buffer. The post-pass rigged draw costs +0.6 ms. - **RT build** (async, ahead of the lighting chain): cluster RT select + rigged CLAS + cluster BLAS build + skin + weld total ~5.6 ms, against ~2.9 ms for legacy refit + preskin. The RT cut is re-selected and rebuilt every frame. - **Shadow rig cull:** +1.26 ms, with no legacy equivalent at this cost. - **CPU front end:** +0.3-0.4 ms. ## Probe capture under CLOD (collect later; probes are going away under GI) With CLOD on, these became large: pr_rt_alpha ~6.3, pr_rt_gbuf ~4.7, pr_alpha ~4.6 and pr_rt_rigcull ~1.3 ms, against ~0 under legacy. They mostly ran beside the GI chain: q_gi_beside was 8.0, and turning probes off moved that wait into g_join_gi. So the critical-path cost was only ~0.9 ms. Probe faces (128 px) seem to draw and trace the cluster cut at view detail, and take alpha paths that legacy probe capture skipped. To do if probes stay for the non-GI tiers: - give probe capture a coarse fixed cluster tier; - skip the cluster alpha paths; - cull aggressively (rigcull per face). ## Targets (in order) 1. RT cut decoupled from the raster cut: coarser and slower-updating. Rebuild CLAS only for clusters that changed. Reuse #1007's cadence and pose-skip rules for rigged staleness. 2. `c_shadow_rigcull` (1.3 ms) and `g_pre_cl_end` (1.3-1.5 ms): find what they do that legacy didn't. 3. Cluster raster parity: g_gbuf_cluster_t1 + post-rig against legacy. 4. Front-end CPU cost of the cut. Related ticket: #928 (user: FPS loss in avatar-heavy scenes, CLOD on).
sky_line added this to the Slipstream project 2026-10-24 01:31:07 +00:00
Author
Owner

Target 2 findings (2026-10-24, same night)

  • This A/B ran the FALLBACK cluster tiers. CLOD was turned on live, so the device had no
    cluster extensions. The tier line read raster=1 mdi_uint8 | cmdgen=0 draw_count, with:
    "mesh_shader: needs RenderVKClusterLOD on at startup or RenderVKClusterDeviceFeatures 2
    (restart); device_generated_commands / partitioned TLAS: needs RenderVKClusterLOD on at
    startup". So the cluster raster numbers (g_pre_cl_end 1.34, g_gbuf_cluster_t1 2.47,
    g_p2_post_rig 1.19) are the uint8 draw-indirect tier, not the mesh-shader tier.
    Re-measure with CLOD on at startup before working on the raster side.
  • c_shadow_rigcull 1.3-1.4 ms was not the cull. Its mark follows asyncJoin(cmd) (the join
    on the async RT build), so it included the graphics queue waiting for the longer cluster RT
    build (q_rt_build 4.5 vs 3.6 ms). The join now has its own mark, g_join_rt_build. Target 1
    (#1008 RT cut) is what shrinks it.
  • g_pre_cl_end is the cluster depth pre-pass (#749: depth/normal/motion for AO, the RT mask,
    Hi-Z and TAA). Legacy's rigged pre-pass was ~0.8 ms (g_prepass 0.95 minus static ~0.15). So
    at the fallback tier the clusters' pre-pass + G-buffer ~= 3.8 ms, against legacy rigged
    ~2.4 ms (pre-pass ~0.8 + g_gbuf_rigged 0.61 + the rigged share of g_term_tri ~1.0).
  • Terminator-tri pass: g_term_tri drops 1.17 -> 0.10 under CLOD. Check whether cluster
    avatars are missing from the terminator-triangle image (RT shadow terminator fix), and
    whether that is a correctness gap or intended.
  • VRAM at the party: ~6.5 GB legacy vs ~5.3 GB CLOD (heap0), and legacy rigged geometry is
    released (6490 slots, 262 MB).
## Target 2 findings (2026-10-24, same night) - **This A/B ran the FALLBACK cluster tiers.** CLOD was turned on live, so the device had no cluster extensions. The tier line read `raster=1 mdi_uint8 | cmdgen=0 draw_count`, with: "mesh_shader: needs RenderVKClusterLOD on at startup or RenderVKClusterDeviceFeatures 2 (restart); device_generated_commands / partitioned TLAS: needs RenderVKClusterLOD on at startup". So the cluster raster numbers (g_pre_cl_end 1.34, g_gbuf_cluster_t1 2.47, g_p2_post_rig 1.19) are the uint8 draw-indirect tier, not the mesh-shader tier. **Re-measure with CLOD on at startup** before working on the raster side. - **c_shadow_rigcull 1.3-1.4 ms was not the cull.** Its mark follows `asyncJoin(cmd)` (the join on the async RT build), so it included the graphics queue waiting for the longer cluster RT build (q_rt_build 4.5 vs 3.6 ms). The join now has its own mark, `g_join_rt_build`. Target 1 (#1008 RT cut) is what shrinks it. - **g_pre_cl_end** is the cluster depth pre-pass (#749: depth/normal/motion for AO, the RT mask, Hi-Z and TAA). Legacy's rigged pre-pass was ~0.8 ms (g_prepass 0.95 minus static ~0.15). So at the fallback tier the clusters' pre-pass + G-buffer ~= 3.8 ms, against legacy rigged ~2.4 ms (pre-pass ~0.8 + g_gbuf_rigged 0.61 + the rigged share of g_term_tri ~1.0). - **Terminator-tri pass:** g_term_tri drops 1.17 -> 0.10 under CLOD. Check whether cluster avatars are missing from the terminator-triangle image (RT shadow terminator fix), and whether that is a correctness gap or intended. - **VRAM** at the party: ~6.5 GB legacy vs ~5.3 GB CLOD (heap0), and legacy rigged geometry is released (6490 slots, 262 MB).
Author
Owner

Mesh-shader tier (CLOD on at startup), same party, 01:39-01:40 UTC, 19 samples

Tiers: raster=2 mesh_shader | cmdgen=1 dgc_ext | rt=2 clas+ptlas. PTLAS has 0 instances (RenderVKClusterRT 1).

GPU total 22.46 ms / 44.2 FPS, which is parity with legacy (22.48 / 44.1).

  • Avatar raster is now cheaper than legacy. It costs ~1.4 ms: g_pre_cl_end 0.32, g_gbuf_cluster_t2 0.61, c_cluster_t2 0.30, g_p2_post_rig 0.15. Legacy was ~2.7 ms. The fallback-tier raster numbers above are superseded.
  • The RT side is the whole remaining gap. q_rt_build is 5.58 ms (legacy 3.62): c_cl_rt_select 2.58, c_cl_rig_clas 2.45, c_cl_sk_skin 1.17, c_cl_sk_weld 0.46. Graphics waits for it in c_shadow_rigcull, at 3.85 ms; that wait now has its own mark, g_join_rt_build, from build bd1911891f.
  • The CPU front end is up ~1 ms: q_frontend 3.67, g_fe_wait 3.56, against legacy 2.66 / 2.38. Needs a look (cut processing on the CPU?).
  • g_term_tri is 0.12 here, so the possible terminator-tri gap for cluster avatars is still open.
## Mesh-shader tier (CLOD on at startup), same party, 01:39-01:40 UTC, 19 samples Tiers: `raster=2 mesh_shader | cmdgen=1 dgc_ext | rt=2 clas+ptlas`. PTLAS has 0 instances (RenderVKClusterRT 1). GPU total **22.46 ms / 44.2 FPS**, which is parity with legacy (22.48 / 44.1). - **Avatar raster is now cheaper than legacy.** It costs ~1.4 ms: g_pre_cl_end 0.32, g_gbuf_cluster_t2 0.61, c_cluster_t2 0.30, g_p2_post_rig 0.15. Legacy was ~2.7 ms. The fallback-tier raster numbers above are superseded. - **The RT side is the whole remaining gap.** q_rt_build is 5.58 ms (legacy 3.62): c_cl_rt_select 2.58, c_cl_rig_clas 2.45, c_cl_sk_skin 1.17, c_cl_sk_weld 0.46. Graphics waits for it in c_shadow_rigcull, at 3.85 ms; that wait now has its own mark, g_join_rt_build, from build bd1911891f. - **The CPU front end is up ~1 ms:** q_frontend 3.67, g_fe_wait 3.56, against legacy 2.66 / 2.38. Needs a look (cut processing on the CPU?). - **g_term_tri** is 0.12 here, so the possible terminator-tri gap for cluster avatars is still open.
Author
Owner

Parked 2026-10-24 (owner): CLOD RT perf is not profitable right now. Measured after #1008 fix / #1010 / #1011 at the party: RT build still ~5.6 ms; RT cut sub-timers: place 1.26, cut 0.55, admit 0.36, gather 0.23, reset 0.10, select 0.15; rig_skin (mode 9: copying the raster skinned vertices + the reuse compare) 2.67 ms, CLAS build alone 0.71, BLAS 0.66. CLAS reuse barely fires with dancing avatars (70.9k compared, 2.9k kept, 86.4k rebuilt). #1010 arena is fine (0 dropped / hidden / coarsened). Next step if revisited: remove the RT vertex copy (point CLAS build + hit shading at the raster skinned output for this frame; ~-2.5 ms), then mode 12 placement, then the CPU front end. Notes: research PLAN_60FPS_PARTY_2026-10-24.

Parked 2026-10-24 (owner): CLOD RT perf is not profitable right now. Measured after #1008 fix / #1010 / #1011 at the party: RT build still ~5.6 ms; RT cut sub-timers: place 1.26, cut 0.55, admit 0.36, gather 0.23, reset 0.10, select 0.15; **rig_skin (mode 9: copying the raster skinned vertices + the reuse compare) 2.67 ms**, CLAS build alone 0.71, BLAS 0.66. CLAS reuse barely fires with dancing avatars (70.9k compared, 2.9k kept, 86.4k rebuilt). #1010 arena is fine (0 dropped / hidden / coarsened). Next step if revisited: remove the RT vertex copy (point CLAS build + hit shading at the raster skinned output for this frame; ~-2.5 ms), then mode 12 placement, then the CPU front end. Notes: research PLAN_60FPS_PARTY_2026-10-24.
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#1008
No description provided.