shader: restore compilation of LDS replay requests #2941
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2941"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by sydney-0o on 2026-11-26T22:31:49Z.
On
cpp-migrationate97c5c7c, the LDS replay CLI stops before compiling a valid slot 67 request withTypeError: load_compute_request() got an unexpected keyword argument 'pipeline_type'. The loader now constructs the requested pipeline after validating the input. Its compute stage can emit the native LDS and VOP2 pragmas and share VGPR write tracking with the standard stage. Returning LDS atomics validate their input operands before recording a write to the destination, including when address and destination alias.The new CLI regression test compiles the source-built case F shader, inspects the bundle and checks that tampering with the request cannot publish another bundle. The control-flow test also exercises an atomic overwriting a partial d16 value and rejects an alias that reads undefined address bits.
Tested locally on Windows with MSVC and Windows SDK 10.0.26100 DXC at
71d468cf.3 passed, 0 skipped, 0 failed. The CLI test compiles the shader and checks its bundle. It does not dispatch it on a GPU.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T22:49:57Z.
Review: APPROVED
Review of head
71d468cf, tested merged ontocpp-migration1cd48bd0. It merges cleanly. Approving and merging.Code:
compile_lds_request.pynow goes throughload_compute_request(..., pipeline_type=...).Stage.ualready walks every register of av[a:b]range.gfx2hlsl.py,set_vis split intorecord_v_writeplusset_vwith the same steps.ComputePipeline.stage_typeand thepipeline_typekeyword default to the existing classes, so the runtime's translation path is unchanged.Runs (Windows 11 26300.9974, AMD Radeon RX 9070 XT, release, Windows SDK 10.0.26100 DXC):
ctest --preset release --no-tests=error -R '^(native_lds_(request|control_flow|warp|hardware)|startup_compute_request_offline)$': 5/5 passed.tests/startup_gfx2hlsl_*_check.pyrun bare: 129 passed. The two draw checks (export_null_draw,mul24_align_draw) need their CTest arguments and fail the same way on every branch when run bare.compile_lds_request.pyandgfx2hlsl.pyfrom1cd48bd0and ran the newnative_lds_requestcommand, and it fails (the CLI exits non-zero). Restoring the PR files makes it pass.gfx2hlsl.py --pendingandX2W_FXC=(translation only), with the base and with this PR. The outcome is identical for all 4,100 records, 321okon both.The new test compiles and inspects the bundle but does not dispatch it, as the description says.
native_lds_hardwarestill dispatches the DXC path.AI-assisted; the commands above were run locally.