Recompiler: Return BVH misses for unmapped memory windows #2532

Merged
Lkxex merged 1 commit from upstream-pr/2542 into main 2026-11-28 19:48:22 +00:00
Lkxex commented 2026-11-25 22:25:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lkxex on 2026-11-25T22:25:04Z.


Reject unmapped UMA windows before interpreting a BVH node. Zero-filled reads can otherwise appear to be a box with valid child zero. Both HLSL and direct DXIL now return the correct box or triangle miss.

What is in it

  • Equivalent window checks in both recompilers.
  • A synthetic GPU regression with mixed box and triangle lanes.

Tested

  • AMD Radeon RX 6600, Windows x64, DXC 1.8.2502.11.
  • Focused HLSL GPU test: 1 passed, 0 failed, 0 skipped.
  • Direct DXIL BVH GPU tests: 4 passed, 0 failed, 0 skipped.

Regression run
Pending. This draft has no matching main/head game smoke captures.

Not tested
Whole workspace test suite, real title smoke, FPS, and lighting.

AI use
OpenAI Codex (GPT-6.2 Sol) assisted with implementation and tests.

<!-- greyfinch-sync:ivall/xcl:issue:5500225195 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2542). Originally posted by [Lkxex](https://github.com/Lkxex) on 2026-11-25T22:25:04Z. --- Reject unmapped UMA windows before interpreting a BVH node. Zero-filled reads can otherwise appear to be a box with valid child zero. Both HLSL and direct DXIL now return the correct box or triangle miss. **What is in it** - Equivalent window checks in both recompilers. - A synthetic GPU regression with mixed box and triangle lanes. **Tested** - AMD Radeon RX 6600, Windows x64, DXC 1.8.2502.11. - Focused HLSL GPU test: 1 passed, 0 failed, 0 skipped. - Direct DXIL BVH GPU tests: 4 passed, 0 failed, 0 skipped. **Regression run** Pending. This draft has no matching main/head game smoke captures. **Not tested** Whole workspace test suite, real title smoke, FPS, and lighting. **AI use** OpenAI Codex (GPT-6.2 Sol) assisted with implementation and tests.
DavidM1911 commented 2026-11-25 23:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T22:32:06Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7176482489 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2542#issuecomment-7176482489). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T22:32:06Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
SlopTart commented 2026-11-26 00:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T23:24:55Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 166 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.
Targeted run of the bvh filter (14 tests incl. the new unmapped-window misses): all passed.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7177528079 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2542#issuecomment-7177528079). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T23:24:55Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 166 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Targeted run of the `bvh` filter (14 tests incl. the new unmapped-window misses): all passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
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
xcl-dev/xcl!2532
No description provided.