Repository navigation
Linux tests: run the D3D12 and launcher tests under Wine with a Proton install - #52
Conversation
clean/linux/run_wine_tests.py runs three tests in a Wine prefix set up the way Proton sets up a game's (clean/linux/wine_env.py: vkd3d-proton d3d12 / d3d12core, DXVK dxgi, Wine's vkd3d libraries for its builtin d3dcompiler_47), with an optional self-built vkd3d-proton (--vkd3d): - interop: the existing run-tests.sh (31 tests); - rr-leak: the RR test host's tagloop job (pull request phantoslayer21#11) against a given wronggpu_runtime.dll with a synthetic RR model, with the 256 MiB limit of the Windows end-to-end test; - ags-layout: wg_ags.hlsli's WMMA and conversion helpers on fixed register values against a CPU reference of the gfx12 semantics (new: ags_layout.hlsl, ags_layout_host.cpp). run-tests.sh: -fms-extensions for clang-based MinGW (the __try in descriptor_publish.h), and WG_WINE to pick Proton's wine over a system wine64. Verified on an RX 9070 XT, RADV, GE-Proton 11-11, with a vkd3d-proton built with dxil-spirv PR #362: interop 31/31, rr-leak +37 MiB (limit 256), ags-layout 7/7. Each test fails on the bug it targets: interop 29/31 with "Unknown modifier globallycoherent" before pull request phantoslayer21#12, rr-leak +2636 MiB with a runtime from before pull request phantoslayer21#11, ags-layout at CreateComputePipelineState on stock vkd3d-proton; its comparison rejects lane-swapped and half-swapped results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
run_wine_tests.py gains a `launcher` test: a WRONGGPU_TESTING MinGW build of clean/installer with the installer suite's generated payload and test map, its four unit-test programs (wg-core-tests, launcher-core-tests, coexist-core-tests, wizard-policy-tests) run in the Proton prefix, the way Linux players run the launcher. Verified with llvm-mingw and GE-Proton 11-11 on main: PASS (73, 230, 186, 18 checks). With one wg-core check broken on purpose, the test reported FAIL (exit 1) naming that check; restored, PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
phantoslayer21
left a comment
There was a problem hiding this comment.
Thanks for this, and for the careful description: the "what each file is based on" section and the note about your own game runs are exactly what the clean-room statement is for.
I read all six files. The scripts are safe to run as far as I can see: no network access, no shell=True, an explicit WINEPREFIX under --work, the Proton install only read, and everything removed or overwritten stays inside --work. The tests decide PASS / FAIL / SKIP the way the README says, the 256 MiB limit is enforced in the host and again in the runner, and the ags-layout expectations are computed on the CPU independently of the shader. The run-tests.sh change does nothing for existing GCC or wine64 users. The code can go in as it is.
What I'd like changed before merging is all in clean/linux/README.md, plus one comment:
- Line 18 says
globallycoherent"failed all 31"; line 59 and the description say 29 of 31. Please make them agree. - The MiB figures. The README has +2,635 and +37, the commit message +2636, the description +2636 / +37.2. The project's rule is that a number in a document names its measurement (CONTRIBUTING.md). Please either drop the figures from the README, or label them as one run of this test on your setup (RX 9070 XT, RADV, GE-Proton 11-11, the vkd3d-proton build) with one consistent value. Line 59 also says "with the 0.6.0 RR runtime"; the description says "a runtime from before #11". Please use whichever is what you ran.
- Lines 61-62 say
launcherfails incoexist-core-testswhen the vkd3d-proton rule incoexist.cppis reverted. That rule isn't onmain(it is #50), and the description records a different check (one brokenwg-corecheck). Please replace the sentence with what was done. - Lines 45-46 say the patched DLLs next to the game exe "make Model M and Ray Reconstruction run". Nothing in this pull request tests that, and it reads as install advice for players. Please take it out here; your Linux guide in #10 is the right place for it until a Proton release has the fix. For the same reason, could the opening lines say the tests check WrongGPU's D3D12 code on that stack, without implying Linux is a supported platform yet?
ags_layout.hlsl:33callswg_ags_call(0x1cu, ...)for the F16 conversion. That opcode isn't inwg_ags.hlsli; it is used by the RR kernels (for exampleclean/rr_f/kernels/rr_in_math.hlsli). Please say in a comment which file of this repository it comes from, so the test's sources are complete.
Optional, your call:
- A bare
wineboot -ican pop up Wine's Mono/Gecko dialog and write menu entries under~/.local/share. Addingmscoree,mshtml=;winemenubuilder.exe=dtoDLL_OVERRIDESavoids both. - If
--work/prefixalready is a Wine prefix, the script reuses it and overwrites itsd3d12/dxgiDLLs. A line in the README, or a marker file the script checks for, would make that explicit. rr-leakwould pass if the stack reported a constantCurrentUsage. Failing when before and after are identical closes that.ags_layout_host.cpp:64takes the default adapter; on a machine with two GPUs it could test the wrong one (it would fail, not falsely pass).- The README's example commit
0bb64c5differs from the5b1089c8you tested with. - A
--workpath with spaces breaks the job file.
On credit: the repository's REUSE rule puts the default copyright line on every file. If you'd like your own copyright line on the files you wrote, add an annotation for clean/linux/** in REUSE.toml in this pull request and I'll take it.
CI is running, and the maintainer-side clean-room scan is in progress; I'll note here when both are done. One push with the README changes and this is ready to merge.
|
The maintainer-side clean-room scan of b81f607 is done: no hits in the contribution, and your clean-room statement and sign-offs are in order. So the README points in my review are all that is left; CI will show on the pull request when it finishes. |
From the review of phantoslayer21#52: - README: the globallycoherent count now agrees (29 of 31, before phantoslayer21#12). The leak figures are named as one run on an RX 9070 XT, RADV, GE-Proton 11-11 and vkd3d-proton 5b1089c8 + dxil-spirv #362: +2636 MiB with a runtime built before phantoslayer21#11, +37.2 MiB with the fix. The launcher red check describes what was run (a wg-core check broken on purpose). The player advice about DLLs next to the game exe is gone, and the opening says the tests don't make Linux a supported platform. The vkd3d-proton commit named is the one tested (5b1089c8). It also says that --work/prefix is reused if it already is a Wine prefix. - ags_layout.hlsl: the FloatConversion opcode 0x1c names its source in this repository (f2h_hw in clean/rr_f/kernels/rr_fast.hlsli). - wine_env.py: mscoree / mshtml off and winemenubuilder disabled, so a new prefix shows no Mono / Gecko dialog and writes no menu entries. - run_wine_tests.py: rr-leak fails when video memory does not change at all (a stack reporting a constant CurrentUsage), and --work with a space is refused (the RR host's job file is split on spaces). Verified on main c793823 + this branch, GE-Proton 11-11 with a fresh --work: interop 31/31, rr-leak +37.2 MiB, ags-layout 7/7, launcher 73/230/186/18 checks. No new entries under ~/.local/share/applications. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
|
Thanks for the careful review. Everything is in
From the optional list:
I left the two-GPU adapter choice in Rerun on c793823 + this branch with a fresh |
The maintainer offered it in the review of phantoslayer21#52. Files under clean/linux now carry both "2026 phantoslayer21" and "2026 j0nsh1n"; every other file is unchanged. Verified with reuse 5.0.2 (the CI's version): reuse lint compliant, and reuse spdx shows both lines on clean/linux files and only the project's line elsewhere. tools/ci/check_line_endings.py: 0 problems. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
|
Thanks for the offer. |
|
Sorry for the wait. Your fixes in 1ac6672 and the REUSE.toml commit came in hours ago and I hadn't come back to them. CI was also held for a maintainer approval because you're a first-time contributor. That's approved now and running on 16c1d17. I'm re-reading it today against my earlier review and will reply here. |
phantoslayer21
left a comment
There was a problem hiding this comment.
All five points from my earlier review are resolved:
- the 29-of-31 count;
- the leak figures, which now name their run;
- the description of the deliberately broken check;
- the player advice is gone, and the Linux-support wording is fixed;
- the
f2h_hwsource comment inags_layout.hlsl.
The REUSE.toml annotation only matches clean/linux/** and leaves every other path as it was.
Two things I found on a second read. Neither blocks this:
run-tests.shends withgrep -qonresult.txt, so the Wine pipeline's exit status is lost. A crash afterALL TESTS PASSEDwould still count as a pass. That line was already on main before your change, so I'll fix it in a separate PR rather than ask you to.- The launcher tests use
GetTempPathW, andwine_env.pydoesn't setTEMP/TMP. In a reused prefix, their temp folders might not sit under--workas the README says. If you want, settingTEMP/TMPinside the work folder in a follow-up would make that claim hold everywhere.
Approving once CI finishes green.
What this changes and why
For #51 (the proposal), which also has the test results in more detail.
Adds a way to run WrongGPU's D3D12 tests on Linux, under Wine with the Direct3D 12 stack of a Proton install (vkd3d-proton, DXVK's dxgi, Wine's vkd3d libraries), which is what a game runs on in Steam on Linux.
clean/linux/run_wine_tests.py --proton <Proton folder>runs four tests and prints PASS, FAIL or SKIP for each:interop: the existingclean/runtime/interop/tests/run-tests.sh(31 tests), compiled against Wine's ownd3dcompiler_47, as a game under Proton meets it. This is the test that showed Model M fails under Proton: the interop spin shader's globallycoherent is rejected by Wine's d3dcompiler_47 #7.rr-leak: the RR test host'stagloopjob from RR runtime: free released input copies while no RR instance exists #11 against a givenwronggpu_runtime.dlland a synthetic RR model, with the 256 MiB limit of the Windows end-to-end test.ags-layout:wg_ags.hlsli's WMMA and conversion helpers on fixed register values, against a CPU reference of the gfx12 register layout. Under Proton the AGS channel is translated by vkd3d-proton's dxil-spirv, so this checks that translation.launcher: the launcher's four unit-test programs (aWRONGGPU_TESTINGMinGW build), run under Wine as Linux players run the launcher.rr-leakandags-layoutneed a vkd3d-proton built with dxil-spirv pull request #362 until a Proton release ships it (--vkd3d <folder>); the README says how.Two commits, each usable alone: the D3D12 runner, then the
launchertest.run-tests.shgets-fms-extensionsfor clang-based MinGW (the__tryindescriptor_publish.h) andWG_WINEto pick Proton's wine over a systemwine64; nothing else outsideclean/linux/changes. Nothing here runs on Windows or in CI.What each new or substantially changed file is based on
clean/linux/run_wine_tests.py,clean/linux/wine_env.py: own design. The prefix setup follows what Proton's own script puts into a game's prefix (the DLL folders of a Proton install) and Wine's documentation ofWINEDLLOVERRIDES.clean/linux/ags_layout.hlsl,clean/linux/ags_layout_host.cpp: own design, on AMD's public RDNA 4 ISA documentation for the WMMA register layout and the repository'swg_ags.hlsli.clean/linux/README.md: own write-up.clean/runtime/interop/tests/run-tests.sh: two small changes, own.How it was tested
On an RX 9070 XT with Mesa RADV, llvm-mingw 20261104 and DXC 1.10.2605 for Linux, on
mainat c793823, with awronggpu_runtime.dllbuilt on Linux from main's source (Model M + RR; the runtime is unchanged since a8500cb). All data is synthetic.CreateComputePipelineStateon stock vkd3d-proton; its comparison rejects lane-swapped and half-swapped results.clean/linux/README.md(+2,635 MiB before the RR runtime: free released input copies while no RR instance exists #11 fix, +37 MiB after) are this test's own output; running it reproduces them.tools/ci/check_line_endings.pypasses. The REUSE lint was not run (not installed here).Outside this PR, and not used to write or check it: I ran Model M and Ray Reconstruction in Cyberpunk 2077 under Proton as a player does, with the model files WrongGPU's launcher converts on my PC from my own copy of the game's upscaler files. None of that data, or anything computed from it, is in this PR or in its tests. I mention it so you can judge it against the clean-room statement.
Checklist
CONTRIBUTING.md
for this and all my contributions (required once, in my first pull request).
Signed-off-by:line (git commit -s; Developer Certificate of Origin 1.1).REUSE.toml.binaries; no paths, user or machine names of my PC.
ags_layout.hlslis a test shader.🤖 Generated with Claude Code