From 26c47c3a95db821a31b7c315d5f10dd71c70fd17 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Tue, 27 Jan 2026 20:47:11 +0100 Subject: [PATCH] fix && ci (meson): trying to fix Vulkan issue in renderCore.cpp and add some windows test based from meson wrapdb CI Signed-off-by: 0verLighT --- .github/workflows/windows_meson.yml | 70 ++++++++++++++++++++++++- runtime/Sources/Renderer/RenderCore.cpp | 6 +-- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows_meson.yml b/.github/workflows/windows_meson.yml index 52e56ba..45cd0c8 100644 --- a/.github/workflows/windows_meson.yml +++ b/.github/workflows/windows_meson.yml @@ -11,10 +11,11 @@ on: - 'README.md' jobs: - build: + VisualStudio: if: "!contains(github.event.head_commit.message, 'ci skip')" runs-on: windows-latest strategy: + fail-fast: false matrix: platform: ['x64', 'x86'] steps: @@ -29,13 +30,80 @@ jobs: with: architecture: 'x86' python-version: '3.12' + - name: Install Meson & Ninja run: | python -m pip install meson ninja - uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{matrix.platform}} + - name: Compile mlx + run: | + meson setup builddir + meson compile -C builddir + + VisualStudio-clang-cl: + if: "!contains(github.event.head_commit.message, 'ci skip')" + runs-on: windows-latest + strategy: + fail-fast: false + env: + CC: clang-cl + CXX: clang-cl + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Install Meson & Ninja + run: | + python -m pip install meson ninja + + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Compile mlx + run: | + meson setup builddir + meson compile -C builddir + + MSYS2: + if: "!contains(github.event.head_commit.message, 'ci skip')" + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + platform: ['UCRT64', 'CLANG64'] + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.platform}} + install: >- + bison + dos2unix + flex + git + pacboy: >- + cc:p + cmake:p + ninja:p + pkgconf:p + python-certifi:p + python-pip:p + # Make sure Python is updated to >=3.11 (fix https://github.com/msys2/MINGW-packages/issues/17415). + update: true + + - name: Install Meson + shell: msys2 {0} + run: | + python -m pip install meson + + - name: Compile mlx + shell: msys2 {0} run: | meson setup builddir meson compile -C builddir \ No newline at end of file diff --git a/runtime/Sources/Renderer/RenderCore.cpp b/runtime/Sources/Renderer/RenderCore.cpp index 1bbe5f6..9e89fea 100644 --- a/runtime/Sources/Renderer/RenderCore.cpp +++ b/runtime/Sources/Renderer/RenderCore.cpp @@ -55,17 +55,17 @@ namespace mlx std::cout << std::endl; } - void* VulkanAllocationFunction(void*, std::size_t size, std::size_t alignment, VkSystemAllocationScope) + void* VKAPI_PTR VulkanAllocationFunction(void*, std::size_t size, std::size_t alignment, VkSystemAllocationScope) { return MemManager::AlignedMalloc(alignment, size); } - void* VulkanReallocationFunction(void*, void* ptr, std::size_t size, std::size_t alignment, VkSystemAllocationScope) + void* VKAPI_PTR VulkanReallocationFunction(void*, void* ptr, std::size_t size, std::size_t alignment, VkSystemAllocationScope) { return MemManager::AlignedRealloc(ptr, alignment, size); } - void VulkanFreeFunction(void*, void* ptr) + void VKAPI_PTR VulkanFreeFunction(void*, void* ptr) { MemManager::Free(ptr); }