Skip to content

Proposal: run WrongGPU's D3D12 and launcher tests on Linux under Wine with a Proton install #51

Open

Description

@j0nsh1n

Why

Under Proton, WrongGPU meets a different D3D12 stack: vkd3d-proton with dxil-spirv on RADV, DXVK's DXGI, and Wine's d3dcompiler_47. #7 (Wine's shader compiler) and the AGS matrix-instruction translation (dxil-spirv PR #362) only show up there.

A small runner makes those checks repeatable on any Linux machine with an RX 9000 card and a Proton install. That includes your retest request in #7.

What I have (clean/linux/, Python with NumPy plus MinGW-w64; on my fork as test/linux-wine-runner, two commits on main)

clean/linux/run_wine_tests.py --proton <Proton folder> [--vkd3d <self-built vkd3d-proton folder>] [--runtime <wronggpu_runtime.dll>] sets up a Wine prefix the way Proton sets up a game's: vkd3d-proton, DXVK's dxgi and Wine's vkd3d libraries. It then runs four tests, each reporting PASS, FAIL or SKIP:

  • interop: the existing clean/runtime/interop/tests/run-tests.sh, 31 tests, compiled against Wine's own d3dcompiler_47;
  • rr-leak: the RR test host's tagloop job from RR runtime: free released input copies while no RR instance exists #11, 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 (that's what dxil-spirv's translation has to preserve);
  • launcher: the launcher's four unit-test programs, a WRONGGPU_TESTING MinGW build run under Wine.

run-tests.sh needs two small changes: -fms-extensions for clang-based MinGW (the __try in descriptor_publish.h), and a way to pick Proton's wine over a system wine64.

Results on current main (a8500cb), RX 9070 XT, RADV, synthetic data only, with a vkd3d-proton built from vkd3d-proton 5b1089c8 plus #362's three code commits:

Each test fails on what it targets:

Nothing in it runs on Windows or in CI.

If you'd like it in the repository, I can open a PR from that branch.

One more Linux note: tools/ci/run_python_tests.py fails 18 emulator and vector-table modules on Linux, the same on unchanged main. Most come from compiling the HIP kernels with Linux's clang, which lacks the AMD GPU builtins (__builtin_amdgcn_readfirstlane, the "+s" asm constraint). One test also writes a file called nul. That may be useful for #4.

Related: #7, #10, #14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: build-ciBuild scripts, CI and repository toolingarea: linuxLinux, Wine and ProtonbuildBuilding from source

    Projects

    • Status
      Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions