WebGPU - Add support for wgpu (#3899)

This commit is contained in:
Birk Skyum
2025-10-23 14:03:33 +02:00
committed by GitHub
parent ee2d7e0dc4
commit b2c59b0e03
23 changed files with 856 additions and 257 deletions

View File

@@ -13,7 +13,7 @@ public:
~DrawScopeResource() override = default;
private:
Context& context;
[[maybe_unused]] Context& context;
};
} // namespace webgpu

View File

@@ -2,6 +2,13 @@
#include <mbgl/gfx/renderer_backend.hpp>
#include <mbgl/util/size.hpp>
#if MLN_WEBGPU_IMPL_DAWN
#include <webgpu/webgpu.h>
#elif MLN_WEBGPU_IMPL_WGPU
#include <webgpu.h>
#endif
#include <mbgl/webgpu/wgpu_cpp_compat.hpp>
#include <memory>

View File

@@ -10,7 +10,13 @@
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif
#if MLN_WEBGPU_IMPL_DAWN
// For Dawn backend, use Dawn's C++ wrapper
#include <webgpu/webgpu_cpp.h>
#elif MLN_WEBGPU_IMPL_WGPU
// For wgpu-native backend, use the WebGPU-Cpp wrapper
#include <webgpu.hpp>
#endif
#if defined(__clang__)
#pragma clang diagnostic pop