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
… constant tables after the program; PR xcl-dev#1428: dispatches past 65 535 groups folded) The direct translator's TRANSLATOR_VERSION is 11 here (the fork was at 10 already, upstream's commit moves 9 to 10). The group limit of a folded dispatch takes io slot 114; 113 is the fork's loop budget. The ExecuteIndirect clamp runs on direct and compute lists only (a bundle cannot hold its barriers). Software adapter, whole library suite on the branch: 1393 passed, 0 failed, 24 ignored; 56 tests that open the hardware GPU not run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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 go through xcl_gload*, which take the dwords at a code address inside a block from the table. With several memory windows s_getpc_b64's high dword is CODE_ADDRESS_HI (0xC0DE, above any user-space address), so a code address is told from the title's memory at the same low dword; with one window it is the program's offset as before. - Direct DXIL: the same, as an internal constant array of the module (Lw::rodata_loads in lower_window.rs); with windows s_buffer_load 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. Not covered: byte / short global loads, MUBUF buffer_load, the legacy GS path and the per-lane form still read memory at such addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
|
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/mod.rs,emit.rs: newOptions::rodata. The HLSL embeds the blocks asstatic const uint xcl_rodata[];s_loadand FLAT / GLOBAL dword loads take dwords at a code address inside a block from the table. With several memory windowss_getpc_b64's high dword isCODE_ADDRESS_HI(0xC0DE, above any user-space address), so a code address is not taken for the title's memory at the same low dword; with one window it stays the program's offset as before.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 windowss_buffer_loadreads 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.Tested
stable-x86_64-pc-windows-msvc, release. Onb7209c2(this PR, rebased ontomain6d12f58; both tests sit in the middle ofrecomp/tests.rsanddxil/core_tests.rs, so tests other PRs append at the end do not conflict with them).cargo test --release -p xcl --lib constant_data_after_the_programonb7209c2: 2 passed, 0 failed (both ran on the GPU, no SKIPPED).cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4onb7209c2: 1421 passed, 4 failed, 46 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 run 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 this change applied (the same commits before the port tomain):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> --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:
The first smoke run of this head, right after the rebase, showed 876 frames: the translator version changes with this PR, so that run translated and compiled the title's shaders from a cold cache. The block above is the next run of the same build (the
mainblock was also taken with a warm cache).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
mainand ran the whole suite on this commit and onmain.🤖 Generated with Claude Code