Adapt unsupported null Texture2D UAV and RTV formats on desktop #1194

Manually merged
github merged 1 commit from gh-pr/1194/head into gh-pr/1194/base 2026-11-26 22:47:52 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-24 03:25 UTC · original
R0Y00:codex/startup-null-uav-format → main · +153 −0 · 5 files · 1 commits · merged 2026-11-24 03:55 UTC

Refs #1137. Depends on the experimental wrapper in #1135. The review base isolates this change until the upstream PR lands.

Slots 19 and 20 query adapter format support for two null Texture2D descriptions. When the original usage is unsupported and RGBA8_UNORM supports it, forward an adapted null descriptor to the desktop device. Keep the guest descriptor for recording. The format fallback excludes resource-backed views, UAV counters, other dimensions and other formats.

Local Windows validation

Commit 2ad099c, MSVC Release, Windows build 26200, debug layer off. Built the shim and source-built consumer with cmake --build out/bin --target startup_null_views_check. Ran ctest --test-dir out/bin --no-tests=error -R "^startup_null_views_" -V.

Adapter Null UAV Null RTV GetDeviceRemovedReason after each
RTX 4060 Laptop GPU, driver 32.0.16.1656 86 → 28 115 → 28 S_OK
Microsoft WARP 86 → 86 115 → 115 S_OK

Two passes, zero skips. The fixture creates two descriptor heaps through D3D12XboxCreateDevice and invokes both wrapper slots. Negative controls cover backed views, a non-null UAV counter, array dimensions and another UAV format. The fixture exercises descriptor creation only.

**@⁠R0Y00** on GitHub · 2026-11-24 03:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1194) `R0Y00:codex/startup-null-uav-format` → `main` · +153 −0 · 5 files · 1 commits · merged 2026-11-24 03:55 UTC Refs #1137. Depends on the experimental wrapper in #1135. The review base isolates this change until the upstream PR lands. Slots 19 and 20 query adapter format support for two null Texture2D descriptions. When the original usage is unsupported and RGBA8_UNORM supports it, forward an adapted null descriptor to the desktop device. Keep the guest descriptor for recording. The format fallback excludes resource-backed views, UAV counters, other dimensions and other formats. ## Local Windows validation Commit 2ad099c, MSVC Release, Windows build 26200, debug layer off. Built the shim and source-built consumer with `cmake --build out/bin --target startup_null_views_check`. Ran `ctest --test-dir out/bin --no-tests=error -R "^startup_null_views_" -V`. | Adapter | Null UAV | Null RTV | GetDeviceRemovedReason after each | | --- | --- | --- | --- | | RTX 4060 Laptop GPU, driver 32.0.16.1656 | 86 → 28 | 115 → 28 | S_OK | | Microsoft WARP | 86 → 86 | 115 → 115 | S_OK | Two passes, zero skips. The fixture creates two descriptor heaps through D3D12XboxCreateDevice and invokes both wrapper slots. Negative controls cover backed views, a non-null UAV counter, array dimensions and another UAV format. The fixture exercises descriptor creation only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:47:50 +00:00
github manually merged commit 15ec631f95 into gh-pr/1194/base 2026-11-26 22:47:52 +00:00
Author
Owner

@⁠denn0x on GitHub · 2026-11-24 03:30 UTC · original

Test report for 2ad099c3: Windows 11 Pro 26300, MSVC 14.50 (VS 18 Build Tools), Ninja, Release, debug layer off.

  • cmake --build out/build/release: built with no errors or failures.
  • ctest --no-tests=error -R startup: 7/7 passed, 0 failed, no skips.

Not tested yet: a run with the console executable. Runs on this machine currently run out of system commit before the menus (#1199). I will add the executable result here once that is resolved.

AI-assisted (Claude Code).

**@⁠denn0x** on GitHub · 2026-11-24 03:30 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1194#issuecomment-7121165054) Test report for `2ad099c3`: Windows 11 Pro 26300, MSVC 14.50 (VS 18 Build Tools), Ninja, Release, debug layer off. - `cmake --build out/build/release`: built with no errors or failures. - `ctest --no-tests=error -R startup`: 7/7 passed, 0 failed, no skips. Not tested yet: a run with the console executable. Runs on this machine currently run out of system commit before the menus (#1199). I will add the executable result here once that is resolved. AI-assisted (Claude Code).
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 03:40 UTC · original · reviewed

Technical review on Linux (Windows build/tests were not executed locally).

Checks run (Linux, commit 2ad099c3)

  • /root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (16 Markdown files, 253 links).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (967 files).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/gpu_report_format_check.py: Ran 10 tests — OK.
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py: Ran 11 tests — OK.

Findings

No issues found in the diff:

  • null_texture_view.h and d3d12_xs_device.cpp (view_slot slots 19 and 20) keep null_uav / null_rtv alive across the forwarded method_of(...) call, guard the guest descriptor pointer with x2w_local::readable, and restrict adaptation to null Texture2D descriptors (a == 0, b == 0 for slot 19) for B5G5R5A1_UNORM UAV / B4G4R4A4_UNORM RTV when R8G8B8A8_UNORM supports the requested usage.
  • desktop_format does not remap either format, and guest descriptor recording in note_view happens before adaptation.
  • tests/startup_null_views_check.cpp covers positive and negative controls (non-null resource/counter, non-Texture2D dimension, other formats) on hardware and WARP, and docs/startup-runtime.md documents the ctest command.
**@⁠tedin7** on GitHub · 2026-11-24 03:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1194#pullrequestreview-6033310483) · **reviewed** Technical review on Linux (Windows build/tests were **not** executed locally). ### Checks run (Linux, commit `2ad099c3`) - `/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py`: passed (`16` Markdown files, `253` links). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py`: passed (`967` files). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/gpu_report_format_check.py`: `Ran 10 tests — OK`. - `/root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py`: `Ran 11 tests — OK`. ### Findings No issues found in the diff: - `null_texture_view.h` and `d3d12_xs_device.cpp` (`view_slot` slots 19 and 20) keep `null_uav` / `null_rtv` alive across the forwarded `method_of(...)` call, guard the guest descriptor pointer with `x2w_local::readable`, and restrict adaptation to null Texture2D descriptors (`a == 0`, `b == 0` for slot 19) for `B5G5R5A1_UNORM` UAV / `B4G4R4A4_UNORM` RTV when `R8G8B8A8_UNORM` supports the requested usage. - `desktop_format` does not remap either format, and guest descriptor recording in `note_view` happens before adaptation. - `tests/startup_null_views_check.cpp` covers positive and negative controls (non-null resource/counter, non-Texture2D dimension, other formats) on hardware and WARP, and `docs/startup-runtime.md` documents the `ctest` command.
This discussion has been locked. Commenting is limited to contributors.
No description provided.