D3D12.X: declare tiled texture pools texture-only #1142
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1142
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1142"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Filip722 on GitHub · 2026-11-24 12:31 UTC · original
Filip722:d3d12-texture-only-page-heaps→main· +129 −15 · 2 files · 5 commits · openTiled 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
DENY_BUFFERSwhen the contiguous tile allocator creates a shared 64 MiB pool. Retry withNONEonly onE_INVALIDARGand remember a successful fallback per device.Tested
The new Windows MSVC release build at
ce510fcpreserves 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
8f5fca5reported 1,096 passed, 6 failed, 46 ignored. PR head0005f67reported 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
e1d84b7againstce510fc. Both blocks come fromscripts/smoke.ps1.Main
xcl-smoke v1
commit:
e1d84b7d91gpu: 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:
ce510fc993gpu: 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
0005f67Same 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.ps1from clean checkouts. The startup comparison finished with 195 versus 193 frames. Wine reported zero committed process memory for both.Main
PR head
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.
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@DavidM1911 on GitHub · 2026-11-24 12:55 UTC · original
Independent verification on current
main384f7f7(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:CreateHeapwithD3D12_HEAP_FLAG_DENY_BUFFERSreturnsE_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, onE_INVALIDARGretry withNONE) — 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.
@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)XCL_ADAPTER=radeon/nvidia): 738 passed, 4 failed, 41 ignored – the same four tests as above--exact), on both adapters:tiled_texture_pool_allows_both_texture_classes_and_denies_buffersfails atvram.rs:740andplaced_title_textures_share_vram_and_preserve_pixelsattitle_textures.rs:1720, with the same log line on each driver: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.
@Filip722 on GitHub · 2026-11-24 23:14 UTC · original
Tested the runtime change from
2331125during 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 main689f2dbwith #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 at4522cc1also has an experimental policy that can place eligible texture pools in non-local memory.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.
@luckyteagirl on GitHub · 2026-11-25 06:57 UTC · original
Independent native Windows check of exact PR head
0005f6785a255c1b5fb8b58952d774d45524ae85on an AMD laptop.Tested
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 withXCL_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 separateD3D12CreateDevice(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.
@Filip722 on GitHub · 2026-11-25 21:35 UTC · original
I rebased the change onto
6d12f58and put it on a refresh branch at20f7928. 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.6d12f5820f7928Both 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.
@fromthemoonx on GitHub · 2026-11-24 12:45 UTC · original · edited 2026-11-25 22:22 UTC
Rerun on the new head
ce510fc(maine1d84b7merged into the branch): still passes on the RTX 3060.cargo test --workspace --no-fail-fast -- --test-threads=4: 1427 passed, 0 failed, 46 ignored, 25SKIPPEDlines; the 3texture_page_pool_*tests 40 of 40;hle::d3d12x::vram::(23 tests) at--test-threads=830 of 30. The e2e debug-layer messages aremain'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):CreateHeapof a 64 MiB default heap withDENY_BUFFERSalone givesE_INVALIDARG, whileDENY_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 on04938bb.Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug23311256c558fd8d7b1f2e023258428d4418a90c:cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 979 passed, 0 failed, 45 ignored. Merged onto currentmain20cf130(no conflict): 980 passed, 0 failed, 45 ignored. SKIPPED in both: 21no wave64/ per-lane refusals ingpu::recomp, andheap_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 includestiled_texture_pool_allows_both_texture_classes,placed_title_textures_share_vram_and_preserve_pixelsand the three newtexture_page_pool_*tests. The log shows the refusal and then the retry:CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x4) refused (0x80070057).test_title_draws_with_a_root_signature_under_the_debug_layer) passes. Compared withmain, the merged tree logs two more errors, the same one twice, for the first attempt: So D3D12's own rules forbidDENY_BUFFERSon its own: exactly one of the three DENY flags must stay unset (theALLOW_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 matchmain(3× id 93, 1× id 1046, 1× warning id 820).-- vram texture_page_pool placed_title_textures),gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmemfails (submit 1 lane 0 mismatch, 0 vs 1077). It fails the same way onmain20cf130, 3 of 3 (#343).Not tested
AI use
Earlier run, on
04938bbNative Windows / NVIDIA run, since Not tested lists native Windows: the new pool heap is refused here, and the title-texture tests fail.
Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug04938bba2179c8cbfad2a09b920c1632d90ea116, which is on currentmain47efa2e:cargo test --workspace --no-fail-fast -- --test-threads=4: 738 passed, 4 failed, 41 ignoredvram::tests::tiled_texture_pool_allows_both_texture_classes_and_denies_buffers: panics atvram.rs:740,allocate a tiled texture pool, becausetake_tilereturnsNonetitle_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_submittedandd32s8_targets_take_their_own_size_of_video_memory:PoisonErrorfrom the test above. Alone,d32s8_targets…passes.--exact). XCL's log names the cause: So native D3D12 on this driver answersE_INVALIDARGto aD3D12_HEAP_FLAG_DENY_BUFFERSheap for this pool, where vkd3d-proton accepted it.main, and on every other PR tree I ran today on this machine,placed_title_textures_share_vram_and_preserve_pixelsand the rest pass (e.g. 742 of 742 onmain+ #1119), so the four failures come from this change.Not tested
AI use
@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
@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 basee1d84b7).Tested
cargo build --workspace, thenXCL_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.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.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).--skipleaves out tests that fail on mainb49be183too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.