WebGPU - Add support for wgpu (#3899)
This commit is contained in:
@@ -13,7 +13,7 @@ public:
|
||||
~DrawScopeResource() override = default;
|
||||
|
||||
private:
|
||||
Context& context;
|
||||
[[maybe_unused]] Context& context;
|
||||
};
|
||||
|
||||
} // namespace webgpu
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user