Direct DXIL: fix compute init and metadata #1952
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!1952
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1952/head"
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?
@mokkamokacaffe on GitHub · 2026-11-24 23:49 UTC · original
mokkamokacaffe:dxil/fix-init-and-metadata→main· +49 −4 · 3 files · 2 commits · closed without mergingAddresses #1894 items 3 and 4. Item 1 was merged in #1950 and item 2 is handled by #1818. The proposed item 5 was rejected after DXIL validators 1.8 and 1.9 independently confirmed that descriptor-heap-only raw buffers do not require the legacy
RawAndStructuredBuffersflag.What is in it
inallocaflag.TRANSLATOR_VERSIONfrom 7 to 8. This must be dropped when rebasing onto currentmain: #1950 already took version 8 and #1947 now hashesgpu/dxilsources automatically.Tested
fb7b2ea96d0201e3ca08b560c4241ba794dec987, Windows 11, AMD Radeon RX 6800M, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5:XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 default_aligned_alloca_validates_without_inalloca -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored; DXIL validation passed.groupshared_bytes_follow_the_16bit_layout: 1 passed, 0 failed, 0 ignored.cargo build --locked --workspace -j 2: passed.cargo build --locked --workspace --release -j 2: passed.0x887A0005; this is not a green full-suite result.main:cargo test -p xcl --libpassed with 0 failures and approximately 26 ignored; an intermittent parallel-scheduling abort is tracked in #1978 and passed on a single-threaded rerun.13d7253, independent DXIL 1.8.2502.11 and 1.9.2602.17 runs showed that the proposed heap-only raw-buffer flag was invalid. That change and its failing test are absent from this head.git diff --check: passed.Regression run
Exact-head paired retail smoke from
scripts/smoke.ps1; same title and 60-second duration. This is a regression check only and does not prove that the title reached either changed metadata path.main:
PR:
The PR produced 104.3% of main frames and 100.0% of main peak commit, with no crash or device removal.
Not tested
AI use
main, overlapping shader PRs and independent validator reports; implemented the two remaining Direct-DXIL fixes and focused tests; audited cache identity; removed the invalid heap-only raw-buffer flag expectation after confirmation from DXIL validators 1.8 and 1.9; and updated this description from contributor reports. No hardware or generated test results are claimed as Codex-produced.@upipibi on GitHub · 2026-11-24 23:53 UTC · original
The first item in the description (round
TG_SIZE[5:0]up for a partial last wave) isn't in the diff at13d7253.dxil/kernel.rschanges onlyTRANSLATOR_VERSION, and its compute prologue still haslet w = lw.c(total / lanes);. I checked on an RTX 3070 (driver 616.56): with this PR merged ontomain20cf130andgpu_compute_tg_size_counts_a_partial_last_waverouted throughdirect_or,XCL_DIRECT_DXIL=1still fails withleft: 1for 96 threads in wave64 (the HLSL path passes).#1950 has that fix (
total.div_ceil(lanes)) with the test routed through the direct translator. It also bumpsTRANSLATOR_VERSIONto 8, so whichever of the two merges second needs 9. If you'd rather keep the TG_SIZE item here, I'm happy to close #1950; it's only the one line plus the test change.AI-assisted (Claude Code).
@GustavoEllwanger on GitHub · 2026-11-25 00:26 UTC · original
Tested exact head
13d7253590a740c9ff96e3d38a5d3673ac8263a1on Windows 11 with the Windows SDK DXIL validator (dxil 1.8.2502.11) and AMD RDNA3 (RX 7600).Finding
The new test
gpu::dxil::ops_tests::heap_raw_buffer_sets_the_required_shader_flagsfails DXIL validation:declared = 0x4000_0010(ResourceDescriptorHeapIndexing | EnableRawAndStructuredBuffers) vsactual = 0x4000_0000(ResourceDescriptorHeapIndexingonly).dxil.dlldoes not expectEnableRawAndStructuredBuffers(0x10) for aByteAddressBufferaccessed solely viaCreateHandleFromHeap+AnnotateHandlewith no!dx.resourcesentry, soself.require(Feature::RawAndStructuredBuffers)inShader::heap_raw_buffer(crates/xcl/src/gpu/dxil/shader.rs:290) causes validation to fail on heap-only raw-buffer shaders.Tested
cargo build --workspace: passed.cargo test -p xcl --lib default_aligned_alloca_validates_without_inalloca -- --nocapture: passed (DXIL 1.8.2502.11).cargo test -p xcl --lib groupshared_bytes_follow_the_16bit_layout -- --nocapture: passed.cargo test -p xcl --lib heap_raw_buffer_sets_the_required_shader_flags -- --nocapture: FAILED (error above).cargo test --workspace --no-fail-fast -- --test-threads=4 --skip fuzz_validate_and_gpu_1: 984 passed, 1 failed (heap_raw_buffer_sets_the_required_shader_flags), 45 ignored, 1 filtered out, 0 wave64/mesh capability skips (8 expectedSKIPPEDlines: 6 per-lane#1426refusals, 1 driver-cache / no Developer Mode, 1no heap windows).XCL_ADAPTER=warp cargo test -p xcl --lib fuzz_validate_and_gpu_1 -- --nocapture: passed (validated 500/500 modules500..1000,GPU-compared 0).XCL_SAMPLE_*variables were unset.Not tested
XCL_SAMPLE_*game-data tests.AI use
Antigravity (Gemini 4 Neon) ran the commands and drafted this report; only the measured results above are posted.
@futurepro62 on GitHub · 2026-11-25 00:47 UTC · original
Same failure here with the newer validator, so it is not specific to DXC 1.8:
gpu::dxil::ops_tests::heap_raw_buffer_sets_the_required_shader_flagsfails identically at head13d7253with DXC /dxil.dll1.9.2602.17, on both GPUs of this machine:Tested
XCL_REQUIRE_GPU=mesh) and the AMD Radeon iGPU of a Ryzen 7 9800X3D (RDNA2,XCL_ADAPTER=radeon); Windows 11, Rust 1.100.0 MSVC, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4(plus the skips for tests that also fail onmain): that one test fails on both GPUs; everything that ran before it passed (NVIDIA 927 passed, AMD 935 passed). The run stopped at the first failing test binary, so later test binaries did not run.Not tested: retail-title smoke or world-load run, release build.
AI-assisted (Claude Code).
@raylitebull on GitHub · 2026-11-25 01:08 UTC · original
Reviewed
fb7b2ea: replacing the invalid-flags test withdefault_aligned_alloca_validates_without_inallocalooks clean alongside theAllocaalign-0 fix and live-global byte count inmodule.rs.Next steps before merge:
main(dropping the manualTRANSLATOR_VERSION = 8bump inkernel.rs, since#1950took8and#1947now auto-hashesgpu/dxilsources).PR descriptioncheck (xcl-smokeblock).@DavidM1911 on GitHub · 2026-11-25 02:59 UTC · original
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!
@luckyteagirl on GitHub · 2026-11-25 04:18 UTC · original
RX 6800M validation for PR #1952 at
fb7b2ea96d0201e3ca08b560c4241ba794dec987Windows 11 build 26200, AMD Radeon RX 6800M (driver
30.0.13002.13003), Ryzen 9 5980HX, Rust1.99.0MSVC, DXC/DXIL1.9.2609.5. Clean checkout of the PR's exact head. This tests the two remaining #1894 fixes before the requested rebase.Tested
XCL_DIRECT_DXIL=1in the environment,cargo test --locked -p xcl --lib -j 2 default_aligned_alloca_validates_without_inalloca -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored; DXIL validation passed.groupshared_bytes_follow_the_16bit_layout: 1 passed, 0 failed, 0 ignored.cargo build --locked --workspace -j 2andcargo build --locked --workspace --release -j 2: passed.cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-output: 845 passed, 140 failed, 45 ignored across completed binaries. All 140 failures aregpu::tests after the RX 6800M D3D12 device suspended (0x887A0005). The full suite is not green on this machine.Regression run
The repository's
scripts/smoke.ps1ran for seven seconds per commit on the same owned title folder, with fresh separate data and DXIL caches. The first PR attempt reached one frame but its wrapper was stopped by a 1 GB free-commit monitor before it printed a smoke block; the clean PR run below completed with the monitor still active at a 768 MB guard. Neither clean run reported a crash or device removal.Current
main:PR head:
Limits: These short runs show only one intro frame and zero draws; they do not exercise the changed Direct DXIL translation in the title. The smoke runs used the default shader path. World loading and GPU execution of a shader affected by Alloca/TGSM metadata were not tested. The PR's older base still needs the rebase requested by the maintainer; this report is for the exact head above. No game data was uploaded.
AI assistance: OpenAI Codex (GPT-6) ran the tests and paired smoke, extracted the reported counts and blocks from logs, and drafted this report.
@Toons29 on GitHub · 2026-11-25 10:30 UTC · original
Regression run of
6831c448on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon568e7db7, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 104 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.@throny on GitHub · 2026-11-25 14:53 UTC · original
Two contributors checked independently and found that #2227 #2255 solves the same problem (for #1894) in a different way: #1607, group D73. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
github-bot referenced this pull request2026-11-26 06:18:30 +00:00
@DavidM1911 on GitHub · 2026-11-26 06:51 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
Pull request closed