Some checks are pending
Build Android / Game (Android, Release ARM64) (push) Waiting to run
Build iOS / Game (iOS, Release ARM64) (push) Waiting to run
Build Linux / Editor (Linux, Development x64) (push) Waiting to run
Build Linux / Game (Linux, Release x64) (push) Waiting to run
Build macOS / Editor (Mac, Development ARM64) (push) Waiting to run
Build macOS / Game (Mac, Release ARM64) (push) Waiting to run
Build Windows / Editor (Windows, Development x64) (push) Waiting to run
Build Windows / Game (Windows, Release x64) (push) Waiting to run
Cooker / Cook (Mac) (push) Waiting to run
Tests / Tests (Linux) (push) Waiting to run
Tests / Tests (Windows) (push) Waiting to run
26 lines
861 B
C#
26 lines
861 B
C#
// Copyright (c) Wojciech Figat. All rights reserved.
|
|
|
|
using System.IO;
|
|
using Flax.Build.NativeCpp;
|
|
using Flax.Build.Platforms;
|
|
|
|
/// <summary>
|
|
/// WebGPU graphics backend module.
|
|
/// </summary>
|
|
public class GraphicsDeviceWebGPU : GraphicsDeviceBaseModule
|
|
{
|
|
/// <inheritdoc />
|
|
public override void Setup(BuildOptions options)
|
|
{
|
|
base.Setup(options);
|
|
|
|
var port = "--use-port=emdawnwebgpu:cpp_bindings=false";
|
|
options.CompileEnv.CustomArgs.Add(port);
|
|
options.LinkEnv.CustomArgs.Add("-sASYNCIFY");
|
|
options.OutputFiles.Add(port);
|
|
//options.PublicDefinitions.Add("GRAPHICS_API_WEBGPU");
|
|
options.PrivateIncludePaths.Add(Path.Combine(EmscriptenSdk.Instance.EmscriptenPath, "emscripten/cache/ports/emdawnwebgpu/emdawnwebgpu_pkg/webgpu/include"));
|
|
options.PrivateDependencies.Add("lz4");
|
|
}
|
|
}
|