[Help Wanted] Add MinGW-w64 GCC / Clang-CL Windows build check and Vulkan graphics swapchain prototype #6

Closed
opened 2026-11-26 19:10:41 +00:00 by github-bot · 2 comments
Owner

@⁠californiaAlmonds on GitHub · 2026-11-21 17:37 UTC · original

Goal

OpenScarlett currently builds and tests cleanly in GitHub Actions with MSVC 2022 + Ninja (Release & Debug). Two high-value portability milestones for contributors:

  1. MinGW-w64 / Clang-CL Windows CI leg: Verify zero warnings/errors under clang-cl or MinGW-w64 GCC 13+ (great stepping stone toward Linux/Proton cross-compilation).
  2. Vulkan Graphics Pipeline Prototype (src/gpu/vulkan_backend.cpp): Extend our zero-SDK dynamic vulkan-1.dll backend from compute pipelines to a minimal graphics render pass + color target readback (triangle + textured quad) using our lifted RDNA2 → SPIR-V 1.3 VS/PS shaders.

Feel free to tackle either part in its own small PR — open a Discussion if you want to coordinate!

**@⁠californiaAlmonds** on GitHub · 2026-11-21 17:37 UTC · [original](https://github.com/californiaAlmonds/OpenScarlett/issues/6) ## Goal OpenScarlett currently builds and tests cleanly in GitHub Actions with **MSVC 2022 + Ninja (Release & Debug)**. Two high-value portability milestones for contributors: 1. **MinGW-w64 / Clang-CL Windows CI leg:** Verify zero warnings/errors under `clang-cl` or `MinGW-w64 GCC 13+` (great stepping stone toward Linux/Proton cross-compilation). 2. **Vulkan Graphics Pipeline Prototype (`src/gpu/vulkan_backend.cpp`):** Extend our zero-SDK dynamic `vulkan-1.dll` backend from compute pipelines to a minimal graphics render pass + color target readback (triangle + textured quad) using our lifted RDNA2 → SPIR-V 1.3 VS/PS shaders. Feel free to tackle either part in its own small PR — open a Discussion if you want to coordinate!
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:10:41 +00:00
Author
Owner

@⁠rpatty-dev on GitHub · 2026-11-21 18:09 UTC · original

Tested building \OpenScarlett\ locally on Windows 11 with MinGW-w64 GCC 16.2.0 + Ninja (\cmake -B build-mingw -G Ninja -DCMAKE_BUILD_TYPE=Release).

Here is what compiled cleanly vs. what blocked the MinGW-w64 leg:

  • Compiled cleanly: \openscarlett_core, \winrt_xs, \xg_xs, \openscarlett_hook, \xgameruntime,
    dna2_lifter,
    dna2_interpreter, etc.
  • Failed in \d3d12_xs\ (\device_x.cpp\ / \command_list_x.cpp):
    1. \include/openscarlett/gpu/d3d12_xs_abi.h: __declspec(uuid(...))\ triggers -Wattributes\ ('uuid' attribute directive ignored) under GCC.
    2. \src/gpu/d3d12_xs/device_x.h\ lines 98, 101, 148, 196: \override\ fails on:
      • \GetResourceAllocationInfo\
      • \GetCustomHeapProperties\
      • \GetAdapterLuid\
      • \GetResourceAllocationInfo1
        because MinGW-w64's \d3d12.h\ uses the C-ABI hidden-out-pointer signature for COM struct-returning methods rather than MSVC's C++ \ hiscall/\x64\ struct return.

If you want a deeper dive into pure-Rust / MinGW-w64-friendly Windows x64 PE32+ & GDK shim tooling, I'm also documenting my own clean-room approach at https://github.com/rpatty-dev/PercyScarlett.

**@⁠rpatty-dev** on GitHub · 2026-11-21 18:09 UTC · [original](https://github.com/californiaAlmonds/OpenScarlett/issues/6#issuecomment-7067049277) Tested building \OpenScarlett\ locally on Windows 11 with **MinGW-w64 GCC 16.2.0 + Ninja** (\cmake -B build-mingw -G Ninja -DCMAKE_BUILD_TYPE=Release\). Here is what compiled cleanly vs. what blocked the MinGW-w64 leg: - **Compiled cleanly:** \openscarlett_core\, \winrt_xs\, \xg_xs\, \openscarlett_hook\, \xgameruntime\, \ dna2_lifter\, \ dna2_interpreter\, etc. - **Failed in \d3d12_xs\ (\device_x.cpp\ / \command_list_x.cpp\):** 1. \include/openscarlett/gpu/d3d12_xs_abi.h\: \__declspec(uuid(...))\ triggers \-Wattributes\ (\'uuid' attribute directive ignored\) under GCC. 2. \src/gpu/d3d12_xs/device_x.h\ lines 98, 101, 148, 196: \override\ fails on: - \GetResourceAllocationInfo\ - \GetCustomHeapProperties\ - \GetAdapterLuid\ - \GetResourceAllocationInfo1\ because MinGW-w64's \d3d12.h\ uses the C-ABI hidden-out-pointer signature for COM struct-returning methods rather than MSVC's C++ \ hiscall\/\x64\ struct return. If you want a deeper dive into pure-Rust / MinGW-w64-friendly Windows x64 PE32+ & GDK shim tooling, I'm also documenting my own clean-room approach at https://github.com/rpatty-dev/PercyScarlett.
Author
Owner

@⁠californiaAlmonds on GitHub · 2026-11-21 18:46 UTC · original

Huge thanks for testing MinGW-w64 GCC 16.2.0 and pinpointing those exact d3d12_xs blockers! Just pushed df979fe addressing all of them:

  • Guarded __declspec(uuid(...)) behind OPENSCARLETT_COM_UUID + added __CRT_UUID_DECL specializations for all 5 custom COM interfaces in include/openscarlett/gpu/d3d12_xs_abi.h
  • Added #ifdef WIDL_EXPLICIT_AGGREGATE_RETURNS overrides (+ using declarations) for GetResourceAllocationInfo, GetCustomHeapProperties, GetAdapterLuid, GetResourceAllocationInfo1, and CommandQueueX::GetDesc
  • Added src/shims/d3d12_xs_mingw.def for the standard D3D12* export aliases and exposed d3d12/dxgi/d3dcompiler/ole32/uuid to non-MSVC Win32 builds in CMakeLists.txt

If you get a chance to pull main and re-run your MinGW-w64 build, let us know if anything else pops up!

**@⁠californiaAlmonds** on GitHub · 2026-11-21 18:46 UTC · [original](https://github.com/californiaAlmonds/OpenScarlett/issues/6#issuecomment-7067502701) Huge thanks for testing MinGW-w64 GCC 16.2.0 and pinpointing those exact `d3d12_xs` blockers! Just pushed `df979fe` addressing all of them: - Guarded `__declspec(uuid(...))` behind `OPENSCARLETT_COM_UUID` + added `__CRT_UUID_DECL` specializations for all 5 custom COM interfaces in `include/openscarlett/gpu/d3d12_xs_abi.h` - Added `#ifdef WIDL_EXPLICIT_AGGREGATE_RETURNS` overrides (+ `using` declarations) for `GetResourceAllocationInfo`, `GetCustomHeapProperties`, `GetAdapterLuid`, `GetResourceAllocationInfo1`, and `CommandQueueX::GetDesc` - Added `src/shims/d3d12_xs_mingw.def` for the standard `D3D12*` export aliases and exposed `d3d12`/`dxgi`/`d3dcompiler`/`ole32`/`uuid` to non-MSVC Win32 builds in `CMakeLists.txt` If you get a chance to pull `main` and re-run your MinGW-w64 build, let us know if anything else pops up!
This discussion has been locked. Commenting is limited to contributors.
No description provided.