fix(gpu/hwrt): verify ALLOW_UNORDERED_ACCESS on postbuild destination shadow buffer (#339) #378

Manually merged
github merged 2 commits from github-bot/gh-378 into gh-pr/378/base 2026-12-03 08:34:58 +00:00 AGit
Owner

@⁠RUIZ-Enrique-25002136 on GitHub · 2026-12-03 07:54 UTC · original
RUIZ-Enrique-25002136:fix/hwrt-postbuild-uav-guard → main · +24 −0 · 1 files · 2 commits · merged 2026-12-03 08:30 UTC

Summary

Guards Manager::emit_postbuild in crates/victory-gpu/src/hwrt.rs against destination shadow buffers that lack D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, matching the root UAV check in draw.rs.

Addresses #339 (Pass #5 [P2] follow-up).

Changes

  • crates/victory-gpu/src/hwrt.rs:
    • Added Manager::allows_uav(flags) checking D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.
    • In emit_postbuild, verified sh.buffer.GetDesc().Flags with allows_uav before binding SetComputeRootUnorderedAccessView(1, dst_aligned) and dispatching write_postbuild; logs a one-time warning and skips the write if absent.
    • Added unit test allows_uav_checks_unordered_access_flag.

Rig Specs Tested On

  • CPU: Linux workstation (x86_64)
  • GPU & VRAM: N/A (Windows-only victory-gpu crate; full clippy & tests verified on GitHub Actions windows-latest CI)
  • System RAM: N/A
  • OS & GPU Driver: Linux (x86_64) — Windows x86_64-pc-windows-msvc CI verifies compilation, clippy, and unit tests

Run Settings & Profile

  • Build & Commit SHA: rebased on origin/main
  • Console Profile & Internal Resolution / Scale: N/A
  • Ray Tracing: N/A
  • Upscaling: N/A
  • Frame Generation: N/A
  • Launcher Command / Preset & Extra VICTORY_* Overrides: N/A
  • Scene / Area & Session Length: N/A

Measurements & Verification

  • Base FPS (without Frame Gen): N/A
  • Frame-Gen FPS (if enabled): N/A
  • VRAM / RAM Usage: N/A
  • Crashes / DRED Resets: N/A
  • Automated Checks:
    • cargo clippy --workspace --all-targets --locked -- -D warnings (verified on GitHub Actions windows-latest CI)
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (verified on GitHub Actions windows-latest CI)
    • cargo test --locked -p xtask -> 8 passed, 0 failed
    • cargo xtask policy -> asset policy: 349 files ok
    • cargo test -p victory-gpu --locked -- --test-threads=1 (verified on GitHub Actions windows-latest CI)
**@⁠RUIZ-Enrique-25002136** on GitHub · 2026-12-03 07:54 UTC · [original](https://github.com/Androtim/MiniVI/pull/378) `RUIZ-Enrique-25002136:fix/hwrt-postbuild-uav-guard` → `main` · +24 −0 · 1 files · 2 commits · merged 2026-12-03 08:30 UTC ## Summary Guards `Manager::emit_postbuild` in `crates/victory-gpu/src/hwrt.rs` against destination shadow buffers that lack `D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS`, matching the root UAV check in `draw.rs`. Addresses #339 (Pass #5 `[P2]` follow-up). ### Changes - **`crates/victory-gpu/src/hwrt.rs`:** - Added `Manager::allows_uav(flags)` checking `D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS`. - In `emit_postbuild`, verified `sh.buffer.GetDesc().Flags` with `allows_uav` before binding `SetComputeRootUnorderedAccessView(1, dst_aligned)` and dispatching `write_postbuild`; logs a one-time warning and skips the write if absent. - Added unit test `allows_uav_checks_unordered_access_flag`. ## Rig Specs Tested On - **CPU:** Linux workstation (`x86_64`) - **GPU & VRAM:** N/A (Windows-only `victory-gpu` crate; full clippy & tests verified on GitHub Actions `windows-latest` CI) - **System RAM:** N/A - **OS & GPU Driver:** Linux (`x86_64`) — Windows `x86_64-pc-windows-msvc` CI verifies compilation, clippy, and unit tests ## Run Settings & Profile - **Build & Commit SHA:** rebased on `origin/main` - **Console Profile & Internal Resolution / Scale:** N/A - **Ray Tracing:** N/A - **Upscaling:** N/A - **Frame Generation:** N/A - **Launcher Command / Preset & Extra `VICTORY_*` Overrides:** N/A - **Scene / Area & Session Length:** N/A ## Measurements & Verification - **Base FPS (without Frame Gen):** N/A - **Frame-Gen FPS (if enabled):** N/A - **VRAM / RAM Usage:** N/A - **Crashes / DRED Resets:** N/A - **Automated Checks:** - [ ] `cargo clippy --workspace --all-targets --locked -- -D warnings` (verified on GitHub Actions `windows-latest` CI) - [ ] `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (verified on GitHub Actions `windows-latest` CI) - [x] `cargo test --locked -p xtask` -> 8 passed, 0 failed - [x] `cargo xtask policy` -> `asset policy: 349 files ok` - [ ] `cargo test -p victory-gpu --locked -- --test-threads=1` (verified on GitHub Actions `windows-latest` CI)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 07:57:44 +00:00
github-bot changed target branch from main to gh-pr/378/base 2026-12-03 08:34:54 +00:00
github manually merged commit 6f915345ba into gh-pr/378/base 2026-12-03 08:34:58 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!378
No description provided.