diff --git a/.clang-format b/.clang-format index bc75cdc9d7..4d9e9c847d 100644 --- a/.clang-format +++ b/.clang-format @@ -10,7 +10,6 @@ IndentWidth: 4 ObjCBlockIndentWidth: 4 AccessModifierOffset: -2 -# Nested namespaces are C++17, fake them by compacting namespaces for now. CompactNamespaces: true # This should result in only one indentation level with compacted namespaces diff --git a/generator/templates/dawn_wire/client/ApiObjects.h b/generator/templates/dawn_wire/client/ApiObjects.h index bbf98174bd..b010ad9cc6 100644 --- a/generator/templates/dawn_wire/client/ApiObjects.h +++ b/generator/templates/dawn_wire/client/ApiObjects.h @@ -18,7 +18,7 @@ #include "dawn_wire/ObjectType_autogen.h" #include "dawn_wire/client/ObjectBase.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { template struct ObjectTypeToTypeEnum { @@ -48,6 +48,6 @@ namespace dawn_wire { namespace client { }; {% endfor %} -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_APIOBJECTS_AUTOGEN_H_ diff --git a/generator/templates/dawn_wire/client/ApiProcs.cpp b/generator/templates/dawn_wire/client/ApiProcs.cpp index 71201ecb47..fae6cc0fc4 100644 --- a/generator/templates/dawn_wire/client/ApiProcs.cpp +++ b/generator/templates/dawn_wire/client/ApiProcs.cpp @@ -21,7 +21,7 @@ #include #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { //* Outputs an rvalue that's the number of elements a pointer member points to. {% macro member_length(member, accessor) -%} @@ -175,4 +175,4 @@ namespace dawn_wire { namespace client { const {{Prefix}}ProcTable& GetProcs() { return gProcTable; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/generator/templates/dawn_wire/client/ClientBase.h b/generator/templates/dawn_wire/client/ClientBase.h index a91584008f..4b59b4ff4b 100644 --- a/generator/templates/dawn_wire/client/ClientBase.h +++ b/generator/templates/dawn_wire/client/ClientBase.h @@ -20,7 +20,7 @@ #include "dawn_wire/client/ApiObjects.h" #include "dawn_wire/client/ObjectAllocator.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class ClientBase : public ChunkedCommandHandler, public ObjectIdProvider { public: @@ -69,6 +69,6 @@ namespace dawn_wire { namespace client { {% endfor %} }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_CLIENTBASE_AUTOGEN_H_ diff --git a/generator/templates/dawn_wire/client/ClientHandlers.cpp b/generator/templates/dawn_wire/client/ClientHandlers.cpp index 13ac79c13b..25c0b4fe51 100644 --- a/generator/templates/dawn_wire/client/ClientHandlers.cpp +++ b/generator/templates/dawn_wire/client/ClientHandlers.cpp @@ -17,7 +17,7 @@ #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { {% for command in cmd_records["return command"] %} bool Client::Handle{{command.name.CamelCase()}}(DeserializeBuffer* deserializeBuffer) { Return{{command.name.CamelCase()}}Cmd cmd; @@ -94,4 +94,4 @@ namespace dawn_wire { namespace client { return commands; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/generator/templates/dawn_wire/server/ServerBase.h b/generator/templates/dawn_wire/server/ServerBase.h index eb0aab8c3b..46ef629c69 100644 --- a/generator/templates/dawn_wire/server/ServerBase.h +++ b/generator/templates/dawn_wire/server/ServerBase.h @@ -22,7 +22,7 @@ #include "dawn_wire/WireDeserializeAllocator.h" #include "dawn_wire/server/ObjectStorage.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { class ServerBase : public ChunkedCommandHandler, public ObjectIdResolver { public: @@ -100,6 +100,6 @@ namespace dawn_wire { namespace server { {% endfor %} }; -}} // namespace dawn_wire::server +} // namespace dawn_wire::server #endif // DAWNWIRE_SERVER_SERVERBASE_H_ diff --git a/generator/templates/dawn_wire/server/ServerDoers.cpp b/generator/templates/dawn_wire/server/ServerDoers.cpp index a663956ea3..5ccbb5f2b7 100644 --- a/generator/templates/dawn_wire/server/ServerDoers.cpp +++ b/generator/templates/dawn_wire/server/ServerDoers.cpp @@ -15,7 +15,7 @@ #include "common/Assert.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { //* Implementation of the command doers {% for command in cmd_records["command"] %} {% set type = command.derived_object %} @@ -118,4 +118,4 @@ namespace dawn_wire { namespace server { } } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/generator/templates/dawn_wire/server/ServerHandlers.cpp b/generator/templates/dawn_wire/server/ServerHandlers.cpp index ea3da6cae3..b853f6f075 100644 --- a/generator/templates/dawn_wire/server/ServerHandlers.cpp +++ b/generator/templates/dawn_wire/server/ServerHandlers.cpp @@ -15,7 +15,7 @@ #include "common/Assert.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { {% for command in cmd_records["command"] %} {% set method = command.derived_method %} {% set is_method = method != None %} @@ -147,4 +147,4 @@ namespace dawn_wire { namespace server { return commands; } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/generator/templates/opengl/OpenGLFunctionsBase.cpp b/generator/templates/opengl/OpenGLFunctionsBase.cpp index cc35dad37f..af76102632 100644 --- a/generator/templates/opengl/OpenGLFunctionsBase.cpp +++ b/generator/templates/opengl/OpenGLFunctionsBase.cpp @@ -14,7 +14,7 @@ #include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { template MaybeError OpenGLFunctionsBase::LoadProc(GetProcAddress getProc, T* memberProc, const char* name) { @@ -67,4 +67,4 @@ MaybeError OpenGLFunctionsBase::LoadDesktopGLProcs(GetProcAddress getProc, int m return {}; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/generator/templates/opengl/OpenGLFunctionsBase.h b/generator/templates/opengl/OpenGLFunctionsBase.h index 2e1656373e..31272be74c 100644 --- a/generator/templates/opengl/OpenGLFunctionsBase.h +++ b/generator/templates/opengl/OpenGLFunctionsBase.h @@ -18,7 +18,7 @@ #include "dawn_native/Error.h" #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { using GetProcAddress = void* (*) (const char*); struct OpenGLFunctionsBase { @@ -40,6 +40,6 @@ namespace dawn_native { namespace opengl { MaybeError LoadProc(GetProcAddress getProc, T* memberProc, const char* name); }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_OPENGLFUNCTIONSBASE_H_ diff --git a/src/common/vulkan_platform.h b/src/common/vulkan_platform.h index 9e4ea0ca91..7011e7bbbf 100644 --- a/src/common/vulkan_platform.h +++ b/src/common/vulkan_platform.h @@ -65,7 +65,7 @@ DAWN_DEFINE_NATIVE_NON_DISPATCHABLE_HANDLE(VkSomeHandle) // One way to get the alignment inside structures of a type is to look at the alignment of it // wrapped in a structure. Hence VkSameHandleNativeWrappe -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace detail { template @@ -140,17 +140,16 @@ namespace dawn_native { namespace vulkan { return reinterpret_cast(handle); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) \ DAWN_DEFINE_NATIVE_NON_DISPATCHABLE_HANDLE(object) \ - namespace dawn_native { namespace vulkan { \ - using object = detail::VkHandle; \ - static_assert(sizeof(object) == sizeof(uint64_t), ""); \ - static_assert(alignof(object) == detail::kUint64Alignment, ""); \ - static_assert(sizeof(object) == sizeof(::object), ""); \ - static_assert(alignof(object) == detail::kNativeVkHandleAlignment, ""); \ - } \ + namespace dawn_native::vulkan { \ + using object = detail::VkHandle; \ + static_assert(sizeof(object) == sizeof(uint64_t), ""); \ + static_assert(alignof(object) == detail::kUint64Alignment, ""); \ + static_assert(sizeof(object) == sizeof(::object), ""); \ + static_assert(alignof(object) == detail::kNativeVkHandleAlignment, ""); \ } // namespace dawn_native::vulkan // Import additional parts of Vulkan that are supported on our architecture and preemptively include diff --git a/src/dawn_native/CompilationMessages.h b/src/dawn_native/CompilationMessages.h index d6edbe9fa5..36db1033a2 100644 --- a/src/dawn_native/CompilationMessages.h +++ b/src/dawn_native/CompilationMessages.h @@ -22,10 +22,10 @@ #include #include -namespace tint { namespace diag { +namespace tint::diag { class Diagnostic; class List; -}} // namespace tint::diag +} // namespace tint::diag namespace dawn_native { diff --git a/src/dawn_native/d3d12/AdapterD3D12.cpp b/src/dawn_native/d3d12/AdapterD3D12.cpp index df8ec50221..e2182e794c 100644 --- a/src/dawn_native/d3d12/AdapterD3D12.cpp +++ b/src/dawn_native/d3d12/AdapterD3D12.cpp @@ -24,7 +24,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { Adapter::Adapter(Backend* backend, ComPtr hardwareAdapter) : AdapterBase(backend->GetInstance(), wgpu::BackendType::D3D12), @@ -412,4 +412,4 @@ namespace dawn_native { namespace d3d12 { return {}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/AdapterD3D12.h b/src/dawn_native/d3d12/AdapterD3D12.h index 4bb5a02045..56b602f950 100644 --- a/src/dawn_native/d3d12/AdapterD3D12.h +++ b/src/dawn_native/d3d12/AdapterD3D12.h @@ -21,7 +21,7 @@ #include "dawn_native/d3d12/D3D12Info.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Backend; @@ -61,6 +61,6 @@ namespace dawn_native { namespace d3d12 { D3D12DeviceInfo mDeviceInfo = {}; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_ADAPTERD3D12_H_ diff --git a/src/dawn_native/d3d12/BackendD3D12.cpp b/src/dawn_native/d3d12/BackendD3D12.cpp index 22d29c7bcf..71a9ccf6b6 100644 --- a/src/dawn_native/d3d12/BackendD3D12.cpp +++ b/src/dawn_native/d3d12/BackendD3D12.cpp @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/D3D12Error.h" #include "dawn_native/d3d12/PlatformFunctions.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { @@ -207,4 +207,4 @@ namespace dawn_native { namespace d3d12 { return backend; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/BackendD3D12.h b/src/dawn_native/d3d12/BackendD3D12.h index 17f77ccec3..e41fd7a0bf 100644 --- a/src/dawn_native/d3d12/BackendD3D12.h +++ b/src/dawn_native/d3d12/BackendD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class PlatformFunctions; @@ -54,6 +54,6 @@ namespace dawn_native { namespace d3d12 { ComPtr mDxcValidator; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_BACKENDD3D12_H_ diff --git a/src/dawn_native/d3d12/BindGroupD3D12.cpp b/src/dawn_native/d3d12/BindGroupD3D12.cpp index 20822408f3..6c19488162 100644 --- a/src/dawn_native/d3d12/BindGroupD3D12.cpp +++ b/src/dawn_native/d3d12/BindGroupD3D12.cpp @@ -23,7 +23,7 @@ #include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" #include "dawn_native/d3d12/TextureD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // static ResultOrError> BindGroup::Create(Device* device, @@ -282,4 +282,4 @@ namespace dawn_native { namespace d3d12 { return mDynamicStorageBufferLengths; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/BindGroupD3D12.h b/src/dawn_native/d3d12/BindGroupD3D12.h index b34b0d4d09..a0b8c7a34e 100644 --- a/src/dawn_native/d3d12/BindGroupD3D12.h +++ b/src/dawn_native/d3d12/BindGroupD3D12.h @@ -22,7 +22,7 @@ #include "dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h" #include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; class SamplerHeapCacheEntry; @@ -63,6 +63,6 @@ namespace dawn_native { namespace d3d12 { DynamicStorageBufferLengths mDynamicStorageBufferLengths; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_BINDGROUPD3D12_H_ diff --git a/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp b/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp index 761b8f74a7..527d41cbb1 100644 --- a/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp +++ b/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/SamplerHeapCacheD3D12.h" #include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { D3D12_DESCRIPTOR_RANGE_TYPE WGPUBindingInfoToDescriptorRangeType( const BindingInfo& bindingInfo) { @@ -188,4 +188,4 @@ namespace dawn_native { namespace d3d12 { return mSamplerDescriptorRanges; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/BindGroupLayoutD3D12.h b/src/dawn_native/d3d12/BindGroupLayoutD3D12.h index abf67021a0..377d620daa 100644 --- a/src/dawn_native/d3d12/BindGroupLayoutD3D12.h +++ b/src/dawn_native/d3d12/BindGroupLayoutD3D12.h @@ -21,7 +21,7 @@ #include "common/ityp_stack_vec.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class BindGroup; class CPUDescriptorHeapAllocation; @@ -89,6 +89,6 @@ namespace dawn_native { namespace d3d12 { StagingDescriptorAllocator* mViewAllocator = nullptr; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_BINDGROUPLAYOUTD3D12_H_ diff --git a/src/dawn_native/d3d12/BufferD3D12.cpp b/src/dawn_native/d3d12/BufferD3D12.cpp index a05eec0711..4741f79cae 100644 --- a/src/dawn_native/d3d12/BufferD3D12.cpp +++ b/src/dawn_native/d3d12/BufferD3D12.cpp @@ -26,7 +26,7 @@ #include "dawn_native/d3d12/ResidencyManagerD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { D3D12_RESOURCE_FLAGS D3D12ResourceFlags(wgpu::BufferUsage usage) { @@ -490,4 +490,4 @@ namespace dawn_native { namespace d3d12 { return {}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/BufferD3D12.h b/src/dawn_native/d3d12/BufferD3D12.h index 8e9e01e7b3..c5a7148efb 100644 --- a/src/dawn_native/d3d12/BufferD3D12.h +++ b/src/dawn_native/d3d12/BufferD3D12.h @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class CommandRecordingContext; class Device; @@ -86,6 +86,6 @@ namespace dawn_native { namespace d3d12 { void* mMappedData = nullptr; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_BUFFERD3D12_H_ diff --git a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp b/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp index d92398584d..bd71def421 100644 --- a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp +++ b/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp @@ -15,7 +15,7 @@ #include "dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h" #include "dawn_native/Error.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { CPUDescriptorHeapAllocation::CPUDescriptorHeapAllocation( D3D12_CPU_DESCRIPTOR_HANDLE baseDescriptor, @@ -50,4 +50,4 @@ namespace dawn_native { namespace d3d12 { mBaseDescriptor = {0}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h b/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h index 51ae2fdb61..9cff652b5d 100644 --- a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h +++ b/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // Wrapper for a handle into a CPU-only descriptor heap. class CPUDescriptorHeapAllocation { @@ -42,6 +42,6 @@ namespace dawn_native { namespace d3d12 { uint32_t mHeapIndex = -1; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_CPUDESCRIPTORHEAPALLOCATION_H_ diff --git a/src/dawn_native/d3d12/CommandAllocatorManager.cpp b/src/dawn_native/d3d12/CommandAllocatorManager.cpp index c011feba60..01891b8e16 100644 --- a/src/dawn_native/d3d12/CommandAllocatorManager.cpp +++ b/src/dawn_native/d3d12/CommandAllocatorManager.cpp @@ -20,7 +20,7 @@ #include "common/Assert.h" #include "common/BitSetIterator.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { CommandAllocatorManager::CommandAllocatorManager(Device* device) : device(device), mAllocatorCount(0) { @@ -69,4 +69,4 @@ namespace dawn_native { namespace d3d12 { return {}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/CommandAllocatorManager.h b/src/dawn_native/d3d12/CommandAllocatorManager.h index 3c123954c1..0ecdadac2b 100644 --- a/src/dawn_native/d3d12/CommandAllocatorManager.h +++ b/src/dawn_native/d3d12/CommandAllocatorManager.h @@ -23,7 +23,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -53,6 +53,6 @@ namespace dawn_native { namespace d3d12 { SerialQueue mInFlightCommandAllocators; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_COMMANDALLOCATORMANAGER_H_ diff --git a/src/dawn_native/d3d12/CommandBufferD3D12.cpp b/src/dawn_native/d3d12/CommandBufferD3D12.cpp index aa83abb0d6..5365351d13 100644 --- a/src/dawn_native/d3d12/CommandBufferD3D12.cpp +++ b/src/dawn_native/d3d12/CommandBufferD3D12.cpp @@ -33,7 +33,7 @@ #include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { @@ -1649,4 +1649,4 @@ namespace dawn_native { namespace d3d12 { } return {}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/CommandBufferD3D12.h b/src/dawn_native/d3d12/CommandBufferD3D12.h index 51dc52728b..50f28c68a6 100644 --- a/src/dawn_native/d3d12/CommandBufferD3D12.h +++ b/src/dawn_native/d3d12/CommandBufferD3D12.h @@ -22,7 +22,7 @@ namespace dawn_native { struct BeginRenderPassCmd; } // namespace dawn_native -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class BindGroupStateTracker; class CommandRecordingContext; @@ -52,6 +52,6 @@ namespace dawn_native { namespace d3d12 { const RenderPassBuilder* renderPassBuilder) const; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_ diff --git a/src/dawn_native/d3d12/CommandRecordingContext.cpp b/src/dawn_native/d3d12/CommandRecordingContext.cpp index 8faa46e036..ce7c22a201 100644 --- a/src/dawn_native/d3d12/CommandRecordingContext.cpp +++ b/src/dawn_native/d3d12/CommandRecordingContext.cpp @@ -18,7 +18,7 @@ #include "dawn_native/d3d12/HeapD3D12.h" #include "dawn_native/d3d12/ResidencyManagerD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { void CommandRecordingContext::AddToSharedTextureList(Texture* texture) { ASSERT(IsOpen()); @@ -123,4 +123,4 @@ namespace dawn_native { namespace d3d12 { mTempBuffers.emplace_back(tempBuffer); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/CommandRecordingContext.h b/src/dawn_native/d3d12/CommandRecordingContext.h index 6c6dc37dd0..75a83502f0 100644 --- a/src/dawn_native/d3d12/CommandRecordingContext.h +++ b/src/dawn_native/d3d12/CommandRecordingContext.h @@ -21,7 +21,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class CommandAllocatorManager; class Device; class Heap; @@ -53,6 +53,6 @@ namespace dawn_native { namespace d3d12 { std::vector> mTempBuffers; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_COMMANDRECORDINGCONTEXT_H_ diff --git a/src/dawn_native/d3d12/ComputePipelineD3D12.cpp b/src/dawn_native/d3d12/ComputePipelineD3D12.cpp index 82579f321a..d50f21092c 100644 --- a/src/dawn_native/d3d12/ComputePipelineD3D12.cpp +++ b/src/dawn_native/d3d12/ComputePipelineD3D12.cpp @@ -22,7 +22,7 @@ #include "dawn_native/d3d12/ShaderModuleD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { Ref ComputePipeline::CreateUninitialized( Device* device, @@ -102,4 +102,4 @@ namespace dawn_native { namespace d3d12 { return ToBackend(GetDevice())->GetDispatchIndirectSignature(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/ComputePipelineD3D12.h b/src/dawn_native/d3d12/ComputePipelineD3D12.h index ddf7476ed1..3e14217676 100644 --- a/src/dawn_native/d3d12/ComputePipelineD3D12.h +++ b/src/dawn_native/d3d12/ComputePipelineD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -53,6 +53,6 @@ namespace dawn_native { namespace d3d12 { ComPtr mPipelineState; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_COMPUTEPIPELINED3D12_H_ diff --git a/src/dawn_native/d3d12/D3D11on12Util.cpp b/src/dawn_native/d3d12/D3D11on12Util.cpp index b8c28f6c43..0c526a0f52 100644 --- a/src/dawn_native/d3d12/D3D11on12Util.cpp +++ b/src/dawn_native/d3d12/D3D11on12Util.cpp @@ -21,7 +21,7 @@ #include "common/Log.h" #include "dawn_native/d3d12/DeviceD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { void Flush11On12DeviceToAvoidLeaks(ComPtr d3d11on12Device) { if (d3d11on12Device == nullptr) { @@ -161,4 +161,4 @@ namespace dawn_native { namespace d3d12 { return entry; } -}} // namespace dawn_native::d3d12 \ No newline at end of file +} // namespace dawn_native::d3d12 \ No newline at end of file diff --git a/src/dawn_native/d3d12/D3D11on12Util.h b/src/dawn_native/d3d12/D3D11on12Util.h index 91db081a8e..ab622f0d0c 100644 --- a/src/dawn_native/d3d12/D3D11on12Util.h +++ b/src/dawn_native/d3d12/D3D11on12Util.h @@ -25,7 +25,7 @@ struct ID3D11On12Device; struct IDXGIKeyedMutex; -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // Wraps 11 wrapped resources in a cache. class D3D11on12ResourceCacheEntry : public RefCounted { @@ -84,6 +84,6 @@ namespace dawn_native { namespace d3d12 { Cache mCache; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D11ON12UTIL_H_ diff --git a/src/dawn_native/d3d12/D3D12Backend.cpp b/src/dawn_native/d3d12/D3D12Backend.cpp index 35baa1b960..e6ce0f6f12 100644 --- a/src/dawn_native/d3d12/D3D12Backend.cpp +++ b/src/dawn_native/d3d12/D3D12Backend.cpp @@ -26,7 +26,7 @@ #include "dawn_native/d3d12/ResidencyManagerD3D12.h" #include "dawn_native/d3d12/TextureD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { ComPtr GetD3D12Device(WGPUDevice device) { return ToBackend(FromAPI(device))->GetD3D12Device(); @@ -178,4 +178,4 @@ namespace dawn_native { namespace d3d12 { AdapterDiscoveryOptions::AdapterDiscoveryOptions(ComPtr adapter) : AdapterDiscoveryOptionsBase(WGPUBackendType_D3D12), dxgiAdapter(std::move(adapter)) { } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/D3D12Error.cpp b/src/dawn_native/d3d12/D3D12Error.cpp index efc9fe09ba..914ff23041 100644 --- a/src/dawn_native/d3d12/D3D12Error.cpp +++ b/src/dawn_native/d3d12/D3D12Error.cpp @@ -18,7 +18,7 @@ #include #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { MaybeError CheckHRESULTImpl(HRESULT result, const char* context) { if (DAWN_LIKELY(SUCCEEDED(result))) { return {}; @@ -48,4 +48,4 @@ namespace dawn_native { namespace d3d12 { return CheckHRESULTImpl(result, context); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/D3D12Error.h b/src/dawn_native/d3d12/D3D12Error.h index ade06fe62e..6d01c9e1a8 100644 --- a/src/dawn_native/d3d12/D3D12Error.h +++ b/src/dawn_native/d3d12/D3D12Error.h @@ -19,7 +19,7 @@ #include "dawn_native/Error.h" #include "dawn_native/ErrorInjector.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { constexpr HRESULT E_FAKE_ERROR_FOR_TESTING = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xFF); constexpr HRESULT E_FAKE_OUTOFMEMORY_ERROR_FOR_TESTING = @@ -40,6 +40,6 @@ namespace dawn_native { namespace d3d12 { E_FAKE_ERROR_FOR_TESTING), \ contextIn) -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_D3D12ERROR_H_ diff --git a/src/dawn_native/d3d12/D3D12Info.cpp b/src/dawn_native/d3d12/D3D12Info.cpp index d7a0f5e66c..3f10b11251 100644 --- a/src/dawn_native/d3d12/D3D12Info.cpp +++ b/src/dawn_native/d3d12/D3D12Info.cpp @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/D3D12Error.h" #include "dawn_native/d3d12/PlatformFunctions.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { ResultOrError GatherDeviceInfo(const Adapter& adapter) { D3D12DeviceInfo info = {}; @@ -119,4 +119,4 @@ namespace dawn_native { namespace d3d12 { return std::move(info); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/D3D12Info.h b/src/dawn_native/d3d12/D3D12Info.h index a7195951ad..b8c7c0b9ec 100644 --- a/src/dawn_native/d3d12/D3D12Info.h +++ b/src/dawn_native/d3d12/D3D12Info.h @@ -19,7 +19,7 @@ #include "dawn_native/PerStage.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Adapter; @@ -36,6 +36,6 @@ namespace dawn_native { namespace d3d12 { }; ResultOrError GatherDeviceInfo(const Adapter& adapter); -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_D3D12INFO_H_ diff --git a/src/dawn_native/d3d12/DeviceD3D12.cpp b/src/dawn_native/d3d12/DeviceD3D12.cpp index 94697e2626..7dd2a533ee 100644 --- a/src/dawn_native/d3d12/DeviceD3D12.cpp +++ b/src/dawn_native/d3d12/DeviceD3D12.cpp @@ -44,7 +44,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // TODO(dawn:155): Figure out these values. static constexpr uint16_t kShaderVisibleDescriptorHeapSize = 1024; @@ -742,4 +742,4 @@ namespace dawn_native { namespace d3d12 { return ToBackend(computePipeline)->UsesNumWorkgroups(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/DeviceD3D12.h b/src/dawn_native/d3d12/DeviceD3D12.h index 6036e41a45..26851d72d8 100644 --- a/src/dawn_native/d3d12/DeviceD3D12.h +++ b/src/dawn_native/d3d12/DeviceD3D12.h @@ -22,7 +22,7 @@ #include "dawn_native/d3d12/Forward.h" #include "dawn_native/d3d12/TextureD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class CommandAllocatorManager; class PlatformFunctions; @@ -261,6 +261,6 @@ namespace dawn_native { namespace d3d12 { float mTimestampPeriod = 1.0f; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_DEVICED3D12_H_ diff --git a/src/dawn_native/d3d12/Forward.h b/src/dawn_native/d3d12/Forward.h index 4e5368b63a..de2b0b4a02 100644 --- a/src/dawn_native/d3d12/Forward.h +++ b/src/dawn_native/d3d12/Forward.h @@ -17,7 +17,7 @@ #include "dawn_native/ToBackend.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Adapter; class BindGroup; @@ -64,6 +64,6 @@ namespace dawn_native { namespace d3d12 { return ToBackendBase(common); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_FORWARD_H_ diff --git a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp b/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp index 939a38c187..59288b1ddc 100644 --- a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp +++ b/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp @@ -14,7 +14,7 @@ #include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { GPUDescriptorHeapAllocation::GPUDescriptorHeapAllocation( D3D12_GPU_DESCRIPTOR_HANDLE baseDescriptor, @@ -36,4 +36,4 @@ namespace dawn_native { namespace d3d12 { HeapVersionID GPUDescriptorHeapAllocation::GetHeapSerial() const { return mHeapSerial; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h b/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h index bdab5beee1..58b39fe66f 100644 --- a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h +++ b/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/IntegerTypes.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // Wrapper for a handle into a GPU-only descriptor heap. class GPUDescriptorHeapAllocation { @@ -39,6 +39,6 @@ namespace dawn_native { namespace d3d12 { HeapVersionID mHeapSerial = HeapVersionID(0); }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_CPUDESCRIPTORHEAPALLOCATION_H_ diff --git a/src/dawn_native/d3d12/HeapAllocatorD3D12.cpp b/src/dawn_native/d3d12/HeapAllocatorD3D12.cpp index 2c9f3778e0..bb333e7ffa 100644 --- a/src/dawn_native/d3d12/HeapAllocatorD3D12.cpp +++ b/src/dawn_native/d3d12/HeapAllocatorD3D12.cpp @@ -18,7 +18,7 @@ #include "dawn_native/d3d12/HeapD3D12.h" #include "dawn_native/d3d12/ResidencyManagerD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { HeapAllocator::HeapAllocator(Device* device, D3D12_HEAP_TYPE heapType, @@ -68,4 +68,4 @@ namespace dawn_native { namespace d3d12 { mDevice->ReferenceUntilUnused(static_cast(heap.get())->GetD3D12Heap()); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/HeapAllocatorD3D12.h b/src/dawn_native/d3d12/HeapAllocatorD3D12.h index 53254c5e9f..f8e58be025 100644 --- a/src/dawn_native/d3d12/HeapAllocatorD3D12.h +++ b/src/dawn_native/d3d12/HeapAllocatorD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/ResourceHeapAllocator.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -43,6 +43,6 @@ namespace dawn_native { namespace d3d12 { MemorySegment mMemorySegment; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_HEAPALLOCATORD3D12_H_ diff --git a/src/dawn_native/d3d12/HeapD3D12.cpp b/src/dawn_native/d3d12/HeapD3D12.cpp index 7bb4e323a6..d5605054c9 100644 --- a/src/dawn_native/d3d12/HeapD3D12.cpp +++ b/src/dawn_native/d3d12/HeapD3D12.cpp @@ -14,7 +14,7 @@ #include "dawn_native/d3d12/HeapD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { Heap::Heap(ComPtr d3d12Pageable, MemorySegment memorySegment, uint64_t size) : Pageable(std::move(d3d12Pageable), memorySegment, size) { mD3d12Pageable.As(&mD3d12Heap); @@ -28,4 +28,4 @@ namespace dawn_native { namespace d3d12 { return mD3d12Heap.Get(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/HeapD3D12.h b/src/dawn_native/d3d12/HeapD3D12.h index b59c6449de..6b04177bd4 100644 --- a/src/dawn_native/d3d12/HeapD3D12.h +++ b/src/dawn_native/d3d12/HeapD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/PageableD3D12.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -35,6 +35,6 @@ namespace dawn_native { namespace d3d12 { private: ComPtr mD3d12Heap; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_HEAPD3D12_H_ diff --git a/src/dawn_native/d3d12/IntegerTypes.h b/src/dawn_native/d3d12/IntegerTypes.h index 219f392a19..df00f1e785 100644 --- a/src/dawn_native/d3d12/IntegerTypes.h +++ b/src/dawn_native/d3d12/IntegerTypes.h @@ -20,7 +20,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // An ID used to desambiguate between multiple uses of the same descriptor heap in the // BindGroup allocations. @@ -29,6 +29,6 @@ namespace dawn_native { namespace d3d12 { // The monotonically increasing serial for external D3D12 mutexes imported in Dawn. using ExternalMutexSerial = TypedInteger; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_INTEGERTYPES_H_ diff --git a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp b/src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp index f4ef120923..933e44d724 100644 --- a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp +++ b/src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp @@ -18,7 +18,7 @@ #include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/TextureD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { DXGI_USAGE D3D12SwapChainBufferUsage(WGPUTextureUsage allowedUsages) { @@ -117,4 +117,4 @@ namespace dawn_native { namespace d3d12 { return wgpu::TextureFormat::RGBA8Unorm; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h b/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h index bb53268471..f3f721597a 100644 --- a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h +++ b/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h @@ -23,7 +23,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -55,6 +55,6 @@ namespace dawn_native { namespace d3d12 { uint32_t mCurrentBuffer; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_NATIVESWAPCHAINIMPLD3D12_H_ diff --git a/src/dawn_native/d3d12/PageableD3D12.cpp b/src/dawn_native/d3d12/PageableD3D12.cpp index b171db5a8d..06b8d8b3ef 100644 --- a/src/dawn_native/d3d12/PageableD3D12.cpp +++ b/src/dawn_native/d3d12/PageableD3D12.cpp @@ -14,7 +14,7 @@ #include "dawn_native/d3d12/PageableD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { Pageable::Pageable(ComPtr d3d12Pageable, MemorySegment memorySegment, uint64_t size) @@ -73,4 +73,4 @@ namespace dawn_native { namespace d3d12 { bool Pageable::IsResidencyLocked() const { return mResidencyLockRefCount != 0; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/PageableD3D12.h b/src/dawn_native/d3d12/PageableD3D12.h index fb3a6894d6..0a7a46a5d3 100644 --- a/src/dawn_native/d3d12/PageableD3D12.h +++ b/src/dawn_native/d3d12/PageableD3D12.h @@ -20,7 +20,7 @@ #include "dawn_native/IntegerTypes.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // This class is used to represent ID3D12Pageable allocations, and also serves as a node within // the ResidencyManager's LRU cache. This node is inserted into the LRU-cache when it is first // allocated, and any time it is scheduled to be used by the GPU. This node is removed from the @@ -75,6 +75,6 @@ namespace dawn_native { namespace d3d12 { uint32_t mResidencyLockRefCount = 0; uint64_t mSize = 0; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif diff --git a/src/dawn_native/d3d12/PipelineLayoutD3D12.cpp b/src/dawn_native/d3d12/PipelineLayoutD3D12.cpp index 7d67ac9dfe..bd38998013 100644 --- a/src/dawn_native/d3d12/PipelineLayoutD3D12.cpp +++ b/src/dawn_native/d3d12/PipelineLayoutD3D12.cpp @@ -24,7 +24,7 @@ using Microsoft::WRL::ComPtr; -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { // Reserve register names for internal use. This registers map to bindings in the shader, @@ -364,4 +364,4 @@ namespace dawn_native { namespace d3d12 { return mDispatchIndirectCommandSignatureWithNumWorkgroups.Get(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/PipelineLayoutD3D12.h b/src/dawn_native/d3d12/PipelineLayoutD3D12.h index 1304f73c2e..2a477b1388 100644 --- a/src/dawn_native/d3d12/PipelineLayoutD3D12.h +++ b/src/dawn_native/d3d12/PipelineLayoutD3D12.h @@ -21,7 +21,7 @@ #include "dawn_native/PipelineLayout.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -95,6 +95,6 @@ namespace dawn_native { namespace d3d12 { ComPtr mDispatchIndirectCommandSignatureWithNumWorkgroups; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_PIPELINELAYOUTD3D12_H_ diff --git a/src/dawn_native/d3d12/PlatformFunctions.cpp b/src/dawn_native/d3d12/PlatformFunctions.cpp index 27e656486e..c89b3923af 100644 --- a/src/dawn_native/d3d12/PlatformFunctions.cpp +++ b/src/dawn_native/d3d12/PlatformFunctions.cpp @@ -20,7 +20,7 @@ #include #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { // Extract Version from "10.0.{Version}.0" if possible, otherwise return 0. uint32_t GetWindowsSDKVersionFromDirectoryName(const char* directoryName) { @@ -268,4 +268,4 @@ namespace dawn_native { namespace d3d12 { } } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/PlatformFunctions.h b/src/dawn_native/d3d12/PlatformFunctions.h index cd88217553..be8c48f6ba 100644 --- a/src/dawn_native/d3d12/PlatformFunctions.h +++ b/src/dawn_native/d3d12/PlatformFunctions.h @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // Loads the functions required from the platform dynamically so that we don't need to rely on // them being present in the system. For example linking against d3d12.lib would prevent @@ -105,6 +105,6 @@ namespace dawn_native { namespace d3d12 { DynamicLib mPIXEventRuntimeLib; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_PLATFORMFUNCTIONS_H_ diff --git a/src/dawn_native/d3d12/QuerySetD3D12.cpp b/src/dawn_native/d3d12/QuerySetD3D12.cpp index d6a618086d..933b0850dc 100644 --- a/src/dawn_native/d3d12/QuerySetD3D12.cpp +++ b/src/dawn_native/d3d12/QuerySetD3D12.cpp @@ -18,7 +18,7 @@ #include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { D3D12_QUERY_HEAP_TYPE D3D12QueryHeapType(wgpu::QueryType type) { @@ -72,4 +72,4 @@ namespace dawn_native { namespace d3d12 { SetDebugName(ToBackend(GetDevice()), mQueryHeap.Get(), "Dawn_QuerySet", GetLabel()); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/QuerySetD3D12.h b/src/dawn_native/d3d12/QuerySetD3D12.h index 7058798bd3..c7a2193105 100644 --- a/src/dawn_native/d3d12/QuerySetD3D12.h +++ b/src/dawn_native/d3d12/QuerySetD3D12.h @@ -18,7 +18,7 @@ #include "dawn_native/QuerySet.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -41,6 +41,6 @@ namespace dawn_native { namespace d3d12 { ComPtr mQueryHeap; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_QUERYSETD3D12_H_ diff --git a/src/dawn_native/d3d12/QueueD3D12.cpp b/src/dawn_native/d3d12/QueueD3D12.cpp index ca6064de51..0bf4edc580 100644 --- a/src/dawn_native/d3d12/QueueD3D12.cpp +++ b/src/dawn_native/d3d12/QueueD3D12.cpp @@ -24,7 +24,7 @@ #include "dawn_platform/DawnPlatform.h" #include "dawn_platform/tracing/TraceEvent.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { Queue::Queue(Device* device) : QueueBase(device) { } @@ -51,4 +51,4 @@ namespace dawn_native { namespace d3d12 { return {}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/QueueD3D12.h b/src/dawn_native/d3d12/QueueD3D12.h index 311c607192..446dc1aee8 100644 --- a/src/dawn_native/d3d12/QueueD3D12.h +++ b/src/dawn_native/d3d12/QueueD3D12.h @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/CommandRecordingContext.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -32,6 +32,6 @@ namespace dawn_native { namespace d3d12 { MaybeError SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) override; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_QUEUED3D12_H_ diff --git a/src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp b/src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp index 47da954c22..d63d77e1b5 100644 --- a/src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp +++ b/src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp @@ -21,7 +21,7 @@ #include "dawn_native/dawn_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE D3D12BeginningAccessType(wgpu::LoadOp loadOp) { @@ -235,4 +235,4 @@ namespace dawn_native { namespace d3d12 { D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/RenderPassBuilderD3D12.h b/src/dawn_native/d3d12/RenderPassBuilderD3D12.h index 20f70a4190..7fa7c6c4e8 100644 --- a/src/dawn_native/d3d12/RenderPassBuilderD3D12.h +++ b/src/dawn_native/d3d12/RenderPassBuilderD3D12.h @@ -24,7 +24,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class TextureView; @@ -93,6 +93,6 @@ namespace dawn_native { namespace d3d12 { kMaxColorAttachments> mSubresourceParams; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_RENDERPASSBUILDERD3D12_H_ diff --git a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp b/src/dawn_native/d3d12/RenderPipelineD3D12.cpp index 410d36f85d..c8efa7f479 100644 --- a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp +++ b/src/dawn_native/d3d12/RenderPipelineD3D12.cpp @@ -27,7 +27,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { DXGI_FORMAT VertexFormatType(wgpu::VertexFormat format) { @@ -487,4 +487,4 @@ namespace dawn_native { namespace d3d12 { CreateRenderPipelineAsyncTask::RunAsync(std::move(asyncTask)); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/RenderPipelineD3D12.h b/src/dawn_native/d3d12/RenderPipelineD3D12.h index 66f0ea66e4..6ac5a19ade 100644 --- a/src/dawn_native/d3d12/RenderPipelineD3D12.h +++ b/src/dawn_native/d3d12/RenderPipelineD3D12.h @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/ShaderModuleD3D12.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -57,6 +57,6 @@ namespace dawn_native { namespace d3d12 { FirstOffsetInfo mFirstOffsetInfo; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_RENDERPIPELINED3D12_H_ diff --git a/src/dawn_native/d3d12/ResidencyManagerD3D12.cpp b/src/dawn_native/d3d12/ResidencyManagerD3D12.cpp index ffc1e1b85a..8eea16a151 100644 --- a/src/dawn_native/d3d12/ResidencyManagerD3D12.cpp +++ b/src/dawn_native/d3d12/ResidencyManagerD3D12.cpp @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/Forward.h" #include "dawn_native/d3d12/HeapD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { ResidencyManager::ResidencyManager(Device* device) : mDevice(device), @@ -368,4 +368,4 @@ namespace dawn_native { namespace d3d12 { } } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/ResidencyManagerD3D12.h b/src/dawn_native/d3d12/ResidencyManagerD3D12.h index 02fad75c32..7c10aa5426 100644 --- a/src/dawn_native/d3d12/ResidencyManagerD3D12.h +++ b/src/dawn_native/d3d12/ResidencyManagerD3D12.h @@ -22,7 +22,7 @@ #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; class Heap; @@ -77,6 +77,6 @@ namespace dawn_native { namespace d3d12 { VideoMemoryInfo mVideoMemoryInfo = {}; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_RESIDENCYMANAGERD3D12_H_ diff --git a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp b/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp index 166d59f817..832b193fe7 100644 --- a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp +++ b/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp @@ -21,7 +21,7 @@ #include "dawn_native/d3d12/ResidencyManagerD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { MemorySegment GetMemorySegment(Device* device, D3D12_HEAP_TYPE heapType) { if (device->GetDeviceInfo().isUMA) { @@ -407,4 +407,4 @@ namespace dawn_native { namespace d3d12 { } } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h b/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h index 7bbf53ae0b..f8ddaacc42 100644 --- a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h +++ b/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h @@ -24,7 +24,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -102,6 +102,6 @@ namespace dawn_native { namespace d3d12 { SerialQueue mAllocationsToDelete; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_RESOURCEALLOCATORMANAGERD3D12_H_ diff --git a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp b/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp index c7f8c68d1d..514a9b49e8 100644 --- a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp +++ b/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp @@ -19,7 +19,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { ResourceHeapAllocation::ResourceHeapAllocation(const AllocationInfo& info, uint64_t offset, ComPtr resource, @@ -40,4 +40,4 @@ namespace dawn_native { namespace d3d12 { D3D12_GPU_VIRTUAL_ADDRESS ResourceHeapAllocation::GetGPUPointer() const { return mResource->GetGPUVirtualAddress(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h b/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h index 7f1fe0a9d8..8c2951d72a 100644 --- a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h +++ b/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/ResourceMemoryAllocation.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Heap; @@ -43,6 +43,6 @@ namespace dawn_native { namespace d3d12 { ComPtr mResource; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_RESOURCEHEAPALLOCATIOND3D12_H_ diff --git a/src/dawn_native/d3d12/SamplerD3D12.cpp b/src/dawn_native/d3d12/SamplerD3D12.cpp index 0671cc428d..a72dd1d064 100644 --- a/src/dawn_native/d3d12/SamplerD3D12.cpp +++ b/src/dawn_native/d3d12/SamplerD3D12.cpp @@ -17,7 +17,7 @@ #include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { D3D12_TEXTURE_ADDRESS_MODE AddressMode(wgpu::AddressMode mode) { @@ -103,4 +103,4 @@ namespace dawn_native { namespace d3d12 { return mSamplerDesc; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/SamplerD3D12.h b/src/dawn_native/d3d12/SamplerD3D12.h index ede374b94b..f1ad94ead1 100644 --- a/src/dawn_native/d3d12/SamplerD3D12.h +++ b/src/dawn_native/d3d12/SamplerD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -35,6 +35,6 @@ namespace dawn_native { namespace d3d12 { D3D12_SAMPLER_DESC mSamplerDesc = {}; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_SAMPLERD3D12_H_ diff --git a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp b/src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp index d1d6f3f011..de8f1365fb 100644 --- a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp +++ b/src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp @@ -24,7 +24,7 @@ #include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" #include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { SamplerHeapCacheEntry::SamplerHeapCacheEntry(std::vector samplers) : mSamplers(std::move(samplers)) { @@ -163,4 +163,4 @@ namespace dawn_native { namespace d3d12 { const SamplerHeapCacheEntry* b) const { return a->mSamplers == b->mSamplers; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.h b/src/dawn_native/d3d12/SamplerHeapCacheD3D12.h index 3e2cf4c80b..09064f7745 100644 --- a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.h +++ b/src/dawn_native/d3d12/SamplerHeapCacheD3D12.h @@ -32,7 +32,7 @@ // // The cache is primary needed for the GPU sampler heap, which is much smaller than the view heap // and switches incur expensive pipeline flushes. -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class BindGroup; class Device; @@ -102,6 +102,6 @@ namespace dawn_native { namespace d3d12 { Cache mCache; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_SAMPLERHEAPCACHE_H_ diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp index 4515d12785..b580a08157 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp +++ b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp @@ -34,7 +34,7 @@ #include #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { ResultOrError GetDXCompilerVersion(ComPtr dxcValidator) { @@ -828,4 +828,4 @@ namespace dawn_native { namespace d3d12 { UNREACHABLE(); return {}; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.h b/src/dawn_native/d3d12/ShaderModuleD3D12.h index 02c1f8cea0..9ab5e499e6 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.h +++ b/src/dawn_native/d3d12/ShaderModuleD3D12.h @@ -24,7 +24,7 @@ namespace dawn_native { struct ProgrammableStage; } // namespace dawn_native -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; class PipelineLayout; @@ -64,6 +64,6 @@ namespace dawn_native { namespace d3d12 { MaybeError Initialize(ShaderModuleParseResult* parseResult); }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_SHADERMODULED3D12_H_ diff --git a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp b/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp index 916a371cb4..631a02e582 100644 --- a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp +++ b/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp @@ -18,7 +18,7 @@ #include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" #include "dawn_native/d3d12/ResidencyManagerD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { // Limits the min/max heap size to always be some known value for testing. // Thresholds should be adjusted (lower == faster) to avoid tests taking too long to complete. @@ -251,4 +251,4 @@ namespace dawn_native { namespace d3d12 { ID3D12DescriptorHeap* ShaderVisibleDescriptorHeap::GetD3D12DescriptorHeap() const { return mD3d12DescriptorHeap.Get(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h b/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h index a315b5607f..72a207e436 100644 --- a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h +++ b/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h @@ -29,7 +29,7 @@ // of two states: switched in or out. Only a switched in heap can be bound to the pipeline. If // the heap is full, the caller must switch-in a new heap before re-allocating and the old one // is returned to the pool. -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; class GPUDescriptorHeapAllocation; @@ -100,6 +100,6 @@ namespace dawn_native { namespace d3d12 { // This is stored on the allocator to avoid extra conversions. uint32_t mDescriptorCount = 0; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_SHADERVISIBLEDESCRIPTORALLOCATOR_H_ diff --git a/src/dawn_native/d3d12/StagingBufferD3D12.cpp b/src/dawn_native/d3d12/StagingBufferD3D12.cpp index d35622e9e0..46ce9ec637 100644 --- a/src/dawn_native/d3d12/StagingBufferD3D12.cpp +++ b/src/dawn_native/d3d12/StagingBufferD3D12.cpp @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/ResidencyManagerD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { StagingBuffer::StagingBuffer(size_t size, Device* device) : StagingBufferBase(size), mDevice(device) { @@ -74,4 +74,4 @@ namespace dawn_native { namespace d3d12 { ID3D12Resource* StagingBuffer::GetResource() const { return mUploadHeap.GetD3D12Resource(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/StagingBufferD3D12.h b/src/dawn_native/d3d12/StagingBufferD3D12.h index aafe60d3c8..64c32abaa1 100644 --- a/src/dawn_native/d3d12/StagingBufferD3D12.h +++ b/src/dawn_native/d3d12/StagingBufferD3D12.h @@ -19,7 +19,7 @@ #include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -36,6 +36,6 @@ namespace dawn_native { namespace d3d12 { Device* mDevice; ResourceHeapAllocation mUploadHeap; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_STAGINGBUFFERD3D12_H_ diff --git a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp b/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp index 4a622acf9f..151d155a73 100644 --- a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp +++ b/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp @@ -18,7 +18,7 @@ #include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { StagingDescriptorAllocator::StagingDescriptorAllocator(Device* device, uint32_t descriptorCount, @@ -149,4 +149,4 @@ namespace dawn_native { namespace d3d12 { mAllocationsToDelete.ClearUpTo(completedSerial); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h b/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h index 96c1cfbc5b..3bcaff253e 100644 --- a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h +++ b/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h @@ -30,7 +30,7 @@ // at-least one free block. If no AVAILABLE heap exists, a new heap is created and inserted // back into the pool to be immediately used. To deallocate, the block corresponding to the // offset is inserted back into the free-list. -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; @@ -80,6 +80,6 @@ namespace dawn_native { namespace d3d12 { SerialQueue mAllocationsToDelete; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_STAGINGDESCRIPTORALLOCATOR_H_ diff --git a/src/dawn_native/d3d12/SwapChainD3D12.cpp b/src/dawn_native/d3d12/SwapChainD3D12.cpp index 4c2dd245ce..bf8a955eec 100644 --- a/src/dawn_native/d3d12/SwapChainD3D12.cpp +++ b/src/dawn_native/d3d12/SwapChainD3D12.cpp @@ -23,7 +23,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { uint32_t PresentModeToBufferCount(wgpu::PresentMode mode) { @@ -374,4 +374,4 @@ namespace dawn_native { namespace d3d12 { mBuffers.clear(); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/SwapChainD3D12.h b/src/dawn_native/d3d12/SwapChainD3D12.h index 8b9c8aea59..0a77777d80 100644 --- a/src/dawn_native/d3d12/SwapChainD3D12.h +++ b/src/dawn_native/d3d12/SwapChainD3D12.h @@ -20,7 +20,7 @@ #include "dawn_native/IntegerTypes.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class Device; class Texture; @@ -84,6 +84,6 @@ namespace dawn_native { namespace d3d12 { Ref mApiTexture; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_SWAPCHAIN_D3D12_H_ diff --git a/src/dawn_native/d3d12/TextureCopySplitter.cpp b/src/dawn_native/d3d12/TextureCopySplitter.cpp index 411cce24ec..b1d4b73bf1 100644 --- a/src/dawn_native/d3d12/TextureCopySplitter.cpp +++ b/src/dawn_native/d3d12/TextureCopySplitter.cpp @@ -18,7 +18,7 @@ #include "dawn_native/Format.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { Origin3D ComputeTexelOffsets(const TexelBlockInfo& blockInfo, @@ -536,4 +536,4 @@ namespace dawn_native { namespace d3d12 { return copySubresource; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/TextureCopySplitter.h b/src/dawn_native/d3d12/TextureCopySplitter.h index 4796ed9de7..3cb93e26ba 100644 --- a/src/dawn_native/d3d12/TextureCopySplitter.h +++ b/src/dawn_native/d3d12/TextureCopySplitter.h @@ -25,7 +25,7 @@ namespace dawn_native { } // namespace dawn_native -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { struct TextureCopySubresource { static constexpr unsigned int kMaxTextureCopyRegions = 4; @@ -92,6 +92,6 @@ namespace dawn_native { namespace d3d12 { uint64_t offset, uint32_t bytesPerRow, uint32_t rowsPerImage); -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_TEXTURECOPYSPLITTER_H_ diff --git a/src/dawn_native/d3d12/TextureD3D12.cpp b/src/dawn_native/d3d12/TextureD3D12.cpp index c669b2f1ba..3c8178f566 100644 --- a/src/dawn_native/d3d12/TextureD3D12.cpp +++ b/src/dawn_native/d3d12/TextureD3D12.cpp @@ -31,7 +31,7 @@ #include "dawn_native/d3d12/TextureCopySplitter.h" #include "dawn_native/d3d12/UtilsD3D12.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { namespace { D3D12_RESOURCE_STATES D3D12TextureUsage(wgpu::TextureUsage usage, const Format& format) { @@ -1377,4 +1377,4 @@ namespace dawn_native { namespace d3d12 { return uavDesc; } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/TextureD3D12.h b/src/dawn_native/d3d12/TextureD3D12.h index 4d49d6fa9f..569c3557da 100644 --- a/src/dawn_native/d3d12/TextureD3D12.h +++ b/src/dawn_native/d3d12/TextureD3D12.h @@ -24,7 +24,7 @@ #include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" #include "dawn_native/d3d12/d3d12_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class CommandRecordingContext; class Device; @@ -159,6 +159,6 @@ namespace dawn_native { namespace d3d12 { D3D12_SHADER_RESOURCE_VIEW_DESC mSrvDesc; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_TEXTURED3D12_H_ diff --git a/src/dawn_native/d3d12/UtilsD3D12.cpp b/src/dawn_native/d3d12/UtilsD3D12.cpp index 38479eba10..e19bebff4c 100644 --- a/src/dawn_native/d3d12/UtilsD3D12.cpp +++ b/src/dawn_native/d3d12/UtilsD3D12.cpp @@ -23,7 +23,7 @@ #include -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { ResultOrError ConvertStringToWstring(const char* str) { size_t len = strlen(str); @@ -388,4 +388,4 @@ namespace dawn_native { namespace d3d12 { object->SetPrivateData(WKPDID_D3DDebugObjectName, objectName.length(), objectName.c_str()); } -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 diff --git a/src/dawn_native/d3d12/UtilsD3D12.h b/src/dawn_native/d3d12/UtilsD3D12.h index 2a3f3d5b95..8e4520a379 100644 --- a/src/dawn_native/d3d12/UtilsD3D12.h +++ b/src/dawn_native/d3d12/UtilsD3D12.h @@ -22,7 +22,7 @@ #include "dawn_native/d3d12/d3d12_platform.h" #include "dawn_native/dawn_platform.h" -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { ResultOrError ConvertStringToWstring(const char* str); @@ -86,6 +86,6 @@ namespace dawn_native { namespace d3d12 { const char* prefix, std::string label = ""); -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12_UTILSD3D12_H_ diff --git a/src/dawn_native/metal/BackendMTL.h b/src/dawn_native/metal/BackendMTL.h index 6cffa43ac6..daa8ac2d43 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 { namespace metal { +namespace dawn_native::metal { class Backend : public BackendConnection { public: @@ -28,6 +28,6 @@ namespace dawn_native { namespace metal { 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 ee7e8e0dd5..f6034b5164 100644 --- a/src/dawn_native/metal/BackendMTL.mm +++ b/src/dawn_native/metal/BackendMTL.mm @@ -31,7 +31,7 @@ #include -namespace dawn_native { namespace metal { +namespace dawn_native::metal { namespace { @@ -613,4 +613,4 @@ namespace dawn_native { namespace metal { 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 1d2c2a9334..9b1771cba4 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 { namespace metal { +namespace dawn_native::metal { class BindGroup; class Device; @@ -41,6 +41,6 @@ namespace dawn_native { namespace metal { SlabAllocator 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 5d748c1f78..b3e7c35182 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 { namespace metal { +namespace dawn_native::metal { // static Ref BindGroupLayout::Create( @@ -42,4 +42,4 @@ namespace dawn_native { namespace metal { 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 9c875833c7..09056641e2 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 { namespace metal { +namespace dawn_native::metal { class Device; @@ -34,6 +34,6 @@ namespace dawn_native { namespace metal { 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 bbb5827fa0..c8673423ff 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 { namespace metal { +namespace dawn_native::metal { BindGroup::BindGroup(Device* device, const BindGroupDescriptor* descriptor) : BindGroupBase(this, device, descriptor) { @@ -34,4 +34,4 @@ namespace dawn_native { namespace metal { 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 61747bedec..7b6c586f84 100644 --- a/src/dawn_native/metal/BufferMTL.h +++ b/src/dawn_native/metal/BufferMTL.h @@ -21,7 +21,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class CommandRecordingContext; class Device; @@ -62,6 +62,6 @@ namespace dawn_native { namespace metal { NSPRef> 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 6907c9407c..c3a4a98954 100644 --- a/src/dawn_native/metal/BufferMTL.mm +++ b/src/dawn_native/metal/BufferMTL.mm @@ -21,7 +21,7 @@ #include -namespace dawn_native { namespace 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 @@ namespace dawn_native { namespace metal { 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 328ac8400d..eb236a9eb0 100644 --- a/src/dawn_native/metal/CommandBufferMTL.h +++ b/src/dawn_native/metal/CommandBufferMTL.h @@ -24,7 +24,7 @@ namespace dawn_native { class CommandEncoder; } -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class CommandRecordingContext; class Device; @@ -64,6 +64,6 @@ namespace dawn_native { namespace metal { 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 ec6296daa4..11e655b7db 100644 --- a/src/dawn_native/metal/CommandBufferMTL.mm +++ b/src/dawn_native/metal/CommandBufferMTL.mm @@ -34,7 +34,7 @@ #include -namespace dawn_native { namespace metal { +namespace dawn_native::metal { namespace { @@ -1564,4 +1564,4 @@ namespace dawn_native { namespace metal { 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 5189a53e74..4caeb0f44e 100644 --- a/src/dawn_native/metal/CommandRecordingContext.h +++ b/src/dawn_native/metal/CommandRecordingContext.h @@ -20,7 +20,7 @@ #import -namespace dawn_native { namespace 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 @@ namespace dawn_native { namespace metal { 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 f07c48c7ae..95d7b2e481 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 { namespace metal { +namespace dawn_native::metal { CommandRecordingContext::CommandRecordingContext() = default; @@ -129,4 +129,4 @@ namespace dawn_native { namespace metal { 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 20b2080ee4..64e93560b8 100644 --- a/src/dawn_native/metal/ComputePipelineMTL.h +++ b/src/dawn_native/metal/ComputePipelineMTL.h @@ -21,7 +21,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; @@ -48,6 +48,6 @@ namespace dawn_native { namespace metal { std::vector 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 48d36ae14a..5041961e85 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 { namespace metal { +namespace dawn_native::metal { // static Ref ComputePipeline::CreateUninitialized( @@ -83,4 +83,4 @@ namespace dawn_native { namespace metal { 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 14c179fdf5..779b726051 100644 --- a/src/dawn_native/metal/DeviceMTL.h +++ b/src/dawn_native/metal/DeviceMTL.h @@ -30,7 +30,7 @@ #include #include -namespace dawn_native { namespace metal { +namespace dawn_native::metal { namespace { struct KalmanInfo; @@ -149,6 +149,6 @@ namespace dawn_native { namespace metal { std::unique_ptr 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 f02d096fae..ccba9d1107 100644 --- a/src/dawn_native/metal/DeviceMTL.mm +++ b/src/dawn_native/metal/DeviceMTL.mm @@ -40,7 +40,7 @@ #include -namespace dawn_native { namespace metal { +namespace dawn_native::metal { namespace { @@ -503,4 +503,4 @@ namespace dawn_native { namespace metal { 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 9481348f52..5d590b1686 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 { namespace metal { +namespace dawn_native::metal { class Adapter; class BindGroup; @@ -63,6 +63,6 @@ namespace dawn_native { namespace metal { return ToBackendBase(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 4d0824d2f5..928977464e 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 { namespace metal { +namespace dawn_native::metal { id GetMetalDevice(WGPUDevice device) { return ToBackend(FromAPI(device))->GetMTLDevice(); @@ -46,4 +46,4 @@ namespace dawn_native { namespace metal { 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 ae803e1d7b..9aa4f7bc47 100644 --- a/src/dawn_native/metal/PipelineLayoutMTL.h +++ b/src/dawn_native/metal/PipelineLayoutMTL.h @@ -23,7 +23,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; @@ -57,6 +57,6 @@ namespace dawn_native { namespace metal { PerStage 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 4faf5db1f6..ac908ab49a 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 { namespace metal { +namespace dawn_native::metal { // static Ref PipelineLayout::Create(Device* device, @@ -79,4 +79,4 @@ namespace dawn_native { namespace metal { 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 a7b1ad7fa3..6bde84ff62 100644 --- a/src/dawn_native/metal/QuerySetMTL.h +++ b/src/dawn_native/metal/QuerySetMTL.h @@ -21,7 +21,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; @@ -49,6 +49,6 @@ namespace dawn_native { namespace metal { 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 a8b53afb50..e92991ad19 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 { namespace metal { +namespace dawn_native::metal { namespace { @@ -136,4 +136,4 @@ namespace dawn_native { namespace metal { } } -}} // 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 38e79eddc4..b608166b58 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 { namespace metal { +namespace dawn_native::metal { class Device; @@ -29,6 +29,6 @@ namespace dawn_native { namespace metal { 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 ad1fad6f0e..09cc2ffe99 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 { namespace metal { +namespace dawn_native::metal { Queue::Queue(Device* device) : QueueBase(device) { } @@ -45,4 +45,4 @@ namespace dawn_native { namespace metal { 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 d6bedfaedb..d4bc69c160 100644 --- a/src/dawn_native/metal/RenderPipelineMTL.h +++ b/src/dawn_native/metal/RenderPipelineMTL.h @@ -21,7 +21,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; @@ -65,6 +65,6 @@ namespace dawn_native { namespace metal { 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 a4ca812e98..74cf3bd7e8 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 { namespace metal { +namespace dawn_native::metal { namespace { MTLVertexFormat VertexFormatType(wgpu::VertexFormat format) { @@ -503,4 +503,4 @@ namespace dawn_native { namespace metal { 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 274ba2033f..52c4ef09ae 100644 --- a/src/dawn_native/metal/SamplerMTL.h +++ b/src/dawn_native/metal/SamplerMTL.h @@ -21,7 +21,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; @@ -39,6 +39,6 @@ namespace dawn_native { namespace metal { NSPRef> 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 608c6bbebe..809c79317d 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 { namespace metal { +namespace dawn_native::metal { namespace { MTLSamplerMinMagFilter FilterModeToMinMagFilter(wgpu::FilterMode mode) { @@ -103,4 +103,4 @@ namespace dawn_native { namespace metal { 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 e82ffad3f8..93800863e7 100644 --- a/src/dawn_native/metal/ShaderModuleMTL.h +++ b/src/dawn_native/metal/ShaderModuleMTL.h @@ -22,7 +22,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; class PipelineLayout; @@ -65,6 +65,6 @@ namespace dawn_native { namespace metal { 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 2c2c0f1ab6..79de704be1 100644 --- a/src/dawn_native/metal/ShaderModuleMTL.mm +++ b/src/dawn_native/metal/ShaderModuleMTL.mm @@ -24,7 +24,7 @@ #include -namespace dawn_native { namespace metal { +namespace dawn_native::metal { // static ResultOrError> ShaderModule::Create(Device* device, @@ -257,4 +257,4 @@ namespace dawn_native { namespace metal { 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 b2d6551cd5..c545b07e96 100644 --- a/src/dawn_native/metal/StagingBufferMTL.h +++ b/src/dawn_native/metal/StagingBufferMTL.h @@ -21,7 +21,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class Device; @@ -37,6 +37,6 @@ namespace dawn_native { namespace metal { Device* mDevice; NSPRef> 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 af06b3548d..5ca18e5d81 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 { namespace metal { +namespace dawn_native::metal { StagingBuffer::StagingBuffer(size_t size, Device* device) : StagingBufferBase(size), mDevice(device) { @@ -43,4 +43,4 @@ namespace dawn_native { namespace metal { 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 3b72163a6e..5513e4fb5f 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 { namespace metal { +namespace dawn_native::metal { class Device; class Texture; @@ -62,6 +62,6 @@ namespace dawn_native { namespace metal { 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 d932986aad..8ec989c04c 100644 --- a/src/dawn_native/metal/SwapChainMTL.mm +++ b/src/dawn_native/metal/SwapChainMTL.mm @@ -22,7 +22,7 @@ #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { // OldSwapChain @@ -152,4 +152,4 @@ namespace dawn_native { namespace metal { } } -}} // 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 8c9a30d8fe..185816783e 100644 --- a/src/dawn_native/metal/TextureMTL.h +++ b/src/dawn_native/metal/TextureMTL.h @@ -23,7 +23,7 @@ #include #import -namespace dawn_native { namespace metal { +namespace dawn_native::metal { class CommandRecordingContext; class Device; @@ -91,6 +91,6 @@ namespace dawn_native { namespace metal { NSPRef> 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 496ca1093c..c166f4f837 100644 --- a/src/dawn_native/metal/TextureMTL.mm +++ b/src/dawn_native/metal/TextureMTL.mm @@ -25,7 +25,7 @@ #include -namespace dawn_native { namespace metal { +namespace dawn_native::metal { namespace { bool UsageNeedsTextureView(wgpu::TextureUsage usage) { @@ -849,4 +849,4 @@ namespace dawn_native { namespace metal { 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 3a17c99b27..8dfb7442cb 100644 --- a/src/dawn_native/metal/UtilsMetal.h +++ b/src/dawn_native/metal/UtilsMetal.h @@ -28,7 +28,7 @@ namespace dawn_native { enum class SingleShaderStage; } -namespace dawn_native { namespace metal { +namespace dawn_native::metal { MTLCompareFunction ToMetalCompareFunction(wgpu::CompareFunction compareFunction); @@ -81,6 +81,6 @@ namespace dawn_native { namespace metal { 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 7fc242945e..8d163acc2d 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 { namespace metal { +namespace dawn_native::metal { MTLCompareFunction ToMetalCompareFunction(wgpu::CompareFunction compareFunction) { switch (compareFunction) { @@ -287,4 +287,4 @@ namespace dawn_native { namespace metal { return {}; } -}} // namespace dawn_native::metal +} // namespace dawn_native::metal diff --git a/src/dawn_native/null/DeviceNull.cpp b/src/dawn_native/null/DeviceNull.cpp index 58a783c582..dad3afafd4 100644 --- a/src/dawn_native/null/DeviceNull.cpp +++ b/src/dawn_native/null/DeviceNull.cpp @@ -20,7 +20,7 @@ #include "dawn_native/Instance.h" #include "dawn_native/Surface.h" -namespace dawn_native { namespace null { +namespace dawn_native::null { // Implementation of pre-Device objects: the null adapter, null backend connection and Connect() @@ -515,4 +515,4 @@ namespace dawn_native { namespace null { return 1.0f; } -}} // namespace dawn_native::null +} // namespace dawn_native::null diff --git a/src/dawn_native/null/DeviceNull.h b/src/dawn_native/null/DeviceNull.h index ef2adfbeaf..b25de2694b 100644 --- a/src/dawn_native/null/DeviceNull.h +++ b/src/dawn_native/null/DeviceNull.h @@ -36,7 +36,7 @@ #include "dawn_native/ToBackend.h" #include "dawn_native/dawn_platform.h" -namespace dawn_native { namespace null { +namespace dawn_native::null { class Adapter; class BindGroup; @@ -335,6 +335,6 @@ namespace dawn_native { namespace null { std::unique_ptr mBuffer; }; -}} // namespace dawn_native::null +} // namespace dawn_native::null #endif // DAWNNATIVE_NULL_DEVICENULL_H_ diff --git a/src/dawn_native/null/NullBackend.cpp b/src/dawn_native/null/NullBackend.cpp index a48dcdccc4..431e149d78 100644 --- a/src/dawn_native/null/NullBackend.cpp +++ b/src/dawn_native/null/NullBackend.cpp @@ -20,7 +20,7 @@ #include "common/SwapChainUtils.h" #include "dawn_native/null/DeviceNull.h" -namespace dawn_native { namespace null { +namespace dawn_native::null { DawnSwapChainImplementation CreateNativeSwapChainImpl() { DawnSwapChainImplementation impl; @@ -29,4 +29,4 @@ namespace dawn_native { namespace null { return impl; } -}} // namespace dawn_native::null +} // namespace dawn_native::null diff --git a/src/dawn_native/opengl/BackendGL.cpp b/src/dawn_native/opengl/BackendGL.cpp index 611d258d6a..0c2ee0b9f2 100644 --- a/src/dawn_native/opengl/BackendGL.cpp +++ b/src/dawn_native/opengl/BackendGL.cpp @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { namespace { @@ -303,4 +303,4 @@ namespace dawn_native { namespace opengl { return new Backend(instance, backendType); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/BackendGL.h b/src/dawn_native/opengl/BackendGL.h index a586a850c7..02db43f56d 100644 --- a/src/dawn_native/opengl/BackendGL.h +++ b/src/dawn_native/opengl/BackendGL.h @@ -17,7 +17,7 @@ #include "dawn_native/BackendConnection.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Backend : public BackendConnection { public: @@ -31,6 +31,6 @@ namespace dawn_native { namespace opengl { bool mCreatedAdapter = false; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_BACKENDGL_H_ diff --git a/src/dawn_native/opengl/BindGroupGL.cpp b/src/dawn_native/opengl/BindGroupGL.cpp index b77e0ffc1d..3c381f32f0 100644 --- a/src/dawn_native/opengl/BindGroupGL.cpp +++ b/src/dawn_native/opengl/BindGroupGL.cpp @@ -18,7 +18,7 @@ #include "dawn_native/opengl/BindGroupLayoutGL.h" #include "dawn_native/opengl/DeviceGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { MaybeError ValidateGLBindGroupDescriptor(const BindGroupDescriptor* descriptor) { const BindGroupLayoutBase::BindingMap& bindingMap = descriptor->layout->GetBindingMap(); @@ -62,4 +62,4 @@ namespace dawn_native { namespace opengl { return ToBackend(descriptor->layout)->AllocateBindGroup(device, descriptor); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/BindGroupGL.h b/src/dawn_native/opengl/BindGroupGL.h index 994795a3e9..6982c4916e 100644 --- a/src/dawn_native/opengl/BindGroupGL.h +++ b/src/dawn_native/opengl/BindGroupGL.h @@ -18,7 +18,7 @@ #include "common/PlacementAllocated.h" #include "dawn_native/BindGroup.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -36,6 +36,6 @@ namespace dawn_native { namespace opengl { void DestroyImpl() override; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_BINDGROUPGL_H_ diff --git a/src/dawn_native/opengl/BindGroupLayoutGL.cpp b/src/dawn_native/opengl/BindGroupLayoutGL.cpp index d008b1d48a..df28bc452b 100644 --- a/src/dawn_native/opengl/BindGroupLayoutGL.cpp +++ b/src/dawn_native/opengl/BindGroupLayoutGL.cpp @@ -16,7 +16,7 @@ #include "dawn_native/opengl/BindGroupGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { BindGroupLayout::BindGroupLayout(DeviceBase* device, const BindGroupLayoutDescriptor* descriptor, @@ -34,4 +34,4 @@ namespace dawn_native { namespace opengl { mBindGroupAllocator.Deallocate(bindGroup); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/BindGroupLayoutGL.h b/src/dawn_native/opengl/BindGroupLayoutGL.h index 136bd0a7e5..7e1eb77a51 100644 --- a/src/dawn_native/opengl/BindGroupLayoutGL.h +++ b/src/dawn_native/opengl/BindGroupLayoutGL.h @@ -18,7 +18,7 @@ #include "common/SlabAllocator.h" #include "dawn_native/BindGroupLayout.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class BindGroup; class Device; @@ -37,6 +37,6 @@ namespace dawn_native { namespace opengl { SlabAllocator mBindGroupAllocator; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_BINDGROUPLAYOUTGL_H_ diff --git a/src/dawn_native/opengl/BufferGL.cpp b/src/dawn_native/opengl/BufferGL.cpp index a23556bc03..5e7458eaf2 100644 --- a/src/dawn_native/opengl/BufferGL.cpp +++ b/src/dawn_native/opengl/BufferGL.cpp @@ -17,7 +17,7 @@ #include "dawn_native/CommandBuffer.h" #include "dawn_native/opengl/DeviceGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { // Buffer @@ -181,4 +181,4 @@ namespace dawn_native { namespace opengl { mBuffer = 0; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/BufferGL.h b/src/dawn_native/opengl/BufferGL.h index 596b229f22..32cf277139 100644 --- a/src/dawn_native/opengl/BufferGL.h +++ b/src/dawn_native/opengl/BufferGL.h @@ -19,7 +19,7 @@ #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -53,6 +53,6 @@ namespace dawn_native { namespace opengl { void* mMappedData = nullptr; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_BUFFERGL_H_ diff --git a/src/dawn_native/opengl/CommandBufferGL.cpp b/src/dawn_native/opengl/CommandBufferGL.cpp index e778282828..ac1fa15e0b 100644 --- a/src/dawn_native/opengl/CommandBufferGL.cpp +++ b/src/dawn_native/opengl/CommandBufferGL.cpp @@ -34,7 +34,7 @@ #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { namespace { @@ -1488,4 +1488,4 @@ namespace dawn_native { namespace opengl { } } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/CommandBufferGL.h b/src/dawn_native/opengl/CommandBufferGL.h index fde8751ef5..0fd222bbfb 100644 --- a/src/dawn_native/opengl/CommandBufferGL.h +++ b/src/dawn_native/opengl/CommandBufferGL.h @@ -21,7 +21,7 @@ namespace dawn_native { struct BeginRenderPassCmd; } // namespace dawn_native -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; struct OpenGLFunctions; @@ -44,6 +44,6 @@ namespace dawn_native { namespace opengl { const void* data, const TextureDataLayout& dataLayout, const Extent3D& copySize); -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_COMMANDBUFFERGL_H_ diff --git a/src/dawn_native/opengl/ComputePipelineGL.cpp b/src/dawn_native/opengl/ComputePipelineGL.cpp index 2ee7bb88c1..0c93f2919f 100644 --- a/src/dawn_native/opengl/ComputePipelineGL.cpp +++ b/src/dawn_native/opengl/ComputePipelineGL.cpp @@ -16,7 +16,7 @@ #include "dawn_native/opengl/DeviceGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { // static Ref ComputePipeline::CreateUninitialized( @@ -42,4 +42,4 @@ namespace dawn_native { namespace opengl { PipelineGL::ApplyNow(ToBackend(GetDevice())->gl); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/ComputePipelineGL.h b/src/dawn_native/opengl/ComputePipelineGL.h index f5646bafef..060bd65825 100644 --- a/src/dawn_native/opengl/ComputePipelineGL.h +++ b/src/dawn_native/opengl/ComputePipelineGL.h @@ -21,7 +21,7 @@ #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -41,6 +41,6 @@ namespace dawn_native { namespace opengl { void DestroyImpl() override; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_COMPUTEPIPELINEGL_H_ diff --git a/src/dawn_native/opengl/DeviceGL.cpp b/src/dawn_native/opengl/DeviceGL.cpp index ffaed2b822..a562cc6419 100644 --- a/src/dawn_native/opengl/DeviceGL.cpp +++ b/src/dawn_native/opengl/DeviceGL.cpp @@ -32,7 +32,7 @@ #include "dawn_native/opengl/SwapChainGL.h" #include "dawn_native/opengl/TextureGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { // static ResultOrError> Device::Create(AdapterBase* adapter, @@ -312,4 +312,4 @@ namespace dawn_native { namespace opengl { return 1.0f; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/DeviceGL.h b/src/dawn_native/opengl/DeviceGL.h index 1bd8f31d57..66cd7855fc 100644 --- a/src/dawn_native/opengl/DeviceGL.h +++ b/src/dawn_native/opengl/DeviceGL.h @@ -33,7 +33,7 @@ typedef void* EGLImage; -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device final : public DeviceBase { public: @@ -126,6 +126,6 @@ namespace dawn_native { namespace opengl { GLFormatTable mFormatTable; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_DEVICEGL_H_ diff --git a/src/dawn_native/opengl/Forward.h b/src/dawn_native/opengl/Forward.h index 82d07661ae..fcf6d2c18c 100644 --- a/src/dawn_native/opengl/Forward.h +++ b/src/dawn_native/opengl/Forward.h @@ -17,7 +17,7 @@ #include "dawn_native/ToBackend.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Adapter; class BindGroup; @@ -61,6 +61,6 @@ namespace dawn_native { namespace opengl { return ToBackendBase(common); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_FORWARD_H_ diff --git a/src/dawn_native/opengl/GLFormat.cpp b/src/dawn_native/opengl/GLFormat.cpp index af28814e99..4bab9e2f13 100644 --- a/src/dawn_native/opengl/GLFormat.cpp +++ b/src/dawn_native/opengl/GLFormat.cpp @@ -14,7 +14,7 @@ #include "dawn_native/opengl/GLFormat.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { GLFormatTable BuildGLFormatTable() { GLFormatTable table; @@ -117,4 +117,4 @@ namespace dawn_native { namespace opengl { return table; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/GLFormat.h b/src/dawn_native/opengl/GLFormat.h index 255b17cdd5..b04fa5eb1e 100644 --- a/src/dawn_native/opengl/GLFormat.h +++ b/src/dawn_native/opengl/GLFormat.h @@ -18,7 +18,7 @@ #include "dawn_native/Format.h" #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -37,6 +37,6 @@ namespace dawn_native { namespace opengl { using GLFormatTable = std::array; GLFormatTable BuildGLFormatTable(); -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_GLFORMAT_H_ diff --git a/src/dawn_native/opengl/NativeSwapChainImplGL.cpp b/src/dawn_native/opengl/NativeSwapChainImplGL.cpp index 330999db6d..03c9eb09e5 100644 --- a/src/dawn_native/opengl/NativeSwapChainImplGL.cpp +++ b/src/dawn_native/opengl/NativeSwapChainImplGL.cpp @@ -16,7 +16,7 @@ #include "dawn_native/opengl/DeviceGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { NativeSwapChainImpl::NativeSwapChainImpl(Device* device, PresentCallback present, @@ -85,4 +85,4 @@ namespace dawn_native { namespace opengl { return wgpu::TextureFormat::RGBA8Unorm; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/NativeSwapChainImplGL.h b/src/dawn_native/opengl/NativeSwapChainImplGL.h index acda00576f..ddf2b26bbd 100644 --- a/src/dawn_native/opengl/NativeSwapChainImplGL.h +++ b/src/dawn_native/opengl/NativeSwapChainImplGL.h @@ -20,7 +20,7 @@ #include "dawn_native/dawn_platform.h" #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -53,6 +53,6 @@ namespace dawn_native { namespace opengl { Device* mDevice = nullptr; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_NATIVESWAPCHAINIMPLGL_H_ diff --git a/src/dawn_native/opengl/OpenGLBackend.cpp b/src/dawn_native/opengl/OpenGLBackend.cpp index 560f3a0342..ca46537ff3 100644 --- a/src/dawn_native/opengl/OpenGLBackend.cpp +++ b/src/dawn_native/opengl/OpenGLBackend.cpp @@ -21,7 +21,7 @@ #include "dawn_native/opengl/DeviceGL.h" #include "dawn_native/opengl/NativeSwapChainImplGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { AdapterDiscoveryOptions::AdapterDiscoveryOptions() : AdapterDiscoveryOptionsBase(WGPUBackendType_OpenGL) { @@ -62,4 +62,4 @@ namespace dawn_native { namespace opengl { return ToAPI(texture); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/OpenGLFunctions.cpp b/src/dawn_native/opengl/OpenGLFunctions.cpp index 472fa5b3ab..05e5014f3c 100644 --- a/src/dawn_native/opengl/OpenGLFunctions.cpp +++ b/src/dawn_native/opengl/OpenGLFunctions.cpp @@ -16,7 +16,7 @@ #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { MaybeError OpenGLFunctions::Initialize(GetProcAddress getProc) { DAWN_TRY(mVersion.Initialize(getProc)); @@ -58,4 +58,4 @@ namespace dawn_native { namespace opengl { return mVersion.IsES() && mVersion.IsAtLeast(majorVersion, minorVersion); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/OpenGLFunctions.h b/src/dawn_native/opengl/OpenGLFunctions.h index 69180b48cf..ff728a6243 100644 --- a/src/dawn_native/opengl/OpenGLFunctions.h +++ b/src/dawn_native/opengl/OpenGLFunctions.h @@ -20,7 +20,7 @@ #include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h" #include "dawn_native/opengl/OpenGLVersion.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { struct OpenGLFunctions : OpenGLFunctionsBase { public: @@ -40,6 +40,6 @@ namespace dawn_native { namespace opengl { std::unordered_set mSupportedGLExtensionsSet; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_OPENGLFUNCTIONS_H_ diff --git a/src/dawn_native/opengl/OpenGLVersion.cpp b/src/dawn_native/opengl/OpenGLVersion.cpp index edb6adf3f4..a97ba5d1f7 100644 --- a/src/dawn_native/opengl/OpenGLVersion.cpp +++ b/src/dawn_native/opengl/OpenGLVersion.cpp @@ -17,7 +17,7 @@ #include #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { MaybeError OpenGLVersion::Initialize(GetProcAddress getProc) { PFNGLGETSTRINGPROC getString = reinterpret_cast(getProc("glGetString")); @@ -73,4 +73,4 @@ namespace dawn_native { namespace opengl { return std::tie(mMajorVersion, mMinorVersion) >= std::tie(majorVersion, minorVersion); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/OpenGLVersion.h b/src/dawn_native/opengl/OpenGLVersion.h index 88ddd50ed9..295e771cd7 100644 --- a/src/dawn_native/opengl/OpenGLVersion.h +++ b/src/dawn_native/opengl/OpenGLVersion.h @@ -17,7 +17,7 @@ #include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { struct OpenGLVersion { public: @@ -39,6 +39,6 @@ namespace dawn_native { namespace opengl { Standard mStandard; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_OPENGLVERSION_H_ diff --git a/src/dawn_native/opengl/PersistentPipelineStateGL.cpp b/src/dawn_native/opengl/PersistentPipelineStateGL.cpp index a37bb6700b..edbffd002f 100644 --- a/src/dawn_native/opengl/PersistentPipelineStateGL.cpp +++ b/src/dawn_native/opengl/PersistentPipelineStateGL.cpp @@ -16,7 +16,7 @@ #include "dawn_native/opengl/OpenGLFunctions.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { void PersistentPipelineState::SetDefaultState(const OpenGLFunctions& gl) { CallGLStencilFunc(gl); @@ -55,4 +55,4 @@ namespace dawn_native { namespace opengl { mStencilReadMask); } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/PersistentPipelineStateGL.h b/src/dawn_native/opengl/PersistentPipelineStateGL.h index c98ec152a4..553d07a60d 100644 --- a/src/dawn_native/opengl/PersistentPipelineStateGL.h +++ b/src/dawn_native/opengl/PersistentPipelineStateGL.h @@ -18,7 +18,7 @@ #include "dawn_native/dawn_platform.h" #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { struct OpenGLFunctions; @@ -40,6 +40,6 @@ namespace dawn_native { namespace opengl { GLuint mStencilReference = 0; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_PERSISTENTPIPELINESTATEGL_H_ diff --git a/src/dawn_native/opengl/PipelineGL.cpp b/src/dawn_native/opengl/PipelineGL.cpp index 614a125c17..21f522c4b4 100644 --- a/src/dawn_native/opengl/PipelineGL.cpp +++ b/src/dawn_native/opengl/PipelineGL.cpp @@ -27,7 +27,7 @@ #include #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { namespace { @@ -215,4 +215,4 @@ namespace dawn_native { namespace opengl { } } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/PipelineGL.h b/src/dawn_native/opengl/PipelineGL.h index be6c1dd553..6199e6ecff 100644 --- a/src/dawn_native/opengl/PipelineGL.h +++ b/src/dawn_native/opengl/PipelineGL.h @@ -26,7 +26,7 @@ namespace dawn_native { struct ProgrammableStage; } // namespace dawn_native -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { struct OpenGLFunctions; class PipelineLayout; @@ -64,6 +64,6 @@ namespace dawn_native { namespace opengl { Ref mDummySampler; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_PIPELINEGL_H_ diff --git a/src/dawn_native/opengl/PipelineLayoutGL.cpp b/src/dawn_native/opengl/PipelineLayoutGL.cpp index a1742a54b5..9c8fffaff4 100644 --- a/src/dawn_native/opengl/PipelineLayoutGL.cpp +++ b/src/dawn_native/opengl/PipelineLayoutGL.cpp @@ -18,7 +18,7 @@ #include "dawn_native/BindGroupLayout.h" #include "dawn_native/opengl/DeviceGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { PipelineLayout::PipelineLayout(Device* device, const PipelineLayoutDescriptor* descriptor) : PipelineLayoutBase(device, descriptor) { @@ -92,4 +92,4 @@ namespace dawn_native { namespace opengl { return mNumSampledTextures; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/PipelineLayoutGL.h b/src/dawn_native/opengl/PipelineLayoutGL.h index eeff7182dd..2386fe23b9 100644 --- a/src/dawn_native/opengl/PipelineLayoutGL.h +++ b/src/dawn_native/opengl/PipelineLayoutGL.h @@ -22,7 +22,7 @@ #include "dawn_native/BindingInfo.h" #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -45,6 +45,6 @@ namespace dawn_native { namespace opengl { size_t mNumSampledTextures; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_PIPELINELAYOUTGL_H_ diff --git a/src/dawn_native/opengl/QuerySetGL.cpp b/src/dawn_native/opengl/QuerySetGL.cpp index 2f712919db..3d701d4cf6 100644 --- a/src/dawn_native/opengl/QuerySetGL.cpp +++ b/src/dawn_native/opengl/QuerySetGL.cpp @@ -16,7 +16,7 @@ #include "dawn_native/opengl/DeviceGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { QuerySet::QuerySet(Device* device, const QuerySetDescriptor* descriptor) : QuerySetBase(device, descriptor) { @@ -24,4 +24,4 @@ namespace dawn_native { namespace opengl { QuerySet::~QuerySet() = default; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/QuerySetGL.h b/src/dawn_native/opengl/QuerySetGL.h index b0a31daff6..0a39e8b206 100644 --- a/src/dawn_native/opengl/QuerySetGL.h +++ b/src/dawn_native/opengl/QuerySetGL.h @@ -17,7 +17,7 @@ #include "dawn_native/QuerySet.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -29,6 +29,6 @@ namespace dawn_native { namespace opengl { ~QuerySet() override; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_QUERYSETGL_H_ diff --git a/src/dawn_native/opengl/QueueGL.cpp b/src/dawn_native/opengl/QueueGL.cpp index ec98b64bb4..c9ecbb02b6 100644 --- a/src/dawn_native/opengl/QueueGL.cpp +++ b/src/dawn_native/opengl/QueueGL.cpp @@ -21,7 +21,7 @@ #include "dawn_platform/DawnPlatform.h" #include "dawn_platform/tracing/TraceEvent.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { Queue::Queue(Device* device) : QueueBase(device) { } @@ -77,4 +77,4 @@ namespace dawn_native { namespace opengl { return {}; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/QueueGL.h b/src/dawn_native/opengl/QueueGL.h index b5a5243dc5..2534297761 100644 --- a/src/dawn_native/opengl/QueueGL.h +++ b/src/dawn_native/opengl/QueueGL.h @@ -17,7 +17,7 @@ #include "dawn_native/Queue.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -37,6 +37,6 @@ namespace dawn_native { namespace opengl { const Extent3D& writeSizePixel) override; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_QUEUEGL_H_ diff --git a/src/dawn_native/opengl/RenderPipelineGL.cpp b/src/dawn_native/opengl/RenderPipelineGL.cpp index bc8c2c6155..fe04fcd8f1 100644 --- a/src/dawn_native/opengl/RenderPipelineGL.cpp +++ b/src/dawn_native/opengl/RenderPipelineGL.cpp @@ -19,7 +19,7 @@ #include "dawn_native/opengl/PersistentPipelineStateGL.h" #include "dawn_native/opengl/UtilsGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { namespace { @@ -342,4 +342,4 @@ namespace dawn_native { namespace opengl { } } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/RenderPipelineGL.h b/src/dawn_native/opengl/RenderPipelineGL.h index 75aab20853..44d01a5404 100644 --- a/src/dawn_native/opengl/RenderPipelineGL.h +++ b/src/dawn_native/opengl/RenderPipelineGL.h @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; class PersistentPipelineState; @@ -57,6 +57,6 @@ namespace dawn_native { namespace opengl { mAttributesUsingVertexBuffer; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_RENDERPIPELINEGL_H_ diff --git a/src/dawn_native/opengl/SamplerGL.cpp b/src/dawn_native/opengl/SamplerGL.cpp index b331df301a..9e5435c01c 100644 --- a/src/dawn_native/opengl/SamplerGL.cpp +++ b/src/dawn_native/opengl/SamplerGL.cpp @@ -18,7 +18,7 @@ #include "dawn_native/opengl/DeviceGL.h" #include "dawn_native/opengl/UtilsGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { namespace { GLenum MagFilterMode(wgpu::FilterMode filter) { @@ -127,4 +127,4 @@ namespace dawn_native { namespace opengl { return mNonFilteringHandle; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/SamplerGL.h b/src/dawn_native/opengl/SamplerGL.h index f08930e364..f8b21b9521 100644 --- a/src/dawn_native/opengl/SamplerGL.h +++ b/src/dawn_native/opengl/SamplerGL.h @@ -19,7 +19,7 @@ #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -43,6 +43,6 @@ namespace dawn_native { namespace opengl { GLuint mNonFilteringHandle; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_SAMPLERGL_H_ diff --git a/src/dawn_native/opengl/ShaderModuleGL.cpp b/src/dawn_native/opengl/ShaderModuleGL.cpp index a959819c90..6517502dcf 100644 --- a/src/dawn_native/opengl/ShaderModuleGL.cpp +++ b/src/dawn_native/opengl/ShaderModuleGL.cpp @@ -34,7 +34,7 @@ #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { std::string GetBindingName(BindGroupIndex group, BindingNumber bindingNumber) { std::ostringstream o; @@ -397,4 +397,4 @@ namespace dawn_native { namespace opengl { return glsl; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/ShaderModuleGL.h b/src/dawn_native/opengl/ShaderModuleGL.h index d955225357..f3d5462ba8 100644 --- a/src/dawn_native/opengl/ShaderModuleGL.h +++ b/src/dawn_native/opengl/ShaderModuleGL.h @@ -19,7 +19,7 @@ #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; class PipelineLayout; @@ -70,6 +70,6 @@ namespace dawn_native { namespace opengl { BindingInfoArrayTable mGLBindings; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_SHADERMODULEGL_H_ diff --git a/src/dawn_native/opengl/SwapChainGL.cpp b/src/dawn_native/opengl/SwapChainGL.cpp index 8223a2ceb1..f8043a435c 100644 --- a/src/dawn_native/opengl/SwapChainGL.cpp +++ b/src/dawn_native/opengl/SwapChainGL.cpp @@ -20,7 +20,7 @@ #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { SwapChain::SwapChain(Device* device, const SwapChainDescriptor* descriptor) : OldSwapChainBase(device, descriptor) { @@ -48,4 +48,4 @@ namespace dawn_native { namespace opengl { return {}; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/SwapChainGL.h b/src/dawn_native/opengl/SwapChainGL.h index 0cce92594a..18689729c0 100644 --- a/src/dawn_native/opengl/SwapChainGL.h +++ b/src/dawn_native/opengl/SwapChainGL.h @@ -19,7 +19,7 @@ #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; @@ -33,6 +33,6 @@ namespace dawn_native { namespace opengl { MaybeError OnBeforePresent(TextureViewBase* view) override; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_SWAPCHAINGL_H_ diff --git a/src/dawn_native/opengl/TextureGL.cpp b/src/dawn_native/opengl/TextureGL.cpp index ceb57bd426..7c7cb9fcaf 100644 --- a/src/dawn_native/opengl/TextureGL.cpp +++ b/src/dawn_native/opengl/TextureGL.cpp @@ -23,7 +23,7 @@ #include "dawn_native/opengl/DeviceGL.h" #include "dawn_native/opengl/UtilsGL.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { namespace { @@ -577,4 +577,4 @@ namespace dawn_native { namespace opengl { return mTarget; } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/TextureGL.h b/src/dawn_native/opengl/TextureGL.h index 28b35d31a8..f6deaf5ab9 100644 --- a/src/dawn_native/opengl/TextureGL.h +++ b/src/dawn_native/opengl/TextureGL.h @@ -19,7 +19,7 @@ #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { class Device; struct GLFormat; @@ -64,6 +64,6 @@ namespace dawn_native { namespace opengl { bool mOwnsHandle; }; -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_TEXTUREGL_H_ diff --git a/src/dawn_native/opengl/UtilsGL.cpp b/src/dawn_native/opengl/UtilsGL.cpp index 413336b5e6..1dd7a69d53 100644 --- a/src/dawn_native/opengl/UtilsGL.cpp +++ b/src/dawn_native/opengl/UtilsGL.cpp @@ -16,7 +16,7 @@ #include "common/Assert.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { GLuint ToOpenGLCompareFunction(wgpu::CompareFunction compareFunction) { switch (compareFunction) { @@ -52,4 +52,4 @@ namespace dawn_native { namespace opengl { UNREACHABLE(); } } -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl diff --git a/src/dawn_native/opengl/UtilsGL.h b/src/dawn_native/opengl/UtilsGL.h index 2f87b37813..fe8a940fca 100644 --- a/src/dawn_native/opengl/UtilsGL.h +++ b/src/dawn_native/opengl/UtilsGL.h @@ -18,10 +18,10 @@ #include "dawn_native/dawn_platform.h" #include "dawn_native/opengl/opengl_platform.h" -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { GLuint ToOpenGLCompareFunction(wgpu::CompareFunction compareFunction); GLint GetStencilMaskFromStencilFormat(wgpu::TextureFormat depthStencilFormat); -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGL_UTILSGL_H_ diff --git a/src/dawn_native/utils/WGPUHelpers.cpp b/src/dawn_native/utils/WGPUHelpers.cpp index 60c2addc82..3fb0549fc4 100644 --- a/src/dawn_native/utils/WGPUHelpers.cpp +++ b/src/dawn_native/utils/WGPUHelpers.cpp @@ -31,7 +31,7 @@ #include #include -namespace dawn_native { namespace utils { +namespace dawn_native::utils { ResultOrError> CreateShaderModule(DeviceBase* device, const char* source) { @@ -189,4 +189,4 @@ namespace dawn_native { namespace utils { return (label == nullptr || strlen(label) == 0) ? "None" : label; } -}} // namespace dawn_native::utils +} // namespace dawn_native::utils diff --git a/src/dawn_native/utils/WGPUHelpers.h b/src/dawn_native/utils/WGPUHelpers.h index 108f107d91..0077059df5 100644 --- a/src/dawn_native/utils/WGPUHelpers.h +++ b/src/dawn_native/utils/WGPUHelpers.h @@ -24,7 +24,7 @@ #include "common/RefCounted.h" #include "dawn_native/Error.h" -namespace dawn_native { namespace utils { +namespace dawn_native::utils { ResultOrError> CreateShaderModule(DeviceBase* device, const char* source); @@ -118,6 +118,6 @@ namespace dawn_native { namespace utils { const char* GetLabelForTrace(const char* label); -}} // namespace dawn_native::utils +} // namespace dawn_native::utils #endif // DAWNNATIVE_UTILS_WGPUHELPERS_H_ \ No newline at end of file diff --git a/src/dawn_native/vulkan/AdapterVk.cpp b/src/dawn_native/vulkan/AdapterVk.cpp index 4eea8206ca..4b81ba0e03 100644 --- a/src/dawn_native/vulkan/AdapterVk.cpp +++ b/src/dawn_native/vulkan/AdapterVk.cpp @@ -20,7 +20,7 @@ #include "common/GPUInfo.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { Adapter::Adapter(InstanceBase* instance, VulkanInstance* vulkanInstance, @@ -350,4 +350,4 @@ namespace dawn_native { namespace vulkan { return Device::Create(this, descriptor); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/AdapterVk.h b/src/dawn_native/vulkan/AdapterVk.h index 6d93a07fea..c61b70e3bd 100644 --- a/src/dawn_native/vulkan/AdapterVk.h +++ b/src/dawn_native/vulkan/AdapterVk.h @@ -21,7 +21,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/vulkan/VulkanInfo.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class VulkanInstance; @@ -54,6 +54,6 @@ namespace dawn_native { namespace vulkan { VulkanDeviceInfo mDeviceInfo = {}; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_ADAPTERVK_H_ diff --git a/src/dawn_native/vulkan/BackendVk.cpp b/src/dawn_native/vulkan/BackendVk.cpp index 7fd6462203..24340b4b82 100644 --- a/src/dawn_native/vulkan/BackendVk.cpp +++ b/src/dawn_native/vulkan/BackendVk.cpp @@ -77,7 +77,7 @@ constexpr SkippedMessage kSkippedMessages[] = { "SYNC_FRAGMENT_SHADER_SHADER_STORAGE_READ, read_barriers: VK_PIPELINE_STAGE_2_NONE_KHR, "}, }; -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -444,4 +444,4 @@ namespace dawn_native { namespace vulkan { return new Backend(instance); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/BackendVk.h b/src/dawn_native/vulkan/BackendVk.h index 96541f1b0b..2532e91110 100644 --- a/src/dawn_native/vulkan/BackendVk.h +++ b/src/dawn_native/vulkan/BackendVk.h @@ -23,7 +23,7 @@ #include "dawn_native/vulkan/VulkanFunctions.h" #include "dawn_native/vulkan/VulkanInfo.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { enum class ICD { None, @@ -81,6 +81,6 @@ namespace dawn_native { namespace vulkan { ityp::array, 2> mVulkanInstances = {}; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_BACKENDVK_H_ diff --git a/src/dawn_native/vulkan/BindGroupLayoutVk.cpp b/src/dawn_native/vulkan/BindGroupLayoutVk.cpp index 52038e15eb..264188755a 100644 --- a/src/dawn_native/vulkan/BindGroupLayoutVk.cpp +++ b/src/dawn_native/vulkan/BindGroupLayoutVk.cpp @@ -25,7 +25,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -196,4 +196,4 @@ namespace dawn_native { namespace vulkan { reinterpret_cast(mHandle), "Dawn_BindGroupLayout", GetLabel()); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/BindGroupLayoutVk.h b/src/dawn_native/vulkan/BindGroupLayoutVk.h index 4b0c98d655..c144562876 100644 --- a/src/dawn_native/vulkan/BindGroupLayoutVk.h +++ b/src/dawn_native/vulkan/BindGroupLayoutVk.h @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class BindGroup; struct DescriptorSetAllocation; @@ -75,6 +75,6 @@ namespace dawn_native { namespace vulkan { Ref mDescriptorSetAllocator; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_BINDGROUPLAYOUTVK_H_ diff --git a/src/dawn_native/vulkan/BindGroupVk.cpp b/src/dawn_native/vulkan/BindGroupVk.cpp index dc056a7bfa..b415685b1f 100644 --- a/src/dawn_native/vulkan/BindGroupVk.cpp +++ b/src/dawn_native/vulkan/BindGroupVk.cpp @@ -26,7 +26,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // static ResultOrError> BindGroup::Create(Device* device, @@ -177,4 +177,4 @@ namespace dawn_native { namespace vulkan { GetLabel()); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/BindGroupVk.h b/src/dawn_native/vulkan/BindGroupVk.h index abd8b1da3d..95d2be0f8f 100644 --- a/src/dawn_native/vulkan/BindGroupVk.h +++ b/src/dawn_native/vulkan/BindGroupVk.h @@ -22,7 +22,7 @@ #include "dawn_native/vulkan/BindGroupLayoutVk.h" #include "dawn_native/vulkan/DescriptorSetAllocation.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -50,6 +50,6 @@ namespace dawn_native { namespace vulkan { DescriptorSetAllocation mDescriptorSetAllocation; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_BINDGROUPVK_H_ diff --git a/src/dawn_native/vulkan/BufferVk.cpp b/src/dawn_native/vulkan/BufferVk.cpp index 0f038739fe..8331dd2b00 100644 --- a/src/dawn_native/vulkan/BufferVk.cpp +++ b/src/dawn_native/vulkan/BufferVk.cpp @@ -24,7 +24,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -410,4 +410,4 @@ namespace dawn_native { namespace vulkan { device->fn.CmdFillBuffer(recordingContext->commandBuffer, mHandle, offset, size, clearValue); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/BufferVk.h b/src/dawn_native/vulkan/BufferVk.h index 721d4f0699..6dfe3c0aa8 100644 --- a/src/dawn_native/vulkan/BufferVk.h +++ b/src/dawn_native/vulkan/BufferVk.h @@ -21,7 +21,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/ResourceMemoryAllocation.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { struct CommandRecordingContext; class Device; @@ -77,6 +77,6 @@ namespace dawn_native { namespace vulkan { wgpu::BufferUsage mLastUsage = wgpu::BufferUsage::None; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_BUFFERVK_H_ diff --git a/src/dawn_native/vulkan/CommandBufferVk.cpp b/src/dawn_native/vulkan/CommandBufferVk.cpp index d89688cf45..8d73790032 100644 --- a/src/dawn_native/vulkan/CommandBufferVk.cpp +++ b/src/dawn_native/vulkan/CommandBufferVk.cpp @@ -38,7 +38,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -1321,4 +1321,4 @@ namespace dawn_native { namespace vulkan { UNREACHABLE(); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/CommandBufferVk.h b/src/dawn_native/vulkan/CommandBufferVk.h index d5d603b611..53d604e1ff 100644 --- a/src/dawn_native/vulkan/CommandBufferVk.h +++ b/src/dawn_native/vulkan/CommandBufferVk.h @@ -25,7 +25,7 @@ namespace dawn_native { struct TextureCopy; } // namespace dawn_native -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { struct CommandRecordingContext; class Device; @@ -50,6 +50,6 @@ namespace dawn_native { namespace vulkan { const Extent3D& copySize); }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_COMMANDBUFFERVK_H_ diff --git a/src/dawn_native/vulkan/CommandRecordingContext.h b/src/dawn_native/vulkan/CommandRecordingContext.h index a8dd68d2e7..ccd5a019ea 100644 --- a/src/dawn_native/vulkan/CommandRecordingContext.h +++ b/src/dawn_native/vulkan/CommandRecordingContext.h @@ -18,7 +18,7 @@ #include "dawn_native/vulkan/BufferVk.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // Used to track operations that are handled after recording. // Currently only tracks semaphores, but may be used to do barrier coalescing in the future. struct CommandRecordingContext { @@ -35,6 +35,6 @@ namespace dawn_native { namespace vulkan { bool used = false; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_COMMANDRECORDINGCONTEXT_H_ diff --git a/src/dawn_native/vulkan/ComputePipelineVk.cpp b/src/dawn_native/vulkan/ComputePipelineVk.cpp index 77ceba7dee..7def0e14d3 100644 --- a/src/dawn_native/vulkan/ComputePipelineVk.cpp +++ b/src/dawn_native/vulkan/ComputePipelineVk.cpp @@ -22,7 +22,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // static Ref ComputePipeline::CreateUninitialized( @@ -113,4 +113,4 @@ namespace dawn_native { namespace vulkan { CreateComputePipelineAsyncTask::RunAsync(std::move(asyncTask)); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/ComputePipelineVk.h b/src/dawn_native/vulkan/ComputePipelineVk.h index 26bf4c2713..3164bdfd37 100644 --- a/src/dawn_native/vulkan/ComputePipelineVk.h +++ b/src/dawn_native/vulkan/ComputePipelineVk.h @@ -20,7 +20,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/Error.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -48,6 +48,6 @@ namespace dawn_native { namespace vulkan { VkPipeline mHandle = VK_NULL_HANDLE; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_COMPUTEPIPELINEVK_H_ diff --git a/src/dawn_native/vulkan/DescriptorSetAllocation.h b/src/dawn_native/vulkan/DescriptorSetAllocation.h index 6a708e1ae3..0e49d34760 100644 --- a/src/dawn_native/vulkan/DescriptorSetAllocation.h +++ b/src/dawn_native/vulkan/DescriptorSetAllocation.h @@ -17,7 +17,7 @@ #include "common/vulkan_platform.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // Contains a descriptor set along with data necessary to track its allocation. struct DescriptorSetAllocation { @@ -26,6 +26,6 @@ namespace dawn_native { namespace vulkan { uint16_t setIndex; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_DESCRIPTORSETALLOCATION_H_ diff --git a/src/dawn_native/vulkan/DescriptorSetAllocator.cpp b/src/dawn_native/vulkan/DescriptorSetAllocator.cpp index 936a9bae28..47f68adffd 100644 --- a/src/dawn_native/vulkan/DescriptorSetAllocator.cpp +++ b/src/dawn_native/vulkan/DescriptorSetAllocator.cpp @@ -19,7 +19,7 @@ #include "dawn_native/vulkan/FencedDeleter.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // TODO(enga): Figure out this value. static constexpr uint32_t kMaxDescriptorsPerPool = 512; @@ -185,4 +185,4 @@ namespace dawn_native { namespace vulkan { return {}; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/DescriptorSetAllocator.h b/src/dawn_native/vulkan/DescriptorSetAllocator.h index ef7eba1b49..dfeba15759 100644 --- a/src/dawn_native/vulkan/DescriptorSetAllocator.h +++ b/src/dawn_native/vulkan/DescriptorSetAllocator.h @@ -25,7 +25,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class BindGroupLayout; @@ -71,6 +71,6 @@ namespace dawn_native { namespace vulkan { ExecutionSerial mLastDeallocationSerial = ExecutionSerial(0); }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_DESCRIPTORSETALLOCATOR_H_ diff --git a/src/dawn_native/vulkan/DeviceVk.cpp b/src/dawn_native/vulkan/DeviceVk.cpp index 2c2c48b39a..2bce87852f 100644 --- a/src/dawn_native/vulkan/DeviceVk.cpp +++ b/src/dawn_native/vulkan/DeviceVk.cpp @@ -42,7 +42,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // static ResultOrError> Device::Create(Adapter* adapter, @@ -1015,4 +1015,4 @@ namespace dawn_native { namespace vulkan { return mDeviceInfo.properties.limits.timestampPeriod; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/DeviceVk.h b/src/dawn_native/vulkan/DeviceVk.h index 00f32c727f..5bdb6d928a 100644 --- a/src/dawn_native/vulkan/DeviceVk.h +++ b/src/dawn_native/vulkan/DeviceVk.h @@ -32,7 +32,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Adapter; class BindGroupLayout; @@ -208,6 +208,6 @@ namespace dawn_native { namespace vulkan { std::vector* outWaitSemaphores); }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_DEVICEVK_H_ diff --git a/src/dawn_native/vulkan/ExternalHandle.h b/src/dawn_native/vulkan/ExternalHandle.h index 45206b36f6..84e672c5ad 100644 --- a/src/dawn_native/vulkan/ExternalHandle.h +++ b/src/dawn_native/vulkan/ExternalHandle.h @@ -3,7 +3,7 @@ #include "common/vulkan_platform.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { #if DAWN_PLATFORM_LINUX // File descriptor @@ -21,6 +21,6 @@ namespace dawn_native { namespace vulkan { using ExternalSemaphoreHandle = void*; #endif -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_EXTERNALHANDLE_H_ diff --git a/src/dawn_native/vulkan/FencedDeleter.cpp b/src/dawn_native/vulkan/FencedDeleter.cpp index 4086f0cc5c..9607a471e1 100644 --- a/src/dawn_native/vulkan/FencedDeleter.cpp +++ b/src/dawn_native/vulkan/FencedDeleter.cpp @@ -16,7 +16,7 @@ #include "dawn_native/vulkan/DeviceVk.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { FencedDeleter::FencedDeleter(Device* device) : mDevice(device) { } @@ -180,4 +180,4 @@ namespace dawn_native { namespace vulkan { mSamplersToDelete.ClearUpTo(completedSerial); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/FencedDeleter.h b/src/dawn_native/vulkan/FencedDeleter.h index 81e60280dc..a137d4903c 100644 --- a/src/dawn_native/vulkan/FencedDeleter.h +++ b/src/dawn_native/vulkan/FencedDeleter.h @@ -19,7 +19,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/IntegerTypes.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -65,6 +65,6 @@ namespace dawn_native { namespace vulkan { SerialQueue mSwapChainsToDelete; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_FENCEDDELETER_H_ diff --git a/src/dawn_native/vulkan/Forward.h b/src/dawn_native/vulkan/Forward.h index e11a74fe4a..bc34458e88 100644 --- a/src/dawn_native/vulkan/Forward.h +++ b/src/dawn_native/vulkan/Forward.h @@ -17,7 +17,7 @@ #include "dawn_native/ToBackend.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Adapter; class BindGroup; @@ -64,6 +64,6 @@ namespace dawn_native { namespace vulkan { return ToBackendBase(common); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_FORWARD_H_ diff --git a/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp b/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp index 9782a2bfbd..8b7cc55bfd 100644 --- a/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp +++ b/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp @@ -20,7 +20,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -222,4 +222,4 @@ namespace dawn_native { namespace vulkan { return mConfig.format; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/NativeSwapChainImplVk.h b/src/dawn_native/vulkan/NativeSwapChainImplVk.h index fe7a1820f5..b908fd93a6 100644 --- a/src/dawn_native/vulkan/NativeSwapChainImplVk.h +++ b/src/dawn_native/vulkan/NativeSwapChainImplVk.h @@ -20,7 +20,7 @@ #include "dawn/dawn_wsi.h" #include "dawn_native/dawn_platform.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -66,6 +66,6 @@ namespace dawn_native { namespace vulkan { Device* mDevice = nullptr; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_NATIVESWAPCHAINIMPLVK_H_ diff --git a/src/dawn_native/vulkan/PipelineLayoutVk.cpp b/src/dawn_native/vulkan/PipelineLayoutVk.cpp index e41a99b8b9..6a34c237b6 100644 --- a/src/dawn_native/vulkan/PipelineLayoutVk.cpp +++ b/src/dawn_native/vulkan/PipelineLayoutVk.cpp @@ -21,7 +21,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // static ResultOrError> PipelineLayout::Create( @@ -81,4 +81,4 @@ namespace dawn_native { namespace vulkan { reinterpret_cast(mHandle), "Dawn_PipelineLayout", GetLabel()); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/PipelineLayoutVk.h b/src/dawn_native/vulkan/PipelineLayoutVk.h index 3cabde09a5..86a1cafe7c 100644 --- a/src/dawn_native/vulkan/PipelineLayoutVk.h +++ b/src/dawn_native/vulkan/PipelineLayoutVk.h @@ -20,7 +20,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/Error.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -45,6 +45,6 @@ namespace dawn_native { namespace vulkan { VkPipelineLayout mHandle = VK_NULL_HANDLE; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_PIPELINELAYOUTVK_H_ diff --git a/src/dawn_native/vulkan/QuerySetVk.cpp b/src/dawn_native/vulkan/QuerySetVk.cpp index 01d3a738c5..f8373ba352 100644 --- a/src/dawn_native/vulkan/QuerySetVk.cpp +++ b/src/dawn_native/vulkan/QuerySetVk.cpp @@ -20,7 +20,7 @@ #include "dawn_native/vulkan/VulkanError.h" #include "dawn_platform/DawnPlatform.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { VkQueryType VulkanQueryType(wgpu::QueryType type) { @@ -114,4 +114,4 @@ namespace dawn_native { namespace vulkan { reinterpret_cast(mHandle), "Dawn_QuerySet", GetLabel()); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/QuerySetVk.h b/src/dawn_native/vulkan/QuerySetVk.h index e219a0f054..9632d6e714 100644 --- a/src/dawn_native/vulkan/QuerySetVk.h +++ b/src/dawn_native/vulkan/QuerySetVk.h @@ -19,7 +19,7 @@ #include "common/vulkan_platform.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -42,6 +42,6 @@ namespace dawn_native { namespace vulkan { VkQueryPool mHandle = VK_NULL_HANDLE; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_QUERYSETVK_H_ diff --git a/src/dawn_native/vulkan/QueueVk.cpp b/src/dawn_native/vulkan/QueueVk.cpp index 2cb1e69db8..79f2973350 100644 --- a/src/dawn_native/vulkan/QueueVk.cpp +++ b/src/dawn_native/vulkan/QueueVk.cpp @@ -25,7 +25,7 @@ #include "dawn_platform/DawnPlatform.h" #include "dawn_platform/tracing/TraceEvent.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // static Queue* Queue::Create(Device* device) { @@ -56,4 +56,4 @@ namespace dawn_native { namespace vulkan { return {}; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/QueueVk.h b/src/dawn_native/vulkan/QueueVk.h index b3aa66538e..effc6ad196 100644 --- a/src/dawn_native/vulkan/QueueVk.h +++ b/src/dawn_native/vulkan/QueueVk.h @@ -17,7 +17,7 @@ #include "dawn_native/Queue.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -33,6 +33,6 @@ namespace dawn_native { namespace vulkan { MaybeError SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) override; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_QUEUEVK_H_ diff --git a/src/dawn_native/vulkan/RenderPassCache.cpp b/src/dawn_native/vulkan/RenderPassCache.cpp index 120cc0fb6b..ad2cfd3daf 100644 --- a/src/dawn_native/vulkan/RenderPassCache.cpp +++ b/src/dawn_native/vulkan/RenderPassCache.cpp @@ -20,7 +20,7 @@ #include "dawn_native/vulkan/TextureVk.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { VkAttachmentLoadOp VulkanAttachmentLoadOp(wgpu::LoadOp op) { @@ -289,4 +289,4 @@ namespace dawn_native { namespace vulkan { return true; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/RenderPassCache.h b/src/dawn_native/vulkan/RenderPassCache.h index 29bcfd0f4b..400c575d19 100644 --- a/src/dawn_native/vulkan/RenderPassCache.h +++ b/src/dawn_native/vulkan/RenderPassCache.h @@ -28,7 +28,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -101,6 +101,6 @@ namespace dawn_native { namespace vulkan { Cache mCache; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_RENDERPASSCACHE_H_ diff --git a/src/dawn_native/vulkan/RenderPipelineVk.cpp b/src/dawn_native/vulkan/RenderPipelineVk.cpp index d0072dfb5d..2f19386c69 100644 --- a/src/dawn_native/vulkan/RenderPipelineVk.cpp +++ b/src/dawn_native/vulkan/RenderPipelineVk.cpp @@ -24,7 +24,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -624,4 +624,4 @@ namespace dawn_native { namespace vulkan { CreateRenderPipelineAsyncTask::RunAsync(std::move(asyncTask)); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/RenderPipelineVk.h b/src/dawn_native/vulkan/RenderPipelineVk.h index 9cfd078dac..810041abef 100644 --- a/src/dawn_native/vulkan/RenderPipelineVk.h +++ b/src/dawn_native/vulkan/RenderPipelineVk.h @@ -20,7 +20,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/Error.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -54,6 +54,6 @@ namespace dawn_native { namespace vulkan { VkPipeline mHandle = VK_NULL_HANDLE; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_RENDERPIPELINEVK_H_ diff --git a/src/dawn_native/vulkan/ResourceHeapVk.cpp b/src/dawn_native/vulkan/ResourceHeapVk.cpp index bf3b947bd4..c0af2d3f19 100644 --- a/src/dawn_native/vulkan/ResourceHeapVk.cpp +++ b/src/dawn_native/vulkan/ResourceHeapVk.cpp @@ -14,7 +14,7 @@ #include "dawn_native/vulkan/ResourceHeapVk.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { ResourceHeap::ResourceHeap(VkDeviceMemory memory, size_t memoryType) : mMemory(memory), mMemoryType(memoryType) { @@ -28,4 +28,4 @@ namespace dawn_native { namespace vulkan { return mMemoryType; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/ResourceHeapVk.h b/src/dawn_native/vulkan/ResourceHeapVk.h index 2bb909b5c8..b87600b056 100644 --- a/src/dawn_native/vulkan/ResourceHeapVk.h +++ b/src/dawn_native/vulkan/ResourceHeapVk.h @@ -18,7 +18,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/ResourceHeap.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // Wrapper for physical memory used with or without a resource object. class ResourceHeap : public ResourceHeapBase { @@ -34,6 +34,6 @@ namespace dawn_native { namespace vulkan { size_t mMemoryType = 0; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_RESOURCEHEAPVK_H_ diff --git a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp b/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp index 72bb019a29..abfd3aad2a 100644 --- a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp +++ b/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp @@ -22,7 +22,7 @@ #include "dawn_native/vulkan/ResourceHeapVk.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -289,4 +289,4 @@ namespace dawn_native { namespace vulkan { } } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h b/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h index e3871dbd28..788ea1c27f 100644 --- a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h +++ b/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h @@ -25,7 +25,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -61,6 +61,6 @@ namespace dawn_native { namespace vulkan { SerialQueue mSubAllocationsToDelete; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_RESOURCEMEMORYALLOCATORVK_H_ diff --git a/src/dawn_native/vulkan/SamplerVk.cpp b/src/dawn_native/vulkan/SamplerVk.cpp index 7c43645380..0885d55de1 100644 --- a/src/dawn_native/vulkan/SamplerVk.cpp +++ b/src/dawn_native/vulkan/SamplerVk.cpp @@ -19,7 +19,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { VkSamplerAddressMode VulkanSamplerAddressMode(wgpu::AddressMode mode) { @@ -128,4 +128,4 @@ namespace dawn_native { namespace vulkan { reinterpret_cast(mHandle), "Dawn_Sampler", GetLabel()); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/SamplerVk.h b/src/dawn_native/vulkan/SamplerVk.h index fec8653d92..e3aea2c6cc 100644 --- a/src/dawn_native/vulkan/SamplerVk.h +++ b/src/dawn_native/vulkan/SamplerVk.h @@ -20,7 +20,7 @@ #include "common/vulkan_platform.h" #include "dawn_native/Error.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -43,6 +43,6 @@ namespace dawn_native { namespace vulkan { VkSampler mHandle = VK_NULL_HANDLE; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_SAMPLERVK_H_ diff --git a/src/dawn_native/vulkan/ShaderModuleVk.cpp b/src/dawn_native/vulkan/ShaderModuleVk.cpp index 81f84aba35..53d8f3ec7c 100644 --- a/src/dawn_native/vulkan/ShaderModuleVk.cpp +++ b/src/dawn_native/vulkan/ShaderModuleVk.cpp @@ -26,7 +26,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { ShaderModule::ConcurrentTransformedShaderModuleCache::ConcurrentTransformedShaderModuleCache( Device* device) @@ -200,4 +200,4 @@ namespace dawn_native { namespace vulkan { return newHandle; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/ShaderModuleVk.h b/src/dawn_native/vulkan/ShaderModuleVk.h index 9d28f91d4d..d91b8f0b6d 100644 --- a/src/dawn_native/vulkan/ShaderModuleVk.h +++ b/src/dawn_native/vulkan/ShaderModuleVk.h @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; class PipelineLayout; @@ -62,6 +62,6 @@ namespace dawn_native { namespace vulkan { std::unique_ptr mTransformedShaderModuleCache; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_SHADERMODULEVK_H_ diff --git a/src/dawn_native/vulkan/StagingBufferVk.cpp b/src/dawn_native/vulkan/StagingBufferVk.cpp index c78f0fc436..d8cbb88eaa 100644 --- a/src/dawn_native/vulkan/StagingBufferVk.cpp +++ b/src/dawn_native/vulkan/StagingBufferVk.cpp @@ -20,7 +20,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { StagingBuffer::StagingBuffer(size_t size, Device* device) : StagingBufferBase(size), mDevice(device) { @@ -74,4 +74,4 @@ namespace dawn_native { namespace vulkan { return mBuffer; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/StagingBufferVk.h b/src/dawn_native/vulkan/StagingBufferVk.h index 50b773a0da..477bed5602 100644 --- a/src/dawn_native/vulkan/StagingBufferVk.h +++ b/src/dawn_native/vulkan/StagingBufferVk.h @@ -19,7 +19,7 @@ #include "dawn_native/ResourceMemoryAllocation.h" #include "dawn_native/StagingBuffer.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -37,6 +37,6 @@ namespace dawn_native { namespace vulkan { VkBuffer mBuffer; ResourceMemoryAllocation mAllocation; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_STAGINGBUFFERVK_H_ diff --git a/src/dawn_native/vulkan/SwapChainVk.cpp b/src/dawn_native/vulkan/SwapChainVk.cpp index e111200dba..8cf6cff721 100644 --- a/src/dawn_native/vulkan/SwapChainVk.cpp +++ b/src/dawn_native/vulkan/SwapChainVk.cpp @@ -30,7 +30,7 @@ # include "dawn_native/XlibXcbFunctions.h" #endif // defined(DAWN_USE_X11) -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // OldSwapChain @@ -661,4 +661,4 @@ namespace dawn_native { namespace vulkan { } } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/SwapChainVk.h b/src/dawn_native/vulkan/SwapChainVk.h index e93039b8c8..c85aa329a7 100644 --- a/src/dawn_native/vulkan/SwapChainVk.h +++ b/src/dawn_native/vulkan/SwapChainVk.h @@ -21,7 +21,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; class Texture; @@ -93,6 +93,6 @@ namespace dawn_native { namespace vulkan { Ref mTexture; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_SWAPCHAINVK_H_ diff --git a/src/dawn_native/vulkan/TextureVk.cpp b/src/dawn_native/vulkan/TextureVk.cpp index ab89859e77..3fc2b85af0 100644 --- a/src/dawn_native/vulkan/TextureVk.cpp +++ b/src/dawn_native/vulkan/TextureVk.cpp @@ -31,7 +31,7 @@ #include "dawn_native/vulkan/UtilsVulkan.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { // Converts an Dawn texture dimension to a Vulkan image view type. @@ -1364,4 +1364,4 @@ namespace dawn_native { namespace vulkan { reinterpret_cast(mHandle), "Dawn_InternalTextureView", GetLabel()); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/TextureVk.h b/src/dawn_native/vulkan/TextureVk.h index 60832752af..d339e99c10 100644 --- a/src/dawn_native/vulkan/TextureVk.h +++ b/src/dawn_native/vulkan/TextureVk.h @@ -23,7 +23,7 @@ #include "dawn_native/vulkan/ExternalHandle.h" #include "dawn_native/vulkan/external_memory/MemoryService.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { struct CommandRecordingContext; class Device; @@ -197,6 +197,6 @@ namespace dawn_native { namespace vulkan { VkImageView mHandle = VK_NULL_HANDLE; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_TEXTUREVK_H_ diff --git a/src/dawn_native/vulkan/UtilsVulkan.cpp b/src/dawn_native/vulkan/UtilsVulkan.cpp index f7f7e4bb65..51095341db 100644 --- a/src/dawn_native/vulkan/UtilsVulkan.cpp +++ b/src/dawn_native/vulkan/UtilsVulkan.cpp @@ -24,7 +24,7 @@ #include "dawn_native/vulkan/TextureVk.h" #include "dawn_native/vulkan/VulkanError.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { VkCompareOp ToVulkanCompareOp(wgpu::CompareFunction op) { switch (op) { @@ -261,4 +261,4 @@ namespace dawn_native { namespace vulkan { return specializationInfo; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/UtilsVulkan.h b/src/dawn_native/vulkan/UtilsVulkan.h index 7b7ead5d5d..f91c782210 100644 --- a/src/dawn_native/vulkan/UtilsVulkan.h +++ b/src/dawn_native/vulkan/UtilsVulkan.h @@ -24,7 +24,7 @@ namespace dawn_native { union OverridableConstantScalar; } // namespace dawn_native -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; @@ -116,6 +116,6 @@ namespace dawn_native { namespace vulkan { std::vector* specializationDataEntries, std::vector* specializationMapEntries); -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_UTILSVULKAN_H_ diff --git a/src/dawn_native/vulkan/VulkanBackend.cpp b/src/dawn_native/vulkan/VulkanBackend.cpp index f406f9f55d..658e8fd8d6 100644 --- a/src/dawn_native/vulkan/VulkanBackend.cpp +++ b/src/dawn_native/vulkan/VulkanBackend.cpp @@ -26,7 +26,7 @@ #include "dawn_native/vulkan/NativeSwapChainImplVk.h" #include "dawn_native/vulkan/TextureVk.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { VkInstance GetInstance(WGPUDevice device) { Device* backendDevice = ToBackend(FromAPI(device)); @@ -126,4 +126,4 @@ namespace dawn_native { namespace vulkan { #endif // DAWN_PLATFORM_LINUX } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/VulkanError.cpp b/src/dawn_native/vulkan/VulkanError.cpp index e0655b959f..9b58d1619a 100644 --- a/src/dawn_native/vulkan/VulkanError.cpp +++ b/src/dawn_native/vulkan/VulkanError.cpp @@ -16,7 +16,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { const char* VkResultAsString(::VkResult result) { // Convert to a int32_t to silence and MSVC warning that the fake errors don't appear in @@ -106,4 +106,4 @@ namespace dawn_native { namespace vulkan { } } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/VulkanError.h b/src/dawn_native/vulkan/VulkanError.h index 7748f56cd3..0d7ee5fb9c 100644 --- a/src/dawn_native/vulkan/VulkanError.h +++ b/src/dawn_native/vulkan/VulkanError.h @@ -21,7 +21,7 @@ constexpr VkResult VK_FAKE_ERROR_FOR_TESTING = VK_RESULT_MAX_ENUM; constexpr VkResult VK_FAKE_DEVICE_OOM_FOR_TESTING = static_cast(VK_RESULT_MAX_ENUM - 1); -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // Returns a string version of the result. const char* VkResultAsString(::VkResult result); @@ -45,6 +45,6 @@ namespace dawn_native { namespace vulkan { resultIn, VK_FAKE_DEVICE_OOM_FOR_TESTING, VK_FAKE_ERROR_FOR_TESTING)), \ contextIn) -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_VULKANERROR_H_ diff --git a/src/dawn_native/vulkan/VulkanExtensions.cpp b/src/dawn_native/vulkan/VulkanExtensions.cpp index 3073625ce3..96b1e50fa4 100644 --- a/src/dawn_native/vulkan/VulkanExtensions.cpp +++ b/src/dawn_native/vulkan/VulkanExtensions.cpp @@ -20,7 +20,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { static constexpr uint32_t VulkanVersion_1_1 = VK_MAKE_VERSION(1, 1, 0); static constexpr uint32_t VulkanVersion_1_2 = VK_MAKE_VERSION(1, 2, 0); @@ -323,4 +323,4 @@ namespace dawn_native { namespace vulkan { return result; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/VulkanExtensions.h b/src/dawn_native/vulkan/VulkanExtensions.h index bd87527945..dd5974703e 100644 --- a/src/dawn_native/vulkan/VulkanExtensions.h +++ b/src/dawn_native/vulkan/VulkanExtensions.h @@ -19,7 +19,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { // The list of known instance extensions. They must be in dependency order (this is checked // inside EnsureDependencies) @@ -157,6 +157,6 @@ namespace dawn_native { namespace vulkan { // Returns a map that maps a Vulkan layer name to its VulkanLayer. std::unordered_map CreateVulkanLayerNameMap(); -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_VULKANEXTENSIONS_H_ diff --git a/src/dawn_native/vulkan/VulkanFunctions.cpp b/src/dawn_native/vulkan/VulkanFunctions.cpp index 2e052e73b4..99c9acd97d 100644 --- a/src/dawn_native/vulkan/VulkanFunctions.cpp +++ b/src/dawn_native/vulkan/VulkanFunctions.cpp @@ -17,7 +17,7 @@ #include "common/DynamicLib.h" #include "dawn_native/vulkan/VulkanInfo.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { #define GET_GLOBAL_PROC(name) \ do { \ @@ -329,4 +329,4 @@ namespace dawn_native { namespace vulkan { return {}; } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/VulkanFunctions.h b/src/dawn_native/vulkan/VulkanFunctions.h index eb20ee67be..a677cd26e3 100644 --- a/src/dawn_native/vulkan/VulkanFunctions.h +++ b/src/dawn_native/vulkan/VulkanFunctions.h @@ -21,7 +21,7 @@ class DynamicLib; -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { struct VulkanGlobalInfo; struct VulkanDeviceInfo; @@ -321,6 +321,6 @@ namespace dawn_native { namespace vulkan { ::VkResult mValue; }; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_VULKANFUNCTIONS_H_ diff --git a/src/dawn_native/vulkan/VulkanInfo.cpp b/src/dawn_native/vulkan/VulkanInfo.cpp index 4b0159f38b..c3883cd96a 100644 --- a/src/dawn_native/vulkan/VulkanInfo.cpp +++ b/src/dawn_native/vulkan/VulkanInfo.cpp @@ -21,7 +21,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { ResultOrError GatherInstanceExtensions( @@ -331,4 +331,4 @@ namespace dawn_native { namespace vulkan { return std::move(info); } -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/dawn_native/vulkan/VulkanInfo.h b/src/dawn_native/vulkan/VulkanInfo.h index ff7a5bcaa7..83fd1374e7 100644 --- a/src/dawn_native/vulkan/VulkanInfo.h +++ b/src/dawn_native/vulkan/VulkanInfo.h @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Adapter; class Backend; @@ -84,6 +84,6 @@ namespace dawn_native { namespace vulkan { ResultOrError GatherDeviceInfo(const Adapter& adapter); ResultOrError GatherSurfaceInfo(const Adapter& adapter, VkSurfaceKHR surface); -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKAN_VULKANINFO_H_ diff --git a/src/dawn_native/vulkan/external_memory/MemoryService.h b/src/dawn_native/vulkan/external_memory/MemoryService.h index 5844d8f872..3e8ae3ef45 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryService.h +++ b/src/dawn_native/vulkan/external_memory/MemoryService.h @@ -20,12 +20,12 @@ #include "dawn_native/VulkanBackend.h" #include "dawn_native/vulkan/ExternalHandle.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; struct VulkanDeviceInfo; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan -namespace dawn_native { namespace vulkan { namespace external_memory { +namespace dawn_native { namespace vulkan::external_memory { struct MemoryImportParams { VkDeviceSize allocationSize; @@ -73,6 +73,6 @@ namespace dawn_native { namespace vulkan { namespace external_memory { bool mSupported = false; }; -}}} // namespace dawn_native::vulkan::external_memory +}} // namespace dawn_native::vulkan::external_memory #endif // DAWNNATIVE_VULKAN_EXTERNALMEMORY_SERVICE_H_ diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp b/src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp index 06e0bf91e2..3317b43bf5 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp +++ b/src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp @@ -21,7 +21,7 @@ #include "dawn_native/vulkan/VulkanError.h" #include "dawn_native/vulkan/external_memory/MemoryService.h" -namespace dawn_native { namespace vulkan { namespace external_memory { +namespace dawn_native { namespace vulkan::external_memory { namespace { @@ -354,4 +354,4 @@ namespace dawn_native { namespace vulkan { namespace external_memory { return image; } -}}} // namespace dawn_native::vulkan::external_memory +}} // namespace dawn_native::vulkan::external_memory diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp b/src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp index 9994951d09..aefe550015 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp +++ b/src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp @@ -15,7 +15,7 @@ #include "dawn_native/vulkan/DeviceVk.h" #include "dawn_native/vulkan/external_memory/MemoryService.h" -namespace dawn_native { namespace vulkan { namespace external_memory { +namespace dawn_native { namespace vulkan::external_memory { Service::Service(Device* device) : mDevice(device) { DAWN_UNUSED(mDevice); @@ -62,4 +62,4 @@ namespace dawn_native { namespace vulkan { namespace external_memory { return DAWN_UNIMPLEMENTED_ERROR("Using null memory service to interop inside Vulkan"); } -}}} // namespace dawn_native::vulkan::external_memory +}} // namespace dawn_native::vulkan::external_memory diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp b/src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp index 55969f7f05..0222833f81 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp +++ b/src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp @@ -20,7 +20,7 @@ #include "dawn_native/vulkan/VulkanError.h" #include "dawn_native/vulkan/external_memory/MemoryService.h" -namespace dawn_native { namespace vulkan { namespace external_memory { +namespace dawn_native { namespace vulkan::external_memory { Service::Service(Device* device) : mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) { @@ -153,4 +153,4 @@ namespace dawn_native { namespace vulkan { namespace external_memory { return image; } -}}} // namespace dawn_native::vulkan::external_memory +}} // namespace dawn_native::vulkan::external_memory diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp b/src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp index 3b1a031a43..7c37135a30 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp +++ b/src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp @@ -20,7 +20,7 @@ #include "dawn_native/vulkan/VulkanError.h" #include "dawn_native/vulkan/external_memory/MemoryService.h" -namespace dawn_native { namespace vulkan { namespace external_memory { +namespace dawn_native { namespace vulkan::external_memory { Service::Service(Device* device) : mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) { @@ -155,4 +155,4 @@ namespace dawn_native { namespace vulkan { namespace external_memory { return image; } -}}} // namespace dawn_native::vulkan::external_memory +}} // namespace dawn_native::vulkan::external_memory diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreService.h b/src/dawn_native/vulkan/external_semaphore/SemaphoreService.h index 91d9576b71..5824c520c3 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreService.h +++ b/src/dawn_native/vulkan/external_semaphore/SemaphoreService.h @@ -21,11 +21,11 @@ #include "dawn_native/vulkan/VulkanFunctions.h" #include "dawn_native/vulkan/VulkanInfo.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { class Device; -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan -namespace dawn_native { namespace vulkan { namespace external_semaphore { +namespace dawn_native { namespace vulkan::external_semaphore { class Service { public: @@ -55,6 +55,6 @@ namespace dawn_native { namespace vulkan { namespace external_semaphore { bool mSupported = false; }; -}}} // namespace dawn_native::vulkan::external_semaphore +}} // namespace dawn_native::vulkan::external_semaphore #endif // DAWNNATIVE_VULKAN_EXTERNALSEMAPHORE_SERVICE_H_ diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp index b81f96c33e..58c6f961f7 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp +++ b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp @@ -25,7 +25,7 @@ static constexpr VkExternalSemaphoreHandleTypeFlagBits kHandleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; #endif // defined(DAWN_USE_SYNC_FDS) -namespace dawn_native { namespace vulkan { namespace external_semaphore { +namespace dawn_native { namespace vulkan::external_semaphore { Service::Service(Device* device) : mDevice(device), @@ -134,4 +134,4 @@ namespace dawn_native { namespace vulkan { namespace external_semaphore { return fd; } -}}} // namespace dawn_native::vulkan::external_semaphore +}} // namespace dawn_native::vulkan::external_semaphore diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp index 3053029825..8c99da1832 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp +++ b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp @@ -15,7 +15,7 @@ #include "dawn_native/vulkan/DeviceVk.h" #include "dawn_native/vulkan/external_semaphore/SemaphoreService.h" -namespace dawn_native { namespace vulkan { namespace external_semaphore { +namespace dawn_native { namespace vulkan::external_semaphore { Service::Service(Device* device) : mDevice(device) { DAWN_UNUSED(mDevice); @@ -47,4 +47,4 @@ namespace dawn_native { namespace vulkan { namespace external_semaphore { return DAWN_UNIMPLEMENTED_ERROR("Using null semaphore service to interop inside Vulkan"); } -}}} // namespace dawn_native::vulkan::external_semaphore +}} // namespace dawn_native::vulkan::external_semaphore diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp index 7a773f9c42..35c2b2b90b 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp +++ b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp @@ -18,7 +18,7 @@ #include "dawn_native/vulkan/VulkanError.h" #include "dawn_native/vulkan/external_semaphore/SemaphoreService.h" -namespace dawn_native { namespace vulkan { namespace external_semaphore { +namespace dawn_native { namespace vulkan::external_semaphore { Service::Service(Device* device) : mDevice(device), @@ -132,4 +132,4 @@ namespace dawn_native { namespace vulkan { namespace external_semaphore { return handle; } -}}} // namespace dawn_native::vulkan::external_semaphore +}} // namespace dawn_native::vulkan::external_semaphore diff --git a/src/dawn_node/binding/AsyncRunner.cpp b/src/dawn_node/binding/AsyncRunner.cpp index 788abc2410..94382d15a3 100644 --- a/src/dawn_node/binding/AsyncRunner.cpp +++ b/src/dawn_node/binding/AsyncRunner.cpp @@ -17,7 +17,7 @@ #include #include -namespace wgpu { namespace binding { +namespace wgpu::binding { AsyncRunner::AsyncRunner(Napi::Env env, wgpu::Device device) : env_(env), device_(device) { } @@ -57,4 +57,4 @@ namespace wgpu { namespace binding { }); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/AsyncRunner.h b/src/dawn_node/binding/AsyncRunner.h index a86ee3a0b6..9ed6e5c5e0 100644 --- a/src/dawn_node/binding/AsyncRunner.h +++ b/src/dawn_node/binding/AsyncRunner.h @@ -21,7 +21,7 @@ #include "dawn/webgpu_cpp.h" #include "napi.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // AsyncRunner is used to poll a wgpu::Device with calls to Tick() while there are asynchronous // tasks in flight. @@ -72,6 +72,6 @@ namespace wgpu { namespace binding { std::shared_ptr runner_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_ASYNC_RUNNER_H_ diff --git a/src/dawn_node/binding/Converter.cpp b/src/dawn_node/binding/Converter.cpp index d75e217a98..e2a168f34b 100644 --- a/src/dawn_node/binding/Converter.cpp +++ b/src/dawn_node/binding/Converter.cpp @@ -22,7 +22,7 @@ #include "src/dawn_node/binding/GPUTextureView.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { Converter::~Converter() { for (auto& free : free_) { @@ -1150,4 +1150,4 @@ namespace wgpu { namespace binding { Convert(out.fragment, in.fragment); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/Converter.h b/src/dawn_node/binding/Converter.h index e6b20e8dbf..cacba0eb35 100644 --- a/src/dawn_node/binding/Converter.h +++ b/src/dawn_node/binding/Converter.h @@ -24,7 +24,7 @@ #include "src/dawn_node/binding/Errors.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // ImplOfTraits is a traits helper that is used to associate the interop interface type to the // binding implementation type. @@ -393,6 +393,6 @@ namespace wgpu { namespace binding { std::vector> free_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_CONVERTER_H_ diff --git a/src/dawn_node/binding/Errors.cpp b/src/dawn_node/binding/Errors.cpp index 953a1a8bc6..722be27a47 100644 --- a/src/dawn_node/binding/Errors.cpp +++ b/src/dawn_node/binding/Errors.cpp @@ -14,7 +14,7 @@ #include "src/dawn_node/binding/Errors.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { namespace { constexpr char kHierarchyRequestError[] = "HierarchyRequestError"; @@ -176,4 +176,4 @@ namespace wgpu { namespace binding { return New(env, kNotAllowedError); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/Errors.h b/src/dawn_node/binding/Errors.h index 0f1a40e6b8..97a357793a 100644 --- a/src/dawn_node/binding/Errors.h +++ b/src/dawn_node/binding/Errors.h @@ -17,7 +17,7 @@ #include "napi.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // Errors contains static helper methods for creating DOMException error // messages as documented at: @@ -55,6 +55,6 @@ namespace wgpu { namespace binding { static Napi::Error NotAllowedError(Napi::Env); }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_ERRORS_H_ diff --git a/src/dawn_node/binding/Flags.cpp b/src/dawn_node/binding/Flags.cpp index 3602e92ce8..9985a49e04 100644 --- a/src/dawn_node/binding/Flags.cpp +++ b/src/dawn_node/binding/Flags.cpp @@ -14,7 +14,7 @@ #include "src/dawn_node/binding/Flags.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { void Flags::Set(const std::string& key, const std::string& value) { flags_[key] = value; } @@ -26,4 +26,4 @@ namespace wgpu { namespace binding { } return {}; } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/Flags.h b/src/dawn_node/binding/Flags.h index 1ca4c3004b..89b7b43fb9 100644 --- a/src/dawn_node/binding/Flags.h +++ b/src/dawn_node/binding/Flags.h @@ -19,7 +19,7 @@ #include #include -namespace wgpu { namespace binding { +namespace wgpu::binding { // Flags maintains a key-value mapping of input flags passed into the module's create() // function, used to configure dawn_node. class Flags { @@ -30,6 +30,6 @@ namespace wgpu { namespace binding { private: std::unordered_map flags_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_FLAGS_H_ diff --git a/src/dawn_node/binding/GPU.cpp b/src/dawn_node/binding/GPU.cpp index a13ed3069d..9cbb41341a 100644 --- a/src/dawn_node/binding/GPU.cpp +++ b/src/dawn_node/binding/GPU.cpp @@ -51,7 +51,7 @@ namespace { } // namespace -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPU @@ -158,4 +158,4 @@ namespace wgpu { namespace binding { return promise; } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPU.h b/src/dawn_node/binding/GPU.h index 8f1999df31..e526403a03 100644 --- a/src/dawn_node/binding/GPU.h +++ b/src/dawn_node/binding/GPU.h @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/Flags.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPU is an implementation of interop::GPU that wraps a dawn_native::Instance. class GPU final : public interop::GPU { public: @@ -37,6 +37,6 @@ namespace wgpu { namespace binding { dawn_native::Instance instance_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPU_H_ diff --git a/src/dawn_node/binding/GPUAdapter.cpp b/src/dawn_node/binding/GPUAdapter.cpp index 8de1269e1a..95667ab451 100644 --- a/src/dawn_node/binding/GPUAdapter.cpp +++ b/src/dawn_node/binding/GPUAdapter.cpp @@ -48,7 +48,7 @@ namespace { } } // namespace -namespace wgpu { namespace binding { +namespace wgpu::binding { namespace { @@ -233,4 +233,4 @@ namespace wgpu { namespace binding { } return promise; } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUAdapter.h b/src/dawn_node/binding/GPUAdapter.h index 6f837c86be..a54cd0bf52 100644 --- a/src/dawn_node/binding/GPUAdapter.h +++ b/src/dawn_node/binding/GPUAdapter.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { class Flags; // GPUAdapter is an implementation of interop::GPUAdapter that wraps a dawn_native::Adapter. @@ -42,6 +42,6 @@ namespace wgpu { namespace binding { const Flags& flags_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUADAPTER_H_ diff --git a/src/dawn_node/binding/GPUBindGroup.cpp b/src/dawn_node/binding/GPUBindGroup.cpp index e156700580..3e7b2a1fcd 100644 --- a/src/dawn_node/binding/GPUBindGroup.cpp +++ b/src/dawn_node/binding/GPUBindGroup.cpp @@ -16,7 +16,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUBindGroup @@ -32,4 +32,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUBindGroup.h b/src/dawn_node/binding/GPUBindGroup.h index e71fc8be5c..342cf0d88c 100644 --- a/src/dawn_node/binding/GPUBindGroup.h +++ b/src/dawn_node/binding/GPUBindGroup.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUBindGroup is an implementation of interop::GPUBindGroup that wraps a wgpu::BindGroup. class GPUBindGroup final : public interop::GPUBindGroup { @@ -40,6 +40,6 @@ namespace wgpu { namespace binding { wgpu::BindGroup group_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUBINDGROUP_H_ diff --git a/src/dawn_node/binding/GPUBindGroupLayout.cpp b/src/dawn_node/binding/GPUBindGroupLayout.cpp index ddaeaba6f1..db32a57dae 100644 --- a/src/dawn_node/binding/GPUBindGroupLayout.cpp +++ b/src/dawn_node/binding/GPUBindGroupLayout.cpp @@ -16,7 +16,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUBindGroupLayout @@ -33,4 +33,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUBindGroupLayout.h b/src/dawn_node/binding/GPUBindGroupLayout.h index 34874bf1d9..92d476d787 100644 --- a/src/dawn_node/binding/GPUBindGroupLayout.h +++ b/src/dawn_node/binding/GPUBindGroupLayout.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUBindGroupLayout is an implementation of interop::GPUBindGroupLayout that wraps a // wgpu::BindGroupLayout. @@ -41,6 +41,6 @@ namespace wgpu { namespace binding { wgpu::BindGroupLayout layout_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUBINDGROUPLAYOUT_H_ diff --git a/src/dawn_node/binding/GPUBuffer.cpp b/src/dawn_node/binding/GPUBuffer.cpp index 2fca5d5144..652c2e76ec 100644 --- a/src/dawn_node/binding/GPUBuffer.cpp +++ b/src/dawn_node/binding/GPUBuffer.cpp @@ -20,7 +20,7 @@ #include "src/dawn_node/binding/Errors.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUBuffer @@ -166,4 +166,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUBuffer.h b/src/dawn_node/binding/GPUBuffer.h index c3d8b03198..7bc1d7e515 100644 --- a/src/dawn_node/binding/GPUBuffer.h +++ b/src/dawn_node/binding/GPUBuffer.h @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/AsyncRunner.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUBuffer is an implementation of interop::GPUBuffer that wraps a wgpu::Buffer. class GPUBuffer final : public interop::GPUBuffer { @@ -81,6 +81,6 @@ namespace wgpu { namespace binding { std::vector mapped_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUBUFFER_H_ diff --git a/src/dawn_node/binding/GPUCommandBuffer.cpp b/src/dawn_node/binding/GPUCommandBuffer.cpp index 0ff503fc54..461c6d92dd 100644 --- a/src/dawn_node/binding/GPUCommandBuffer.cpp +++ b/src/dawn_node/binding/GPUCommandBuffer.cpp @@ -16,7 +16,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUCommandBuffer @@ -37,4 +37,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUCommandBuffer.h b/src/dawn_node/binding/GPUCommandBuffer.h index b6fc3ba511..8b35c21925 100644 --- a/src/dawn_node/binding/GPUCommandBuffer.h +++ b/src/dawn_node/binding/GPUCommandBuffer.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUCommandBuffer is an implementation of interop::GPUCommandBuffer that wraps a // wgpu::CommandBuffer. @@ -42,6 +42,6 @@ namespace wgpu { namespace binding { wgpu::CommandBuffer cmd_buf_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUCOMMANDBUFFER_H_ diff --git a/src/dawn_node/binding/GPUCommandEncoder.cpp b/src/dawn_node/binding/GPUCommandEncoder.cpp index cf3925c268..d86cebf69c 100644 --- a/src/dawn_node/binding/GPUCommandEncoder.cpp +++ b/src/dawn_node/binding/GPUCommandEncoder.cpp @@ -24,7 +24,7 @@ #include "src/dawn_node/binding/GPUTexture.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUCommandEncoder @@ -193,4 +193,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUCommandEncoder.h b/src/dawn_node/binding/GPUCommandEncoder.h index f23e281234..3402c7861e 100644 --- a/src/dawn_node/binding/GPUCommandEncoder.h +++ b/src/dawn_node/binding/GPUCommandEncoder.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUCommandEncoder is an implementation of interop::GPUCommandEncoder that wraps a // wgpu::CommandEncoder. @@ -75,6 +75,6 @@ namespace wgpu { namespace binding { wgpu::CommandEncoder enc_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUCOMMANDENCODER_H_ diff --git a/src/dawn_node/binding/GPUComputePassEncoder.cpp b/src/dawn_node/binding/GPUComputePassEncoder.cpp index 6edc467ccf..d827d84bc8 100644 --- a/src/dawn_node/binding/GPUComputePassEncoder.cpp +++ b/src/dawn_node/binding/GPUComputePassEncoder.cpp @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/GPUQuerySet.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUComputePassEncoder @@ -132,4 +132,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUComputePassEncoder.h b/src/dawn_node/binding/GPUComputePassEncoder.h index 9c7064be99..faf0859851 100644 --- a/src/dawn_node/binding/GPUComputePassEncoder.h +++ b/src/dawn_node/binding/GPUComputePassEncoder.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUComputePassEncoder is an implementation of interop::GPUComputePassEncoder that wraps a // wgpu::ComputePassEncoder. @@ -71,6 +71,6 @@ namespace wgpu { namespace binding { wgpu::ComputePassEncoder enc_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUCOMPUTEPASSENCODER_H_ diff --git a/src/dawn_node/binding/GPUComputePipeline.cpp b/src/dawn_node/binding/GPUComputePipeline.cpp index 0eef82ec54..be6d1c39e5 100644 --- a/src/dawn_node/binding/GPUComputePipeline.cpp +++ b/src/dawn_node/binding/GPUComputePipeline.cpp @@ -18,7 +18,7 @@ #include "src/dawn_node/binding/GPUBuffer.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUComputePipeline @@ -42,4 +42,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUComputePipeline.h b/src/dawn_node/binding/GPUComputePipeline.h index e9dde76a6a..a4b8bcae93 100644 --- a/src/dawn_node/binding/GPUComputePipeline.h +++ b/src/dawn_node/binding/GPUComputePipeline.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUComputePipeline is an implementation of interop::GPUComputePipeline that wraps a // wgpu::ComputePipeline. @@ -43,6 +43,6 @@ namespace wgpu { namespace binding { wgpu::ComputePipeline pipeline_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUPIPELINE_H_ diff --git a/src/dawn_node/binding/GPUDevice.cpp b/src/dawn_node/binding/GPUDevice.cpp index 3b65fa2d41..cddab093b1 100644 --- a/src/dawn_node/binding/GPUDevice.cpp +++ b/src/dawn_node/binding/GPUDevice.cpp @@ -35,7 +35,7 @@ #include "src/dawn_node/binding/GPUTexture.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { namespace { @@ -527,4 +527,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUDevice.h b/src/dawn_node/binding/GPUDevice.h index a3c5dce31d..368f86b723 100644 --- a/src/dawn_node/binding/GPUDevice.h +++ b/src/dawn_node/binding/GPUDevice.h @@ -20,7 +20,7 @@ #include "src/dawn_node/binding/AsyncRunner.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUDevice is an implementation of interop::GPUDevice that wraps a wgpu::Device. class GPUDevice final : public interop::GPUDevice { public: @@ -108,6 +108,6 @@ namespace wgpu { namespace binding { lost_promises_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUDEVICE_H_ diff --git a/src/dawn_node/binding/GPUPipelineLayout.cpp b/src/dawn_node/binding/GPUPipelineLayout.cpp index 861df210d4..712e3fee99 100644 --- a/src/dawn_node/binding/GPUPipelineLayout.cpp +++ b/src/dawn_node/binding/GPUPipelineLayout.cpp @@ -16,7 +16,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUPipelineLayout @@ -32,4 +32,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUPipelineLayout.h b/src/dawn_node/binding/GPUPipelineLayout.h index a1d0b87bcd..02f07c1448 100644 --- a/src/dawn_node/binding/GPUPipelineLayout.h +++ b/src/dawn_node/binding/GPUPipelineLayout.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUPipelineLayout is an implementation of interop::GPUPipelineLayout that wraps a // wgpu::PipelineLayout. @@ -41,6 +41,6 @@ namespace wgpu { namespace binding { wgpu::PipelineLayout layout_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUPIPELINELAYOUT_H_ diff --git a/src/dawn_node/binding/GPUQuerySet.cpp b/src/dawn_node/binding/GPUQuerySet.cpp index e56564a94c..836faf91ec 100644 --- a/src/dawn_node/binding/GPUQuerySet.cpp +++ b/src/dawn_node/binding/GPUQuerySet.cpp @@ -16,7 +16,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUQuerySet @@ -36,4 +36,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUQuerySet.h b/src/dawn_node/binding/GPUQuerySet.h index 8669e16ac2..46d8097bb3 100644 --- a/src/dawn_node/binding/GPUQuerySet.h +++ b/src/dawn_node/binding/GPUQuerySet.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUQuerySet is an implementation of interop::GPUQuerySet that wraps a wgpu::QuerySet. class GPUQuerySet final : public interop::GPUQuerySet { @@ -41,6 +41,6 @@ namespace wgpu { namespace binding { wgpu::QuerySet query_set_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUQUERYSET_H_ diff --git a/src/dawn_node/binding/GPUQueue.cpp b/src/dawn_node/binding/GPUQueue.cpp index e1c0413d70..3b0f681229 100644 --- a/src/dawn_node/binding/GPUQueue.cpp +++ b/src/dawn_node/binding/GPUQueue.cpp @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/GPUCommandBuffer.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUQueue @@ -129,4 +129,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUQueue.h b/src/dawn_node/binding/GPUQueue.h index 69952c6dd4..f59b19f1b9 100644 --- a/src/dawn_node/binding/GPUQueue.h +++ b/src/dawn_node/binding/GPUQueue.h @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/AsyncRunner.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUQueue is an implementation of interop::GPUQueue that wraps a wgpu::Queue. class GPUQueue final : public interop::GPUQueue { @@ -56,6 +56,6 @@ namespace wgpu { namespace binding { std::shared_ptr async_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUQUEUE_H_ diff --git a/src/dawn_node/binding/GPURenderBundle.cpp b/src/dawn_node/binding/GPURenderBundle.cpp index 2f42ac72d3..f49c900756 100644 --- a/src/dawn_node/binding/GPURenderBundle.cpp +++ b/src/dawn_node/binding/GPURenderBundle.cpp @@ -20,7 +20,7 @@ #include "src/dawn_node/binding/GPURenderPipeline.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPURenderBundle @@ -36,4 +36,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPURenderBundle.h b/src/dawn_node/binding/GPURenderBundle.h index 9f824f239e..bde0b50c27 100644 --- a/src/dawn_node/binding/GPURenderBundle.h +++ b/src/dawn_node/binding/GPURenderBundle.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPURenderBundle is an implementation of interop::GPURenderBundle that wraps a // wgpu::RenderBundle. @@ -41,6 +41,6 @@ namespace wgpu { namespace binding { wgpu::RenderBundle bundle_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPURENDERBUNDLE_H_ diff --git a/src/dawn_node/binding/GPURenderBundleEncoder.cpp b/src/dawn_node/binding/GPURenderBundleEncoder.cpp index 123741d6c4..fcd7219040 100644 --- a/src/dawn_node/binding/GPURenderBundleEncoder.cpp +++ b/src/dawn_node/binding/GPURenderBundleEncoder.cpp @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/GPURenderPipeline.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPURenderBundleEncoder @@ -189,4 +189,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPURenderBundleEncoder.h b/src/dawn_node/binding/GPURenderBundleEncoder.h index 3d11e330e4..9a4dbcb376 100644 --- a/src/dawn_node/binding/GPURenderBundleEncoder.h +++ b/src/dawn_node/binding/GPURenderBundleEncoder.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPURenderBundleEncoder is an implementation of interop::GPURenderBundleEncoder that wraps a // wgpu::RenderBundleEncoder. @@ -81,6 +81,6 @@ namespace wgpu { namespace binding { wgpu::RenderBundleEncoder enc_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPURENDERBUNDLEENCODER_H_ diff --git a/src/dawn_node/binding/GPURenderPassEncoder.cpp b/src/dawn_node/binding/GPURenderPassEncoder.cpp index 5dce4f2389..128cbf9230 100644 --- a/src/dawn_node/binding/GPURenderPassEncoder.cpp +++ b/src/dawn_node/binding/GPURenderPassEncoder.cpp @@ -22,7 +22,7 @@ #include "src/dawn_node/binding/GPURenderPipeline.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPURenderPassEncoder @@ -259,4 +259,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPURenderPassEncoder.h b/src/dawn_node/binding/GPURenderPassEncoder.h index 866aaab822..452dc1aeff 100644 --- a/src/dawn_node/binding/GPURenderPassEncoder.h +++ b/src/dawn_node/binding/GPURenderPassEncoder.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPURenderPassEncoder is an implementation of interop::GPURenderPassEncoder that wraps a // wgpu::RenderPassEncoder. @@ -110,6 +110,6 @@ namespace wgpu { namespace binding { wgpu::RenderPassEncoder enc_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPURENDERPASSENCODER_H_ diff --git a/src/dawn_node/binding/GPURenderPipeline.cpp b/src/dawn_node/binding/GPURenderPipeline.cpp index 3f363fc2a4..9683b80349 100644 --- a/src/dawn_node/binding/GPURenderPipeline.cpp +++ b/src/dawn_node/binding/GPURenderPipeline.cpp @@ -18,7 +18,7 @@ #include "src/dawn_node/binding/GPUBuffer.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPURenderPipeline @@ -42,4 +42,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPURenderPipeline.h b/src/dawn_node/binding/GPURenderPipeline.h index fc15fc6acb..acb8c53649 100644 --- a/src/dawn_node/binding/GPURenderPipeline.h +++ b/src/dawn_node/binding/GPURenderPipeline.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPURenderPipeline is an implementation of interop::GPURenderPipeline that wraps a // wgpu::RenderPipeline. @@ -43,6 +43,6 @@ namespace wgpu { namespace binding { wgpu::RenderPipeline pipeline_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPURENDERPIPELINE_H_ diff --git a/src/dawn_node/binding/GPUSampler.cpp b/src/dawn_node/binding/GPUSampler.cpp index 6de3aa49c0..39d87a03ef 100644 --- a/src/dawn_node/binding/GPUSampler.cpp +++ b/src/dawn_node/binding/GPUSampler.cpp @@ -17,7 +17,7 @@ #include "src/dawn_node/binding/Converter.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUSampler @@ -33,4 +33,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUSampler.h b/src/dawn_node/binding/GPUSampler.h index 24e77d2b5e..9bae3881cb 100644 --- a/src/dawn_node/binding/GPUSampler.h +++ b/src/dawn_node/binding/GPUSampler.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUSampler is an implementation of interop::GPUSampler that wraps a wgpu::Sampler. class GPUSampler final : public interop::GPUSampler { public: @@ -39,6 +39,6 @@ namespace wgpu { namespace binding { wgpu::Sampler sampler_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUSAMPLER_H_ diff --git a/src/dawn_node/binding/GPUShaderModule.cpp b/src/dawn_node/binding/GPUShaderModule.cpp index 52efabd3ea..6ac66456ec 100644 --- a/src/dawn_node/binding/GPUShaderModule.cpp +++ b/src/dawn_node/binding/GPUShaderModule.cpp @@ -18,7 +18,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUShaderModule @@ -122,4 +122,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUShaderModule.h b/src/dawn_node/binding/GPUShaderModule.h index 2fcd140120..57c49ddb6f 100644 --- a/src/dawn_node/binding/GPUShaderModule.h +++ b/src/dawn_node/binding/GPUShaderModule.h @@ -21,7 +21,7 @@ #include "src/dawn_node/binding/AsyncRunner.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUShaderModule is an implementation of interop::GPUShaderModule that wraps a // wgpu::ShaderModule. @@ -45,6 +45,6 @@ namespace wgpu { namespace binding { std::shared_ptr async_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUSHADERMODULE_H_ diff --git a/src/dawn_node/binding/GPUSupportedLimits.cpp b/src/dawn_node/binding/GPUSupportedLimits.cpp index 4a8399bc73..2c8c881eb8 100644 --- a/src/dawn_node/binding/GPUSupportedLimits.cpp +++ b/src/dawn_node/binding/GPUSupportedLimits.cpp @@ -14,7 +14,7 @@ #include "src/dawn_node/binding/GPUSupportedLimits.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUSupportedLimits @@ -128,4 +128,4 @@ namespace wgpu { namespace binding { return limits_.limits.maxComputeWorkgroupsPerDimension; } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUSupportedLimits.h b/src/dawn_node/binding/GPUSupportedLimits.h index faed813949..82b0ea64a5 100644 --- a/src/dawn_node/binding/GPUSupportedLimits.h +++ b/src/dawn_node/binding/GPUSupportedLimits.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUSupportedLimits is an implementation of interop::GPUSupportedLimits. class GPUSupportedLimits final : public interop::GPUSupportedLimits { @@ -59,6 +59,6 @@ namespace wgpu { namespace binding { wgpu::SupportedLimits limits_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUSUPPORTEDLIMITS_H_ diff --git a/src/dawn_node/binding/GPUTexture.cpp b/src/dawn_node/binding/GPUTexture.cpp index 284cd8a91f..3257f15ace 100644 --- a/src/dawn_node/binding/GPUTexture.cpp +++ b/src/dawn_node/binding/GPUTexture.cpp @@ -19,7 +19,7 @@ #include "src/dawn_node/binding/GPUTextureView.h" #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUTexture @@ -61,4 +61,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); } -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUTexture.h b/src/dawn_node/binding/GPUTexture.h index f5a2a47392..29e7621203 100644 --- a/src/dawn_node/binding/GPUTexture.h +++ b/src/dawn_node/binding/GPUTexture.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUTexture is an implementation of interop::GPUTexture that wraps a wgpu::Texture. class GPUTexture final : public interop::GPUTexture { @@ -44,6 +44,6 @@ namespace wgpu { namespace binding { wgpu::Texture texture_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUTEXTURE_H_ diff --git a/src/dawn_node/binding/GPUTextureView.cpp b/src/dawn_node/binding/GPUTextureView.cpp index f03bc3f266..11aa55f92d 100644 --- a/src/dawn_node/binding/GPUTextureView.cpp +++ b/src/dawn_node/binding/GPUTextureView.cpp @@ -16,7 +16,7 @@ #include "src/dawn_node/utils/Debug.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// // wgpu::bindings::GPUTextureView @@ -32,4 +32,4 @@ namespace wgpu { namespace binding { UNIMPLEMENTED(); }; -}} // namespace wgpu::binding +} // namespace wgpu::binding diff --git a/src/dawn_node/binding/GPUTextureView.h b/src/dawn_node/binding/GPUTextureView.h index 8590735093..89b972e7e0 100644 --- a/src/dawn_node/binding/GPUTextureView.h +++ b/src/dawn_node/binding/GPUTextureView.h @@ -20,7 +20,7 @@ #include "napi.h" #include "src/dawn_node/interop/WebGPU.h" -namespace wgpu { namespace binding { +namespace wgpu::binding { // GPUTextureView is an implementation of interop::GPUTextureView that wraps a // wgpu::TextureView. @@ -41,6 +41,6 @@ namespace wgpu { namespace binding { wgpu::TextureView view_; }; -}} // namespace wgpu::binding +} // namespace wgpu::binding #endif // DAWN_NODE_BINDING_GPUTEXTUREVIEW_H_ diff --git a/src/dawn_node/interop/Core.cpp b/src/dawn_node/interop/Core.cpp index 8ee22cf90f..7a671c8d1c 100644 --- a/src/dawn_node/interop/Core.cpp +++ b/src/dawn_node/interop/Core.cpp @@ -14,7 +14,7 @@ #include "src/dawn_node/interop/Core.h" -namespace wgpu { namespace interop { +namespace wgpu::interop { Result Success; @@ -157,4 +157,4 @@ namespace wgpu { namespace interop { return Napi::Value::From(env, value); } -}} // namespace wgpu::interop +} // namespace wgpu::interop diff --git a/src/dawn_node/interop/Core.h b/src/dawn_node/interop/Core.h index d4d0ec60a0..c0ec61e338 100644 --- a/src/dawn_node/interop/Core.h +++ b/src/dawn_node/interop/Core.h @@ -45,7 +45,7 @@ __FILE__, __FUNCTION__, __LINE__ \ } -namespace wgpu { namespace interop { +namespace wgpu::interop { //////////////////////////////////////////////////////////////////////////////// // Primitive JavaScript types @@ -687,6 +687,6 @@ namespace wgpu { namespace interop { } } -}} // namespace wgpu::interop +} // namespace wgpu::interop #endif // DAWN_NODE_INTEROP_CORE_WEBGPU_H_ diff --git a/src/dawn_node/utils/Debug.h b/src/dawn_node/utils/Debug.h index 3636df0cbc..cf7c7d8b20 100644 --- a/src/dawn_node/utils/Debug.h +++ b/src/dawn_node/utils/Debug.h @@ -24,7 +24,7 @@ #include "dawn/webgpu_cpp_print.h" -namespace wgpu { namespace utils { +namespace wgpu::utils { // Write() is a helper for printing container types to the std::ostream. // Write() is used by the LOG() macro below. @@ -141,6 +141,6 @@ namespace wgpu { namespace utils { #define UNREACHABLE(...) \ ::wgpu::utils::Fatal("UNREACHABLE", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__) -}} // namespace wgpu::utils +} // namespace wgpu::utils #endif // DAWNNODE_UTILS_DEBUG_H_ diff --git a/src/dawn_platform/tracing/EventTracer.cpp b/src/dawn_platform/tracing/EventTracer.cpp index a110340f58..086e35556e 100644 --- a/src/dawn_platform/tracing/EventTracer.cpp +++ b/src/dawn_platform/tracing/EventTracer.cpp @@ -16,7 +16,7 @@ #include "common/Assert.h" #include "dawn_platform/DawnPlatform.h" -namespace dawn_platform { namespace tracing { +namespace dawn_platform::tracing { const unsigned char* GetTraceCategoryEnabledFlag(Platform* platform, TraceCategory category) { static unsigned char disabled = 0; @@ -55,4 +55,4 @@ namespace dawn_platform { namespace tracing { return static_cast(0); } -}} // namespace dawn_platform::tracing +} // namespace dawn_platform::tracing diff --git a/src/dawn_platform/tracing/TraceEvent.h b/src/dawn_platform/tracing/TraceEvent.h index 8d375ef036..5afced9155 100644 --- a/src/dawn_platform/tracing/TraceEvent.h +++ b/src/dawn_platform/tracing/TraceEvent.h @@ -754,7 +754,7 @@ #define TRACE_VALUE_TYPE_STRING (static_cast(6)) #define TRACE_VALUE_TYPE_COPY_STRING (static_cast(7)) -namespace dawn_platform { namespace TraceEvent { +namespace dawn_platform::TraceEvent { // Specify these values when the corresponding argument of addTraceEvent is not // used. @@ -986,6 +986,6 @@ namespace dawn_platform { namespace TraceEvent { Data m_data; }; -}} // namespace dawn_platform::TraceEvent +} // namespace dawn_platform::TraceEvent #endif // DAWNPLATFORM_TRACING_TRACEEVENT_H_ diff --git a/src/dawn_wire/client/Adapter.cpp b/src/dawn_wire/client/Adapter.cpp index db9986ffa6..ce7bd336af 100644 --- a/src/dawn_wire/client/Adapter.cpp +++ b/src/dawn_wire/client/Adapter.cpp @@ -17,7 +17,7 @@ #include "common/Log.h" #include "dawn_wire/client/Client.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { Adapter::~Adapter() { mRequestDeviceRequests.CloseAll([](RequestDeviceData* request) { @@ -130,4 +130,4 @@ namespace dawn_wire { namespace client { return nullptr; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/Adapter.h b/src/dawn_wire/client/Adapter.h index 26c8222d55..fcfaed9165 100644 --- a/src/dawn_wire/client/Adapter.h +++ b/src/dawn_wire/client/Adapter.h @@ -23,7 +23,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Adapter final : public ObjectBase { public: @@ -65,6 +65,6 @@ namespace dawn_wire { namespace client { RequestTracker mRequestDeviceRequests; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_ADAPTER_H_ diff --git a/src/dawn_wire/client/Buffer.cpp b/src/dawn_wire/client/Buffer.cpp index 5077b5aa49..51b30106ec 100644 --- a/src/dawn_wire/client/Buffer.cpp +++ b/src/dawn_wire/client/Buffer.cpp @@ -19,7 +19,7 @@ #include "dawn_wire/client/Client.h" #include "dawn_wire/client/Device.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { // static WGPUBuffer Buffer::Create(Device* device, const WGPUBufferDescriptor* descriptor) { @@ -402,4 +402,4 @@ namespace dawn_wire { namespace client { mMappedData = nullptr; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/Buffer.h b/src/dawn_wire/client/Buffer.h index 0a24384389..f362621970 100644 --- a/src/dawn_wire/client/Buffer.h +++ b/src/dawn_wire/client/Buffer.h @@ -21,7 +21,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Device; @@ -104,6 +104,6 @@ namespace dawn_wire { namespace client { std::weak_ptr mDeviceIsAlive; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_BUFFER_H_ diff --git a/src/dawn_wire/client/Client.cpp b/src/dawn_wire/client/Client.cpp index 628232d391..b01e8f56ba 100644 --- a/src/dawn_wire/client/Client.cpp +++ b/src/dawn_wire/client/Client.cpp @@ -17,7 +17,7 @@ #include "common/Compiler.h" #include "dawn_wire/client/Device.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { namespace { @@ -168,4 +168,4 @@ namespace dawn_wire { namespace client { return mDisconnected; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/Client.h b/src/dawn_wire/client/Client.h index aebf9535b9..1e5e47f1c6 100644 --- a/src/dawn_wire/client/Client.h +++ b/src/dawn_wire/client/Client.h @@ -26,7 +26,7 @@ #include "dawn_wire/WireDeserializeAllocator.h" #include "dawn_wire/client/ClientBase_autogen.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Device; class MemoryTransferService; @@ -90,6 +90,6 @@ namespace dawn_wire { namespace client { std::unique_ptr CreateInlineMemoryTransferService(); -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_CLIENT_H_ diff --git a/src/dawn_wire/client/ClientDoers.cpp b/src/dawn_wire/client/ClientDoers.cpp index e6665abf01..fd75a0945f 100644 --- a/src/dawn_wire/client/ClientDoers.cpp +++ b/src/dawn_wire/client/ClientDoers.cpp @@ -18,7 +18,7 @@ #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { bool Client::DoDeviceUncapturedErrorCallback(Device* device, WGPUErrorType errorType, @@ -130,4 +130,4 @@ namespace dawn_wire { namespace client { return shaderModule->GetCompilationInfoCallback(requestSerial, status, info); } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp b/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp index 9cb0eed13f..f03969ed5d 100644 --- a/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp +++ b/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp @@ -19,7 +19,7 @@ #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class InlineMemoryTransferService : public MemoryTransferService { class ReadHandleImpl : public ReadHandle { @@ -128,4 +128,4 @@ namespace dawn_wire { namespace client { return std::make_unique(); } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp b/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp index 6a523f2819..eed0aea251 100644 --- a/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp +++ b/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp @@ -17,7 +17,7 @@ #include #include "common/Assert.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { MockMemoryTransferService::MockReadHandle::MockReadHandle(MockMemoryTransferService* service) : ReadHandle(), mService(service) { @@ -102,4 +102,4 @@ namespace dawn_wire { namespace client { return new MockWriteHandle(this); } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/ClientMemoryTransferService_mock.h b/src/dawn_wire/client/ClientMemoryTransferService_mock.h index 5f9eeb0552..0db3530b87 100644 --- a/src/dawn_wire/client/ClientMemoryTransferService_mock.h +++ b/src/dawn_wire/client/ClientMemoryTransferService_mock.h @@ -20,7 +20,7 @@ #include "dawn_wire/WireClient.h" #include "dawn_wire/client/Client.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class MockMemoryTransferService : public MemoryTransferService { public: @@ -94,6 +94,6 @@ namespace dawn_wire { namespace client { MOCK_METHOD(void, OnWriteHandleDestroy, (const void* WriteHandle)); }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_CLIENTMEMORYTRANSFERSERVICE_MOCK_H_ diff --git a/src/dawn_wire/client/Device.cpp b/src/dawn_wire/client/Device.cpp index 54d1053ff2..daa7cfc985 100644 --- a/src/dawn_wire/client/Device.cpp +++ b/src/dawn_wire/client/Device.cpp @@ -20,7 +20,7 @@ #include "dawn_wire/client/Client.h" #include "dawn_wire/client/ObjectAllocator.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { Device::Device(Client* clientIn, uint32_t initialRefcount, uint32_t initialId) : ObjectBase(clientIn, initialRefcount, initialId), mIsAlive(std::make_shared()) { @@ -339,4 +339,4 @@ namespace dawn_wire { namespace client { return true; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/Device.h b/src/dawn_wire/client/Device.h index 58be19898c..5ec5b25cbd 100644 --- a/src/dawn_wire/client/Device.h +++ b/src/dawn_wire/client/Device.h @@ -26,7 +26,7 @@ #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Client; class Queue; @@ -107,6 +107,6 @@ namespace dawn_wire { namespace client { std::shared_ptr mIsAlive; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_DEVICE_H_ diff --git a/src/dawn_wire/client/Instance.cpp b/src/dawn_wire/client/Instance.cpp index cf3976c825..9b69d3379a 100644 --- a/src/dawn_wire/client/Instance.cpp +++ b/src/dawn_wire/client/Instance.cpp @@ -16,7 +16,7 @@ #include "dawn_wire/client/Client.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { Instance::~Instance() { mRequestAdapterRequests.CloseAll([](RequestAdapterData* request) { @@ -98,4 +98,4 @@ namespace dawn_wire { namespace client { return true; } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/Instance.h b/src/dawn_wire/client/Instance.h index 2733b9ccc1..964523b93d 100644 --- a/src/dawn_wire/client/Instance.h +++ b/src/dawn_wire/client/Instance.h @@ -22,7 +22,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Instance final : public ObjectBase { public: @@ -51,6 +51,6 @@ namespace dawn_wire { namespace client { RequestTracker mRequestAdapterRequests; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_INSTANCE_H_ diff --git a/src/dawn_wire/client/LimitsAndFeatures.cpp b/src/dawn_wire/client/LimitsAndFeatures.cpp index c4b4656c48..d33799f66f 100644 --- a/src/dawn_wire/client/LimitsAndFeatures.cpp +++ b/src/dawn_wire/client/LimitsAndFeatures.cpp @@ -17,7 +17,7 @@ #include "common/Assert.h" #include "dawn_wire/SupportedFeatures.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { bool LimitsAndFeatures::GetLimits(WGPUSupportedLimits* limits) const { ASSERT(limits != nullptr); @@ -60,4 +60,4 @@ namespace dawn_wire { namespace client { } } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/LimitsAndFeatures.h b/src/dawn_wire/client/LimitsAndFeatures.h index 996dbdbf68..4d6cfcac95 100644 --- a/src/dawn_wire/client/LimitsAndFeatures.h +++ b/src/dawn_wire/client/LimitsAndFeatures.h @@ -19,7 +19,7 @@ #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class LimitsAndFeatures { public: @@ -35,6 +35,6 @@ namespace dawn_wire { namespace client { std::unordered_set mFeatures; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_LIMITSANDFEATURES_H_ diff --git a/src/dawn_wire/client/ObjectAllocator.h b/src/dawn_wire/client/ObjectAllocator.h index 4572752552..a2efd3bffb 100644 --- a/src/dawn_wire/client/ObjectAllocator.h +++ b/src/dawn_wire/client/ObjectAllocator.h @@ -23,7 +23,7 @@ #include #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { template class ObjectAllocator { @@ -105,6 +105,6 @@ namespace dawn_wire { namespace client { std::vector mFreeIds; std::vector mObjects; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_OBJECTALLOCATOR_H_ diff --git a/src/dawn_wire/client/ObjectBase.h b/src/dawn_wire/client/ObjectBase.h index ac257c8444..ac6ae273c6 100644 --- a/src/dawn_wire/client/ObjectBase.h +++ b/src/dawn_wire/client/ObjectBase.h @@ -20,7 +20,7 @@ #include "common/LinkedList.h" #include "dawn_wire/ObjectType_autogen.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Client; @@ -46,6 +46,6 @@ namespace dawn_wire { namespace client { const uint32_t id; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_OBJECTBASE_H_ diff --git a/src/dawn_wire/client/Queue.cpp b/src/dawn_wire/client/Queue.cpp index daa44d7707..1875b25075 100644 --- a/src/dawn_wire/client/Queue.cpp +++ b/src/dawn_wire/client/Queue.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/client/Client.h" #include "dawn_wire/client/Device.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { Queue::~Queue() { ClearAllCallbacks(WGPUQueueWorkDoneStatus_Unknown); @@ -95,4 +95,4 @@ namespace dawn_wire { namespace client { }); } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/Queue.h b/src/dawn_wire/client/Queue.h index 901acac2d4..2d177361be 100644 --- a/src/dawn_wire/client/Queue.h +++ b/src/dawn_wire/client/Queue.h @@ -21,7 +21,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Queue final : public ObjectBase { public: @@ -52,6 +52,6 @@ namespace dawn_wire { namespace client { RequestTracker mOnWorkDoneRequests; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_QUEUE_H_ diff --git a/src/dawn_wire/client/RequestTracker.h b/src/dawn_wire/client/RequestTracker.h index 56691c2096..892803389a 100644 --- a/src/dawn_wire/client/RequestTracker.h +++ b/src/dawn_wire/client/RequestTracker.h @@ -21,7 +21,7 @@ #include #include -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class Device; class MemoryTransferService; @@ -77,6 +77,6 @@ namespace dawn_wire { namespace client { std::map mRequests; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_REQUESTTRACKER_H_ diff --git a/src/dawn_wire/client/ShaderModule.cpp b/src/dawn_wire/client/ShaderModule.cpp index c28b978c3a..1e491b2e1d 100644 --- a/src/dawn_wire/client/ShaderModule.cpp +++ b/src/dawn_wire/client/ShaderModule.cpp @@ -16,7 +16,7 @@ #include "dawn_wire/client/Client.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { ShaderModule::~ShaderModule() { ClearAllCallbacks(WGPUCompilationInfoRequestStatus_Unknown); @@ -61,4 +61,4 @@ namespace dawn_wire { namespace client { }); } -}} // namespace dawn_wire::client +} // namespace dawn_wire::client diff --git a/src/dawn_wire/client/ShaderModule.h b/src/dawn_wire/client/ShaderModule.h index f12a4d0f1b..2359be3778 100644 --- a/src/dawn_wire/client/ShaderModule.h +++ b/src/dawn_wire/client/ShaderModule.h @@ -20,7 +20,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire { namespace client { +namespace dawn_wire::client { class ShaderModule final : public ObjectBase { public: @@ -43,6 +43,6 @@ namespace dawn_wire { namespace client { RequestTracker mCompilationInfoRequests; }; -}} // namespace dawn_wire::client +} // namespace dawn_wire::client #endif // DAWNWIRE_CLIENT_SHADER_MODULE_H_ diff --git a/src/dawn_wire/server/ObjectStorage.h b/src/dawn_wire/server/ObjectStorage.h index bc45b262bc..c48235ef2d 100644 --- a/src/dawn_wire/server/ObjectStorage.h +++ b/src/dawn_wire/server/ObjectStorage.h @@ -22,7 +22,7 @@ #include #include -namespace dawn_wire { namespace server { +namespace dawn_wire::server { struct DeviceInfo { std::unordered_set childObjectTypesAndIds; @@ -223,6 +223,6 @@ namespace dawn_wire { namespace server { std::map mTable; }; -}} // namespace dawn_wire::server +} // namespace dawn_wire::server #endif // DAWNWIRE_SERVER_OBJECTSTORAGE_H_ diff --git a/src/dawn_wire/server/Server.cpp b/src/dawn_wire/server/Server.cpp index 13ac756fc3..57da184003 100644 --- a/src/dawn_wire/server/Server.cpp +++ b/src/dawn_wire/server/Server.cpp @@ -15,7 +15,7 @@ #include "dawn_wire/server/Server.h" #include "dawn_wire/WireServer.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { Server::Server(const DawnProcTable& procs, CommandSerializer* serializer, @@ -210,4 +210,4 @@ namespace dawn_wire { namespace server { return true; } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/Server.h b/src/dawn_wire/server/Server.h index e76f62b722..69de4ab775 100644 --- a/src/dawn_wire/server/Server.h +++ b/src/dawn_wire/server/Server.h @@ -18,7 +18,7 @@ #include "dawn_wire/ChunkedCommandSerializer.h" #include "dawn_wire/server/ServerBase_autogen.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { class Server; class MemoryTransferService; @@ -238,6 +238,6 @@ namespace dawn_wire { namespace server { std::unique_ptr CreateInlineMemoryTransferService(); -}} // namespace dawn_wire::server +} // namespace dawn_wire::server #endif // DAWNWIRE_SERVER_SERVER_H_ diff --git a/src/dawn_wire/server/ServerAdapter.cpp b/src/dawn_wire/server/ServerAdapter.cpp index c70b8d890a..2d723ae906 100644 --- a/src/dawn_wire/server/ServerAdapter.cpp +++ b/src/dawn_wire/server/ServerAdapter.cpp @@ -16,7 +16,7 @@ #include "dawn_wire/SupportedFeatures.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { bool Server::DoAdapterRequestDevice(ObjectId adapterId, uint64_t requestSerial, @@ -107,4 +107,4 @@ namespace dawn_wire { namespace server { SerializeCommand(cmd); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerBuffer.cpp b/src/dawn_wire/server/ServerBuffer.cpp index 86f011e6a9..03192f625f 100644 --- a/src/dawn_wire/server/ServerBuffer.cpp +++ b/src/dawn_wire/server/ServerBuffer.cpp @@ -19,7 +19,7 @@ #include -namespace dawn_wire { namespace server { +namespace dawn_wire::server { bool Server::PreHandleBufferUnmap(const BufferUnmapCmd& cmd) { auto* buffer = BufferObjects().Get(cmd.selfId); @@ -279,4 +279,4 @@ namespace dawn_wire { namespace server { }); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerDevice.cpp b/src/dawn_wire/server/ServerDevice.cpp index 139ed3dbd3..6a52411df1 100644 --- a/src/dawn_wire/server/ServerDevice.cpp +++ b/src/dawn_wire/server/ServerDevice.cpp @@ -14,7 +14,7 @@ #include "dawn_wire/server/Server.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { namespace { @@ -201,4 +201,4 @@ namespace dawn_wire { namespace server { SerializeCommand(cmd); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp b/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp index 71347d2f7c..2fcbad76c1 100644 --- a/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp +++ b/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp @@ -18,7 +18,7 @@ #include -namespace dawn_wire { namespace server { +namespace dawn_wire::server { class InlineMemoryTransferService : public MemoryTransferService { public: @@ -91,4 +91,4 @@ namespace dawn_wire { namespace server { return std::make_unique(); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerInstance.cpp b/src/dawn_wire/server/ServerInstance.cpp index 18d67406b2..4369d0c45d 100644 --- a/src/dawn_wire/server/ServerInstance.cpp +++ b/src/dawn_wire/server/ServerInstance.cpp @@ -18,7 +18,7 @@ #include -namespace dawn_wire { namespace server { +namespace dawn_wire::server { bool Server::DoInstanceRequestAdapter(ObjectId instanceId, uint64_t requestSerial, @@ -97,4 +97,4 @@ namespace dawn_wire { namespace server { SerializeCommand(cmd); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp b/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp index 165c6d3ebf..0bb1442f62 100644 --- a/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp +++ b/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp @@ -16,7 +16,7 @@ #include "common/Assert.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { MockMemoryTransferService::MockReadHandle::MockReadHandle(MockMemoryTransferService* service) : ReadHandle(), mService(service) { @@ -88,4 +88,4 @@ namespace dawn_wire { namespace server { return new MockWriteHandle(this); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerMemoryTransferService_mock.h b/src/dawn_wire/server/ServerMemoryTransferService_mock.h index 23cf9ed607..36510e6d2f 100644 --- a/src/dawn_wire/server/ServerMemoryTransferService_mock.h +++ b/src/dawn_wire/server/ServerMemoryTransferService_mock.h @@ -20,7 +20,7 @@ #include "dawn_wire/WireServer.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { class MockMemoryTransferService : public MemoryTransferService { public: @@ -103,6 +103,6 @@ namespace dawn_wire { namespace server { MOCK_METHOD(void, OnWriteHandleDestroy, (const WriteHandle* writeHandle)); }; -}} // namespace dawn_wire::server +} // namespace dawn_wire::server #endif // DAWNWIRE_SERVER_SERVERMEMORYTRANSFERSERVICE_MOCK_H_ diff --git a/src/dawn_wire/server/ServerQueue.cpp b/src/dawn_wire/server/ServerQueue.cpp index 54f573e863..656c833f05 100644 --- a/src/dawn_wire/server/ServerQueue.cpp +++ b/src/dawn_wire/server/ServerQueue.cpp @@ -15,7 +15,7 @@ #include "common/Assert.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire { namespace server { +namespace dawn_wire::server { void Server::OnQueueWorkDone(QueueWorkDoneUserdata* data, WGPUQueueWorkDoneStatus status) { ReturnQueueWorkDoneCallbackCmd cmd; @@ -100,4 +100,4 @@ namespace dawn_wire { namespace server { return true; } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/dawn_wire/server/ServerShaderModule.cpp b/src/dawn_wire/server/ServerShaderModule.cpp index 3a7a67194e..072ad73d39 100644 --- a/src/dawn_wire/server/ServerShaderModule.cpp +++ b/src/dawn_wire/server/ServerShaderModule.cpp @@ -16,7 +16,7 @@ #include -namespace dawn_wire { namespace server { +namespace dawn_wire::server { bool Server::DoShaderModuleGetCompilationInfo(ObjectId shaderModuleId, uint64_t requestSerial) { auto* shaderModule = ShaderModuleObjects().Get(shaderModuleId); @@ -46,4 +46,4 @@ namespace dawn_wire { namespace server { SerializeCommand(cmd); } -}} // namespace dawn_wire::server +} // namespace dawn_wire::server diff --git a/src/include/dawn_native/D3D12Backend.h b/src/include/dawn_native/D3D12Backend.h index a6644b11cf..8973af14ac 100644 --- a/src/include/dawn_native/D3D12Backend.h +++ b/src/include/dawn_native/D3D12Backend.h @@ -28,7 +28,7 @@ struct ID3D12Device; struct ID3D12Resource; -namespace dawn_native { namespace d3d12 { +namespace dawn_native::d3d12 { class D3D11on12ResourceCache; @@ -101,6 +101,6 @@ namespace dawn_native { namespace d3d12 { Microsoft::WRL::ComPtr dxgiAdapter; }; -}} // namespace dawn_native::d3d12 +} // namespace dawn_native::d3d12 #endif // DAWNNATIVE_D3D12BACKEND_H_ diff --git a/src/include/dawn_native/MetalBackend.h b/src/include/dawn_native/MetalBackend.h index 0346843658..a8c11068cb 100644 --- a/src/include/dawn_native/MetalBackend.h +++ b/src/include/dawn_native/MetalBackend.h @@ -32,7 +32,7 @@ typedef __IOSurface* IOSurfaceRef; # import #endif //__OBJC__ -namespace dawn_native { namespace metal { +namespace dawn_native::metal { struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { AdapterDiscoveryOptions(); @@ -56,14 +56,14 @@ namespace dawn_native { namespace 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 { namespace metal { +namespace dawn_native::metal { DAWN_NATIVE_EXPORT id GetMetalDevice(WGPUDevice device); -}} // namespace dawn_native::metal +} // namespace dawn_native::metal #endif // __OBJC__ #pragma clang diagnostic pop diff --git a/src/include/dawn_native/NullBackend.h b/src/include/dawn_native/NullBackend.h index 5762a77620..02f8b952fc 100644 --- a/src/include/dawn_native/NullBackend.h +++ b/src/include/dawn_native/NullBackend.h @@ -18,8 +18,8 @@ #include #include -namespace dawn_native { namespace null { +namespace dawn_native::null { DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(); -}} // namespace dawn_native::null +} // namespace dawn_native::null #endif // DAWNNATIVE_NULLBACKEND_H_ diff --git a/src/include/dawn_native/OpenGLBackend.h b/src/include/dawn_native/OpenGLBackend.h index 81ab1f8c12..d8d4afdccf 100644 --- a/src/include/dawn_native/OpenGLBackend.h +++ b/src/include/dawn_native/OpenGLBackend.h @@ -20,7 +20,7 @@ typedef void* EGLImage; #include #include -namespace dawn_native { namespace opengl { +namespace dawn_native::opengl { struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { AdapterDiscoveryOptions(); @@ -50,6 +50,6 @@ namespace dawn_native { namespace opengl { DAWN_NATIVE_EXPORT WGPUTexture WrapExternalEGLImage(WGPUDevice device, const ExternalImageDescriptorEGLImage* descriptor); -}} // namespace dawn_native::opengl +} // namespace dawn_native::opengl #endif // DAWNNATIVE_OPENGLBACKEND_H_ diff --git a/src/include/dawn_native/VulkanBackend.h b/src/include/dawn_native/VulkanBackend.h index 888ef27936..4c8cfb5dc2 100644 --- a/src/include/dawn_native/VulkanBackend.h +++ b/src/include/dawn_native/VulkanBackend.h @@ -22,7 +22,7 @@ #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device); @@ -135,6 +135,6 @@ namespace dawn_native { namespace vulkan { VkImageLayout desiredLayout, ExternalImageExportInfoVk* info); -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan #endif // DAWNNATIVE_VULKANBACKEND_H_ diff --git a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp index 9786c6ab0f..c0afd94dbe 100644 --- a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp +++ b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp @@ -28,7 +28,7 @@ #include #include -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -884,4 +884,4 @@ namespace dawn_native { namespace vulkan { DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend()); DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend()); -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan diff --git a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp index 1bf503e382..c0923c992a 100644 --- a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp +++ b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp @@ -25,7 +25,7 @@ #include "utils/SystemUtils.h" #include "utils/WGPUHelpers.h" -namespace dawn_native { namespace vulkan { +namespace dawn_native::vulkan { namespace { @@ -1016,4 +1016,4 @@ namespace dawn_native { namespace vulkan { DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend()); DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend()); -}} // namespace dawn_native::vulkan +} // namespace dawn_native::vulkan