mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Add Webgpu backend (#2132)
* WebGPU first draft (shaderc bin version 8) * WebGPU scripts
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
--
|
||||
|
||||
newoption {
|
||||
trigger = "webgpu",
|
||||
description = "Enable webgpu experimental renderer.",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-amalgamated",
|
||||
description = "Enable amalgamated build.",
|
||||
@@ -162,6 +167,12 @@ if not os.isdir(BX_DIR) or not os.isdir(BIMG_DIR) then
|
||||
os.exit()
|
||||
end
|
||||
|
||||
if _OPTIONS["webgpu"] then
|
||||
DAWN_DIR = os.getenv("DAWN_DIR")
|
||||
|
||||
_OPTIONS["with-windows"] = "10.0"
|
||||
end
|
||||
|
||||
dofile (path.join(BX_DIR, "scripts/toolchain.lua"))
|
||||
if not toolchain(BGFX_BUILD_DIR, BGFX_THIRD_PARTY_DIR) then
|
||||
return -- no action specified
|
||||
@@ -214,6 +225,10 @@ function exampleProjectDefaults()
|
||||
"bx",
|
||||
}
|
||||
|
||||
if _OPTIONS["webgpu"] then
|
||||
usesWebGPU()
|
||||
end
|
||||
|
||||
if _OPTIONS["with-sdl"] then
|
||||
defines { "ENTRY_CONFIG_USE_SDL=1" }
|
||||
links { "SDL2" }
|
||||
|
||||
Reference in New Issue
Block a user