Recompiler: loads through s_getpc_b64 read the constant data after the program #2229
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!2229
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2229"
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?
@MacieGx on GitHub · 2026-11-25 10:46 UTC · original
MacieGx:recomp/getpc-constant-data→main· +751 −40 · 13 files · 1 commits · openConsole programs keep constant tables after
s_endpgmand read them PC-relative (s_getpc_b64+s_load_dword*/global_load_dword*). The translation gaves_getpc_b64the program's offset with high dword 0, so in a title those loads read memory window 0 at a low offset and got zeros. This makes both translators (HLSL and direct DXIL) read the program's own constant data there. Part of #505.676 of the 26503 shader records of the newer retail title (#505) take such an address. Among them are all
postfx_acesLUT bakes (CS_Bake*LUT*): the ACES tone-scale spline coefficients sit after the program, so with zeros every channel came out 1.0 and the 64-cube output LUT the composite pass reads was one constant texel (0.162, 0.162, 0.162, 1). The presented picture was then one flat grey whatever the scene. Others in the list:scattering_transmittance_system,prefilter_env_map,MS_VS_CascadeShadows*,MS_VS_Transform*,rtdirectionalshadows,indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes,water_*.What is in it
crates/xcl/src/gpu/xbox.rs:Fssm::rodata(program), the data blocks after a program.crates/xcl/src/gpu/recomp/code_loads.rs(new): sorts thes_load*/s_buffer_load*and FLAT / GLOBAL loads of a program with constant data by whether their address comes froms_getpc_b64, by a forward dataflow over the CFG (s_getpc_b64and offsets added to it give a code address, merges join, loads give data; an indirect jump makes every load "maybe"). Three forms follow:s_getpc_b64: a plain memory load, no table test (as before this PR);xcl_cload*, the table's dwords (0 outside the blocks), no memory access and no window index;xcl_gload*(hi, a)reads the memory and selects the table's dwords, with no branch, when the raw high dword isCODE_ADDRESS_HI(0xC0DE, above any user-space address).s_getpc_b64's high dword isCODE_ADDRESS_HIin a program with such a mixed load, with one memory window as with several, and 0 in a program with only table loads or only memory loads. With one window the memory loads take the low dword only, so a tagged pointer used for a memory load still reads the memory; without the tag there, a mixed load took the title's memory at the table's low offset for the table (thehollowedone, below). A first form tested the window index in a branch around every load of such a program; the NVIDIA Linux driver crashed compiling it (pr1sm-dev, below).crates/xcl/src/gpu/recomp/mod.rs,emit.rs: newOptions::rodata. The HLSL embeds the blocks asstatic const uint xcl_rodata[]and emits the three forms above.crates/xcl/src/gpu/dxil/(kernel.rs,lower.rs,lower_mem.rs,lower_window.rs,coverage.rs): the same for the direct translator, as an internal constant array of the module (Lw::rodata_loads), with the same three forms;s_buffer_loadthrough a V# built froms_getpc_b64reads it too.kernel::translate_entry_rodatacarries the data (and, for compute, the compact table sizetranslate_compute_onpicks for wave32-only GPUs); the per-lane form has no table and leaves such programs to the per-instruction form. ItsTRANSLATOR_VERSIONgoes from 9 to 10.crates/xcl/src/gpu/recomp/pso.rs,crates/xcl/src/shaders.rs: the data is passed on the compute, VS / PS and mesh paths (HLSL and direct), and byxcl shaders(--precompile, the direct sweep).gpu::recomp::tests::gpu_loads_read_the_constant_data_after_the_programandgpu::dxil::core_tests::gpu_direct_loads_read_the_constant_data_after_the_program: a program reads its table throughs_getpc_b64+s_load_dword*/global_load_dword*(direct: alsos_buffer_loadthrough a V# on it), with one window, two windows in the switch form and with heap windows; the values must equal the table...._not_the_memory_at_its_offset(both translators): the same with one window, the memory a load through the same register pair reads at the table's low offset.gpu::recomp::code_loads::tests::loads_from_s_getpc_read_the_code_and_the_others_memory: the pattern of a retail LUT bake gives the table loads "code", a descriptor table load nothing and a load whose pointer is a code address on one path only "maybe".Tested
stable-x86_64-pc-windows-msvc, release. On3ce7f30(this PR, rebased ontomain08db802; the GPU tests sit in the middle ofrecomp/tests.rsanddxil/core_tests.rs, so tests other PRs append at the end do not conflict with them).d2dee32; their fixture variant is now the two..._not_the_memory_at_its_offsettests, ands_getpc_b64tags the code pointer with one window too.cargo test --release -p xcl --lib -- constant_data_after_the_program code_loadson3ce7f30: 5 passed, 0 failed, 0 ignored (all four GPU tests ran on the GPU, no SKIPPED).cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4on3ce7f30: 1430 passed, 4 failed, 47 ignored.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState: out of memory (0x8007000E)), which fail the same way onmain(last checked on568e7db: 1150 passed, the same 4 failed, 46 ignored).rerouted_disk_entries_follow_the_direct_translatorandpc_resource_desc_strips_uav_on_unsupported_formats_and_msaa, reported in the comments, are not in this diff; they failed on the oldermain5478c4awithout this change and pass in the runs above.--no-fail-fastcargo stops after thexcllib binary.main): 21 "no wave64" (recomp::lower::tests×4,recomp::lower_dxil::tests×14,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,dxil::kernel::dispatch_chain_native_wave64_builds_whole), 3 "refused by the per-lane form" (lower_dxil::tests),heap_window_out_of_memory_falls_back_to_the_switch_form("no heap windows"),pso_measurement_compiles_an_exact_synthetic_record(driver cache cannot be disabled without Developer Mode).mainalone it does not reach its world, so the effect was measured on a local branch that adds other open PRs and local work tomain(XCL_HEAP_WINDOWS=1,XCL_UMA_SHADOW=1, pipelines precompiled), with the first form of this change applied (before the port tomainand before the three load forms):postfx_aces:CS_BakeACESWithGamutCompressLUT_QuasiLogShaper(64-cube RGBA16F, slice 0 read back): 1 distinct texel of 4096 before, about 3300 after, in two runs;xcl shaders <pack> --export-hlsl <dir> --record-hash 14f33bcccd1ec01d --split 0withXCL_HEAP_WINDOWS=1on3ce7f30(postfx_aces:CS_BakeACESWithGamutCompressLUT_QuasiLogShaper, 4 windows): its 6 table loads (global_load_dwordx3afters_getpc_b64) arexcl_cload, its 3 descriptor table loads (s_load_dwordx4/x8) plain memory loads, noxcl_gload, ands_getpc_b64gives high dword 0.30b0eb9b, releasex86_64-pc-windows-gnu, the retail title on the HLSL path withXCL_HEAP_WINDOWS=1, 120 s): the previous headb7209c2ended in the driver at 9.4 s compiling a program with the table (status0x3inwinevulkan), no frames; with1bfa10d(the change to the three load forms, now squashed into this commit) the run reached 120 s, that program compiled in 288 ms and 2785 frames were shown. One run each.xcl shaders <pack> --direct --hash 56c0cd3b82a00c6e --validate(indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes): translates in about 1 s and validates, 3.4 MB DXIL with heap windows. On the HLSL path that program is 28 MB of DXIL, so keeping it on the direct translator matters for compile time.Regression run
main:
this PR:
Not tested
main.buffer_load, the legacy GS path and the per-lane form (XCL_PER_LANE) still read memory at such addresses.AI use
code_loads.rs) and their test, ported the change tomain, added the one-window tag and its tests after thehollowedone's finding, squashed it and ran the whole suite on this commit and onmain. The Linux / NVIDIA run is pr1sm-dev's (their comment names their tool and model).🤖 Generated with Claude Code
@itsSio on GitHub · 2026-11-25 11:23 UTC · original
Tested
Independent debug verification on clean
23047743c72f180bd142e5802ef0920c97ab30cb. Windows 11 Pro 26200, x64 MSVC, unoptimized dev/test with debug info off.cargo build --workspace --lockedsucceeded on both PCs.cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocaptureexited 101 on both:32.0.16.108832.0.16.1088Both logged 20 native-wave64 skips, three per-lane f16/f32 refusals, and one skip each for unavailable driver-cache control and heap windows. The RTX 2080 SUPER also logged two missing-D3D12-debug-layer skips.
cargo test -p xcl --lib --locked constant_data_after_the_program -- --test-threads=1 --nocapture: 2 / 0 / 0, no runtime skips, on each of the RTX 5080, RTX 2080 SUPER, and Radeon RDNA2 iGPU (32.0.21043.5001, same Ryzen 7 system and toolchain). Both the HLSL and direct-DXIL constant-table tests passed.The two workspace failures had identical assertions on both PCs:
rerouted_disk_entries_follow_the_direct_translator(68 vs 1), andpc_resource_desc_strips_uav_on_unsupported_formats_and_msaa(format 85, got 28). I ran each on the exact parent5478c4a7c1ae5adba127c8d27018d7fdbf3a8725on both PCs usingcargo test -p xcl --lib --locked <fully-qualified-name> -- --exact --test-threads=1 --nocapture. All four invocations reproduced the corresponding exact assertion, each 0 / 1 / 0, no skips. These signatures predate this PR; the head workspace results remain red.Not tested
Retail smoke, title shader samples, full AMD workspace, Intel, release mode, and performance. The parent checks were targeted, not full-workspace runs.
AI use
Ran via Samaritan:
openai/gpt-6.2-sol): scoped and ran the two-PC head and parent tests, checked logs, and wrote this report. No subagents contributed to this check.@CharlyRien on GitHub · 2026-11-25 11:57 UTC · original
In-title test on an RTX 3090 (32-lane waves), on a different local stack: with this change ported, the presented world frame is no longer flat grey, and the output LUT matches your numbers. One run, with two deviations from the PR that are listed below, so read it as a second data point, not as a test of this head.
Setup
TdrDelay30 s, release.main689f2db+ #1329 (ac4b997), #1448, #1323, #889, #684, #929, #640, #1850 (0861c8c), #765, #541 (6bd8f64), #724 (rebased,3442b58), #1887, #1803 (cb00751), #1982, #1405, #1464, #1989 (197b104, applied by hand), then this PR's first head039a363cherry-picked (conflicts indxil/kernel.rs,recomp/pso.rs,shaders.rsand the two test files, resolved by hand; both translators kept). Not the current head2304774.XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_WAIT_RELEASE_MS=250(as #1046).s_getpc_b64get the table (a local switch). Deviation 2: only containers with such a program were retranslated (258 used ones plus 261 mesh containers, about 13 minutes); the others kept their cached translation, on the reading that the emitted HLSL is unchanged when there is no table. Neither was checked against the full change.Measured
gpu::dxil::core_tests::gpu_direct_loads_read_the_constant_data_after_the_program ... ok,gpu::recomp::tests::gpu_loads_read_the_constant_data_after_the_program ... ok,2 passed; 0 failed.ff3f3836(12.6 %), flat grey on screen;Not tested / not established
0xC0000409before any dump; cause not found, and a local diagnostic of mine is a suspect, so I am not reporting it against this PR.AI use: Claude Code (Claude Fable 5.2 coordinating; a Claude Fable 5.2 agent did the port, the runs and the dumps). I looked at the last dumped frame and checked its log line; the other numbers are from the agent's notes.
@DavidM1911 on GitHub · 2026-11-25 16:31 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1 real failure, deterministic (also fails--test-threads=1):The new test's own assertion fails — UAV stripping keeps the wrong format. Needs a fix before merge.
— Devin
@MacieGx on GitHub · 2026-11-25 20:57 UTC · original
@DavidM1911
pc_resource_desc_strips_uav_on_unsupported_formats_and_msaais not touched by this PR: it failed onmainat the time too (checked alone onc9a5d58), and it passes on the rebased head (full suite in the description).@oni-swr on GitHub · 2026-11-25 21:12 UTC · original
Tested
XCL_ADAPTER=radeon.b7209c2cdd5c179a05dd19cb24ccd91be40a27b1(the head had moved from980eb78in the handoff). Baselineorigin/mainwas6d12f58a229bc73889878a448c64dc3af25eeba0.cargo test --workspace --no-fail-fast -- --test-threads=4: 1,424 passed, 1 failed, 46 ignored, 25SKIPPEDnotices (exit 101). The sole failure wasgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, also the sole baseline failure.cargo test -p xcl --lib constant_data_after_the_program -- --test-threads=1: 2 passed, 0 failed, 0 ignored, 0 skipped; both GPU readback tests ran on the RX 7800 XT.cargo test --workspace --no-fail-fast -- --test-threads=4: 1,422 passed, 1 failed, 46 ignored, 25SKIPPEDnotices (exit 101).Not tested
AI use
@pr1sm-dev on GitHub · 2026-11-25 21:22 UTC · original · edited 2026-11-25 21:49 UTC
On Linux + NVIDIA (vkd3d-proton), the driver crashes in
vkCreateComputePipelineson programs that get the new constant tables, including one of the ACES LUT bakes this PR names. Without the PR the same programs compile fine. The SPIR-V is valid, so this looks like a driver bug that the new table code triggers, not a translation error.Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Linux 6.17, Wine 11.22, vkd3d-proton master
30b0eb9b+ #257 + the two dxil-spirv dominator patches from #1269. Local tree, not cleanmain: upstream06c9f55+ #2092 + our commits, with this PR's diff at980eb78applied unchanged. I compared against the current headb7209c2: itsrecomp/emit.rsandgpu/xbox.rshunks are identical, and the crashing programs go through the HLSL path.What happens:
xcl shaders --precompile --pipelinesend with status 3, aftererr:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call. The same command lines on the tree without the PR run clean (3-min precompile sample: 23,200 records, no fault).XCL_PSO_TRACE=1, the thread that dies is always inside a driver compile of a table-carrying program with no driver blob:spirv-val --target-env vulkan1.3accepts. One of them holds a 78-dwordOpConstantCompositetable.static const uint xcl_rodata[](no array at all) does not help. So the array form itself is not the trigger.Edit, later the same evening: the trigger is the code-address window logic. With
s_getpc_b64given high dword 0 (as with one window) and thexcl_w == 0xC0DE - xcl_uma_base &&test dropped fromxcl_gload*, the tables load by their low address only, and the driver stops faulting:With tables for the 10 ACES bakes on that variant, the presented frame stops being flat grey here as well: the world scene now comes through the composite. I have not checked why the driver chokes on the window test, and this variant is only a diagnosis build: a table read can then be confused with a load of the title's memory at the same low dword. So it is not a fix in itself, but it points at the part of the read path that needs another form on NVIDIA Linux.
Trap for others testing this: after one such crash, the translated-shader cache keeps the translations with their tables. Later runs then crash even with tables switched off, until that cache folder (
translated/v2/<source id>) is moved aside.I can try variants of the read path here if you have one in mind (each test is a short build + a ~1-minute run).
AI use: investigated and written with Claude Code (Claude Opus 5.5); all results are from real runs on the machine above.
@MacieGx on GitHub · 2026-11-25 22:26 UTC · original
@pr1sm-dev thanks for the careful bisect, the window test was the right lead. Here is a variant that keeps code addresses apart from title memory without that test on the loads that do not need it: branch https://github.com/MacieGx/xcl/tree/recomp/getpc-constant-data-v2, one commit (
1bfa10d) on this PR's head.s_getpc_b64(offsets added to it keep the mark; a load clears it).xcl_cload*): no memory access and no window index.== 0xC0DE); noxcl_w - xcl_uma_basetest.s_getpc_b64gets high dword0xC0DEonly in a program with such a mixed load and several windows; otherwise 0. The ACES bake14f33bcccd1ec01dhas none: its 6 table loads becomexcl_cloadand the getpc high dword is 0, i.e. your working variant without the table/memory mix-up.The direct DXIL path does the same. On Windows / RTX 5080 the two GPU tests (now also with a load that reads the table on one path and memory on the other) pass, plus
gpu::recompandgpu::dxil(only the knownfuzz_validate_and_gpu_*OOM failures, the same without the change). Not run in the title yet and nothing tested on Linux. If it compiles cleanly on your setup (after movingtranslated/v2/<source id>aside), I'll fold it into this PR with fresh regression runs.AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Opus 5.5 subagent wrote the change and ran the tests).
@pr1sm-dev on GitHub · 2026-11-26 00:04 UTC · original
@MacieGx v2 (
1bfa10d) on Linux + NVIDIA: the crash is gone here. The same title run that ends in the driver at 9.4 s on this PR's head ran its full 120 s with v2, and the program it ends on compiles in 288 ms. One run each, A then B, same settings.Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Wine 11.22 + vkd3d-proton master
30b0eb9bwith #257's patch; release builds (x86_64-pc-windows-gnu) of your branch as is: A =b7209c2(this PR's head), B =1bfa10d, both onmain6d12f58, no local changes. Neither build had run here before, so each started withtranslated/v2folders of its own (nothing from earlier trees). The retail title, HLSL path (noXCL_DIRECT_DXIL),XCL_HEAP_WINDOWS=1,XCL_PSO_TRACE=1,VKD3D_CONFIG=ignore_shared_fence,pipeline_library_log,no_descriptor_heap,retain_psos,XCL_SHORT_MOVIES=1,XCL_NETWORK=0, A / DOWN pressed byXCL_PRESS_AT, 120 s.b7209c21bfa10d0x3at 9.4 s, inwinevulkan←d3d12coreAlso seen, for completeness:
XCL_DIRECT_DXIL=1(A only, otherwise the same, 120 s) A did not end: no error and presents to the end. So on this machine the HLSL path is the one that shows it.XCL_RUN_SECONDSended the title at 120 s; my run script's timeout ended it. A's direct-DXIL run exited normally. I have not looked into it and can't say it has anything to do with this change.nvidia-dev(c044dc6, which carries an earlier form of this PR) withXCL_DIRECT_DXIL=1and the switches from #2057, two runs ended the same way (status0x3with the samewinevulkan←d3d12corestack, at 43.8 s and 17.4 s; in the second, traced run, during a compute pipeline's driver compile that never finished). The DXIL of the program in the second run converts with the native dxil-spirv to SPIR-V thatspirv-val(Vulkan 1.3) passes and that holds two constant arrays (29 and 78 words).1bfa10ddoes not cherry-pick ontonvidia-dev(conflicts indxil/core_tests.rs,dxil/lower_mem.rs,recomp/emit.rs), so v2 is not tested there.AI use: Claude Code (Claude Opus 5.5) made the builds and runs and wrote this comment.
@MacieGx on GitHub · 2026-11-26 00:31 UTC · original
@pr1sm-dev thank you, that settles it. v2 is now folded into this PR: one commit,
d2dee32, rebased ontomain08db802, with a new regression run and the full suite in the description, and your run credited under Tested.@DavidM1911 on GitHub · 2026-11-26 00:59 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
@thehollowedone on GitHub · 2026-11-26 01:57 UTC · original
Independent RTX 3080 Ti check of head
d2dee32: the checked-in HLSL and direct-DXIL constant-data GPU tests pass (2 passed, 0 failed, 0 ignored, 0 SKIPPED). A test-only address-collision variant fails on both backends (0 passed, 2 failed, 0 ignored, 0 SKIPPED).In each existing one-window fixture, set
st.sgpr[2] = block + 4instead of0x900, and place the existing[4242, 4343]memory words atmem[(st.sgpr[2] / 4) as usize..]. The mixed register-pair load then returns[0x7AB1_E003, 0x7AB1_E001]; the second value should be the memory word4343. The direct-DXIL fixture includes its existing third memory word4444. This exercises ordinary memory at the same low offset as the program's constant table; the code-address load still returns the table word.The one-window mixed-load selection currently checks the low offset without a code-address tag in HLSL and direct DXIL. It appears mixed code/memory loads need a distinguishable code pointer in one-window mode too, with both fixture variants kept as regressions.
Command for each run:
cargo test --offline --locked -p xcl --lib constant_data_after_the_program -- --nocapture --test-threads=1using an isolated Cargo target. Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. Synthetic inputs only; no title run. AI-assisted: Codex (GPT-6.2 Sol) reviewed the code, changed the local test fixture, ran both GPU checks, and drafted this report.@thehollowedone on GitHub · 2026-11-26 02:09 UTC · original
A separate classifier regression on #2229 head
d2dee32is reproducible. The checked-inloads_from_s_getpc_read_the_code_and_the_others_memoryCPU test passed 1/0/0. A local test-only program withS_GETPC_B64 s[0:1],S_CSELECT_B64 s[8:9], s[0:1], 0, thenS_LOAD_DWORDthroughs[8:9]failed 0/1/0:code_loadsreturnedSome(Code)for the load, where either selected address is possible andSome(Maybe)is expected. No skips in either run.The select classification joins register uses only; the inline-zero operand is omitted by
sgpr_uses. Joining both selected operands, treating the immediate as data, appears to address this case. The test-only fixture added 11 lines; no production change or commit was made.Commands:
cargo test --offline --locked -p xcl --lib loads_from_s_getpc_read_the_code_and_the_others_memory -- --nocapture --test-threads=1andcargo test --offline --locked -p xcl --lib inline_zero_select_makes_code_load_conditional -- --nocapture --test-threads=1, in an isolated target. Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC. CPU-only synthetic classification; no GPU or title run. AI-assisted: Codex (GPT-6.2 Sol) created and ran the local regression and drafted this report.@MacieGx on GitHub · 2026-11-26 03:04 UTC · original
@thehollowedone thanks, a real hole: with one window a mixed load could take ordinary memory at the table's low offset for the table. Fixed in
3ce7f30: a program with a mixed load now tags its code pointer with0xC0DEin the high dword in every window mode, and the select tests the raw high dword. Programs whose loads are only from the table or only from memory keep high dword 0, which is what the Linux driver needed. Your variant is now two regression tests, one per backend, next to the existing ones. The full suite and a new regression run are in the description.@upipibi on GitHub · 2026-11-26 04:00 UTC · original
NVIDIA test report for
3ce7f30: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4(xaudio2 hangs on this machine, also onmain):08db802, same command: 1295 passed, 0 failed, 27 ignored (the difference is this PR's 5 new tests).cargo test -p xcl --lib constant_data_after_the_program -- --test-threads=1 --nocapture, 3 runs: 4 passed, 0 failed, 0 ignored each, 0 SKIPPED (HLSL and direct DXIL, both fixture variants).Lib tests only; no title run.
AI-assisted (Claude Code, Claude Opus 5.5).
@LocranKing on GitHub · 2026-11-26 04:48 UTC · original
Independent NVIDIA test report on exact head
3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c(clean detached checkout, no local changes).Tested
32.0.16.2140/ 621.40), AMD Ryzen 5 5500, 32 GB RAM, Windows 11 Home (build 26300), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK10.0.26100.0.cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 1434 passed, 0 failed, 47 ignored (xcl --lib: 1309 passed, 0 failed, 27 ignored).SKIPPEDGPU tests on this adapter: 21 wave64-only (no wave64), 3 wave32 per-lane f16/f32 semantics, 1no heap windows, 1 no D3D12 debug layer (0x887A002D), 1 cannot disable driver cache without Developer Mode (0x887A002D).Regression run
scripts/smoke.ps1 -Seconds 60, release builds oforigin/main(b49be18) and this PR's head (3ce7f30):main:
PR:
Not tested
XCL_SAMPLE_*tests; the 60 s smoke run covers boot/intro/menus and does not enter the 3D world.AI use
smoke.ps1commands on this machine and drafted this report from the captured outputs.@futurepro62 on GitHub · 2026-11-26 05:38 UTC · original
NVIDIA and AMD full-suite run, to go with the reports above by LocranKing, upipibi, since none of them covers AMD. Tested exact head
3ce7f30f(on its base08db802).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: 1422 passed, 0 failed, 45 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.gpu_direct_loads_read_the_constant_data_after_the_program,gpu_direct_loads_read_the_constant_data_after_the_program_not_the_memory_at_its_offset,loads_from_s_getpc_read_the_code_and_the_others_memory,gpu_loads_read_the_constant_data_after_the_program,gpu_loads_read_the_constant_data_after_the_program_not_the_memory_at_its_offset.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1433 passed, 0 failed, 47 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
@bmjask on GitHub · 2026-11-25 21:11 UTC · original · reviewed
No concrete source-level defect found. Post-program rodata recognition and CODE_ADDRESS_HI layout gating are correct across HLSL/Direct-DXIL; current CI/smoke and direct GPU coverage are strong. Residual gaps: direct geometry/legacy GS/per-lane intentionally remain unsupported, no byte/short/MUBUF coverage, and add a multi-program FSSM case to ensure one program cannot alias later program rodata. AMD/Intel validation would help. I found no blocker.
@Prime1997 on GitHub · 2026-11-26 12:28 UTC · original · reviewed
Needs changes — keep the useful work. Checked head
3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c.The conditional-source classification still loses the non-register alternative when a program-data pointer is selected against an inline constant such as zero. SDWA also needs the actual scalar/vector selected source, including scalar constants and NULL. The local repair preserves those alternatives and includes
code_loads.rsin the translator cache identity, so an older misclassification is not retained through cached output.Local validation: head plus an uncommitted repair and regression fixtures: 7 passed, 0 failed, 0 ignored, 0 skipped. These are CPU checks of the local repair, not a claim that the unmodified PR passed them. Separate negative-control checks produced 3 passes and 4 expected failures.
Build command:
cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated target>(only the private absolute target path is replaced here). Each selected test executable was then run separately as<test-exe> <exact-name> --exact --test-threads=1 --nocapture.Selected exact tests
gpu::recomp::code_loads::tests::scalar_selects_include_constant_addressesgpu::recomp::code_loads::tests::vector_select_includes_inline_zero_addressgpu::recomp::code_loads::tests::selects_keep_definite_code_and_data_loadsgpu::recomp::code_loads::tests::loads_from_s_getpc_read_the_code_and_the_others_memorygpu::recomp::code_loads::tests::sdwa_selects_include_scalar_constant_addressesgpu::recomp::code_loads::tests::sdwa_vector_register_numbers_are_not_constantsgpu::recomp::code_loads::tests::sdwa_selects_track_scalar_register_addressesLatest-main source comparison:
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7; full-head merge-tree result: clean. This is a source compatibility check, not a tested integration build. Local repair patch SHA-256:a6df4718f105df9db45a3cd904fc9211c022511c81189554e9a39ccd49b5b839.Windows 11 Pro build 26200, i5-10400, 32 GiB RAM, Rust 1.100.0 MSVC debug tests. RTX 3060 Ti / driver 32.0.16.1714 is present but was not exercised. No full-suite, GPU or title result is claimed; installed builds and game data were untouched.
AI use: Codex (GPT-6) reviewed the source, prepared the local repair/fixtures, ran the checks and drafted this report.
Optional temporary Discord for coordinating this contributor work, helping test and comparing results.
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.