mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Rename namespace dawn_native to dawn::native.
But keep a namespace alias to avoid breaking project that depend on the previous namespace name while they get updated. Done with through the following steps: - git grep -l dawn_native:: | xargs sed -i "" "s/dawn_native::/dawn::native::/g" - git grep -l "namespace dawn_native" | xargs sed -i "" "s/namespace dawn_native/namespace dawn::native/g" - git cl format - Manual fixups in generator/templates (and the addition of namespace_case in dawn_json_generator.py). - The addition of the namespace alias in DawnNative.h Bug: dawn:824 Change-Id: I676cc4e3ced2e0e4bab32a0d66d7eaf9537e3f09 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75982 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
8b3eaa60d8
commit
ec9cf2a85c
@@ -28,7 +28,7 @@
|
||||
struct ID3D12Device;
|
||||
struct ID3D12Resource;
|
||||
|
||||
namespace dawn_native::d3d12 {
|
||||
namespace dawn::native::d3d12 {
|
||||
|
||||
class D3D11on12ResourceCache;
|
||||
|
||||
@@ -106,6 +106,6 @@ namespace dawn_native::d3d12 {
|
||||
Microsoft::WRL::ComPtr<IDXGIAdapter> dxgiAdapter;
|
||||
};
|
||||
|
||||
} // namespace dawn_native::d3d12
|
||||
} // namespace dawn::native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12BACKEND_H_
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace wgpu {
|
||||
struct DeviceDescriptor;
|
||||
}
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class InstanceBase;
|
||||
class AdapterBase;
|
||||
@@ -247,6 +247,9 @@ namespace dawn_native {
|
||||
DAWN_NATIVE_EXPORT bool BindGroupLayoutBindingsEqualForTesting(WGPUBindGroupLayout a,
|
||||
WGPUBindGroupLayout b);
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
// TODO(dawn:824): Remove once the deprecation period is passed.
|
||||
namespace dawn_native = dawn::native;
|
||||
|
||||
#endif // DAWNNATIVE_DAWNNATIVE_H_
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef __IOSurface* IOSurfaceRef;
|
||||
# import <Metal/Metal.h>
|
||||
#endif //__OBJC__
|
||||
|
||||
namespace dawn_native::metal {
|
||||
namespace dawn::native::metal {
|
||||
|
||||
struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase {
|
||||
AdapterDiscoveryOptions();
|
||||
@@ -56,14 +56,14 @@ namespace dawn_native::metal {
|
||||
// scheduled could lead to races in who gets scheduled first and incorrect rendering.
|
||||
DAWN_NATIVE_EXPORT void WaitForCommandsToBeScheduled(WGPUDevice device);
|
||||
|
||||
} // namespace dawn_native::metal
|
||||
} // namespace dawn::native::metal
|
||||
|
||||
#ifdef __OBJC__
|
||||
namespace dawn_native::metal {
|
||||
namespace dawn::native::metal {
|
||||
|
||||
DAWN_NATIVE_EXPORT id<MTLDevice> GetMetalDevice(WGPUDevice device);
|
||||
|
||||
} // namespace dawn_native::metal
|
||||
} // namespace dawn::native::metal
|
||||
#endif // __OBJC__
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
namespace dawn_native::null {
|
||||
namespace dawn::native::null {
|
||||
DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl();
|
||||
} // namespace dawn_native::null
|
||||
} // namespace dawn::native::null
|
||||
|
||||
#endif // DAWNNATIVE_NULLBACKEND_H_
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef void* EGLImage;
|
||||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
namespace dawn_native::opengl {
|
||||
namespace dawn::native::opengl {
|
||||
|
||||
struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase {
|
||||
AdapterDiscoveryOptions();
|
||||
@@ -50,6 +50,6 @@ namespace dawn_native::opengl {
|
||||
DAWN_NATIVE_EXPORT WGPUTexture
|
||||
WrapExternalEGLImage(WGPUDevice device, const ExternalImageDescriptorEGLImage* descriptor);
|
||||
|
||||
} // namespace dawn_native::opengl
|
||||
} // namespace dawn::native::opengl
|
||||
|
||||
#endif // DAWNNATIVE_OPENGLBACKEND_H_
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native::vulkan {
|
||||
namespace dawn::native::vulkan {
|
||||
|
||||
DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device);
|
||||
|
||||
@@ -135,6 +135,6 @@ namespace dawn_native::vulkan {
|
||||
VkImageLayout desiredLayout,
|
||||
ExternalImageExportInfoVk* info);
|
||||
|
||||
} // namespace dawn_native::vulkan
|
||||
} // namespace dawn::native::vulkan
|
||||
|
||||
#endif // DAWNNATIVE_VULKANBACKEND_H_
|
||||
|
||||
Reference in New Issue
Block a user