Move EnumClassBitmasks from wgpu to dawn namespace

The EnumClassBitmasks is used by dawn/api_cpp.h that needs to be common.
Define a macro to export the operators from dawn to other various namespace.

BUG=dawn:1201
Change-Id: I20badd54e844fead6ecf12546a2c9e0afa2fd83f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
This commit is contained in:
fujunwei
2021-12-08 05:46:17 +00:00
committed by Dawn LUCI CQ
parent ef572ba7a1
commit ed33e05db1
9 changed files with 55 additions and 43 deletions

View File

@@ -18,6 +18,7 @@
#include "dawn/EnumClassBitmasks.h"
#include <cmath>
#include "dawn/webgpu_cpp.h"
namespace wgpu {
enum class TestEnum {
@@ -27,10 +28,12 @@ namespace wgpu {
};
} // namespace wgpu
template <>
struct wgpu::IsDawnBitmask<wgpu::TestEnum> {
static constexpr bool enable = true;
};
namespace dawn {
template <>
struct IsDawnBitmask<wgpu::TestEnum> {
static constexpr bool enable = true;
};
} // namespace dawn
// Tests for ScanForward
TEST(Math, ScanForward) {