Add WebGPU Backend w/ Dawn Support (#3838)

This commit is contained in:
Birk Skyum
2025-10-16 20:35:33 +02:00
committed by GitHub
parent cd129e873a
commit 68459732be
119 changed files with 14067 additions and 28 deletions

18
vendor/webgpu.cmake vendored Normal file
View File

@@ -0,0 +1,18 @@
# WebGPU implementation configuration
# This file handles the integration of either Dawn or wgpu
set(MLN_WEBGPU_IMPL "dawn" CACHE STRING "WebGPU backend implementation (dawn or wgpu)")
set_property(CACHE MLN_WEBGPU_IMPL PROPERTY STRINGS dawn wgpu stub)
if(MLN_WITH_WEBGPU)
if(MLN_WEBGPU_IMPL STREQUAL "dawn")
message(STATUS "Using Dawn as WebGPU backend")
elseif(MLN_WEBGPU_IMPL STREQUAL "wgpu")
message(FATAL_ERROR "Using wgpu as WebGPU backend is not implemented yet")
else()
message(FATAL_ERROR "MLN_WEBGPU_IMPL can take values \"dawn\" or \"wgpu\"")
endif()
endif()