Skip to content

ng1: reduce resident DID decode latency - #748

Merged
techomancer merged 2 commits into
techomancer:mainfrom
Tzeentchnet:perf/newport-did-latency
Nov 15, 2026
Merged

techomancer merged 2 commits into
techomancer:mainfrom
Tzeentchnet:perf/newport-did-latency

Conversation

@Tzeentchnet

Copy link
Copy Markdown
Contributor

Summary

  • Decode one Newport DID scanline per workgroup and share its validated row state across 64 lanes.
  • Write disjoint packed u32 DID words instead of serial byte read/modify/write operations.
  • Keep the one-thread scanline decoder as an ignored hardware benchmark baseline, with interleaved Vulkan and D3D12 measurements.

This follows the review guidance on #731: DID decode is on the composition critical path, so the comparison targets latency rather than GPU utilization.

Measurements

NVIDIA RTX 5070, 1,280 x 1,024 DID map, four alternating rounds and 64 dispatches per round:

Backend / metric Uniform rows Divergent rows
D3D12 timestamp p50 145.184 -> 89.152 us (-39%) 145.728 -> 95.872 us (-34%)
D3D12 timestamp p95 218.496 -> 90.112 us (-59%) 234.176 -> 97.824 us (-58%)
D3D12 wall p50 167.464 -> 105.053 us (-37%) 168.086 -> 114.334 us (-32%)
Vulkan wall p50 166.347 -> 107.412 us (-35%) 169.342 -> 121.675 us (-28%)

Vulkan in-pass timestamps were not credible and are excluded. The wall figures are submit-through-map time amortized per dispatch. This is a scheduler microbenchmark, not a claim that GPU DID expansion beats the CPU decoder end to end.

Scope

The resident Newport path remains test-only and gated. Display-off preservation, DID-disabled clearing, early line-table termination, malformed pointers, partial packed words, retained history, and the no-routine-readback contract are unchanged.

Validation

$env:LIBCHDMAN_FORCE_SOURCE = '1'
.\scripts\test-resident-gate.ps1
cargo check --locked --offline -p iris --no-default-features
cargo check --locked --offline -p iris-gui --features iris/wgpu

The resident gate passed all 65 required tests on Vulkan and D3D12 using an NVIDIA RTX 5070.

Decode one scanline per workgroup and let 64 lanes write disjoint packed DID words. Keep the serial shader as a hardware benchmark baseline and record interleaved Vulkan and D3D12 measurements.
@techomancer
techomancer merged commit 0aef8f2 into techomancer:main Nov 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants