D3D12.X: declare tiled texture pools texture-only #1142

Open
github-bot wants to merge 5 commits from github-bot/gh-1142 into main AGit
Owner

@⁠Filip722 on GitHub · 2026-11-24 12:31 UTC · original
Filip722:d3d12-texture-only-page-heaps → main · +129 −15 · 2 files · 5 commits · open

Tiled texture pools can use texture-only heaps on vkd3d-proton. This lets the Vulkan backend choose texture-compatible memory and avoid a backing buffer. Native Windows D3D12 drivers tested in this thread reject the two-category heap flags with E_INVALIDARG. Retry with the standard all-resource heap and reuse that choice after a successful fallback.

What is in it

  • Request DENY_BUFFERS when the contiguous tile allocator creates a shared 64 MiB pool. Retry with NONE only on E_INVALIDARG and remember a successful fallback per device.
  • Preserve allocation and device errors. Both texture categories still share one pool.
  • Cover flag selection, retry and error propagation with CPU tests. A GPU test checks the flags of the resulting D3D12 heap.

Tested

  • The new Windows MSVC release build at ce510fc preserves heap slot reuse and per-device reclaim. Both 15-second startup checks finished with exit zero.

  • The workspace counts below are from the previous revision.

  • Bazzite 44 Testing F44.20261011, kernel 7.2.9-ogc2.1.fc44.x86_64, Intel Core 7 240H, GeForce RTX 5060 Laptop GPU 8 GB, NVIDIA 615.78.08. Both workspaces were cross-built for Windows MSVC in release mode with Rust 1.98.1 and run under Proton Experimental 11.0-20261112. Both used vkd3d-proton 4522cc1a8b1347f+ with local allocation changes.

  • All 19 workspace test executables ran serially on each revision with one test thread. Main 8f5fca5 reported 1,096 passed, 6 failed, 46 ignored. PR head 0005f67 reported 1,100 passed, 6 failed, 46 ignored. The same six tests failed on both. They cover depth UAV resource flags, Opus and XMA2 voice playback, the synthetic title end-to-end run, PLS disk quota and predication state.

  • Both runs printed the same 26 SKIPPED markers across 16 tests. They cover wave64, unsupported per-lane FP16/FP32 forms, driver-cache disabling, optional heap windows and D3D12 debug layers. Those subcases are excluded from hardware coverage.

  • A separate RTX run of the VRAM tests and shared-pixel fixture reported 16 passed, 0 failed, 1 ignored benchmark, no SKIPPED markers. It covered actual tiled heap flags, both texture classes, shared pixel readback, the fallback/error tests and upstream's packed 3D mip-tail test. The native NVIDIA and AMD reports in this thread reproduced the original heap creation failure on 04938bb.

Regression run

Same offline title, fresh data and caches, cloned Proton prefixes, and the same 512 MiB coherent window. The current comparison is e1d84b7 against ce510fc. Both blocks come from scripts/smoke.ps1.

Main

xcl-smoke v1
commit: e1d84b7d91
gpu: NVIDIA GeForce RTX 5060 Laptop GPU
title: retail-offline-1142-refresh
seconds: 15
exit: 0x0
frames shown: 217 (PresentX 217)
presents per 2 s (last 3): 60 47 40
device removals: 0
crashes: 0
peak commit: 0 MB

PR head

xcl-smoke v1
commit: ce510fc993
gpu: NVIDIA GeForce RTX 5060 Laptop GPU
title: retail-offline-1142-refresh
seconds: 15
exit: 0x0
frames shown: 205 (PresentX 206)
presents per 2 s (last 3): 46 40 40
device removals: 0
crashes: 0
peak commit: 0 MB

Previous startup comparison for 0005f67

Same offline title, fresh per-arm data and cache, cloned Proton prefixes, and a 512 MiB coherent window. Both blocks below were emitted by scripts/smoke.ps1 from clean checkouts. The startup comparison finished with 195 versus 193 frames. Wine reported zero committed process memory for both.

Main

xcl-smoke v1
commit: 8f5fca5bb9ad6e695093d75294ad2cec023bba60
gpu: NVIDIA GeForce RTX 5060 Laptop GPU
title: retail-offline
seconds: 15
exit: 0x0
frames shown: 195 (PresentX 195)
presents per 2 s (last 3): 45 37 41
device removals: 0
crashes: 0
peak commit: 0 MB

PR head

xcl-smoke v1
commit: 0005f6785a255c1b5fb8b58952d774d45524ae85
gpu: NVIDIA GeForce RTX 5060 Laptop GPU
title: retail-offline
seconds: 15
exit: 0x0
frames shown: 193 (PresentX 194)
presents per 2 s (last 3): 38 38 50
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

Native Windows on the new head and sustained gameplay. Wine reported zero committed process memory on both arms.

AI use

OpenAI Codex with GPT-6.2-Sol high investigated the heap behavior, wrote the initial change and tests, and ran the earlier checks. OpenAI Codex with GPT-6.2-astra carried the change into the contiguous allocator, preserved upstream's new packed-mip coverage during this refresh, ran the matched tests and updated this report.

OpenAI Codex (GPT-6) resolved the current allocator conflict, validated the existing PR branch, and ran the new comparison.

**@⁠Filip722** on GitHub · 2026-11-24 12:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142) `Filip722:d3d12-texture-only-page-heaps` → `main` · +129 −15 · 2 files · 5 commits · open Tiled texture pools can use texture-only heaps on vkd3d-proton. This lets the Vulkan backend choose texture-compatible memory and avoid a backing buffer. Native Windows D3D12 drivers tested in this thread reject the two-category heap flags with `E_INVALIDARG`. Retry with the standard all-resource heap and reuse that choice after a successful fallback. **What is in it** - Request `DENY_BUFFERS` when the contiguous tile allocator creates a shared 64 MiB pool. Retry with `NONE` only on `E_INVALIDARG` and remember a successful fallback per device. - Preserve allocation and device errors. Both texture categories still share one pool. - Cover flag selection, retry and error propagation with CPU tests. A GPU test checks the flags of the resulting D3D12 heap. **Tested** - The new Windows MSVC release build at `ce510fc` preserves heap slot reuse and per-device reclaim. Both 15-second startup checks finished with exit zero. - The workspace counts below are from the previous revision. - Bazzite 44 Testing F44.20261011, kernel 7.2.9-ogc2.1.fc44.x86_64, Intel Core 7 240H, GeForce RTX 5060 Laptop GPU 8 GB, NVIDIA 615.78.08. Both workspaces were cross-built for Windows MSVC in release mode with Rust 1.98.1 and run under Proton Experimental 11.0-20261112. Both used vkd3d-proton `4522cc1a8b1347f+` with local allocation changes. - All 19 workspace test executables ran serially on each revision with one test thread. Main `8f5fca5` reported **1,096 passed, 6 failed, 46 ignored**. PR head `0005f67` reported **1,100 passed, 6 failed, 46 ignored**. The same six tests failed on both. They cover depth UAV resource flags, Opus and XMA2 voice playback, the synthetic title end-to-end run, PLS disk quota and predication state. - Both runs printed the same 26 SKIPPED markers across 16 tests. They cover wave64, unsupported per-lane FP16/FP32 forms, driver-cache disabling, optional heap windows and D3D12 debug layers. Those subcases are excluded from hardware coverage. - A separate RTX run of the VRAM tests and shared-pixel fixture reported **16 passed, 0 failed, 1 ignored benchmark, no SKIPPED markers**. It covered actual tiled heap flags, both texture classes, shared pixel readback, the fallback/error tests and upstream's packed 3D mip-tail test. The native NVIDIA and AMD reports in this thread reproduced the original heap creation failure on `04938bb`. **Regression run** Same offline title, fresh data and caches, cloned Proton prefixes, and the same 512 MiB coherent window. The current comparison is `e1d84b7` against `ce510fc`. Both blocks come from `scripts/smoke.ps1`. Main ``` ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 5060 Laptop GPU title: retail-offline-1142-refresh seconds: 15 exit: 0x0 frames shown: 217 (PresentX 217) presents per 2 s (last 3): 60 47 40 device removals: 0 crashes: 0 peak commit: 0 MB ``` ``` PR head ``` ``` xcl-smoke v1 commit: ce510fc993e82469969575d10bc0d17f114b9558 gpu: NVIDIA GeForce RTX 5060 Laptop GPU title: retail-offline-1142-refresh seconds: 15 exit: 0x0 frames shown: 205 (PresentX 206) presents per 2 s (last 3): 46 40 40 device removals: 0 crashes: 0 peak commit: 0 MB ``` ``` <details> <summary>Previous startup comparison for 0005f67</summary> Same offline title, fresh per-arm data and cache, cloned Proton prefixes, and a 512 MiB coherent window. Both blocks below were emitted by `scripts/smoke.ps1` from clean checkouts. The startup comparison finished with 195 versus 193 frames. Wine reported zero committed process memory for both. Main ``` xcl-smoke v1 commit: 8f5fca5bb9ad6e695093d75294ad2cec023bba60 gpu: NVIDIA GeForce RTX 5060 Laptop GPU title: retail-offline seconds: 15 exit: 0x0 frames shown: 195 (PresentX 195) presents per 2 s (last 3): 45 37 41 device removals: 0 crashes: 0 peak commit: 0 MB ``` PR head ``` xcl-smoke v1 commit: 0005f6785a255c1b5fb8b58952d774d45524ae85 gpu: NVIDIA GeForce RTX 5060 Laptop GPU title: retail-offline seconds: 15 exit: 0x0 frames shown: 193 (PresentX 194) presents per 2 s (last 3): 38 38 50 device removals: 0 crashes: 0 peak commit: 0 MB ``` </details> **Not tested** Native Windows on the new head and sustained gameplay. Wine reported zero committed process memory on both arms. **AI use** OpenAI Codex with GPT-6.2-Sol high investigated the heap behavior, wrote the initial change and tests, and ran the earlier checks. OpenAI Codex with GPT-6.2-astra carried the change into the contiguous allocator, preserved upstream's new packed-mip coverage during this refresh, ran the matched tests and updated this report. OpenAI Codex (GPT-6) resolved the current allocator conflict, validated the existing PR branch, and ran the new comparison.
Tiled texture pools map sampled and attachment textures. Disallow buffers so the host can allocate the pool without a buffer compatibility requirement.

Assisted-by: OpenAI Codex (GPT-6.2-Sol high)
Apply the texture-only heap preference and per-device E_INVALIDARG fallback when the contiguous tile pool allocates its next heap.

Assisted-by: OpenAI Codex (GPT-6.2-astra)
Merge current main into the existing PR branch. Preserve per-device pool flags, reclamation and the allocator and packed-mip tests. Assisted by OpenAI Codex (GPT-6).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:44:56 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 12:55 UTC · original

Independent verification on current main 384f7f7 (branch already contains it — clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti (driver current, WDDM); Rust stable MSVC, debug.

The PR's own new test fails on this hardware, and it takes an existing GPU test down with it:

  • cargo test -p xcl --lib vram: 10 passed, 2 failed:
    • tiled_texture_pool_allows_both_texture_classes_and_denies_buffers (new) — pages.take_tile() fails: CreateHeap with D3D12_HEAP_FLAG_DENY_BUFFERS returns E_INVALIDARG (0x80070057) → "no video memory for more pages of title textures".
    • placed_title_textures_share_vram_and_preserve_pixels (existing) — collateral: it needs the same tiled pool.

So on this driver the texture-only heap flag is rejected outright. If the flag is required for correctness on some titles, it probably needs a fallback (try DENY_BUFFERS, on E_INVALIDARG retry with NONE) — or confirmation that other drivers accept it. As-is the PR breaks tiled-texture allocation on at least this RTX 3060 Ti.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

**@⁠DavidM1911** on GitHub · 2026-11-24 12:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7132097462) Independent verification on current `main` `384f7f7` (branch already contains it — clean merge). **Machine:** Windows 11, Ryzen 9 7900X + **RTX 3060 Ti** (driver current, WDDM); Rust stable MSVC, debug. **The PR's own new test fails on this hardware**, and it takes an existing GPU test down with it: - `cargo test -p xcl --lib vram`: 10 passed, **2 failed**: - `tiled_texture_pool_allows_both_texture_classes_and_denies_buffers` (new) — `pages.take_tile()` fails: `CreateHeap` with `D3D12_HEAP_FLAG_DENY_BUFFERS` returns `E_INVALIDARG (0x80070057)` → "no video memory for more pages of title textures". - `placed_title_textures_share_vram_and_preserve_pixels` (existing) — collateral: it needs the same tiled pool. So on this driver the texture-only heap flag is rejected outright. If the flag is required for correctness on some titles, it probably needs a fallback (try `DENY_BUFFERS`, on `E_INVALIDARG` retry with `NONE`) — or confirmation that other drivers accept it. As-is the PR breaks tiled-texture allocation on at least this RTX 3060 Ti. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Author
Owner

@⁠bjarngard on GitHub · 2026-11-24 13:47 UTC · original

The AMD driver refuses the heap too, so this does not look NVIDIA-specific (re the open question in the report above).

Tested (head 04938bb, native Windows)

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2), driver 32.0.21043.5001, and RTX 5080, driver 621.24; Windows 11 build 26300; Rust 1.99.1 MSVC; debug
  • Full suite, each adapter (XCL_ADAPTER=radeon / nvidia): 738 passed, 4 failed, 41 ignored – the same four tests as above
  • Alone (--exact), on both adapters: tiled_texture_pool_allows_both_texture_classes_and_denies_buffers fails at vram.rs:740 and placed_title_textures_share_vram_and_preserve_pixels at title_textures.rs:1720, with the same log line on each driver:
    D3D12.X: CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057); as type 1, alignment 0x0, flags 0x4: 0x80070057
    
  • On the merge base 47efa2e, the three pre-existing tests pass on both adapters.

Not tested: the D3D12 debug layer, so the runtime's own message for the refusal is not captured.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

**@⁠bjarngard** on GitHub · 2026-11-24 13:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7133351130) The AMD driver refuses the heap too, so this does not look NVIDIA-specific (re the open question in the report above). **Tested** (head `04938bb`, native Windows) - AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2), driver 32.0.21043.5001, and RTX 5080, driver 621.24; Windows 11 build 26300; Rust 1.99.1 MSVC; debug - Full suite, each adapter (`XCL_ADAPTER=radeon` / `nvidia`): 738 passed, 4 failed, 41 ignored – the same four tests as above - Alone (`--exact`), on both adapters: `tiled_texture_pool_allows_both_texture_classes_and_denies_buffers` fails at `vram.rs:740` and `placed_title_textures_share_vram_and_preserve_pixels` at `title_textures.rs:1720`, with the same log line on each driver: ``` D3D12.X: CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057); as type 1, alignment 0x0, flags 0x4: 0x80070057 ``` - On the merge base `47efa2e`, the three pre-existing tests pass on both adapters. **Not tested:** the D3D12 debug layer, so the runtime's own message for the refusal is not captured. **AI use:** the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
Author
Owner

@⁠Filip722 on GitHub · 2026-11-24 23:14 UTC · original

Tested the runtime change from 2331125 during late Series X loading on an RTX 5060 Laptop (8 GiB), Bazzite 44, NVIDIA 615.78.08 and Proton Experimental 11.0-20261112. Both runs used main 689f2db with #541 and #1124, matching initial caches, input and memory limits. The second changed only the texture heap allocation policy from this PR. The local vkd3d-proton build at 4522cc1 also has an experimental policy that can place eligible texture pools in non-local memory.

Allocation trace Before With this change
64 MiB default heaps with flags NONE 144 0
64 MiB default heaps with DENY_BUFFERS 0 146
Experimental non-local placement decisions 0 97

The control logged an access violation inside Vulkan memory allocation immediately after an unflagged 64 MiB heap request and exited. The patched run reached the external timeout with loading artwork still on screen. It recorded 2,877 presents, 82,401 storage requests, 148 storage failures, and no presents in the last 18 two-second samples. Neither run logged a device removal or kernel Xid. This single pair confirms the heap choice under streaming load. Gameplay and native Windows fallback remain unverified on this machine.

OpenAI Codex assisted with the matched runs and trace analysis.

**@⁠Filip722** on GitHub · 2026-11-24 23:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7147178164) Tested the runtime change from `2331125` during late Series X loading on an RTX 5060 Laptop (8 GiB), Bazzite 44, NVIDIA 615.78.08 and Proton Experimental 11.0-20261112. Both runs used main `689f2db` with #541 and #1124, matching initial caches, input and memory limits. The second changed only the texture heap allocation policy from this PR. The local vkd3d-proton build at `4522cc1` also has an experimental policy that can place eligible texture pools in non-local memory. | Allocation trace | Before | With this change | | --- | ---: | ---: | | 64 MiB default heaps with flags NONE | 144 | 0 | | 64 MiB default heaps with DENY_BUFFERS | 0 | 146 | | Experimental non-local placement decisions | 0 | 97 | The control logged an access violation inside Vulkan memory allocation immediately after an unflagged 64 MiB heap request and exited. The patched run reached the external timeout with loading artwork still on screen. It recorded 2,877 presents, 82,401 storage requests, 148 storage failures, and no presents in the last 18 two-second samples. Neither run logged a device removal or kernel Xid. This single pair confirms the heap choice under streaming load. Gameplay and native Windows fallback remain unverified on this machine. OpenAI Codex assisted with the matched runs and trace analysis.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 06:57 UTC · original

Independent native Windows check of exact PR head 0005f6785a255c1b5fb8b58952d774d45524ae85 on an AMD laptop.

Tested

  • Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5; debug test build.
  • cargo test --locked -p xcl --lib -j 2 texture_page_pool -- --test-threads=1 --show-output: 3 passed, 0 failed, 0 ignored, 0 SKIPPED. These are the heap flag selection, fallback, and error-propagation unit tests.
  • xcl-c507a8c30a120d13.exe --exact hle::d3d12x::vram::tests::tiled_texture_pool_allows_both_texture_classes --show-output: 1 passed, 0 failed, 0 ignored, 0 SKIPPED with XCL_REQUIRE_GPU=wave64. It reached native D3D12 tiled-page setup and asserted the created heap's resource-category flags. I used a temporary Windows high-performance per-app preference for that exact-head test executable and restored the previous setting afterward. A separate D3D12CreateDevice(None) adapter-LUID probe under the same preference selected the RX 6800M (00000000:00014d72); without the preference, Windows selected the integrated AMD GPU. The test itself does not print its device LUID, so adapter attribution follows from the per-app setting and the matching device-creation call.

I did not run the full GPU workspace suite or a paired title smoke on this PR. The focused GPU test confirms heap creation and flag assertions; it does not measure sustained texture streaming or identify in its output whether the fallback was used.

AI-assisted testing, adapter-selection verification, and report drafting with OpenAI Codex (GPT-6). No game data was used.

**@⁠luckyteagirl** on GitHub · 2026-11-25 06:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7155328715) Independent native Windows check of exact PR head `0005f6785a255c1b5fb8b58952d774d45524ae85` on an AMD laptop. **Tested** - Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5; debug test build. - `cargo test --locked -p xcl --lib -j 2 texture_page_pool -- --test-threads=1 --show-output`: **3 passed, 0 failed, 0 ignored, 0 SKIPPED**. These are the heap flag selection, fallback, and error-propagation unit tests. - `xcl-c507a8c30a120d13.exe --exact hle::d3d12x::vram::tests::tiled_texture_pool_allows_both_texture_classes --show-output`: **1 passed, 0 failed, 0 ignored, 0 SKIPPED** with `XCL_REQUIRE_GPU=wave64`. It reached native D3D12 tiled-page setup and asserted the created heap's resource-category flags. I used a temporary Windows high-performance per-app preference for that exact-head test executable and restored the previous setting afterward. A separate `D3D12CreateDevice(None)` adapter-LUID probe under the same preference selected the RX 6800M (`00000000:00014d72`); without the preference, Windows selected the integrated AMD GPU. The test itself does not print its device LUID, so adapter attribution follows from the per-app setting and the matching device-creation call. I did not run the full GPU workspace suite or a paired title smoke on this PR. The focused GPU test confirms heap creation and flag assertions; it does not measure sustained texture streaming or identify in its output whether the fallback was used. AI-assisted testing, adapter-selection verification, and report drafting with OpenAI Codex (GPT-6). No game data was used.
Author
Owner

@⁠Filip722 on GitHub · 2026-11-25 21:35 UTC · original

I rebased the change onto 6d12f58 and put it on a refresh branch at 20f7928. The allocator keeps main's reusable heap slots and per-device reclamation, along with this PR's texture-only preference and fallback.

On Bazzite 44, RTX 5060 Laptop GPU, NVIDIA 615.78.08 and GE-Proton 11-14, the Windows MSVC debug test binary ran hle::d3d12x::vram::tests --test-threads=1.

Revision Passed Failed Ignored Runtime skips
Main 6d12f58 18 1 1 0
Refresh 20f7928 22 1 1 0

Both revisions failed the D32S8 test at readback-buffer creation with E_INVALIDARG. All four pool tests passed, including the hardware heap check. I used a separate branch to preserve the current PR history. The refresh has focused test coverage. Native CI and a title smoke pair are still pending for that revision.

OpenAI Codex (GPT-6) resolved the conflict and ran the tests.

**@⁠Filip722** on GitHub · 2026-11-25 21:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7175282830) I rebased the change onto `6d12f58` and put it on a [refresh branch](https://github.com/Filip722/xcl/tree/d3d12-texture-only-page-heaps-refresh-6d12f58) at `20f7928`. The allocator keeps main's reusable heap slots and per-device reclamation, along with this PR's texture-only preference and fallback. On Bazzite 44, RTX 5060 Laptop GPU, NVIDIA 615.78.08 and GE-Proton 11-14, the Windows MSVC debug test binary ran `hle::d3d12x::vram::tests --test-threads=1`. | Revision | Passed | Failed | Ignored | Runtime skips | | --- | ---: | ---: | ---: | ---: | | Main `6d12f58` | 18 | 1 | 1 | 0 | | Refresh `20f7928` | 22 | 1 | 1 | 0 | Both revisions failed the D32S8 test at readback-buffer creation with `E_INVALIDARG`. All four pool tests passed, including the hardware heap check. I used a separate branch to preserve the current PR history. The refresh has focused test coverage. Native CI and a title smoke pair are still pending for that revision. OpenAI Codex (GPT-6) resolved the conflict and ran the tests.
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-24 12:45 UTC · original · edited 2026-11-25 22:22 UTC

Rerun on the new head ce510fc (main e1d84b7 merged into the branch): still passes on the RTX 3060. cargo test --workspace --no-fail-fast -- --test-threads=4: 1427 passed, 0 failed, 46 ignored, 25 SKIPPED lines; the 3 texture_page_pool_* tests 40 of 40; hle::d3d12x::vram:: (23 tests) at --test-threads=8 30 of 30. The e2e debug-layer messages are main's plus the same 2× id 631 as below (3 runs). A scratch probe on a plain device (no debug layer, resource heap tier 2): CreateHeap of a 64 MiB default heap with DENY_BUFFERS alone gives E_INVALIDARG, while DENY_BUFFERS | DENY_RT_DS_TEXTURES (ALLOW_ONLY_NON_RT_DS_TEXTURES) and no flags succeed. So on native Windows the pool always takes the fallback. Same machine, debug. Not tested: Wine / vkd3d-proton. The reports below are for older heads.


Rerun on the new head 2331125: the fallback works on native Windows (RTX 3060). The full suite passes, and so do the four tests that failed on 04938bb.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300); rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug
  • Exact head 23311256c558fd8d7b1f2e023258428d4418a90c: cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 979 passed, 0 failed, 45 ignored. Merged onto current main 20cf130 (no conflict): 980 passed, 0 failed, 45 ignored. SKIPPED in both: 21 no wave64 / per-lane refusals in gpu::recomp, and heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.
  • cargo test -p xcl --lib -- d3d12x::vram placed_title_textures: 15 passed, 0 failed, 1 ignored, 10 of 10 runs. This includes tiled_texture_pool_allows_both_texture_classes, placed_title_textures_share_vram_and_preserve_pixels and the three new texture_page_pool_* tests. The log shows the refusal and then the retry: CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057).
  • The e2e test under the D3D12 debug layer (test_title_draws_with_a_root_signature_under_the_debug_layer) passes. Compared with main, the merged tree logs two more errors, the same one twice, for the first attempt:
    D3D12 debug layer (error, id 631): ID3D12Device::CreateHeap: D3D12_HEAP_FLAGS has invalid flag combinations set. The following flags may not all be set simultaneously. Exactly one must be left unset, or all may be left unset when the adapter supports D3D12_RESOURCE_HEAP_TIER_2 or creating a heap in conjunction with D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER: [...] D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0, D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0, and D3D12_HEAP_FLAG_DENY_BUFFERS = 1.
    
    So D3D12's own rules forbid DENY_BUFFERS on its own: exactly one of the three DENY flags must stay unset (the ALLOW_ONLY_* combinations), or none may be set. The refusal is not driver-specific; native Windows adapters should all take the fallback (once per device), and debug-layer runs will show this error. The other messages match main (3× id 93, 1× id 1046, 1× warning id 820).
  • Unrelated to this PR: run as one filtered set (-- vram texture_page_pool placed_title_textures), gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem fails (submit 1 lane 0 mismatch, 0 vs 1077). It fails the same way on main 20cf130, 3 of 3 (#343).

Not tested

  • AMD / Intel on native Windows, release build, a title (no Xbox title here).

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and tests on the machine above and wrote this report from the output.
Earlier run, on 04938bb

Native Windows / NVIDIA run, since Not tested lists native Windows: the new pool heap is refused here, and the title-texture tests fail.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools installed; rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug
  • Exact head 04938bba2179c8cbfad2a09b920c1632d90ea116, which is on current main 47efa2e: cargo test --workspace --no-fail-fast -- --test-threads=4: 738 passed, 4 failed, 41 ignored
    • vram::tests::tiled_texture_pool_allows_both_texture_classes_and_denies_buffers: panics at vram.rs:740, allocate a tiled texture pool, because take_tile returns None
    • title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels: expected shared vram::Pages texture at 0x700000000 (title_textures.rs:1720)
    • transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory: PoisonError from the test above. Alone, d32s8_targets… passes.
  • Each of the first two fails the same way 3 times out of 3 when run alone (--exact). XCL's log names the cause:
    D3D12.X: CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057); as type 1, alignment 0x0, flags 0x4: 0x80070057
    D3D12.X: no video memory for more pages of title textures (The parameter is incorrect. (0x80070057))
    
    So native D3D12 on this driver answers E_INVALIDARG to a D3D12_HEAP_FLAG_DENY_BUFFERS heap for this pool, where vkd3d-proton accepted it.
  • On main, and on every other PR tree I ran today on this machine, placed_title_textures_share_vram_and_preserve_pixels and the rest pass (e.g. 742 of 742 on main + #1119), so the four failures come from this change.

Not tested

  • AMD / Intel on native Windows; whether the refusal is specific to NVIDIA's driver or a runtime rule for this flag combination (I didn't run it under the debug layer, because the test creates its own device first).

AI use

  • Claude Code (Claude Opus 5.5) ran the build and tests on the machine above and wrote this report from the output and XCL's log.
**@⁠fromthemoonx** on GitHub · 2026-11-24 12:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7131881933) · edited 2026-11-25 22:22 UTC **Rerun on the new head `ce510fc` (`main` `e1d84b7` merged into the branch): still passes on the RTX 3060.** `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1427 passed, 0 failed, 46 ignored, 25 `SKIPPED` lines; the 3 `texture_page_pool_*` tests 40 of 40; `hle::d3d12x::vram::` (23 tests) at `--test-threads=8` 30 of 30. The e2e debug-layer messages are `main`'s plus the same 2× id 631 as below (3 runs). A scratch probe on a plain device (no debug layer, resource heap tier 2): `CreateHeap` of a 64 MiB default heap with `DENY_BUFFERS` alone gives `E_INVALIDARG`, while `DENY_BUFFERS | DENY_RT_DS_TEXTURES` (`ALLOW_ONLY_NON_RT_DS_TEXTURES`) and no flags succeed. So on native Windows the pool always takes the fallback. Same machine, debug. Not tested: Wine / vkd3d-proton. The reports below are for older heads. --- **Rerun on the new head `2331125`: the fallback works on native Windows (RTX 3060). The full suite passes, and so do the four tests that failed on `04938bb`.** **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300); rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17; debug - **Exact head `23311256c558fd8d7b1f2e023258428d4418a90c`**: `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **979 passed, 0 failed, 45 ignored**. Merged onto current `main` `20cf130` (no conflict): **980 passed, 0 failed, 45 ignored**. SKIPPED in both: 21 `no wave64` / per-lane refusals in `gpu::recomp`, and `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`. - `cargo test -p xcl --lib -- d3d12x::vram placed_title_textures`: 15 passed, 0 failed, 1 ignored, **10 of 10 runs**. This includes `tiled_texture_pool_allows_both_texture_classes`, `placed_title_textures_share_vram_and_preserve_pixels` and the three new `texture_page_pool_*` tests. The log shows the refusal and then the retry: `CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057)`. - The e2e test under the D3D12 debug layer (`test_title_draws_with_a_root_signature_under_the_debug_layer`) passes. Compared with `main`, the merged tree logs two more errors, the same one twice, for the first attempt: ``` D3D12 debug layer (error, id 631): ID3D12Device::CreateHeap: D3D12_HEAP_FLAGS has invalid flag combinations set. The following flags may not all be set simultaneously. Exactly one must be left unset, or all may be left unset when the adapter supports D3D12_RESOURCE_HEAP_TIER_2 or creating a heap in conjunction with D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER: [...] D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0, D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0, and D3D12_HEAP_FLAG_DENY_BUFFERS = 1. ``` So D3D12's own rules forbid `DENY_BUFFERS` on its own: exactly one of the three DENY flags must stay unset (the `ALLOW_ONLY_*` combinations), or none may be set. The refusal is not driver-specific; native Windows adapters should all take the fallback (once per device), and debug-layer runs will show this error. The other messages match `main` (3× id 93, 1× id 1046, 1× warning id 820). - Unrelated to this PR: run as one filtered set (`-- vram texture_page_pool placed_title_textures`), `gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem` fails (`submit 1 lane 0 mismatch`, 0 vs 1077). It fails the same way on `main` `20cf130`, 3 of 3 (#343). **Not tested** - AMD / Intel on native Windows, release build, a title (no Xbox title here). **AI use** - Claude Code (Claude Opus 5.5) ran the builds and tests on the machine above and wrote this report from the output. <details><summary>Earlier run, on <code>04938bb</code></summary> Native Windows / NVIDIA run, since **Not tested** lists native Windows: **the new pool heap is refused here, and the title-texture tests fail.** **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools installed; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17; debug - Exact head `04938bba2179c8cbfad2a09b920c1632d90ea116`, which is on current `main` `47efa2e`: `cargo test --workspace --no-fail-fast -- --test-threads=4`: **738 passed, 4 failed, 41 ignored** - `vram::tests::tiled_texture_pool_allows_both_texture_classes_and_denies_buffers`: panics at `vram.rs:740`, `allocate a tiled texture pool`, because `take_tile` returns `None` - `title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels`: `expected shared vram::Pages texture at 0x700000000` (`title_textures.rs:1720`) - `transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory`: `PoisonError` from the test above. Alone, `d32s8_targets…` passes. - Each of the first two fails the same way 3 times out of 3 when run alone (`--exact`). XCL's log names the cause: ``` D3D12.X: CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057); as type 1, alignment 0x0, flags 0x4: 0x80070057 D3D12.X: no video memory for more pages of title textures (The parameter is incorrect. (0x80070057)) ``` So native D3D12 on this driver answers `E_INVALIDARG` to a `D3D12_HEAP_FLAG_DENY_BUFFERS` heap for this pool, where vkd3d-proton accepted it. - On `main`, and on every other PR tree I ran today on this machine, `placed_title_textures_share_vram_and_preserve_pixels` and the rest pass (e.g. 742 of 742 on `main` + #1119), so the four failures come from this change. **Not tested** - AMD / Intel on native Windows; whether the refusal is specific to NVIDIA's driver or a runtime rule for this flag combination (I didn't run it under the debug layer, because the test creates its own device first). **AI use** - Claude Code (Claude Opus 5.5) ran the build and tests on the machine above and wrote this report from the output and XCL's log. </details>
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:40 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 03:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7181932075) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 08:53 UTC · original

NVIDIA and AMD full-suite run, to go with the reports above by fromthemoonx, since none of them covers AMD. Tested exact head ce510fc9 (on its base e1d84b7).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1415 passed, 0 failed, 44 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: texture_page_pool_keeps_a_supported_texture_only_heap, texture_page_pool_remembers_a_successful_all_resource_fallback, texture_page_pool_propagates_allocation_and_device_errors, tiled_texture_pool_allows_both_texture_classes.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1426 passed, 0 failed, 46 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main b49be183 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 08:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1142#issuecomment-7187151332) NVIDIA and AMD full-suite run, to go with the reports above by fromthemoonx, since none of them covers AMD. Tested exact head `ce510fc9` (on its base `e1d84b7`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1415 passed, 0 failed, 44 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `texture_page_pool_keeps_a_supported_texture_only_heap`, `texture_page_pool_remembers_a_successful_all_resource_fallback`, `texture_page_pool_propagates_allocation_and_device_errors`, `tiled_texture_pool_allows_both_texture_classes`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1426 passed, 0 failed, 46 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `b49be183` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1142/head:github-bot/gh-1142'
git switch 'github-bot/gh-1142'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1142'
git switch 'github-bot/gh-1142'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1142'
git switch 'github-bot/gh-1142'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1142'
git switch 'main'
git merge --squash 'github-bot/gh-1142'
git switch 'main'
git merge --ff-only 'github-bot/gh-1142'
git switch 'main'
git merge 'github-bot/gh-1142'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.