cpp-migration: fix compile_lds_request.py's call to gfx2hlsl.load_compute_request #2944
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#2944
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@SimSalabimse on GitHub · 2026-11-26 22:33 UTC · original
Target branch
cpp-migration, ate97c5c7c. Part of #2935 (Helper scripts).Gap.
tools/startup/compile_lds_request.pycannot run:main()callsgfx.load_compute_request(str(request), key, pipeline_type=partial(ComputePipeline, feedback=(('table', param), off)))attools/startup/compile_lds_request.py:168-169, butload_compute_requestis defined asload_compute_request(out_dir, key, refusals=None)attools/startup/gfx2hlsl.py:10986and always returns the baseComputePipeline(...)at:11008. The script's ownComputePipelinesubclass (compile_lds_request.py:135-141, which needs thefeedback=argument) is therefore never built. Reproduced one97c5c7cwith Python 3.13:No test reaches
main():tests/native_lds_control_flow_check.pyonly importsComputeStage.Proposed fix. Give
gfx2hlsl.load_compute_requestan optionalpipeline_type=ComputePipelinekeyword and buildpipeline_type(code, parts['.root'], rsrc2, group, refusals=refusals). The default keeps every existing caller unchanged (gfx2hlsl.py:11015,:11042). Add a check that runscompile_lds_request.main()end to end.Verification.
native_lds_request_cli(registered in atests/cmake/fragment). It writes a small synthetic compute request, using the existingwrite_requesthelper intests/native_compute_clear_check.pyif it fits, and runsmain()with a fake compiler. It asserts thatreplay.jsonand the manifest are written, that the HLSL carries[WaveSize(32)]or[WaveSize(64)]as requested, and that the recorded SHA-256 values match the files.e97c5c7cwith theTypeErrorabove, and a request whose key does not match its files is refused withcompute request files do not match the key in their name.ctest --preset dev --no-tests=error -R "^native_lds_(warp|hardware|control_flow)$" -Von WARP and an RTX 4070 Ti, before and after the change.Out of scope. Any change to the LDS lowering, to the feedback-image handling in
ComputeStage, or tocompile_sampled_pixel_request.py(#2935 says its manifest source is from reading only; I have not checked it).AI-Assisted
@SimSalabimse on GitHub · 2026-11-26 22:34 UTC · original
Taking this one. Environment: Windows 11 25H2 (26200), WARP and an NVIDIA GeForce RTX 4070 Ti (driver 32.0.16.2135),
devpreset. The PR will targetcpp-migrationand link this issue.AI-Assisted
@MasterDomino on GitHub · 2026-11-26 22:51 UTC · original
@SimSalabimse this looks already fixed on
cpp-migrationby #2941 (@sydney-0o), merged asa990f323about an hour ago. Worth checking before you start:gfx2hlsl.load_compute_requestnow takes*, pipeline_type=ComputePipelineand buildspipeline_type(code, parts['.root'], rsrc2, group, refusals=refusals). The default leaves every existing caller unchanged.compile_lds_request.main()gets an end-to-end check,native_lds_request(tests/native_lds_request_check.py, registered intests/cmake/native_lds_request.cmake). It compiles a source-built request, inspects the bundle and refuses a tampered request.Checked here on the merged tip:
native_lds_requestpasses, and it fails with thegfx2hlsl.pyandcompile_lds_request.pyfrom before #2941. If that covers it, this can be closed; if you see something #2941 missed, please add the detail here.AI-assisted.
@SimSalabimse on GitHub · 2026-11-26 22:59 UTC · original
This is fixed on
cpp-migrationby #2941, which givesload_compute_requesta keyword-onlypipeline_type=ComputePipelineargument. I'm dropping my claim and won't open a PR for it.As a check, I ran a GPU-free test of
compile_lds_request.main()onea07313b, with a stand-in compiler and a synthetic request. It exited 0: a mismatched key is refused, wave 32 and wave 64 each writereplay.json, the manifest and[WaveSize(...)]with matching SHA-256 values, and the LDS subclass gets its feedback. Closing as fixed.AI-Assisted