core: rename mbgl directories to mln (#4511)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
32
include/mln/webgpu/wgpu_cpp_compat.hpp
Normal file
32
include/mln/webgpu/wgpu_cpp_compat.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wshadow"
|
||||
#pragma clang diagnostic ignored "-Wstrict-aliasing"
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#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
|
||||
// TODO: remove this workaround as soon as https://github.com/eliemichel/WebGPU-Cpp/issues/35 is fixed
|
||||
#ifndef _NULLABLE
|
||||
#define _NULLABLE WGPU_NULLABLE
|
||||
#endif
|
||||
#include <webgpu.hpp>
|
||||
|
||||
#undef _NULLABLE
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
Reference in New Issue
Block a user