xshader: add --capabilities, --stride-report, and --stride-hints CLI options #547
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/547"
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 brcly/TuxBox. Originally posted by glovepost on 2026-11-29T21:21:41Z.
Summary
Split from #522 per reviewer feedback. Adds
--capabilities,--stride-report, and--stride-hintstotuxbox-xshader:tools/shader-compiler/src/main.rs,tests/main.rs): Adds--capabilitiesusing standard-library JSON output (no new crate dependencies) reporting the binary's supported CLI flags.tools/shader-compiler/src/hlsl.rs,hlsl/emitter/resources.rs,main.rs,tests/hlsl/raw_width.rs): Adds--stride-reportand--stride-hints(StrideGuess,set_stride_hints,take_stride_report) wired intosbuf_wordsso external callers can inspect guessed structured-buffer strides or supply real byte strides and observe any refused hints. Default translation behavior when these flags are absent is unchanged.Prepared with AI assistance; all changes were reviewed and verified with host checks (
tuxbox.py check --no-gpu). ProjectScarlett itself was not run with this split branch.Tested
Run the checks relevant to this change.
Pure CLI option plumbing (
--capabilities,--stride-report,--stride-hints) with no default HLSL output changes, so no GPU or Lanes scenario is affected; behavior is covered directly bytools/shader-compiler/src/tests/main.rsandtools/shader-compiler/src/tests/hlsl/raw_width.rs. ProjectScarlett was not run with this change.Commands run and their results:
Checks
CI runs the Python unit tests, the shader compiler, DXBC, and XG layout tests, and a Windows typecheck of
tuxbox-d3d12.