feat(gpu): port opt-in GPU compute texture detiling (VICTORY_GPU_DETILE) #36

Merged
wike1701 merged 2 commits from upstream-pr/36 into main 2026-11-28 19:01:28 +00:00
wike1701 commented 2026-11-27 12:16:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wike1701 on 2026-11-27T12:16:08Z.


Summary

Ports opt-in GPU compute texture detiling (VICTORY_GPU_DETILE=1) from xceless/victory-fork@3461f52 (GPL-3.0), adapted for VIctory-NVIDIA:

  • crates/victory-formats/src/texture.rs: adds Swizzle::name(), DetileParams + DetileParams::address(), Layout::detile_params(), Layout::pattern_tables(), and unit test detile_params_address_every_element_as_offset_does.
  • crates/victory-gpu/src/gpudetile.rs: adds D3D12 compute detiling pipeline (HLSL -> DXIL via DXC, root signature, PSO, job planner, raw/mask/pattern-table staging layout, and WARP byte-exact test he_card_detiles_as_the_cpu_does).
  • crates/victory-gpu/src/texture.rs: adds opt-in Staging::gpu (VICTORY_GPU_DETILE=1) backed by pooled device-local UAV linear buffers (SPARE_LINEAR), plus per-frame CPU/GPU detile telemetry (DETILED, BY_MODE).
  • crates/victory-gpu/src/host.rs: records GPU detiling in HostList::prelude (idempotent per submission) and logs per-frame detiling breakdown in Meter.

Adaptations for VIctory-NVIDIA

  1. PreludeUpload ordering: when VICTORY_PRELUDE_UPLOADS=1, HostList::prelude records upload.staging().record_detile(list, submission) before upload.record(list), and PreludeUpload::record reads from staging.copy_source() / staging.copy_base().
  2. Partial-mip & pooled-staging safety: Staging::gpu is only enabled when irst == 0 && level0 == 0 (so ootprints matches
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5526462043 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/36). Originally posted by [wike1701](https://github.com/wike1701) on 2026-11-27T12:16:08Z. --- ## Summary Ports opt-in GPU compute texture detiling (VICTORY_GPU_DETILE=1) from [ xceless/victory-fork@3461f52](https://github.com/fxceless/victory-fork/commit/3461f52) (GPL-3.0), adapted for VIctory-NVIDIA: - **crates/victory-formats/src/texture.rs**: adds Swizzle::name(), DetileParams + DetileParams::address(), Layout::detile_params(), Layout::pattern_tables(), and unit test detile_params_address_every_element_as_offset_does. - **crates/victory-gpu/src/gpudetile.rs**: adds D3D12 compute detiling pipeline (HLSL -> DXIL via DXC, root signature, PSO, job planner, raw/mask/pattern-table staging layout, and WARP byte-exact test he_card_detiles_as_the_cpu_does). - **crates/victory-gpu/src/texture.rs**: adds opt-in Staging::gpu (VICTORY_GPU_DETILE=1) backed by pooled device-local UAV linear buffers (SPARE_LINEAR), plus per-frame CPU/GPU detile telemetry (DETILED, BY_MODE). - **crates/victory-gpu/src/host.rs**: records GPU detiling in HostList::prelude (idempotent per submission) and logs per-frame detiling breakdown in Meter. ### Adaptations for VIctory-NVIDIA 1. **PreludeUpload ordering**: when VICTORY_PRELUDE_UPLOADS=1, HostList::prelude records upload.staging().record_detile(list, submission) **before** upload.record(list), and PreludeUpload::record reads from staging.copy_source() / staging.copy_base(). 2. **Partial-mip & pooled-staging safety**: Staging::gpu is only enabled when irst == 0 && level0 == 0 (so ootprints matches
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
trustno1-coder/VIctory-NVIDIA!36
No description provided.