diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fff1e3534..9042b1f17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,8 @@ env: WINE_URL: https://github.com/3Shain/wine/releases/download/v8.16-3shain/wine.tar.gz WINE_ARM64EC_VERSION: wine-11.2 WINE_ARM64EC_URL: https://github.com/3Shain/wine/releases/download/wine-11.2/wine-11.2.tar.gz - LLVM_MINGW_VERSION: "20251216" - LLVM_MINGW_DIR: llvm-mingw-20251216-ucrt-macos-universal + LLVM_MINGW_VERSION: "20260908" + LLVM_MINGW_DIR: llvm-mingw-20260908-ucrt-macos-universal jobs: setup-wine: diff --git a/build-arm64ec.txt b/build-arm64ec.txt index bc8462f47..e9ac3b47d 100644 --- a/build-arm64ec.txt +++ b/build-arm64ec.txt @@ -8,6 +8,12 @@ windres = 'arm64ec-w64-mingw32-windres' [properties] needs_exe_wrapper = true +[built-in options] +c_args = ['-marm64x'] +cpp_args = ['-marm64x'] +c_link_args = ['-marm64x'] +cpp_link_args = ['-marm64x'] + [host_machine] system = 'windows' cpu_family = 'aarch64' diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index 5e9404d3f..d1825876c 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -17,6 +17,7 @@ #include "util_env.hpp" #include "util_string.hpp" #include "util_win32_compat.h" +#include "util_hotpatch.h" #include "wsi_monitor.hpp" #include "wsi_platform_win32.hpp" #include "wsi_window.hpp" @@ -242,6 +243,7 @@ class MTLD3D11SwapChain final : public MTLDXGISubObjectQueryInterface(riid, parent); }; + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE Present(UINT sync_interval, UINT flags) final { @@ -259,6 +261,7 @@ class MTLD3D11SwapChain final : public MTLDXGISubObject @@ -261,6 +262,7 @@ class MTLD3D12SwapChain final : public MTLDXGISubObjectQueryInterface(riid, parent); }; + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE Present(UINT sync_interval, UINT flags) final { @@ -275,6 +277,7 @@ class MTLD3D12SwapChain final : public MTLDXGISubObjectQueryInterface(riid, ppSurface); }; + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE SetFullscreenState(BOOL Fullscreen, IDXGIOutput *pTarget) final { @@ -486,6 +489,7 @@ class MTLD3D12SwapChain final : public MTLDXGISubObject { return DXGI_ERROR_UNSUPPORTED; } + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE CreateSwapChain(IUnknown *pDevice, DXGI_SWAP_CHAIN_DESC *pDesc, IDXGISwapChain **ppSwapChain) final { @@ -97,6 +99,7 @@ class MTLDXGIFactory : public MTLDXGIObject { return hr; } + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE CreateSwapChainForHwnd( IUnknown *pDevice, HWND hWnd, const DXGI_SWAP_CHAIN_DESC1 *pDesc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, @@ -135,6 +138,7 @@ class MTLDXGIFactory : public MTLDXGIObject { ppSwapChain); } + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow( IUnknown *pDevice, IUnknown *pWindow, const DXGI_SWAP_CHAIN_DESC1 *pDesc, IDXGIOutput *pRestrictToOutput, IDXGISwapChain1 **ppSwapChain) final { @@ -144,6 +148,7 @@ class MTLDXGIFactory : public MTLDXGIObject { return E_NOTIMPL; } + DXMT_HOTPATCHABLE HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition( IUnknown *pDevice, const DXGI_SWAP_CHAIN_DESC1 *pDesc, IDXGIOutput *pRestrictToOutput, IDXGISwapChain1 **ppSwapChain) final { diff --git a/src/util/util_hotpatch.h b/src/util/util_hotpatch.h new file mode 100644 index 000000000..c81ee7faa --- /dev/null +++ b/src/util/util_hotpatch.h @@ -0,0 +1,17 @@ +/* + * Derived from DXVK (originally under zlib License) + * + * See + * + * See + */ + +#pragma once + +#if defined(DECLSPEC_CHPE_PATCHABLE) +#define DXMT_HOTPATCHABLE DECLSPEC_CHPE_PATCHABLE +#elif defined(__arm64ec__) +#define DXMT_HOTPATCHABLE __attribute__((hybrid_patchable)) +#else +#define DXMT_HOTPATCHABLE +#endif \ No newline at end of file diff --git a/tests/dx11/stb_image.h b/tests/dx11/stb_image.h index 8879e981b..f1ce952e6 100644 --- a/tests/dx11/stb_image.h +++ b/tests/dx11/stb_image.h @@ -208,6 +208,7 @@ RECENT REVISION HISTORY: // you have issues compiling it, you can disable it entirely by // defining STBI_NO_SIMD. // +#define STBI_NO_SIMD // =========================================================================== // // HDR image support (disable by defining STBI_NO_HDR)