Repository navigation
Conversation
039a363 to
2304774
Compare
|
Tested Independent debug verification on clean
Both 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.
The two workspace failures had identical assertions on both PCs: 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:
|
|
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
Measured
Not tested / not established
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. |
2304774 to
46b0298
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
The new test's own assertion fails — UAV stripping keeps the wrong format. Needs a fix before merge. — Devin |
46b0298 to
980eb78
Compare
980eb78 to
b7209c2
Compare
|
@DavidM1911 |
bmjask
left a comment
There was a problem hiding this comment.
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.
|
Tested
Not tested
AI use
|
|
On Linux + NVIDIA (vkd3d-proton), the driver crashes in Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Linux 6.17, Wine 11.22, vkd3d-proton master What happens:
Edit, later the same evening: the trigger is the code-address window logic. With
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 ( 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. |
|
@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 (
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 AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Opus 5.5 subagent wrote the change and ran the tests). |
|
@MacieGx v2 ( Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Wine 11.22 + vkd3d-proton master
Also seen, for completeness:
AI use: Claude Code (Claude Opus 5.5) made the builds and runs and wrote this comment. |
|
AMD Windows, translation size and driver time for #2229 on an RX 9070 XT: the current head Setup: RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 7700, 32 GB RAM, Windows 11, release. This head and its base
The 284-byte program's driver times overlap between the two builds, within this machine's noise. AI use: Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this; I posted it. |
3ce7f30 to
98a629a
Compare
|
RTX 5080 / Proton Experimental / NVIDIA 620.73.04, Series X profile. I checked a backport of With direct DXIL, four heap windows and split wave64, the ACES program changes from 125,652 to 126,348 bytes. A negative control without the PC-relative load stays byte-identical at 159,688 bytes. All four constant-data GPU tests (HLSL and direct DXIL, including the same-offset cases) ran and passed under Proton. The traces establish pipeline creation; the LUT contents and the effect on the movement-tutorial image still need measurement. Test preparation and analysis assisted by OpenAI Codex (gpt-6.2-astra). In-title follow-up: I kept the original executable, save profile, runtime settings and 1,207 of 1,208 starting cache entries. The only changed entry contained the corrected ACES translation. A file-access monitor saw XCL read it. The native driver created the 126,348-byte pipeline at +129.7 s (919 ms, no driver blob supplied). An isolated cold pipeline creation with the same executable also succeeded. The title displayed the Art Production credit at 6:58; the host memory guard ended the run at 7:04, before the tutorial. Pipeline creation can happen during preload. Dispatch at the tutorial, LUT output and an effect on the 3D scene remain unmeasured. |
|
Current head still misclassifies NULL-selected addresses, with wrong GPU readbacks. Reproduced on exact Minimal scalar case: after The selected pointer is NULL, so the load should read memory at 0. With memory words Other paired cases on the same head:
For all five NULL variants, captured Tested
Inherited Not tested Latest main AI use OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, wrote the added fixture/captures, ran comparisons, independently verified encoded operands, load semantics, sentinels, memory, wave metadata and source/executable provenance, and drafted this report. Publication authorized by the account owner. |
…e program Console programs keep constant tables after s_endpgm and read them PC-relative (s_getpc_b64 + s_load_dword* / global_load_dword*). The translation gave s_getpc_b64 the program offset with high dword 0, so in a title these loads read memory window 0 at a low offset: zeros. 676 of the 26503 shader records of a retail title use this, among them all postfx_aces LUT bakes, whose 64-cube output LUT came out as one constant texel, so the presented image was flat. The data blocks after the program (xbox::Fssm::rodata, the new Options::rodata) now go with the translation: - HLSL: emit.rs embeds them as `static const uint xcl_rodata[]`, and s_load and FLAT / GLOBAL dword loads whose address may be a code address take the dwords at that address inside a block from the table (xcl_cload* / xcl_gload*). - Direct DXIL: the same, as an internal constant array of the module (Lw::rodata_loads in lower_window.rs); s_buffer_load through a V# built from s_getpc_b64 reads it too. kernel::translate_entry_rodata carries the data. The per-lane form (XCL_PER_LANE) has no table and leaves such programs to the per-instruction form. TRANSLATOR_VERSION 9 -> 10. - pso.rs passes the data on the compute, VS / PS and mesh paths (HLSL and direct), and `xcl shaders` (precompile, direct sweep) does too. Loads are sorted at translation by whether their address comes from s_getpc_b64, by a forward dataflow over the CFG (gpu/recomp/code_loads.rs: s_getpc_b64 and offsets added to it give a code address, merges join, loads give data). A load whose address never comes from it stays a plain memory load with no table test; one whose address comes from it on every path reads only the table (xcl_cload*, 0 outside the blocks, no memory access); a mixed one reads the memory and selects the table's dwords, with no branch, when the raw high dword is CODE_ADDRESS_HI (0xC0DE, above any user-space address). s_getpc_b64 gives that high dword in a program with a mixed load, and 0 otherwise. Why: the first form tested the window index in a branch around every such load, and the NVIDIA Linux driver (vkd3d-proton) crashed compiling it (pr1sm-dev on xcl-dev#2229). The tag is given with one memory window too: memory loads there take the low dword only, and without it the title's memory at the table's low offset was read as the table (thehollowedone on xcl-dev#2229). The dataflow follows every source of an instruction: a constant source of a select (inline or literal) is data, so a select between a code address and a constant is decided at run time, not read from the table only; an SDWA source with S0 / S1 set is the SGPR it names, which rdna2::sgpr_uses leaves out and rdna2::vgpr_uses takes for a VGPR. code_loads.rs and the recompiler's cfg.rs it runs on are in build.rs's TRANSLATOR_SOURCES, so a change to them gives the translated cache another identity for both paths. Not covered: byte / short global loads, MUBUF buffer_load, the legacy GS path and the per-lane form still read memory at such addresses. Port to nvidia-dev: it replaces nvidia-dev's earlier copy of this change (41f1a85) with this head. In the conflicts this head's side, keeping nvidia-dev's own lines (Em::loop_ids, the io slots IO_LOOP_BUDGET to IO_THREAD_LIMIT, writes_lds and the stage flag of constant_samplers); TRANSLATOR_VERSION 12 -> 13; the earlier copy's rodata() and its direct-DXIL test, left outside the conflicts, removed as duplicates. The earlier copy is the form pr1sm-dev saw crash NVIDIA's Linux driver (code pointers always tagged); this head tags them only in programs with a mixed load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 98a629a)
|
I tested #2229 on plain Tested. I cherry-picked
The picture numbers are the per-channel mean and the luma spread over each whole frame dump. In the #2229 run, every world frame from 1940 to 2660 is that same near-white colour. So on plain main + #2229, the frame stays flat; it is just near-white now instead of dark grey. That fits your note that the world result needed the other work on your branch. I didn't look at the G-buffer or at the LUT texture itself. The slight cyan tint might be the 3-D LUT page sharing that #2753 is about. #2753 is not in this build, and I haven't tested it. On this machine, Smoke blocks, test suite and setup
Not tested: AMD and other NVIDIA GPUs or drivers; the HLSL path (only AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, measured the frames and drafted this. I reviewed it before posting. |
|
Retail test on NVIDIA: #2229 gives the title a real picture instead of the flat grey one, but on this setup it also makes the title hang shortly after the world loads. Without #2229, the same build and environment keep running. Setup
Runs
First timeout in run 102: So the hang follows #2229 with alias on and with alias off, and #2753 isn't needed to reproduce it. That matches the report on #1833 that colour was only reached in runs that later crashed. My guess, which I haven't checked, is that one of the 676 programs that now get real constant data takes a much longer or never-ending path on the GPU (a loop bound or count read from the table). I'm happy to run a build with extra logging, or to bisect by shader hash if there's a switch to limit |
|
Correction to my guess above: it's probably not a runaway shader. None of the three runs had a device removal or TDR. Windows would reset the GPU if a single dispatch ran past the ~2 s TDR limit, so the GPU isn't stuck inside one program. What the log does show at the first timeout (run 102) is a cross-queue wait that never completes:
So it looks more like a chain of queue waits that never resolves. My guess is that #2229 changes what some programs compute, and with that what the title submits or waits on. In run 103 (alias off), the title stops submitting entirely at ~193 s, with no timeouts. That would fit the title's CPU side waiting on a result that doesn't arrive. I haven't verified any of this; it's what the logs point to. |
|
Bisect progress on the #2229 hang (NVIDIA, retail, I added a local switch that limits which of the 669 records with Results (720 s per run if clean):
|
main gained 345 commits since 753e8b1, most of them bmjask's stack (xcl-dev#2959), plus xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086 from this branch. Conflicts, per PR: - xcl-dev#2404 + xcl-dev#2633 (split chained ExecuteIndirect): main's xcl-dev#2959 took both over (ed98461, a05fbc4, 8626d5b: IndirectBuild/IndirectChain on a CBV root, one-command slicer, separate cache namespace). Main's side kept in dispatch_chain.rs, pso.rs (slicer, command signature, chain root), bind.rs (ExecuteIndirect path), device_x.rs (signature traits), pso_async.rs (no background whole build, so no build_waited_on), real.rs (ComputeBuild, driver_cache names) and shaders.rs (blob names). Dropped with them: slab_count, record_slicer, abi_signature_id names, the direct root-CBV constant blocks, list_x::predicated, the split.rs/runner.rs ExecuteIndirect test and the list_x chain-scratch test. Not in main: xcl-dev#2404 ran the pieces before any whole form was built; main runs the whole form (built on the title's thread) until the indirect set is ready. - xcl-dev#2707 (allocator reclaim): main has it (31930d8, 057f463, 8e7b566). alloc_pool.rs is main's, with xcl-dev#867's changes on top; bind.rs takes main's native_backing; xcl-dev#2707's tests and bind::push_uma_for_test go. - xcl-dev#867 + xcl-dev#2477 (Wine vtables and fences), adapted to main's new code: real.rs keeps the in-place patching, UnadoptGuard and FenceProxy beside main's native_queue_* helpers; guards in cl_reset, bind_pipeline_exact, clear_pipeline_exact, reset_pc_allocator, the title ExecuteCommandLists closure and native_queue_execute; Signal/Wait unwrap the title's fence (also in native_queue_signal/wait); list_x guards in reset_reserved_segment and KickoffX's submit closures; create_raw_fence for main's new internal fences in alloc_pool.rs (SubmissionGate), title_textures.rs, present.rs, vram.rs, sparse.rs, cpu_writes.rs; tests as xcl-dev#2477 had them; runner.rs is main's plus submit_list. - xcl-dev#1803 (heap addresses): kept, carried into main's PreparedSplit and PreparedAbiState (prepared_abi_io takes the heaps). - xcl-dev#1368 (NodeMask 0): kept in compute_container, before main's per-node blob names, so names and pipeline use node 0. - xcl-dev#1860, xcl-dev#2082 (cfg.rs, module/opt.rs): cfg.rs is 1567f72's version (xcl-dev#1860 on main's Succs); opt.rs is that plus xcl-dev#2082's arm and test. - xcl-dev#2229 (rodata): kept through main's kernel.rs entry points; translate_entry_rodata loses wave32_only as main dropped per-GPU tables (3cde0cc); pso.rs and coverage.rs call it with main's options (no_remap, split for graphics); recomp Options keeps rodata and no_remap. - xcl-dev#1975: kept in emit.rs and lower_valu.rs; its mesh barrier guard and its test dropped, main's wider guard (2ca9127) covers it; the now-unused lower::has_non_uniform_barrier goes. - xcl-dev#2070 (64 MB stacks): pso_async::WORKER_STACK on main's worker, helper and preload threads; shaders.rs's piece threads on worker_thread. - xcl-dev#2551 (whole forms prebuilt): split_whole_roots(false) is DirectChain, so the precompile builds every split program's whole form; main built it only for programs an earlier run used through ExecuteIndirect. - xcl-dev#688 (dxc.rs imports), xcl-dev#2762 (host.rs log line), xcl-dev#3090 (list_x tests), arch/window-title-commit (present.rs with_commit on main's compiling_text), README.md: both sides. - list_x.rs: main dropped title_textures::list_reset; main's side. - sparse.rs, vram.rs: main's quarantine_tiles_for and per-device retire state, with create_raw_fence. - xcl-dev#3090, xcl-dev#3092 tests: runner::device and Uma::block_len added from nvidia-dev (5 and 12 lines) so the lib tests compile. - xcl-dev#751: its commit is already in main (b84e037, via xcl-dev#2844); it leaves the README table with xcl-dev#2404, xcl-dev#2633, xcl-dev#2707, xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
What the culprit record's constant table controls (from the HLSL export of The table: 6 dwords at code offset 8916, What the program does with it:
Consequences:
So the hang doesn't look like #2229 reading wrong data. It looks like #2229 making the title take paths it never took on main (grass drawn into the extra views via indirect draws), and something on that path not working in XCL on NVIDIA yet. The other culprit(s) beyond the 8 InstanceCulling records may follow the same pattern; I haven't analysed them. I'm now testing VIctory-NVIDIA-style loop caps and table clamping as a control, though from the above I don't expect them to change this record's behaviour. |
main has merged nvidia-dev (xcl-dev#3203): its two-pass mesh, sparse and upload paths now submit through real::native_queue_execute / _signal / _wait. Those already carry xcl-dev#867's UnadoptGuard and unwrap_fence; the conflicts and the main-only submit paths were resolved as follows. Taken from main, the stack's version dropped (main does the same): - recomp/dxc.rs (3): xcl-dev#688's private DXC heaps; main's form (3842807) falls back on any failure and never destroys a heap. - device_x.rs (10): xcl-dev#3091 (cherry-pick 511a297); main's 7e24237 keeps interned shader copies for base pipelines. xcl-dev#3091's tests and its real.rs test counter (GRAPHICS_FALLBACK_ATTEMPTS) and README line go; xcl-dev#2753's console_bytes is re-applied on main's file. - bind.rs (16): the stack's only change there was xcl-dev#1803, merged in main. main's file, plus the xcl-dev#2816 feedback-copy UnadoptGuard in poll_two_pass_feedback (ed887d2, from linux/stack-nvidia-dev). - pso.rs: main has daae033 (multidimensional groups take direct DXIL, xcl-dev#3189's change), so the stack-only commit is in main; translate calls take main's translate_compute_rodata / translate_entry_rodata_rt32. - list_x.rs tests: xcl-dev#3090's barrier tests were in twice (cherry-pick and main's merge); the cherry-picked copy goes. - runner.rs device(), xbox.rs Fssm::rodata: added on both sides; one copy. - README.md: the precompile-wrapper paragraph was added on both sides; one copy. Both kept: - build.rs (2): TRANSLATION_GLUE_REVISION "pso-glue-v5-linux-multidimensional- direct" (main's v5 + the stack suffix); translator sources keep xcl-dev#2229's cfg.rs and code_loads.rs, drop dxc.rs as main does. - dxil/kernel.rs (6): TRANSLATOR_VERSION 13 (main 12; the stack's xcl-dev#2229 head output differs, as on linux/stack-nvidia-dev); main's rt32 entry points with xcl-dev#2229's code_loads. - dxil/lower.rs (4), lower_mem.rs (3), lower_window.rs (1), recomp/emit.rs (11), recomp/mod.rs (3), recomp/tests.rs (1), core_tests.rs: main has an earlier copy of xcl-dev#2229 (41f1a85); xcl-dev#2229's head (code_loads, xcl_cload / xcl_gload(hi, a)) is kept over it, as on linux/stack-nvidia-dev; main's loop_ids, IO slots, ps_mask_live_scc and rt32 mask kept beside it, and main's duplicate core_tests copy of the rodata test goes. lower_mem.rs keeps the stack's scratch_ptr insert-before-terminator line. - real.rs (6): the class scan keeps `own` with main's release_through_its_own_vtable; xcl-dev#2477's in-place patch after main's two-pass defer hooks; q_signal_pc / q_wait_pc beside main's page mappings; the title ExecuteCommandLists keeps xcl-dev#867's list guards inside main's watch::in_driver scope; test modules of both. - list_x.rs (1): xcl-dev#867's allocator / PSO guards with main's `on = pc_alloc`. - sparse.rs (1): main's new_state, with xcl-dev#867's raw fences for the sparse and readback fences and the async readback fence pairs (as on linux/stack-nvidia-dev); pc_execute (main's texture_upload submit path) unadopts its list for the submit. - title_textures.rs (1): main's early fence creation, as a raw fence. - dstorage.rs (4): xcl-dev#2864's unpack cache on main's Cow source and stage buffers. - xg.rs (2): main's copy_args (adccb7d) covers xcl-dev#684's argument fix; xcl-dev#684's destination guard kept. - present.rs (1), gpu_compute_e2e.rs (1), README.md (2): tests and text of both. linux/README.md: main line updated; xcl-dev#1599, xcl-dev#2082, xcl-dev#1803, xcl-dev#3090, xcl-dev#688, xcl-dev#3091 and the stack-only multidimensional row leave the table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lower.rs s_getpc_b64: main's compact-block low half with the stack's (xcl-dev#2229) code_loads high half; lower_wide.rs v_movrel*: main's (both masked m0 to 8 bits). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@MacieGx this conflicts with AI use: Claude Code (Claude Fable 5.2) made the trial merge and wrote this. |
|
An earlier form of this change is already on main: commit 41f1a85 (same title, cherry-picked from your branch and merged with the world-main merge fc4481d), with the branching AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
6232c2a's sub-dword rodata loads, in xcl-dev#2229's per-load design: the sub-dword FLAT/GLOBAL load asks code_load like the dword loads and reads xcl_cload_u32(a) / xcl_gload_u32(hi, a) (each dword looked up on its own), else ld_raw. Direct DXIL's ld_raw_u32_guarded takes the load's pc and high dword for rodata_loads. flat_code_hi holds the high dword both FLAT paths pass. The test expects xcl_cload_u32, and 0 for the code bytes beside the block in every window mode: a load through s_getpc_b64 reads no memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Console 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
main8b957bec(now98a629a, no change to the code besides the rebase).cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4on98a629a: 1449 passed, 4 failed (the samefuzz_validate_and_gpu_0..3), 47 ignored. The counts below are from3ce7f30, before the rebase.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: pending for the rebased head. Since #2624 a PR that changes the translator first prepares all ~26,500 shaders with a cold cache, about 70 min on this machine before
smoke.ps1sees the title start; I'll add the block after that run. Anyone with the title is welcome to runscripts/smoke.ps1on this head and post the block.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