From feae06c398e94ca2e413a63f50b22ea7fecd4ea4 Mon Sep 17 00:00:00 2001 From: Simon Kallweit Date: Mon, 23 Sep 2024 23:19:57 +0200 Subject: [PATCH] only enable wgpu on x86_64 --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9570c449..e47b4121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,14 +38,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(SLANG_RHI_HAS_VULKAN ON) set(SLANG_RHI_HAS_METAL OFF) set(SLANG_RHI_HAS_CUDA ON) - set(SLANG_RHI_HAS_WGPU ON) + if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64") + set(SLANG_RHI_HAS_WGPU ON) + else() + set(SLANG_RHI_HAS_WGPU OFF) + endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(SLANG_RHI_HAS_D3D11 OFF) set(SLANG_RHI_HAS_D3D12 OFF) set(SLANG_RHI_HAS_VULKAN ON) set(SLANG_RHI_HAS_METAL OFF) set(SLANG_RHI_HAS_CUDA ON) - set(SLANG_RHI_HAS_WGPU ON) + if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64") + set(SLANG_RHI_HAS_WGPU ON) + else() + set(SLANG_RHI_HAS_WGPU OFF) + endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(SLANG_RHI_HAS_D3D11 OFF) set(SLANG_RHI_HAS_D3D12 OFF)