DXIL: fix heap_structured_buffer, texture_load, and wave_all_equal feature flags #2476
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!2476
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2476"
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?
@Decodere on GitHub · 2026-11-25 19:41 UTC · original
Decodere:fix-dxil-ops-feature-flags→main· +64 −5 · 2 files · 1 commits · openWhat is in it
Align three
Shaderop builders incrates/xcl/src/gpu/dxil/ops.rs(+5/-5) with DXC 1.9's validator feature-flag rules and add DXC 1.9 validator +SFI0coverage incrates/xcl/src/gpu/dxil/ops_tests.rs(+59/-0,69lines total):heap_structured_buffer: remove spuriousself.require(Feature::RawAndStructuredBuffers)—ResourceDescriptorHeapstructured buffers require onlyResourceHeapIndexing(1 << 30,SFI0 = 0x200_0000), not the static raw/structured binding metadata flag (1 << 4), which causeddxil.dllto reject standalone heap structured-buffer shaders withFlags must match usage.Texture/srv_texture/heap_texture/texture_load: recordpub ncomp: u32onTextureand gateFeature::TypedUavLoadAdditionalFormats(1 << 13,SFI0 = 0x800) ontex.uav && tex.ncomp > 1instead oftex.comp != U32/I32/F32, fixing both 1-component false positives (UNormF32,SNormF32,F16) and multi-componentF32/I32/U32false negatives without removingtyped_uav_load_additional_formats().wave_all_equal: callself.wave_int64(v)matching the other typed wave helpers soFeature::Int64OpsandFeature::Doublesare recorded immediately oni64/f64inputs.Part of #1401
Part of #1833
Tested
origin/main(9ba6804f, DXC/dxil1.9.2609.5):cargo test -p xcl --lib gpu::dxil::ops_tests::ops_feature_flags -- --test-threads=1 --nocapturefailed3of3(ops_feature_flags_heap_structured_bufferrejecteddeclared=1073741840, actual=1073741824;ops_feature_flags_typed_uav_texture_loadrejecteddeclared=1073741824, actual=1073750016;ops_feature_flags_wave_all_equal_64bitmissedInt64Ops16384 != 49152).gpu::dxil::ops_tests(c20e5829, rebased ontoorigin/main06055a7a, DXC/dxil1.9.2609.5):cargo test --release -p xcl --lib gpu::dxil::ops_tests -- --test-threads=1 --nocapture):27 passed; 0 failed; 0 ignored(0.33 s,0skips).XCL_ADAPTER=warp cargo test --release -p xcl --lib gpu::dxil::ops_tests -- --test-threads=1 --nocapture):27 passed; 0 failed; 0 ignored(0.06 s;0skips on all 3 new pure-CPU/DXC 1.9 tests, pre-existing GPU dispatch tests skip cleanly withno wave32).cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture, RTX 4060):37test binaries,1416 passed; 0 failed; 46 ignored(183/183gpu::dxil::*).29pre-existingSKIPPEDlines on this RTX 4060 host (21no wave64,3per-lane wave32 refused,3no D3D12 debug layer /d3d12SDKLayers.dll,1no heap windows,1cannot disable driver cache;0skipped ingpu::dxil::ops_tests).Regression run
Paired 60 s RTX 4060 smoke (
scripts/smoke.ps1 -Seconds 60) on baseorigin/mainvs PR head (1539vs1466frames =105.0%,60 60 60steady pace,0device removals,0crashes):Base (
origin/main):PR head:
Not tested
21pre-existing wave64 tests skip on RTX 4060 wave32-only hardware; all feature-flag cases are validated directly by DXC/dxil1.9.2609.5andSFI0assertions).d3d12SDKLayers.dllnot installed on this host).AI use
Written and verified with Google Antigravity (Gemini 4 Neon). All changes were validated locally with failing-first DXC 1.9 tests, full release workspace tests, and paired 60 s RTX 4060 smoke runs.
@DarkPanda69 on GitHub · 2026-11-25 19:53 UTC · original
The wave64 GPU paths listed as untested, on an AMD card with native wave64, plus an RTX 3060, paired against
mainwith the direct translator on for the whole GPU suite (so every directly translated program carries the changed flags).Head
c20e582applied onmain6d051da, debug, Windows 11 Pro 26200,XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu:: --test-threads=4, onmainand on this PR for each card:mainPer-test comparison: on both cards the only differences are the 3 new
ops_feature_flags_*tests (all ok). No existing test changes result or skip state; on the RX 9070 XT none of the wave64 tests skip, so the drivers accept the pipelines with the new flags there too. The 2 RX 9070 XT failures are the AMD fuzz seeds tracked in #2115, the same onmain.Not tested: the D3D12 debug layer (not installed here), a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@emirduran707 on GitHub · 2026-11-25 20:09 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
c20e5829a7b6bac8ff2acddcd58e697872b7bc00(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1414 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.gpu::dxil::ops_tests::ops_feature_flags_heap_structured_buffer,ops_feature_flags_typed_uav_texture_load, andops_feature_flags_wave_all_equal_64bit.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) are pre-existing on unmodifiedmainon this GPU.Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 20:37 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
@Decodere on GitHub · 2026-11-25 20:49 UTC · original
Thanks for reviewing! We verified this directly against Microsoft
dxc.exe/dxil.dll 1.9.2609.5(and all 8 format/component-count cases inops_feature_flags_typed_uav_texture_loadpass livedxil.dllvalidation viacheck(&c)):Compiling
RWTexture2D<T> u; u[t.xy] = u[t.xy];withdxc -T cs_6_6emits:float,unorm float,snorm float(ncomp == 1):SFI0 = 0x00000000(TypedUAVLoadAdditionalFormats = false)float16_t(ncomp == 1,-enable-16bit-types):SFI0 = 0x00040000(NativeLowPrecisiononly,TypedUAVLoadAdditionalFormats = false)float4,uint4(ncomp == 4):SFI0 = 0x00000800(TypedUAVLoadAdditionalFormats = true)float16_t4(ncomp == 4,-enable-16bit-types):SFI0 = 0x00040800(TypedUAVLoadAdditionalFormats = true)DXIL resource metadata encodes component type + component count (not
DXGI_FORMAT), anddxil.dll's validator requiresTypedUAVLoadAdditionalFormats(0x800) strictly when a typed UAV load reads> 1component (ncomp > 1) — setting0x800on 1-componentUNormF32/SNormF32/F16(asmaindid previously) is rejected bydxil.dllwith a shader feature-flag mismatch.@SlopTart on GitHub · 2026-11-25 20:52 UTC · original
gpu_suite (cold cache): 164 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.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.