Repository navigation
Conversation
|
Tested 05fe854 on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass
CPU/CLI-only change; no GPU suite run. AI-assisted (OpenCode). |
slopradish
left a comment
There was a problem hiding this comment.
CPU-only review and local test run.
Checked out pull/3633/head in an isolated worktree and ran pytest -q tests/test_rdna2spirv_cli.py: 28 passed, 22 subtests passed.
The guard is placed correctly: after --merge (which is exempt because it writes in place) and before os.makedirs, so a refused run leaves no empty output folder. Using same_report_path for the equality case covers .., links and Windows case, and path_key for the containment test covers case-insensitive macOS volumes. The added test checks the negative cases and that a distinct output folder still translates, so the guard is not over-broad.
One observation, not a blocker: _out_inside_input computes folder = os.path.dirname(os.path.abspath(src)) for a single file, so an --out equal to the file's parent is refused — that is the documented intent ("a single file's folder is its input folder"), but worth keeping in the docstring, which it already is.
No GPU or game files used.
|
Tested
AI-assisted (Claude Code). Synthetic test shaders only, no game files. |
Translating with --out equal to the input disasm folder (or a folder inside it) wrote .spvasm/.spv/index.json among the .s inputs and exited 0. Resolve both paths and refuse with one ERROR line and exit 2 before mkdir or any output is written. The --merge path is exempt: it does not read src, and merging shard parts in place is how a shard run finishes. Tests: out==input, out inside input, and a distinct out control.
|
Rebased onto current main (4c52ce2), clean. ests/test_rdna2spirv_cli.py 28 OK/1 skipped, est_rdna2spirv_merge.py 23 OK, est_tool_startup.py 2 OK. New head $new. |
05fe854 to
335f01a
Compare
|
Tested 335f01a merged onto main aa2988c on an RTX 5090 (driver 616.92), Windows 11, Vulkan SDK 1.4.363. The GPU test programs were built from the same tree:
AI-assisted (Claude Code). |
|
Already applied on main: |
What
tools/rdna2spirv.pywrote translations into the input folder when--outresolved to it (or a folder inside it), mixing generated files with the.sinputs and polluting a rerun.The CLI now refuses that before
makedirs, the index or any module is written:--outequal to the input folder/file's folder, or inside it, prints oneERROR:line and exits 2.report_paths.same_report_path/path_keyhelpers (realpath,normcase,samefile, macOS case folding).--mergeis exempt: it does not readsrc, and merging shard outputs in place is the documented workflow.Red before / green after
Red (tool stashed, new tests): 2 failures — return code 0 and translations written into
disasm/; the distinct-output control passed.Green: 3/3 new cases pass.
tests/test_rdna2spirv_cli.py-> 28 OK, 1 skipped (no Windows symlink privilege);tests/test_rdna2spirv_merge.py-> 23 OK;tests/test_tool_startup.py-> 2 OK.tests/test_report_paths.py-> 14 OK, 1 skipped, 1 pre-existing Windows-onlyMacVolumeTestsfailure also present on the untouched base.compileallandgit diff --checkclean.No game data. AI-assisted.