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>
diff --git a/src/dawn_native/metal/BackendMTL.h b/src/dawn_native/metal/BackendMTL.h
index daa8ac2..da67335 100644
--- a/src/dawn_native/metal/BackendMTL.h
+++ b/src/dawn_native/metal/BackendMTL.h
@@ -17,7 +17,7 @@
#include "dawn_native/BackendConnection.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Backend : public BackendConnection {
public:
@@ -28,6 +28,6 @@
const AdapterDiscoveryOptionsBase* optionsBase) override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BACKENDMTL_H_
diff --git a/src/dawn_native/metal/BackendMTL.mm b/src/dawn_native/metal/BackendMTL.mm
index fd5e507..bc9c6fc 100644
--- a/src/dawn_native/metal/BackendMTL.mm
+++ b/src/dawn_native/metal/BackendMTL.mm
@@ -31,7 +31,7 @@
#include <vector>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -272,7 +272,7 @@
// AdapterBase Implementation
bool SupportsExternalImages() const override {
- // Via dawn_native::metal::WrapIOSurface
+ // Via dawn::native::metal::WrapIOSurface
return true;
}
@@ -613,4 +613,4 @@
return new Backend(instance);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/BindGroupLayoutMTL.h b/src/dawn_native/metal/BindGroupLayoutMTL.h
index 9b1771c..dc2566e 100644
--- a/src/dawn_native/metal/BindGroupLayoutMTL.h
+++ b/src/dawn_native/metal/BindGroupLayoutMTL.h
@@ -18,7 +18,7 @@
#include "common/SlabAllocator.h"
#include "dawn_native/BindGroupLayout.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class BindGroup;
class Device;
@@ -41,6 +41,6 @@
SlabAllocator<BindGroup> mBindGroupAllocator;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BINDGROUPLAYOUTMTL_H_
diff --git a/src/dawn_native/metal/BindGroupLayoutMTL.mm b/src/dawn_native/metal/BindGroupLayoutMTL.mm
index b3e7c35..bfe6870 100644
--- a/src/dawn_native/metal/BindGroupLayoutMTL.mm
+++ b/src/dawn_native/metal/BindGroupLayoutMTL.mm
@@ -16,7 +16,7 @@
#include "dawn_native/metal/BindGroupMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
Ref<BindGroupLayout> BindGroupLayout::Create(
@@ -42,4 +42,4 @@
mBindGroupAllocator.Deallocate(bindGroup);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/BindGroupMTL.h b/src/dawn_native/metal/BindGroupMTL.h
index 0905664..c94a409 100644
--- a/src/dawn_native/metal/BindGroupMTL.h
+++ b/src/dawn_native/metal/BindGroupMTL.h
@@ -18,7 +18,7 @@
#include "common/PlacementAllocated.h"
#include "dawn_native/BindGroup.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -34,6 +34,6 @@
void DestroyImpl() override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BINDGROUPMTL_H_
diff --git a/src/dawn_native/metal/BindGroupMTL.mm b/src/dawn_native/metal/BindGroupMTL.mm
index c867342..272703e 100644
--- a/src/dawn_native/metal/BindGroupMTL.mm
+++ b/src/dawn_native/metal/BindGroupMTL.mm
@@ -16,7 +16,7 @@
#include "dawn_native/metal/BindGroupLayoutMTL.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
BindGroup::BindGroup(Device* device, const BindGroupDescriptor* descriptor)
: BindGroupBase(this, device, descriptor) {
@@ -34,4 +34,4 @@
return ToBackend(descriptor->layout)->AllocateBindGroup(device, descriptor);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/BufferMTL.h b/src/dawn_native/metal/BufferMTL.h
index 7b6c586..9397d69 100644
--- a/src/dawn_native/metal/BufferMTL.h
+++ b/src/dawn_native/metal/BufferMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class CommandRecordingContext;
class Device;
@@ -62,6 +62,6 @@
NSPRef<id<MTLBuffer>> mMtlBuffer;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BUFFERMTL_H_
diff --git a/src/dawn_native/metal/BufferMTL.mm b/src/dawn_native/metal/BufferMTL.mm
index c3a4a98..d40f883 100644
--- a/src/dawn_native/metal/BufferMTL.mm
+++ b/src/dawn_native/metal/BufferMTL.mm
@@ -21,7 +21,7 @@
#include <limits>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// The size of uniform buffer and storage buffer need to be aligned to 16 bytes which is the
// largest alignment of supported data types
static constexpr uint32_t kMinUniformOrStorageBufferAlignment = 16u;
@@ -237,4 +237,4 @@
value:clearValue];
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/CommandBufferMTL.h b/src/dawn_native/metal/CommandBufferMTL.h
index eb236a9..69427f4 100644
--- a/src/dawn_native/metal/CommandBufferMTL.h
+++ b/src/dawn_native/metal/CommandBufferMTL.h
@@ -20,11 +20,11 @@
#import <Metal/Metal.h>
-namespace dawn_native {
+namespace dawn::native {
class CommandEncoder;
}
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class CommandRecordingContext;
class Device;
@@ -64,6 +64,6 @@
uint32_t height);
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_COMMANDBUFFERMTL_H_
diff --git a/src/dawn_native/metal/CommandBufferMTL.mm b/src/dawn_native/metal/CommandBufferMTL.mm
index 11e655b..d353e99 100644
--- a/src/dawn_native/metal/CommandBufferMTL.mm
+++ b/src/dawn_native/metal/CommandBufferMTL.mm
@@ -34,7 +34,7 @@
#include <tint/tint.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -1564,4 +1564,4 @@
UNREACHABLE();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/CommandRecordingContext.h b/src/dawn_native/metal/CommandRecordingContext.h
index 4caeb0f..662cdcd 100644
--- a/src/dawn_native/metal/CommandRecordingContext.h
+++ b/src/dawn_native/metal/CommandRecordingContext.h
@@ -20,7 +20,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// This class wraps a MTLCommandBuffer and tracks which Metal encoder is open.
// Only one encoder may be open at a time.
@@ -54,6 +54,6 @@
bool mUsed = false;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_COMMANDRECORDINGCONTEXT_H_
diff --git a/src/dawn_native/metal/CommandRecordingContext.mm b/src/dawn_native/metal/CommandRecordingContext.mm
index 95d7b2e..4b3e158 100644
--- a/src/dawn_native/metal/CommandRecordingContext.mm
+++ b/src/dawn_native/metal/CommandRecordingContext.mm
@@ -16,7 +16,7 @@
#include "common/Assert.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
CommandRecordingContext::CommandRecordingContext() = default;
@@ -129,4 +129,4 @@
mInEncoder = false;
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/ComputePipelineMTL.h b/src/dawn_native/metal/ComputePipelineMTL.h
index 64e9356..b3f70d9 100644
--- a/src/dawn_native/metal/ComputePipelineMTL.h
+++ b/src/dawn_native/metal/ComputePipelineMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -48,6 +48,6 @@
std::vector<uint32_t> mWorkgroupAllocations;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_COMPUTEPIPELINEMTL_H_
diff --git a/src/dawn_native/metal/ComputePipelineMTL.mm b/src/dawn_native/metal/ComputePipelineMTL.mm
index 5041961..9f5255f 100644
--- a/src/dawn_native/metal/ComputePipelineMTL.mm
+++ b/src/dawn_native/metal/ComputePipelineMTL.mm
@@ -19,7 +19,7 @@
#include "dawn_native/metal/ShaderModuleMTL.h"
#include "dawn_native/metal/UtilsMetal.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
Ref<ComputePipeline> ComputePipeline::CreateUninitialized(
@@ -83,4 +83,4 @@
CreateComputePipelineAsyncTask::RunAsync(std::move(asyncTask));
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/DeviceMTL.h b/src/dawn_native/metal/DeviceMTL.h
index 779b726..f7817c4 100644
--- a/src/dawn_native/metal/DeviceMTL.h
+++ b/src/dawn_native/metal/DeviceMTL.h
@@ -30,7 +30,7 @@
#include <memory>
#include <mutex>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
struct KalmanInfo;
@@ -149,6 +149,6 @@
std::unique_ptr<KalmanInfo> mKalmanInfo;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_DEVICEMTL_H_
diff --git a/src/dawn_native/metal/DeviceMTL.mm b/src/dawn_native/metal/DeviceMTL.mm
index 978b2f6..c62417f 100644
--- a/src/dawn_native/metal/DeviceMTL.mm
+++ b/src/dawn_native/metal/DeviceMTL.mm
@@ -40,7 +40,7 @@
#include <type_traits>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -503,4 +503,4 @@
return mTimestampPeriod;
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/Forward.h b/src/dawn_native/metal/Forward.h
index 5d590b1..cfa2cac 100644
--- a/src/dawn_native/metal/Forward.h
+++ b/src/dawn_native/metal/Forward.h
@@ -17,7 +17,7 @@
#include "dawn_native/ToBackend.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Adapter;
class BindGroup;
@@ -63,6 +63,6 @@
return ToBackendBase<MetalBackendTraits>(common);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_FORWARD_H_
diff --git a/src/dawn_native/metal/MetalBackend.mm b/src/dawn_native/metal/MetalBackend.mm
index 9289774..95174eb 100644
--- a/src/dawn_native/metal/MetalBackend.mm
+++ b/src/dawn_native/metal/MetalBackend.mm
@@ -20,7 +20,7 @@
#include "dawn_native/metal/DeviceMTL.h"
#include "dawn_native/metal/TextureMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
id<MTLDevice> GetMetalDevice(WGPUDevice device) {
return ToBackend(FromAPI(device))->GetMTLDevice();
@@ -46,4 +46,4 @@
ToBackend(FromAPI(device))->WaitForCommandsToBeScheduled();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/PipelineLayoutMTL.h b/src/dawn_native/metal/PipelineLayoutMTL.h
index 9aa4f7b..715da14 100644
--- a/src/dawn_native/metal/PipelineLayoutMTL.h
+++ b/src/dawn_native/metal/PipelineLayoutMTL.h
@@ -23,7 +23,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -57,6 +57,6 @@
PerStage<uint32_t> mBufferBindingCount;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_PIPELINELAYOUTMTL_H_
diff --git a/src/dawn_native/metal/PipelineLayoutMTL.mm b/src/dawn_native/metal/PipelineLayoutMTL.mm
index ac908ab..956ba58 100644
--- a/src/dawn_native/metal/PipelineLayoutMTL.mm
+++ b/src/dawn_native/metal/PipelineLayoutMTL.mm
@@ -18,7 +18,7 @@
#include "dawn_native/BindGroupLayout.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
Ref<PipelineLayout> PipelineLayout::Create(Device* device,
@@ -79,4 +79,4 @@
return mBufferBindingCount[stage];
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/QuerySetMTL.h b/src/dawn_native/metal/QuerySetMTL.h
index 6bde84f..27ac10c 100644
--- a/src/dawn_native/metal/QuerySetMTL.h
+++ b/src/dawn_native/metal/QuerySetMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -49,6 +49,6 @@
ios(14.0)) = nullptr;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_QUERYSETMTL_H_
diff --git a/src/dawn_native/metal/QuerySetMTL.mm b/src/dawn_native/metal/QuerySetMTL.mm
index e92991a..ac732c8 100644
--- a/src/dawn_native/metal/QuerySetMTL.mm
+++ b/src/dawn_native/metal/QuerySetMTL.mm
@@ -18,7 +18,7 @@
#include "common/Platform.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -136,4 +136,4 @@
}
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/QueueMTL.h b/src/dawn_native/metal/QueueMTL.h
index b608166..6df9801 100644
--- a/src/dawn_native/metal/QueueMTL.h
+++ b/src/dawn_native/metal/QueueMTL.h
@@ -17,7 +17,7 @@
#include "dawn_native/Queue.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -29,6 +29,6 @@
MaybeError SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_QUEUEMTL_H_
diff --git a/src/dawn_native/metal/QueueMTL.mm b/src/dawn_native/metal/QueueMTL.mm
index 09cc2ff..09aadd6 100644
--- a/src/dawn_native/metal/QueueMTL.mm
+++ b/src/dawn_native/metal/QueueMTL.mm
@@ -24,7 +24,7 @@
#include "dawn_platform/DawnPlatform.h"
#include "dawn_platform/tracing/TraceEvent.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
Queue::Queue(Device* device) : QueueBase(device) {
}
@@ -45,4 +45,4 @@
return device->SubmitPendingCommandBuffer();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/RenderPipelineMTL.h b/src/dawn_native/metal/RenderPipelineMTL.h
index d4bc69c..ca150f1c 100644
--- a/src/dawn_native/metal/RenderPipelineMTL.h
+++ b/src/dawn_native/metal/RenderPipelineMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -65,6 +65,6 @@
wgpu::ShaderStage mStagesRequiringStorageBufferLength = wgpu::ShaderStage::None;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_RENDERPIPELINEMTL_H_
diff --git a/src/dawn_native/metal/RenderPipelineMTL.mm b/src/dawn_native/metal/RenderPipelineMTL.mm
index 74cf3bd..695684c 100644
--- a/src/dawn_native/metal/RenderPipelineMTL.mm
+++ b/src/dawn_native/metal/RenderPipelineMTL.mm
@@ -22,7 +22,7 @@
#include "dawn_native/metal/TextureMTL.h"
#include "dawn_native/metal/UtilsMetal.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
MTLVertexFormat VertexFormatType(wgpu::VertexFormat format) {
@@ -503,4 +503,4 @@
CreateRenderPipelineAsyncTask::RunAsync(std::move(asyncTask));
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/SamplerMTL.h b/src/dawn_native/metal/SamplerMTL.h
index 52c4ef0..a90f518 100644
--- a/src/dawn_native/metal/SamplerMTL.h
+++ b/src/dawn_native/metal/SamplerMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -39,6 +39,6 @@
NSPRef<id<MTLSamplerState>> mMtlSamplerState;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_SAMPLERMTL_H_
diff --git a/src/dawn_native/metal/SamplerMTL.mm b/src/dawn_native/metal/SamplerMTL.mm
index 809c793..ef9960c 100644
--- a/src/dawn_native/metal/SamplerMTL.mm
+++ b/src/dawn_native/metal/SamplerMTL.mm
@@ -17,7 +17,7 @@
#include "dawn_native/metal/DeviceMTL.h"
#include "dawn_native/metal/UtilsMetal.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
MTLSamplerMinMagFilter FilterModeToMinMagFilter(wgpu::FilterMode mode) {
@@ -103,4 +103,4 @@
return mMtlSamplerState.Get();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/ShaderModuleMTL.h b/src/dawn_native/metal/ShaderModuleMTL.h
index 9380086..4bf2014 100644
--- a/src/dawn_native/metal/ShaderModuleMTL.h
+++ b/src/dawn_native/metal/ShaderModuleMTL.h
@@ -22,7 +22,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
class PipelineLayout;
@@ -65,6 +65,6 @@
MaybeError Initialize(ShaderModuleParseResult* parseResult);
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_SHADERMODULEMTL_H_
diff --git a/src/dawn_native/metal/ShaderModuleMTL.mm b/src/dawn_native/metal/ShaderModuleMTL.mm
index 79de704..c09720d 100644
--- a/src/dawn_native/metal/ShaderModuleMTL.mm
+++ b/src/dawn_native/metal/ShaderModuleMTL.mm
@@ -24,7 +24,7 @@
#include <sstream>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
ResultOrError<Ref<ShaderModule>> ShaderModule::Create(Device* device,
@@ -257,4 +257,4 @@
return {};
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/StagingBufferMTL.h b/src/dawn_native/metal/StagingBufferMTL.h
index c545b07..3b177f2 100644
--- a/src/dawn_native/metal/StagingBufferMTL.h
+++ b/src/dawn_native/metal/StagingBufferMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -37,6 +37,6 @@
Device* mDevice;
NSPRef<id<MTLBuffer>> mBuffer;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_STAGINGBUFFERMETAL_H_
diff --git a/src/dawn_native/metal/StagingBufferMTL.mm b/src/dawn_native/metal/StagingBufferMTL.mm
index 5ca18e5..6820e58 100644
--- a/src/dawn_native/metal/StagingBufferMTL.mm
+++ b/src/dawn_native/metal/StagingBufferMTL.mm
@@ -15,7 +15,7 @@
#include "dawn_native/metal/StagingBufferMTL.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
StagingBuffer::StagingBuffer(size_t size, Device* device)
: StagingBufferBase(size), mDevice(device) {
@@ -43,4 +43,4 @@
return mBuffer.Get();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/SwapChainMTL.h b/src/dawn_native/metal/SwapChainMTL.h
index 5513e4f..ef173cb 100644
--- a/src/dawn_native/metal/SwapChainMTL.h
+++ b/src/dawn_native/metal/SwapChainMTL.h
@@ -22,7 +22,7 @@
@class CAMetalLayer;
@protocol CAMetalDrawable;
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
class Texture;
@@ -62,6 +62,6 @@
void DetachFromSurfaceImpl() override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_SWAPCHAINMTL_H_
diff --git a/src/dawn_native/metal/SwapChainMTL.mm b/src/dawn_native/metal/SwapChainMTL.mm
index 8ec989c..cc978d7 100644
--- a/src/dawn_native/metal/SwapChainMTL.mm
+++ b/src/dawn_native/metal/SwapChainMTL.mm
@@ -22,7 +22,7 @@
#import <QuartzCore/CAMetalLayer.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// OldSwapChain
@@ -152,4 +152,4 @@
}
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/TextureMTL.h b/src/dawn_native/metal/TextureMTL.h
index 1858167..711f683 100644
--- a/src/dawn_native/metal/TextureMTL.h
+++ b/src/dawn_native/metal/TextureMTL.h
@@ -23,7 +23,7 @@
#include <IOSurface/IOSurfaceRef.h>
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class CommandRecordingContext;
class Device;
@@ -91,6 +91,6 @@
NSPRef<id<MTLTexture>> mMtlTextureView;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_TEXTUREMTL_H_
diff --git a/src/dawn_native/metal/TextureMTL.mm b/src/dawn_native/metal/TextureMTL.mm
index c166f4f..a3e9745 100644
--- a/src/dawn_native/metal/TextureMTL.mm
+++ b/src/dawn_native/metal/TextureMTL.mm
@@ -25,7 +25,7 @@
#include <CoreVideo/CVPixelBuffer.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
bool UsageNeedsTextureView(wgpu::TextureUsage usage) {
@@ -849,4 +849,4 @@
ASSERT(mMtlTextureView != nullptr);
return mMtlTextureView.Get();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/UtilsMetal.h b/src/dawn_native/metal/UtilsMetal.h
index 8dfb744..ef993a4 100644
--- a/src/dawn_native/metal/UtilsMetal.h
+++ b/src/dawn_native/metal/UtilsMetal.h
@@ -22,13 +22,13 @@
#import <Metal/Metal.h>
-namespace dawn_native {
+namespace dawn::native {
struct ProgrammableStage;
struct EntryPointMetadata;
enum class SingleShaderStage;
}
-namespace dawn_native::metal {
+namespace dawn::native::metal {
MTLCompareFunction ToMetalCompareFunction(wgpu::CompareFunction compareFunction);
@@ -81,6 +81,6 @@
uint32_t sampleMask = 0xFFFFFFFF,
const RenderPipeline* renderPipeline = nullptr);
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_UTILSMETAL_H_
diff --git a/src/dawn_native/metal/UtilsMetal.mm b/src/dawn_native/metal/UtilsMetal.mm
index 8d163ac..084c6a6 100644
--- a/src/dawn_native/metal/UtilsMetal.mm
+++ b/src/dawn_native/metal/UtilsMetal.mm
@@ -19,7 +19,7 @@
#include "common/Assert.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
MTLCompareFunction ToMetalCompareFunction(wgpu::CompareFunction compareFunction) {
switch (compareFunction) {
@@ -287,4 +287,4 @@
return {};
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal