mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 07:23:35 +00:00
working on WebGPU support
This commit is contained in:
16
xmake.lua
16
xmake.lua
@@ -5,7 +5,7 @@
|
||||
local backends = {
|
||||
Vulkan = {
|
||||
option = "vulkan",
|
||||
default = true,
|
||||
default = not is_plat("wasm"),
|
||||
packages = { "vulkan-headers", "vulkan-memory-allocator" },
|
||||
custom = function()
|
||||
add_defines("VK_NO_PROTOTYPES")
|
||||
@@ -18,6 +18,16 @@ local backends = {
|
||||
custom = function()
|
||||
add_files("Sources/Backends/Metal/**.m")
|
||||
end
|
||||
},
|
||||
WebGPU = {
|
||||
option = "webgpu",
|
||||
packages = { "wgpu-native" },
|
||||
default = is_plat("wasm"),
|
||||
custom = function()
|
||||
if is_plat("wasm") then
|
||||
add_defines("PULSE_PLAT_WASM")
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +68,10 @@ includes("Xmake/**.lua")
|
||||
|
||||
option("unitybuild", { description = "Build the library using unity build", default = false })
|
||||
|
||||
if is_plat("wasm") then
|
||||
backends.Vulkan = nil
|
||||
end
|
||||
|
||||
for name, module in pairs(backends) do
|
||||
if has_config(module.option) then
|
||||
if module.packages then
|
||||
|
||||
Reference in New Issue
Block a user