Use C++17 nested namespaces instead of manually nesting them.
This was done with these two commands and a couple manual fixups for namespaces that had more than one space in the comment in the closing brace, as well as vulkan_platform.h git grep -l "namespace .* { namespace " | xargs sed -i "" "s/namespace \(.*\) { namespace /namespace \1::/" git grep -l "}} // namespace" | xargs sed -i "" "s%}} // namespace%} // namespace%" Bug: dawn:824 Change-Id: I6f448b820c12fc1004ea5270bf8e1f466b0c0aab Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75400 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
5984d8d1a8
commit
7f8fa04edc
|
@ -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
|
||||
|
|
|
@ -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 <typename T>
|
||||
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_
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h"
|
||||
|
||||
namespace dawn_native { namespace opengl {
|
||||
namespace dawn_native::opengl {
|
||||
|
||||
template<typename T>
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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 <typename T>
|
||||
|
@ -140,17 +140,16 @@ namespace dawn_native { namespace vulkan {
|
|||
return reinterpret_cast<HandleType*>(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 { \
|
||||
namespace dawn_native::vulkan { \
|
||||
using object = detail::VkHandle<struct VkTag##object, ::object>; \
|
||||
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
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace tint { namespace diag {
|
||||
namespace tint::diag {
|
||||
class Diagnostic;
|
||||
class List;
|
||||
}} // namespace tint::diag
|
||||
} // namespace tint::diag
|
||||
|
||||
namespace dawn_native {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <sstream>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
|
||||
Adapter::Adapter(Backend* backend, ComPtr<IDXGIAdapter3> 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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<IDxcValidator> mDxcValidator;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_BACKENDD3D12_H_
|
||||
|
|
|
@ -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<Ref<BindGroup>> BindGroup::Create(Device* device,
|
||||
|
@ -282,4 +282,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
return mDynamicStorageBufferLengths;
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <bitset>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
|
||||
class Device;
|
||||
|
||||
|
@ -53,6 +53,6 @@ namespace dawn_native { namespace d3d12 {
|
|||
SerialQueue<ExecutionSerial, IndexedCommandAllocator> mInFlightCommandAllocators;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_COMMANDALLOCATORMANAGER_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <set>
|
||||
|
||||
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<Ref<Buffer>> mTempBuffers;
|
||||
};
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_COMMANDRECORDINGCONTEXT_H_
|
||||
|
|
|
@ -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> 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
|
||||
|
|
|
@ -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<ID3D12PipelineState> mPipelineState;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_COMPUTEPIPELINED3D12_H_
|
||||
|
|
|
@ -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<ID3D11On12Device> d3d11on12Device) {
|
||||
if (d3d11on12Device == nullptr) {
|
||||
|
@ -161,4 +161,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
return entry;
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
|
@ -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_
|
||||
|
|
|
@ -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<ID3D12Device> GetD3D12Device(WGPUDevice device) {
|
||||
return ToBackend(FromAPI(device))->GetD3D12Device();
|
||||
|
@ -178,4 +178,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
AdapterDiscoveryOptions::AdapterDiscoveryOptions(ComPtr<IDXGIAdapter> adapter)
|
||||
: AdapterDiscoveryOptionsBase(WGPUBackendType_D3D12), dxgiAdapter(std::move(adapter)) {
|
||||
}
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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<D3D12DeviceInfo> 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
|
||||
|
|
|
@ -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<D3D12DeviceInfo> GatherDeviceInfo(const Adapter& adapter);
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_D3D12INFO_H_
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include <sstream>
|
||||
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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<D3D12BackendTraits>(common);
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_FORWARD_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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*>(heap.get())->GetD3D12Heap());
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "dawn_native/d3d12/HeapD3D12.h"
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
Heap::Heap(ComPtr<ID3D12Pageable> 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
|
||||
|
|
|
@ -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<ID3D12Heap> mD3d12Heap;
|
||||
};
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_HEAPD3D12_H_
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <cstdint>
|
||||
|
||||
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<struct ExternalMutexSerialT, uint64_t>;
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_INTEGERTYPES_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
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_
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "dawn_native/d3d12/PageableD3D12.h"
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
Pageable::Pageable(ComPtr<ID3D12Pageable> 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<ID3D12CommandSignature> mDispatchIndirectCommandSignatureWithNumWorkgroups;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_PIPELINELAYOUTD3D12_H_
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <array>
|
||||
#include <sstream>
|
||||
|
||||
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
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <d3dcompiler.h>
|
||||
|
||||
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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<ID3D12QueryHeap> mQueryHeap;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_QUERYSETD3D12_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <array>
|
||||
|
||||
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_
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <d3dcompiler.h>
|
||||
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <array>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
|
||||
class Device;
|
||||
|
||||
|
@ -102,6 +102,6 @@ namespace dawn_native { namespace d3d12 {
|
|||
SerialQueue<ExecutionSerial, ResourceHeapAllocation> mAllocationsToDelete;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_RESOURCEALLOCATORMANAGERD3D12_H_
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
ResourceHeapAllocation::ResourceHeapAllocation(const AllocationInfo& info,
|
||||
uint64_t offset,
|
||||
ComPtr<ID3D12Resource> 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
|
||||
|
|
|
@ -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<ID3D12Resource> mResource;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_RESOURCEHEAPALLOCATIOND3D12_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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<Sampler*> 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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
|
||||
namespace {
|
||||
ResultOrError<uint64_t> GetDXCompilerVersion(ComPtr<IDxcValidator> dxcValidator) {
|
||||
|
@ -828,4 +828,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<ExecutionSerial, CPUDescriptorHeapAllocation> mAllocationsToDelete;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_STAGINGDESCRIPTORALLOCATOR_H_
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <windows.ui.xaml.media.dxinterop.h>
|
||||
|
||||
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
|
||||
|
|
|
@ -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<Texture> mApiTexture;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_SWAPCHAIN_D3D12_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <stringapiset.h>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
|
||||
ResultOrError<std::wstring> 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
|
||||
|
|
|
@ -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<std::wstring> 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_
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
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
|
||||
|
|
|
@ -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<BindGroup> mBindGroupAllocator;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::metal
|
||||
} // namespace dawn_native::metal
|
||||
|
||||
#endif // DAWNNATIVE_METAL_BINDGROUPLAYOUTMTL_H_
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "dawn_native/metal/BindGroupMTL.h"
|
||||
|
||||
namespace dawn_native { namespace metal {
|
||||
namespace dawn_native::metal {
|
||||
|
||||
// static
|
||||
Ref<BindGroupLayout> BindGroupLayout::Create(
|
||||
|
@ -42,4 +42,4 @@ namespace dawn_native { namespace metal {
|
|||
mBindGroupAllocator.Deallocate(bindGroup);
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::metal
|
||||
} // namespace dawn_native::metal
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
namespace dawn_native { namespace metal {
|
||||
namespace dawn_native::metal {
|
||||
|
||||
class CommandRecordingContext;
|
||||
class Device;
|
||||
|
@ -62,6 +62,6 @@ namespace dawn_native { namespace metal {
|
|||
NSPRef<id<MTLBuffer>> mMtlBuffer;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::metal
|
||||
} // namespace dawn_native::metal
|
||||
|
||||
#endif // DAWNNATIVE_METAL_BUFFERMTL_H_
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <limits>
|
||||
|
||||
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
|
||||
|
|
|
@ -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_
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue