From 7b7ffb0eea001494f9330bf484d1c40228ad4c3b Mon Sep 17 00:00:00 2001 From: RDW Date: Sat, 3 Feb 2024 11:28:50 +0100 Subject: [PATCH 1/4] Repo: Update the Lua runtime to v0.0.18 --- download-runtime.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-runtime.sh b/download-runtime.sh index f69c24e1..905759f2 100755 --- a/download-runtime.sh +++ b/download-runtime.sh @@ -2,7 +2,7 @@ set -e GITHUB_ORGANIZATION="evo-lua" GITHUB_REPOSITORY="evo-runtime" -REQUIRED_RUNTIME_VERSION="v0.0.17" +REQUIRED_RUNTIME_VERSION="v0.0.18" PLATFORM=$(uname) From 91e61695c57152ecdd0d373dc7c0c3e61e17e782 Mon Sep 17 00:00:00 2001 From: RDW Date: Sat, 3 Feb 2024 11:29:57 +0100 Subject: [PATCH 2/4] Client: Remove obsolete FFI cdefs for wgpu-native extensions These are now part of the runtime itself. --- Core/NativeClient/WebGPU/GPU.lua | 45 -------------------------------- 1 file changed, 45 deletions(-) diff --git a/Core/NativeClient/WebGPU/GPU.lua b/Core/NativeClient/WebGPU/GPU.lua index 3703a0f5..7265329e 100644 --- a/Core/NativeClient/WebGPU/GPU.lua +++ b/Core/NativeClient/WebGPU/GPU.lua @@ -13,51 +13,6 @@ local GPU = { MAX_BUFFER_SIZE = 256 * 1024 * 1024, } --- The FFI bindings don't provide enums for native extensions yet (requires a fix in the runtime) -ffi.cdef([[ - typedef enum WGPUNativeFeature { - WGPUNativeFeature_PushConstants = 0x00030001, - WGPUNativeFeature_TextureAdapterSpecificFormatFeatures = 0x00030002, - WGPUNativeFeature_MultiDrawIndirect = 0x00030003, - WGPUNativeFeature_MultiDrawIndirectCount = 0x00030004, - WGPUNativeFeature_VertexWritableStorage = 0x00030005, - WGPUNativeFeature_TextureBindingArray = 0x00030006, - WGPUNativeFeature_SampledTextureAndStorageBufferArrayNonUniformIndexing = 0x00030007, - WGPUNativeFeature_PipelineStatisticsQuery = 0x00030008, - WGPUNativeFeature_Force32 = 0x7FFFFFFF - } WGPUNativeFeature; - - typedef enum WGPUNativeSType { - // Start at 0003 since that's allocated range for wgpu-native - WGPUSType_DeviceExtras = 0x00030001, - WGPUSType_RequiredLimitsExtras = 0x00030002, - WGPUSType_PipelineLayoutExtras = 0x00030003, - WGPUSType_ShaderModuleGLSLDescriptor = 0x00030004, - WGPUSType_SupportedLimitsExtras = 0x00030005, - WGPUSType_InstanceExtras = 0x00030006, - WGPUSType_BindGroupEntryExtras = 0x00030007, - WGPUSType_BindGroupLayoutEntryExtras = 0x00030008, - WGPUSType_QuerySetDescriptorExtras = 0x00030009, - WGPUSType_SurfaceConfigurationExtras = 0x0003000A, - WGPUNativeSType_Force32 = 0x7FFFFFFF - } WGPUNativeSType; - - typedef struct WGPUBindGroupLayoutEntryExtras { - WGPUChainedStruct chain; - uint32_t count; - } WGPUBindGroupLayoutEntryExtras; - - typedef struct WGPUBindGroupEntryExtras { - WGPUChainedStruct chain; - WGPUBuffer const * buffers; - size_t bufferCount; - WGPUSampler const * samplers; - size_t samplerCount; - WGPUTextureView const * textureViews; - size_t textureViewCount; - } WGPUBindGroupEntryExtras; -]]) - function GPU:CreateInstance() local instanceDescriptor = new("WGPUInstanceDescriptor") local instance = webgpu.bindings.wgpu_create_instance(instanceDescriptor) From ee561dfd1fbd1ec0649bebcf6fb74ba503da5a63 Mon Sep 17 00:00:00 2001 From: RDW Date: Sat, 3 Feb 2024 11:36:29 +0100 Subject: [PATCH 3/4] Repo: Enable runtime release downloads of M1 builds --- download-runtime.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/download-runtime.sh b/download-runtime.sh index 905759f2..8e598d39 100755 --- a/download-runtime.sh +++ b/download-runtime.sh @@ -5,6 +5,7 @@ GITHUB_REPOSITORY="evo-runtime" REQUIRED_RUNTIME_VERSION="v0.0.18" PLATFORM=$(uname) +ARCHITECTURE=$(uname -m) echo "Required runtime version: $REQUIRED_RUNTIME_VERSION" @@ -12,7 +13,7 @@ ASSET_FILE_NAME="" EXECUTABLE_NAME="" GITHUB_BASE_URL="https://github.com/$GITHUB_ORGANIZATION/$GITHUB_REPOSITORY/releases/download" -echo "Detected platform: $PLATFORM" +echo "Detected platform: $PLATFORM ($ARCHITECTURE)" case $PLATFORM in MINGW64_NT*|CYGWIN_NT*|MSYS_NT*) @@ -24,7 +25,18 @@ case $PLATFORM in EXECUTABLE_NAME="evo" ;; Darwin) - ASSET_FILE_NAME="evo-macos-x64" + case $ARCHITECTURE in + arm64) + ASSET_FILE_NAME="evo-macos-M1" + ;; + x86_64) + ASSET_FILE_NAME="evo-macos-x64" + ;; + *) + echo "Unsupported architecture: $ARCHITECTURE" + exit 1 + ;; + esac EXECUTABLE_NAME="evo" ;; *) From a452d465e3982c9d284ba0c20fd597075e65c770 Mon Sep 17 00:00:00 2001 From: RDW Date: Sat, 3 Feb 2024 11:41:19 +0100 Subject: [PATCH 4/4] CI: Add support for building with M1-based macOS runners This should help make sure the platform is equally supported. --- .github/workflows/ci-mac.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-mac.yml b/.github/workflows/ci-mac.yml index 84cd52b8..d6500c02 100644 --- a/.github/workflows/ci-mac.yml +++ b/.github/workflows/ci-mac.yml @@ -22,7 +22,15 @@ jobs: build: if: github.event.pull_request.draft == false name: Build for macOS - runs-on: macos-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, macos-14] + include: + - os: macos-latest + arch: x64 + - os: macos-14 + arch: M1 steps: - name: Check out Git repository