Tests: the draw harness puts the memory windows in its heap #1743
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!1743
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1743"
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?
@Retried on GitHub · 2026-11-24 20:08 UTC · original
Retried:tests/draw-heap-window-views→main· +26 −12 · 4 files · 1 commits · openWith
XCL_HEAP_WINDOWS=1, three retail tests ingpu_pso_e2efail on any GPU:retail_vs_ps_through_the_pso_hook_render_and_read_back,retail_pipelines_built_in_the_background_behind_a_stand_inandretail_textured_ps_decoded_descriptors_and_a_descriptor_change_between_draws. Each image comes back as the clear colour. The cause is the test harness, not the heap form. A pipeline built by the backend's hook reads memory window k throughResourceDescriptorHeap[MEM_HEAP_BASE + k]. The console heap keeps those slots for the window views, and the title's views come after them.runner::draw_on/draw_on_multiinstead bound a heap of their own with no window views and the textures at 2·i, so the VS read an empty slot and drew nothing. The compute runner already fills the window slots (dispatch_with); the graphics path did not. The tests needXCL_SAMPLE_RPF, which is probably why the #680 test runs did not show this.Part of #680 (heap windows on by default needs the whole suite green in both forms).
What is in it
Tests: the draw harness puts the memory windows in its heap:crates/xcl/src/gpu/recomp/runner.rs:bind_viewsputs a raw UAV ofmemin every window slot (MEM_HEAP_BASE..) and the textures from the newVIEW_HEAP_BASE(MEM_HEAP_BASE + MAX_WINDOWS, where the console heap's views start). Every draw goes through it.VIEW_HEAP_BASEas their texture index:crates/xcl/tests/gpu_pso_e2e.rs,crates/xcl/src/gpu/recomp/tests.rs,crates/xcl/src/gpu/dxil/graphics_tests.rs.Tested
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4(XCL_SAMPLE_RPFset) on0e89e2c(this PR on6c89285):XCL_HEAP_WINDOWSunset: 863 passed, 0 failed, 42 ignoredXCL_HEAP_WINDOWS=1: 863 passed, 0 failed, 42 ignored. The first run of this form had 862 passed and 1 failed:test_title_draws_with_a_root_signature_under_the_debug_layer, where the test title hung after its triangle check. That test then passed alone 5 times out of 5, on6c89285and on this PR, about 2.7 s each. The draw harness is not on its path, and no runtime code calls it.c160d86: with this PR, 858 passed, 0 failed, 42 ignored in both forms; without it, withXCL_HEAP_WINDOWS=1, 855 passed and 3 failed (the three tests above).gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64); withXCL_HEAP_WINDOWSunset alsoheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Regression run
The diff changes only test code (no runtime code calls the draw harness), but
runner.rslives incrates/xcl/src. Same title, same 60 s,XCL_TRANSLATED_CACHE=0, an emptyXCL_DXIL_CACHEfor each run;mainran first. This PR: 99.0 % of main's frames, 99.96 % of its peak commit, no device removal or crash.Before the rebase onto
6c89285, one head run (01ed927) reached only 553 frames: after loading it held 28 presents per 2 s where main had 60. Three reruns in a row (head 1094, main 1057, head 1062 frames) all held 60.Not tested
MEM_HEAP_BASE + MAX_WINDOWS, and the console heap's views then start one slot later. Whichever of them lands after this one needsVIEW_HEAP_BASE = MEM_HEAP_NULL + 1and the null view inbind_views.AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 21:16 UTC · original · edited 2026-11-24 21:58 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
0e89e2c(on its base6c89285).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 pso_measurement_compiles_an_exact_synthetic_record: 862 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 863 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
@Retried on GitHub · 2026-11-24 22:28 UTC · original
I am not going to follow this PR up any further. It is finished as described, and maintainers can edit the branch, take it over or close it.
If #1695 or #1669 lands first, the draw harness has to follow the new heap layout. That means
VIEW_HEAP_BASE = MEM_HEAP_NULL + 1inrunner.rsand the null view inbind_views, as the description says under Not tested.@DavidM1911 on GitHub · 2026-11-24 22:55 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
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.