Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions clean/installer/src/app/ui_art.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

#include "wg_core/detect.h"

#ifdef __MINGW32__
// llvm-mingw's wincodec.h stops at Fant; the Windows SDK's value of HighQualityCubic (Windows 10 1809 and later)
#define WICBitmapInterpolationModeHighQualityCubic ((WICBitmapInterpolationMode)4)
#endif

namespace wg::app::lui {

namespace {
Expand Down
6 changes: 6 additions & 0 deletions clean/installer/src/app/ui_gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

#include <d2d1effects.h>

#ifdef __MINGW32__
// llvm-mingw's d2d1effects.h has the property but not the D2D1_GAUSSIANBLUR_OPTIMIZATION values: the Windows SDK's
// (SPEED 0, BALANCED 1, QUALITY 2)
#define D2D1_GAUSSIANBLUR_OPTIMIZATION_QUALITY ((UINT32)2)
#endif

#ifdef _MSC_VER
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "d2d1.lib")
Expand Down
13 changes: 13 additions & 0 deletions clean/installer/src/app/ui_uia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
#include <oleacc.h>
#include <uiautomation.h>

#if defined(__MINGW32__) && defined(__CRT_UUID_DECL)
// llvm-mingw's oleacc.h has the IIDs (IID_IAccPropServices, CLSID_AccPropServices) but no __uuidof for the two types:
// the Windows SDK's values
__CRT_UUID_DECL(IAccPropServices, 0x6e26e776, 0x04f0, 0x495d, 0x80, 0xe4, 0x33, 0x30, 0x35, 0x2e, 0x31, 0x69)
__CRT_UUID_DECL(CAccPropServices, 0xb5f8350b, 0x0548, 0x48b1, 0xa6, 0xee, 0x88, 0xbd, 0x00, 0xb4, 0xa5, 0xe7)
#endif

#if defined(__MINGW32__) && !defined(UIA_ScrollPatternNoScroll)
// llvm-mingw's uiautomationclient.h lacks it: the Windows SDK's value, a double (a percent of -1: nothing to scroll). MinGW
// only: the Windows SDK declares it as a const double, which a macro must not replace.
#define UIA_ScrollPatternNoScroll (-1.0)
#endif

#ifdef _MSC_VER
#pragma comment(lib, "uiautomationcore.lib")
#endif
Expand Down
2 changes: 1 addition & 1 deletion clean/installer/tests/run_launcher_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,7 @@ def main():
if a.only: # development: only the tests named (after the basics)
for name in a.only:
fn = globals()["test_" + name]
fn(t, opti) if name != "rr" else fn(t, opti, a.synth_f)
fn(*(t, opti, a.baseline if "baseline" in fn.__code__.co_varnames[:3] else a.synth_f)[:fn.__code__.co_argcount])
print("\n%d checks passed, %d failed (%.0f s)" % (t.passed, len(t.failures), time.time() - t0))
for f in t.failures:
print(" FAILED:", f)
Expand Down
2 changes: 1 addition & 1 deletion clean/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The tests use WrongGPU's own synthetic data only: no model converted from a DLSS
|---|---|---|
| `interop` | `clean/runtime/interop/tests/run-tests.sh` (31 tests): MinGW build of the runtime with the `d3d12-test` executor | interop shaders that Wine's `d3dcompiler_47` rejects (before #12, `globallycoherent` in `PASS_SPIN` made 29 of the 31 fail), copy / convert / split regressions on vkd3d-proton |
| `rr-leak` | the RR runtime test host's `tagloop` job against `--runtime`, with a synthetic RR model (`pack_model --synthetic 5100`) | RR input copies retained and released every frame with no RR instance piling up in video memory (the fix is #11; see "Reading the result") |
| `launcher` | the launcher's unit tests (`wg-core-tests`, `launcher-core-tests`, `coexist-core-tests`, `wizard-policy-tests`): a `WRONGGPU_TESTING` MinGW build of `clean/installer` with the installer suite's generated payload and test map | launcher code that breaks under Wine, the way Linux players run the launcher: the same unit tests as on Windows, run with Wine's DLLs and Proton's Direct3D 12 |
| `launcher` | the launcher's unit tests (`wg-core-tests`, `launcher-core-tests`, `coexist-core-tests`, `wizard-policy-tests`), and a build of the `WrongGPU` program (built, not run): a `WRONGGPU_TESTING` MinGW build of `clean/installer` with the installer suite's generated payload and test map | launcher code that breaks under Wine, the way Linux players run the launcher: the same unit tests as on Windows, run with Wine's DLLs and Proton's Direct3D 12 |
| `ags-layout` | `ags_layout.hlsl`: `wg_ags_mma` (FP16, FP8), `wg_ags_convert` (F32 accumulator to F16 accumulator and FP8 B, FP8 B to F32 for all 256 codes), the F16 `FloatConversion` call, a wave64 conversion | a translation of the driver channel that does not keep the gfx12 register semantics the kernels rely on; checked against a CPU reference (multiplies within 1e-5, everything else bit-exact) |

The `--runtime` DLL is the one to be released: the MSVC release build works as it is. `interop` builds its own
Expand Down
5 changes: 3 additions & 2 deletions clean/linux/run_wine_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,10 @@ def test_launcher(a, env, work):
f"-DWRONGGPU_MAP={prep / 'prepared' / 'test-map.json'}"], capture_output=True, text=True)
if r.returncode != 0:
raise RuntimeError("configuring clean/installer failed:\n" + (r.stdout + r.stderr)[-3000:])
r = subprocess.run(["cmake", "--build", str(build), "--target", *LAUNCHER_TESTS], capture_output=True, text=True)
# the WrongGPU program too (built, not run): the unit tests alone do not compile the window's code
r = subprocess.run(["cmake", "--build", str(build), "--target", *LAUNCHER_TESTS, "WrongGPU"], capture_output=True, text=True)
if r.returncode != 0:
raise RuntimeError("building the launcher's unit tests failed:\n" + (r.stdout + r.stderr)[-3000:])
raise RuntimeError("building the launcher's unit tests and the WrongGPU program failed:\n" + (r.stdout + r.stderr)[-3000:])
passed, failed = [], []
for t in LAUNCHER_TESTS:
rc, text = run_wine(env, [str(build / (t + ".exe"))], build, 600)
Expand Down
Loading