Rename namespace dawn_native to dawn::native.
But keep a namespace alias to avoid breaking project that depend on the
previous namespace name while they get updated.
Done with through the following steps:
- git grep -l dawn_native:: | xargs sed -i "" "s/dawn_native::/dawn::native::/g"
- git grep -l "namespace dawn_native" | xargs sed -i "" "s/namespace dawn_native/namespace dawn::native/g"
- git cl format
- Manual fixups in generator/templates (and the addition of
namespace_case in dawn_json_generator.py).
- The addition of the namespace alias in DawnNative.h
Bug: dawn:824
Change-Id: I676cc4e3ced2e0e4bab32a0d66d7eaf9537e3f09
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75982
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
diff --git a/examples/ManualSwapChainTest.cpp b/examples/ManualSwapChainTest.cpp
index 1c7d9dd..77b9e84 100644
--- a/examples/ManualSwapChainTest.cpp
+++ b/examples/ManualSwapChainTest.cpp
@@ -85,7 +85,7 @@
static std::unordered_map<GLFWwindow*, std::unique_ptr<WindowData>> windows;
static uint64_t windowSerial = 0;
-static std::unique_ptr<dawn_native::Instance> instance;
+static std::unique_ptr<dawn::native::Instance> instance;
static wgpu::Device device;
static wgpu::Queue queue;
static wgpu::RenderPipeline trianglePipeline;
@@ -266,15 +266,15 @@
// Choose an adapter we like.
// TODO: allow switching the window between devices.
- DawnProcTable procs = dawn_native::GetProcs();
+ DawnProcTable procs = dawn::native::GetProcs();
dawnProcSetProcs(&procs);
- instance = std::make_unique<dawn_native::Instance>();
+ instance = std::make_unique<dawn::native::Instance>();
instance->DiscoverDefaultAdapters();
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
- dawn_native::Adapter chosenAdapter;
- for (dawn_native::Adapter& adapter : adapters) {
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
+ dawn::native::Adapter chosenAdapter;
+ for (dawn::native::Adapter& adapter : adapters) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
if (properties.backendType != wgpu::BackendType::Null) {
diff --git a/examples/SampleUtils.cpp b/examples/SampleUtils.cpp
index 47fd05b..336e42f 100644
--- a/examples/SampleUtils.cpp
+++ b/examples/SampleUtils.cpp
@@ -81,7 +81,7 @@
#endif
static CmdBufType cmdBufType = CmdBufType::Terrible;
-static std::unique_ptr<dawn_native::Instance> instance;
+static std::unique_ptr<dawn::native::Instance> instance;
static utils::BackendBinding* binding = nullptr;
static GLFWwindow* window = nullptr;
@@ -110,15 +110,15 @@
return wgpu::Device();
}
- instance = std::make_unique<dawn_native::Instance>();
+ instance = std::make_unique<dawn::native::Instance>();
utils::DiscoverAdapter(instance.get(), window, backendType);
// Get an adapter for the backend to use, and create the device.
- dawn_native::Adapter backendAdapter;
+ dawn::native::Adapter backendAdapter;
{
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
auto adapterIt = std::find_if(adapters.begin(), adapters.end(),
- [](const dawn_native::Adapter adapter) -> bool {
+ [](const dawn::native::Adapter adapter) -> bool {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
return properties.backendType == backendType;
@@ -128,7 +128,7 @@
}
WGPUDevice backendDevice = backendAdapter.CreateDevice();
- DawnProcTable backendProcs = dawn_native::GetProcs();
+ DawnProcTable backendProcs = dawn::native::GetProcs();
binding = utils::CreateBinding(backendType, window, backendDevice);
if (binding == nullptr) {
diff --git a/generator/dawn_json_generator.py b/generator/dawn_json_generator.py
index 7ecf906..5439929 100644
--- a/generator/dawn_json_generator.py
+++ b/generator/dawn_json_generator.py
@@ -68,6 +68,9 @@
def snake_case(self):
return '_'.join(self.chunks)
+ def namespace_case(self):
+ return '::'.join(self.chunks)
+
def js_enum_case(self):
result = self.chunks[0].lower()
for chunk in self.chunks[1:]:
diff --git a/generator/templates/dawn_native/ChainUtils.cpp b/generator/templates/dawn_native/ChainUtils.cpp
index 11d150b..759a004 100644
--- a/generator/templates/dawn_native/ChainUtils.cpp
+++ b/generator/templates/dawn_native/ChainUtils.cpp
@@ -13,8 +13,9 @@
// limitations under the License.
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/ChainUtils_autogen.h"
#include <unordered_set>
diff --git a/generator/templates/dawn_native/ChainUtils.h b/generator/templates/dawn_native/ChainUtils.h
index 37cf5ef..ce7adbc 100644
--- a/generator/templates/dawn_native/ChainUtils.h
+++ b/generator/templates/dawn_native/ChainUtils.h
@@ -18,8 +18,9 @@
#define {{DIR}}_CHAIN_UTILS_H_
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_namespace = namespace_name.snake_case() %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
{% set prefix = metadata.proc_table_prefix.lower() %}
#include "{{native_dir}}/{{prefix}}_platform.h"
#include "{{native_dir}}/Error.h"
diff --git a/generator/templates/dawn_native/ObjectType.cpp b/generator/templates/dawn_native/ObjectType.cpp
index 0f79327..07f4838 100644
--- a/generator/templates/dawn_native/ObjectType.cpp
+++ b/generator/templates/dawn_native/ObjectType.cpp
@@ -12,9 +12,10 @@
//* See the License for the specific language governing permissions and
//* limitations under the License.
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/ObjectType_autogen.h"
namespace {{native_namespace}} {
diff --git a/generator/templates/dawn_native/ObjectType.h b/generator/templates/dawn_native/ObjectType.h
index 6430e6f..d99cdd4 100644
--- a/generator/templates/dawn_native/ObjectType.h
+++ b/generator/templates/dawn_native/ObjectType.h
@@ -21,7 +21,7 @@
#include <cstdint>
-{% set native_namespace = namespace_name.snake_case() %}
+{% set native_namespace = namespace_name.namespace_case() %}
namespace {{native_namespace}} {
enum class ObjectType : uint32_t {
diff --git a/generator/templates/dawn_native/ProcTable.cpp b/generator/templates/dawn_native/ProcTable.cpp
index dc39f4e..cfc1e53 100644
--- a/generator/templates/dawn_native/ProcTable.cpp
+++ b/generator/templates/dawn_native/ProcTable.cpp
@@ -14,9 +14,10 @@
{% set Prefix = metadata.proc_table_prefix %}
{% set prefix = Prefix.lower() %}
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/{{prefix}}_platform.h"
#include "{{native_dir}}/{{Prefix}}Native.h"
diff --git a/generator/templates/dawn_native/ValidationUtils.cpp b/generator/templates/dawn_native/ValidationUtils.cpp
index abe0726..64b991e 100644
--- a/generator/templates/dawn_native/ValidationUtils.cpp
+++ b/generator/templates/dawn_native/ValidationUtils.cpp
@@ -12,9 +12,10 @@
//* See the License for the specific language governing permissions and
//* limitations under the License.
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/ValidationUtils_autogen.h"
namespace {{native_namespace}} {
diff --git a/generator/templates/dawn_native/ValidationUtils.h b/generator/templates/dawn_native/ValidationUtils.h
index 68d7176..9746397 100644
--- a/generator/templates/dawn_native/ValidationUtils.h
+++ b/generator/templates/dawn_native/ValidationUtils.h
@@ -18,9 +18,10 @@
{% set api = metadata.api.lower() %}
#include "dawn/{{api}}_cpp.h"
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/Error.h"
namespace {{native_namespace}} {
diff --git a/generator/templates/dawn_native/api_absl_format.cpp b/generator/templates/dawn_native/api_absl_format.cpp
index 8145990..90647b2 100644
--- a/generator/templates/dawn_native/api_absl_format.cpp
+++ b/generator/templates/dawn_native/api_absl_format.cpp
@@ -13,8 +13,9 @@
//* limitations under the License.
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
{% set api = metadata.api.lower() %}
#include "{{native_dir}}/{{api}}_absl_format_autogen.h"
diff --git a/generator/templates/dawn_native/api_absl_format.h b/generator/templates/dawn_native/api_absl_format.h
index efca15b..64c4153 100644
--- a/generator/templates/dawn_native/api_absl_format.h
+++ b/generator/templates/dawn_native/api_absl_format.h
@@ -17,8 +17,9 @@
#define {{API}}_ABSL_FORMAT_H_
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
{% set prefix = metadata.proc_table_prefix.lower() %}
#include "{{native_dir}}/{{prefix}}_platform.h"
diff --git a/generator/templates/dawn_native/api_dawn_native_proc.cpp b/generator/templates/dawn_native/api_dawn_native_proc.cpp
index 846a409..f17d2b4 100644
--- a/generator/templates/dawn_native/api_dawn_native_proc.cpp
+++ b/generator/templates/dawn_native/api_dawn_native_proc.cpp
@@ -14,7 +14,7 @@
#include <dawn/{{metadata.api.lower()}}.h>
-namespace dawn_native {
+namespace dawn::native {
// This file should be kept in sync with generator/templates/dawn_native/ProcTable.cpp
@@ -39,7 +39,7 @@
}
extern "C" {
- using namespace dawn_native;
+ using namespace dawn::native;
{% for function in by_category["function"] %}
{{as_cType(function.return_type.name)}} {{metadata.namespace}}{{as_cppType(function.name)}} (
diff --git a/generator/templates/dawn_native/api_structs.cpp b/generator/templates/dawn_native/api_structs.cpp
index 40aca8f..aa23425 100644
--- a/generator/templates/dawn_native/api_structs.cpp
+++ b/generator/templates/dawn_native/api_structs.cpp
@@ -12,9 +12,10 @@
//* See the License for the specific language governing permissions and
//* limitations under the License.
-{% set native_namespace = Name(metadata.native_namespace).snake_case() %}
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set namespace_name = Name(metadata.native_namespace) %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
{% set namespace = metadata.namespace %}
#include "{{native_dir}}/{{namespace}}_structs_autogen.h"
diff --git a/generator/templates/dawn_native/api_structs.h b/generator/templates/dawn_native/api_structs.h
index 2bf4296..1c1106c 100644
--- a/generator/templates/dawn_native/api_structs.h
+++ b/generator/templates/dawn_native/api_structs.h
@@ -21,8 +21,8 @@
{% set api = metadata.api.lower() %}
#include "dawn/{{api}}_cpp.h"
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_namespace = namespace_name.snake_case() %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/Forward.h"
namespace {{native_namespace}} {
diff --git a/generator/templates/dawn_native/dawn_platform.h b/generator/templates/dawn_native/dawn_platform.h
index cffa2ae..94464ca 100644
--- a/generator/templates/dawn_native/dawn_platform.h
+++ b/generator/templates/dawn_native/dawn_platform.h
@@ -21,13 +21,13 @@
{% set api = metadata.api.lower() %}
#include "dawn/{{api}}_cpp.h"
{% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %}
-{% set native_namespace = namespace_name.snake_case() %}
-{% set native_dir = impl_dir + native_namespace %}
+{% set native_namespace = namespace_name.namespace_case() %}
+{% set native_dir = impl_dir + namespace_name.snake_case() %}
#include "{{native_dir}}/Forward.h"
{% set namespace = metadata.namespace %}
// Use our autogenerated version of the {{namespace}} structures that point to {{native_namespace}} object types
-// (wgpu::Buffer is dawn_native::BufferBase*)
+// (wgpu::Buffer is dawn::native::BufferBase*)
#include <{{native_dir}}/{{namespace}}_structs_autogen.h>
namespace {{native_namespace}} {
@@ -79,4 +79,4 @@
{% endfor %}
}
-#endif // {{NATIVE_DIR}}_{{PREFIX}}_PLATFORM_AUTOGEN_H_
\ No newline at end of file
+#endif // {{NATIVE_DIR}}_{{PREFIX}}_PLATFORM_AUTOGEN_H_
diff --git a/generator/templates/opengl/OpenGLFunctionsBase.cpp b/generator/templates/opengl/OpenGLFunctionsBase.cpp
index af76102..066b9a7 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::opengl {
+namespace dawn::native::opengl {
template<typename T>
MaybeError OpenGLFunctionsBase::LoadProc(GetProcAddress getProc, T* memberProc, const char* name) {
@@ -67,4 +67,4 @@
return {};
}
-} // namespace dawn_native::opengl
+} // namespace dawn::native::opengl
diff --git a/generator/templates/opengl/OpenGLFunctionsBase.h b/generator/templates/opengl/OpenGLFunctionsBase.h
index 31272be..0d1e2d7 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::opengl {
+namespace dawn::native::opengl {
using GetProcAddress = void* (*) (const char*);
struct OpenGLFunctionsBase {
@@ -40,6 +40,6 @@
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 7011e7b..46818a7 100644
--- a/src/common/vulkan_platform.h
+++ b/src/common/vulkan_platform.h
@@ -65,7 +65,7 @@
// 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::vulkan {
+namespace dawn::native::vulkan {
namespace detail {
template <typename T>
@@ -140,17 +140,17 @@
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::vulkan { \
+#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) \
+ DAWN_DEFINE_NATIVE_NON_DISPATCHABLE_HANDLE(object) \
+ 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
+ } // namespace dawn::native::vulkan
// Import additional parts of Vulkan that are supported on our architecture and preemptively include
// headers that vulkan.h includes that we have "undefs" for.
diff --git a/src/dawn_native/Adapter.cpp b/src/dawn_native/Adapter.cpp
index f8a5d91..7c09235 100644
--- a/src/dawn_native/Adapter.cpp
+++ b/src/dawn_native/Adapter.cpp
@@ -19,7 +19,7 @@
#include "dawn_native/Instance.h"
#include "dawn_native/ValidationUtils_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
AdapterBase::AdapterBase(InstanceBase* instance, wgpu::BackendType backend)
: mInstance(instance), mBackend(backend) {
@@ -218,4 +218,4 @@
"ResetInternalDeviceForTesting should only be used with the D3D12 backend.");
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Adapter.h b/src/dawn_native/Adapter.h
index 3636bfc..c9398d2 100644
--- a/src/dawn_native/Adapter.h
+++ b/src/dawn_native/Adapter.h
@@ -26,7 +26,7 @@
#include <string>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -94,6 +94,6 @@
bool mUseTieredLimits = false;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ADAPTER_H_
diff --git a/src/dawn_native/AsyncTask.cpp b/src/dawn_native/AsyncTask.cpp
index 41463bb..1310d4d 100644
--- a/src/dawn_native/AsyncTask.cpp
+++ b/src/dawn_native/AsyncTask.cpp
@@ -2,7 +2,7 @@
#include "dawn_platform/DawnPlatform.h"
-namespace dawn_native {
+namespace dawn::native {
AsyncTaskManager::AsyncTaskManager(dawn::platform::WorkerTaskPool* workerTaskPool)
: mWorkerTaskPool(workerTaskPool) {
@@ -62,4 +62,4 @@
waitableTask->taskManager->HandleTaskCompletion(waitableTask.Get());
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/AsyncTask.h b/src/dawn_native/AsyncTask.h
index 070942f..e6c5781 100644
--- a/src/dawn_native/AsyncTask.h
+++ b/src/dawn_native/AsyncTask.h
@@ -27,7 +27,7 @@
class WorkerTaskPool;
} // namespace dawn::platform
-namespace dawn_native {
+namespace dawn::native {
// TODO(crbug.com/dawn/826): we'll add additional things to AsyncTask in the future, like
// Cancel() and RunNow(). Cancelling helps avoid running the task's body when we are just
@@ -60,6 +60,6 @@
dawn::platform::WorkerTaskPool* mWorkerTaskPool;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif
diff --git a/src/dawn_native/AttachmentState.cpp b/src/dawn_native/AttachmentState.cpp
index 427db42..ceff76d 100644
--- a/src/dawn_native/AttachmentState.cpp
+++ b/src/dawn_native/AttachmentState.cpp
@@ -19,7 +19,7 @@
#include "dawn_native/ObjectContentHasher.h"
#include "dawn_native/Texture.h"
-namespace dawn_native {
+namespace dawn::native {
AttachmentStateBlueprint::AttachmentStateBlueprint(
const RenderBundleEncoderDescriptor* descriptor)
@@ -162,4 +162,4 @@
return mSampleCount;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/AttachmentState.h b/src/dawn_native/AttachmentState.h
index 6c1e434..b30998e 100644
--- a/src/dawn_native/AttachmentState.h
+++ b/src/dawn_native/AttachmentState.h
@@ -27,7 +27,7 @@
#include <array>
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -78,6 +78,6 @@
~AttachmentState() override;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ATTACHMENTSTATE_H_
diff --git a/src/dawn_native/BackendConnection.cpp b/src/dawn_native/BackendConnection.cpp
index 89379cb..a25010f 100644
--- a/src/dawn_native/BackendConnection.cpp
+++ b/src/dawn_native/BackendConnection.cpp
@@ -14,7 +14,7 @@
#include "dawn_native/BackendConnection.h"
-namespace dawn_native {
+namespace dawn::native {
BackendConnection::BackendConnection(InstanceBase* instance, wgpu::BackendType type)
: mInstance(instance), mType(type) {
@@ -33,4 +33,4 @@
return DAWN_FORMAT_VALIDATION_ERROR("DiscoverAdapters not implemented for this backend.");
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/BackendConnection.h b/src/dawn_native/BackendConnection.h
index f17108e..e9007e3 100644
--- a/src/dawn_native/BackendConnection.h
+++ b/src/dawn_native/BackendConnection.h
@@ -20,7 +20,7 @@
#include <memory>
-namespace dawn_native {
+namespace dawn::native {
// An common interface for all backends. Mostly used to create adapters for a particular
// backend.
@@ -45,6 +45,6 @@
wgpu::BackendType mType;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BACKENDCONNECTION_H_
diff --git a/src/dawn_native/BindGroup.cpp b/src/dawn_native/BindGroup.cpp
index d125a59..61858e7 100644
--- a/src/dawn_native/BindGroup.cpp
+++ b/src/dawn_native/BindGroup.cpp
@@ -27,7 +27,7 @@
#include "dawn_native/Sampler.h"
#include "dawn_native/Texture.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -483,4 +483,4 @@
return static_cast<ExternalTextureBase*>(mBindingData.bindings[bindingIndex].Get());
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/BindGroup.h b/src/dawn_native/BindGroup.h
index 6b687ce..2510db7 100644
--- a/src/dawn_native/BindGroup.h
+++ b/src/dawn_native/BindGroup.h
@@ -26,7 +26,7 @@
#include <array>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -87,6 +87,6 @@
BindGroupLayoutBase::BindingDataPointers mBindingData;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BINDGROUP_H_
diff --git a/src/dawn_native/BindGroupLayout.cpp b/src/dawn_native/BindGroupLayout.cpp
index c56f0ac..cea3a06 100644
--- a/src/dawn_native/BindGroupLayout.cpp
+++ b/src/dawn_native/BindGroupLayout.cpp
@@ -28,7 +28,7 @@
#include <functional>
#include <set>
-namespace dawn_native {
+namespace dawn::native {
namespace {
MaybeError ValidateStorageTextureFormat(DeviceBase* device,
@@ -553,4 +553,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/BindGroupLayout.h b/src/dawn_native/BindGroupLayout.h
index 6749adb..91c8890 100644
--- a/src/dawn_native/BindGroupLayout.h
+++ b/src/dawn_native/BindGroupLayout.h
@@ -31,7 +31,7 @@
#include <bitset>
#include <map>
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateBindGroupLayoutDescriptor(DeviceBase* device,
const BindGroupLayoutDescriptor* descriptor,
@@ -142,6 +142,6 @@
PipelineCompatibilityToken(0);
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BINDGROUPLAYOUT_H_
diff --git a/src/dawn_native/BindGroupTracker.h b/src/dawn_native/BindGroupTracker.h
index f7a9142..53b886b 100644
--- a/src/dawn_native/BindGroupTracker.h
+++ b/src/dawn_native/BindGroupTracker.h
@@ -23,7 +23,7 @@
#include <array>
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
// Keeps track of the dirty bind groups so they can be lazily applied when we know the
// pipeline state or it changes.
@@ -137,6 +137,6 @@
}
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BINDGROUPTRACKER_H_
diff --git a/src/dawn_native/BindingInfo.cpp b/src/dawn_native/BindingInfo.cpp
index aba5d0d..d24c150 100644
--- a/src/dawn_native/BindingInfo.cpp
+++ b/src/dawn_native/BindingInfo.cpp
@@ -16,7 +16,7 @@
#include "dawn_native/ChainUtils_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
absl::FormatConvertResult<absl::FormatConversionCharSet::kString> AbslFormatConvert(
BindingInfoType value,
@@ -218,4 +218,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/BindingInfo.h b/src/dawn_native/BindingInfo.h
index 6662554..aea4fc9 100644
--- a/src/dawn_native/BindingInfo.h
+++ b/src/dawn_native/BindingInfo.h
@@ -26,7 +26,7 @@
#include <cstdint>
-namespace dawn_native {
+namespace dawn::native {
// Not a real WebGPU limit, but the sum of the two limits is useful for internal optimizations.
static constexpr uint32_t kMaxDynamicBuffersPerPipelineLayout =
@@ -98,6 +98,6 @@
// For buffer size validation
using RequiredBufferSizes = ityp::array<BindGroupIndex, std::vector<uint64_t>, kMaxBindGroups>;
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BINDINGINFO_H_
diff --git a/src/dawn_native/BuddyAllocator.cpp b/src/dawn_native/BuddyAllocator.cpp
index b19cc19..647bb6c 100644
--- a/src/dawn_native/BuddyAllocator.cpp
+++ b/src/dawn_native/BuddyAllocator.cpp
@@ -17,7 +17,7 @@
#include "common/Assert.h"
#include "common/Math.h"
-namespace dawn_native {
+namespace dawn::native {
BuddyAllocator::BuddyAllocator(uint64_t maxSize) : mMaxBlockSize(maxSize) {
ASSERT(IsPowerOfTwo(maxSize));
@@ -261,4 +261,4 @@
delete block;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/BuddyAllocator.h b/src/dawn_native/BuddyAllocator.h
index af959fc..31c8b0b 100644
--- a/src/dawn_native/BuddyAllocator.h
+++ b/src/dawn_native/BuddyAllocator.h
@@ -20,7 +20,7 @@
#include <limits>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
// Buddy allocator uses the buddy memory allocation technique to satisfy an allocation request.
// Memory is split into halves until just large enough to fit to the request. This
@@ -112,6 +112,6 @@
std::vector<BlockList> mFreeLists;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BUDDYALLOCATOR_H_
diff --git a/src/dawn_native/BuddyMemoryAllocator.cpp b/src/dawn_native/BuddyMemoryAllocator.cpp
index eb7320c..fd2387c 100644
--- a/src/dawn_native/BuddyMemoryAllocator.cpp
+++ b/src/dawn_native/BuddyMemoryAllocator.cpp
@@ -17,7 +17,7 @@
#include "common/Math.h"
#include "dawn_native/ResourceHeapAllocator.h"
-namespace dawn_native {
+namespace dawn::native {
BuddyMemoryAllocator::BuddyMemoryAllocator(uint64_t maxSystemSize,
uint64_t memoryBlockSize,
@@ -117,4 +117,4 @@
return count;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/BuddyMemoryAllocator.h b/src/dawn_native/BuddyMemoryAllocator.h
index c057f74..18b4635 100644
--- a/src/dawn_native/BuddyMemoryAllocator.h
+++ b/src/dawn_native/BuddyMemoryAllocator.h
@@ -22,7 +22,7 @@
#include <memory>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
class ResourceHeapAllocator;
@@ -69,6 +69,6 @@
std::vector<TrackedSubAllocations> mTrackedSubAllocations;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BUDDYMEMORYALLOCATOR_H_
diff --git a/src/dawn_native/Buffer.cpp b/src/dawn_native/Buffer.cpp
index 6b04cbb..0aa54db 100644
--- a/src/dawn_native/Buffer.cpp
+++ b/src/dawn_native/Buffer.cpp
@@ -28,7 +28,7 @@
#include <cstring>
#include <utility>
-namespace dawn_native {
+namespace dawn::native {
namespace {
struct MapRequestTask : QueueBase::TaskInFlight {
@@ -557,4 +557,4 @@
return offset == 0 && size == GetSize();
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Buffer.h b/src/dawn_native/Buffer.h
index acdbc71..534100a 100644
--- a/src/dawn_native/Buffer.h
+++ b/src/dawn_native/Buffer.h
@@ -24,7 +24,7 @@
#include <memory>
-namespace dawn_native {
+namespace dawn::native {
struct CopyTextureToBufferCmd;
@@ -130,6 +130,6 @@
size_t mMapSize = 0;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_BUFFER_H_
diff --git a/src/dawn_native/CachedObject.cpp b/src/dawn_native/CachedObject.cpp
index 523924d..8f305bc 100644
--- a/src/dawn_native/CachedObject.cpp
+++ b/src/dawn_native/CachedObject.cpp
@@ -16,7 +16,7 @@
#include "common/Assert.h"
-namespace dawn_native {
+namespace dawn::native {
bool CachedObject::IsCachedReference() const {
return mIsCachedReference;
@@ -41,4 +41,4 @@
mIsContentHashInitialized = true;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CachedObject.h b/src/dawn_native/CachedObject.h
index ff84e1e..b6c0115 100644
--- a/src/dawn_native/CachedObject.h
+++ b/src/dawn_native/CachedObject.h
@@ -17,7 +17,7 @@
#include <cstddef>
-namespace dawn_native {
+namespace dawn::native {
// Some objects are cached so that instead of creating new duplicate objects,
// we increase the refcount of an existing object.
@@ -48,6 +48,6 @@
bool mIsContentHashInitialized = false;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_CACHED_OBJECT_H_
diff --git a/src/dawn_native/CallbackTaskManager.cpp b/src/dawn_native/CallbackTaskManager.cpp
index 1c9106c..999438e 100644
--- a/src/dawn_native/CallbackTaskManager.cpp
+++ b/src/dawn_native/CallbackTaskManager.cpp
@@ -14,7 +14,7 @@
#include "dawn_native/CallbackTaskManager.h"
-namespace dawn_native {
+namespace dawn::native {
bool CallbackTaskManager::IsEmpty() {
std::lock_guard<std::mutex> lock(mCallbackTaskQueueMutex);
@@ -34,4 +34,4 @@
mCallbackTaskQueue.push_back(std::move(callbackTask));
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CallbackTaskManager.h b/src/dawn_native/CallbackTaskManager.h
index 49108ec..37fddd4 100644
--- a/src/dawn_native/CallbackTaskManager.h
+++ b/src/dawn_native/CallbackTaskManager.h
@@ -19,7 +19,7 @@
#include <mutex>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
struct CallbackTask {
public:
@@ -40,6 +40,6 @@
std::vector<std::unique_ptr<CallbackTask>> mCallbackTaskQueue;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif
diff --git a/src/dawn_native/CommandAllocator.cpp b/src/dawn_native/CommandAllocator.cpp
index 9516b59..a9cea46 100644
--- a/src/dawn_native/CommandAllocator.cpp
+++ b/src/dawn_native/CommandAllocator.cpp
@@ -22,7 +22,7 @@
#include <cstdlib>
#include <utility>
-namespace dawn_native {
+namespace dawn::native {
// TODO(cwallez@chromium.org): figure out a way to have more type safety for the iterator
@@ -225,4 +225,4 @@
mEndPtr = reinterpret_cast<uint8_t*>(&mDummyEnum[1]);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CommandAllocator.h b/src/dawn_native/CommandAllocator.h
index 7a706aa..e6ad3c5 100644
--- a/src/dawn_native/CommandAllocator.h
+++ b/src/dawn_native/CommandAllocator.h
@@ -23,7 +23,7 @@
#include <cstdint>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
// Allocation for command buffers should be fast. To avoid doing an allocation per command
// or to avoid copying commands when reallocing, we use a linear allocator in a growing set
@@ -268,6 +268,6 @@
uint8_t* mEndPtr = nullptr;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMMAND_ALLOCATOR_H_
diff --git a/src/dawn_native/CommandBuffer.cpp b/src/dawn_native/CommandBuffer.cpp
index c214fbf..94222be 100644
--- a/src/dawn_native/CommandBuffer.cpp
+++ b/src/dawn_native/CommandBuffer.cpp
@@ -23,7 +23,7 @@
#include "dawn_native/ObjectType_autogen.h"
#include "dawn_native/Texture.h"
-namespace dawn_native {
+namespace dawn::native {
CommandBufferBase::CommandBufferBase(CommandEncoder* encoder,
const CommandBufferDescriptor* descriptor)
@@ -217,24 +217,24 @@
return true;
}
- std::array<float, 4> ConvertToFloatColor(dawn_native::Color color) {
+ std::array<float, 4> ConvertToFloatColor(dawn::native::Color color) {
const std::array<float, 4> outputValue = {
static_cast<float>(color.r), static_cast<float>(color.g), static_cast<float>(color.b),
static_cast<float>(color.a)};
return outputValue;
}
- std::array<int32_t, 4> ConvertToSignedIntegerColor(dawn_native::Color color) {
+ std::array<int32_t, 4> ConvertToSignedIntegerColor(dawn::native::Color color) {
const std::array<int32_t, 4> outputValue = {
static_cast<int32_t>(color.r), static_cast<int32_t>(color.g),
static_cast<int32_t>(color.b), static_cast<int32_t>(color.a)};
return outputValue;
}
- std::array<uint32_t, 4> ConvertToUnsignedIntegerColor(dawn_native::Color color) {
+ std::array<uint32_t, 4> ConvertToUnsignedIntegerColor(dawn::native::Color color) {
const std::array<uint32_t, 4> outputValue = {
static_cast<uint32_t>(color.r), static_cast<uint32_t>(color.g),
static_cast<uint32_t>(color.b), static_cast<uint32_t>(color.a)};
return outputValue;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CommandBuffer.h b/src/dawn_native/CommandBuffer.h
index a8c23a6..e3c9bc6 100644
--- a/src/dawn_native/CommandBuffer.h
+++ b/src/dawn_native/CommandBuffer.h
@@ -24,7 +24,7 @@
#include "dawn_native/PassResourceUsage.h"
#include "dawn_native/Texture.h"
-namespace dawn_native {
+namespace dawn::native {
struct BeginRenderPassCmd;
struct CopyTextureToBufferCmd;
@@ -67,10 +67,10 @@
bool IsFullBufferOverwrittenInTextureToBufferCopy(const CopyTextureToBufferCmd* copy);
- std::array<float, 4> ConvertToFloatColor(dawn_native::Color color);
- std::array<int32_t, 4> ConvertToSignedIntegerColor(dawn_native::Color color);
- std::array<uint32_t, 4> ConvertToUnsignedIntegerColor(dawn_native::Color color);
+ std::array<float, 4> ConvertToFloatColor(dawn::native::Color color);
+ std::array<int32_t, 4> ConvertToSignedIntegerColor(dawn::native::Color color);
+ std::array<uint32_t, 4> ConvertToUnsignedIntegerColor(dawn::native::Color color);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMMANDBUFFER_H_
diff --git a/src/dawn_native/CommandBufferStateTracker.cpp b/src/dawn_native/CommandBufferStateTracker.cpp
index 17a9b61..c20ee99 100644
--- a/src/dawn_native/CommandBufferStateTracker.cpp
+++ b/src/dawn_native/CommandBufferStateTracker.cpp
@@ -28,7 +28,7 @@
// validating against. It would be nice to improve that, but difficult to do without incurring
// additional tracking costs.
-namespace dawn_native {
+namespace dawn::native {
namespace {
bool BufferSizesAtLeastAsBig(const ityp::span<uint32_t, uint64_t> unverifiedBufferSizes,
@@ -404,4 +404,4 @@
return mIndexBufferSize;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CommandBufferStateTracker.h b/src/dawn_native/CommandBufferStateTracker.h
index 5686956..19bfb19 100644
--- a/src/dawn_native/CommandBufferStateTracker.h
+++ b/src/dawn_native/CommandBufferStateTracker.h
@@ -22,7 +22,7 @@
#include "dawn_native/Error.h"
#include "dawn_native/Forward.h"
-namespace dawn_native {
+namespace dawn::native {
class CommandBufferStateTracker {
public:
@@ -81,6 +81,6 @@
const RequiredBufferSizes* mMinBufferSizes = nullptr;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMMANDBUFFERSTATETRACKER_H
diff --git a/src/dawn_native/CommandEncoder.cpp b/src/dawn_native/CommandEncoder.cpp
index cec2df7..d781962 100644
--- a/src/dawn_native/CommandEncoder.cpp
+++ b/src/dawn_native/CommandEncoder.cpp
@@ -38,7 +38,7 @@
#include <cmath>
#include <map>
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -1134,4 +1134,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CommandEncoder.h b/src/dawn_native/CommandEncoder.h
index ec0a121..e773ed2 100644
--- a/src/dawn_native/CommandEncoder.h
+++ b/src/dawn_native/CommandEncoder.h
@@ -24,7 +24,7 @@
#include <string>
-namespace dawn_native {
+namespace dawn::native {
class CommandEncoder final : public ApiObjectBase {
public:
@@ -102,6 +102,6 @@
uint64_t mDebugGroupStackSize = 0;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMMANDENCODER_H_
diff --git a/src/dawn_native/CommandValidation.cpp b/src/dawn_native/CommandValidation.cpp
index 25f49f2..e7a0feb 100644
--- a/src/dawn_native/CommandValidation.cpp
+++ b/src/dawn_native/CommandValidation.cpp
@@ -26,7 +26,7 @@
#include "dawn_native/RenderPipeline.h"
#include "dawn_native/ValidationUtils_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
// Performs validation of the "synchronization scope" rules of WebGPU.
MaybeError ValidateSyncScopeResourceUsage(const SyncScopeResourceUsage& scope) {
@@ -465,4 +465,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CommandValidation.h b/src/dawn_native/CommandValidation.h
index 3f57eae..92b61e6 100644
--- a/src/dawn_native/CommandValidation.h
+++ b/src/dawn_native/CommandValidation.h
@@ -21,7 +21,7 @@
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
class QuerySetBase;
struct SyncScopeResourceUsage;
@@ -79,6 +79,6 @@
MaybeError ValidateCanUseAs(const BufferBase* buffer, wgpu::BufferUsage usage);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMMANDVALIDATION_H_
diff --git a/src/dawn_native/Commands.cpp b/src/dawn_native/Commands.cpp
index fbc6d93..544ee9e 100644
--- a/src/dawn_native/Commands.cpp
+++ b/src/dawn_native/Commands.cpp
@@ -23,7 +23,7 @@
#include "dawn_native/RenderPipeline.h"
#include "dawn_native/Texture.h"
-namespace dawn_native {
+namespace dawn::native {
void FreeCommands(CommandIterator* commands) {
commands->Reset();
@@ -362,4 +362,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Commands.h b/src/dawn_native/Commands.h
index 03eed40..de37a38 100644
--- a/src/dawn_native/Commands.h
+++ b/src/dawn_native/Commands.h
@@ -26,7 +26,7 @@
#include <array>
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
// Definition of the commands that are present in the CommandIterator given by the
// CommandBufferBuilder. There are not defined in CommandBuffer.h to break some header
@@ -80,7 +80,7 @@
Ref<TextureViewBase> resolveTarget;
wgpu::LoadOp loadOp;
wgpu::StoreOp storeOp;
- dawn_native::Color clearColor;
+ dawn::native::Color clearColor;
};
struct RenderPassDepthStencilAttachmentInfo {
@@ -285,6 +285,6 @@
// consuming the correct amount of data from the command iterator.
void SkipCommand(CommandIterator* commands, Command type);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMMANDS_H_
diff --git a/src/dawn_native/CompilationMessages.cpp b/src/dawn_native/CompilationMessages.cpp
index cc0790e..50e19bd 100644
--- a/src/dawn_native/CompilationMessages.cpp
+++ b/src/dawn_native/CompilationMessages.cpp
@@ -19,7 +19,7 @@
#include <tint/tint.h>
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -198,4 +198,4 @@
mFormattedTintMessages.push_back(t.str());
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CompilationMessages.h b/src/dawn_native/CompilationMessages.h
index 36db103..ebddc1f 100644
--- a/src/dawn_native/CompilationMessages.h
+++ b/src/dawn_native/CompilationMessages.h
@@ -27,7 +27,7 @@
class List;
} // namespace tint::diag
-namespace dawn_native {
+namespace dawn::native {
class OwnedCompilationMessages : public NonCopyable {
public:
@@ -57,6 +57,6 @@
std::vector<std::string> mFormattedTintMessages;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMPILATIONMESSAGES_H_
\ No newline at end of file
diff --git a/src/dawn_native/ComputePassEncoder.cpp b/src/dawn_native/ComputePassEncoder.cpp
index f7b9aa7..22a2a4d 100644
--- a/src/dawn_native/ComputePassEncoder.cpp
+++ b/src/dawn_native/ComputePassEncoder.cpp
@@ -28,7 +28,7 @@
#include "dawn_native/QuerySet.h"
#include "dawn_native/utils/WGPUHelpers.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -456,4 +456,4 @@
return &mCommandBufferState;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ComputePassEncoder.h b/src/dawn_native/ComputePassEncoder.h
index 41d4d47..1b526fe 100644
--- a/src/dawn_native/ComputePassEncoder.h
+++ b/src/dawn_native/ComputePassEncoder.h
@@ -21,7 +21,7 @@
#include "dawn_native/PassResourceUsageTracker.h"
#include "dawn_native/ProgrammableEncoder.h"
-namespace dawn_native {
+namespace dawn::native {
class SyncScopeUsageTracker;
@@ -83,6 +83,6 @@
Ref<CommandEncoder> mCommandEncoder;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMPUTEPASSENCODER_H_
diff --git a/src/dawn_native/ComputePipeline.cpp b/src/dawn_native/ComputePipeline.cpp
index b6c1766..c67bb40 100644
--- a/src/dawn_native/ComputePipeline.cpp
+++ b/src/dawn_native/ComputePipeline.cpp
@@ -18,7 +18,7 @@
#include "dawn_native/ObjectContentHasher.h"
#include "dawn_native/ObjectType_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateComputePipelineDescriptor(DeviceBase* device,
const ComputePipelineDescriptor* descriptor) {
@@ -93,4 +93,4 @@
return PipelineBase::EqualForCache(a, b);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ComputePipeline.h b/src/dawn_native/ComputePipeline.h
index 28d5ed9..1a80ed2 100644
--- a/src/dawn_native/ComputePipeline.h
+++ b/src/dawn_native/ComputePipeline.h
@@ -19,7 +19,7 @@
#include "dawn_native/Forward.h"
#include "dawn_native/Pipeline.h"
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
struct EntryPointMetadata;
@@ -50,6 +50,6 @@
ComputePipelineBase(DeviceBase* device, ObjectBase::ErrorTag tag);
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COMPUTEPIPELINE_H_
diff --git a/src/dawn_native/CopyTextureForBrowserHelper.cpp b/src/dawn_native/CopyTextureForBrowserHelper.cpp
index 8fd87bd..6cfd74c 100644
--- a/src/dawn_native/CopyTextureForBrowserHelper.cpp
+++ b/src/dawn_native/CopyTextureForBrowserHelper.cpp
@@ -33,7 +33,7 @@
#include <unordered_set>
-namespace dawn_native {
+namespace dawn::native {
namespace {
static const char sCopyTextureForBrowserShader[] = R"(
@@ -594,4 +594,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CopyTextureForBrowserHelper.h b/src/dawn_native/CopyTextureForBrowserHelper.h
index e0965ab..209aae2 100644
--- a/src/dawn_native/CopyTextureForBrowserHelper.h
+++ b/src/dawn_native/CopyTextureForBrowserHelper.h
@@ -18,7 +18,7 @@
#include "dawn_native/Error.h"
#include "dawn_native/ObjectBase.h"
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
struct Extent3D;
struct ImageCopyTexture;
@@ -36,6 +36,6 @@
const Extent3D* copySize,
const CopyTextureForBrowserOptions* options);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_COPYTEXTUREFORBROWSERHELPER_H_
diff --git a/src/dawn_native/CreatePipelineAsyncTask.cpp b/src/dawn_native/CreatePipelineAsyncTask.cpp
index a266988..5683c70 100644
--- a/src/dawn_native/CreatePipelineAsyncTask.cpp
+++ b/src/dawn_native/CreatePipelineAsyncTask.cpp
@@ -22,7 +22,7 @@
#include "dawn_platform/tracing/TraceEvent.h"
#include "utils/WGPUHelpers.h"
-namespace dawn_native {
+namespace dawn::native {
CreatePipelineAsyncCallbackTaskBase::CreatePipelineAsyncCallbackTaskBase(
std::string errorMessage,
@@ -199,4 +199,4 @@
eventLabel);
device->GetAsyncTaskManager()->PostTask(std::move(asyncTask));
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/CreatePipelineAsyncTask.h b/src/dawn_native/CreatePipelineAsyncTask.h
index 3bac477..ad68164 100644
--- a/src/dawn_native/CreatePipelineAsyncTask.h
+++ b/src/dawn_native/CreatePipelineAsyncTask.h
@@ -20,7 +20,7 @@
#include "dawn_native/CallbackTaskManager.h"
#include "dawn_native/Error.h"
-namespace dawn_native {
+namespace dawn::native {
class ComputePipelineBase;
class DeviceBase;
@@ -103,6 +103,6 @@
void* mUserdata;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_CREATEPIPELINEASYNCTASK_H_
diff --git a/src/dawn_native/DawnNative.cpp b/src/dawn_native/DawnNative.cpp
index 3736dc1..4079cd6 100644
--- a/src/dawn_native/DawnNative.cpp
+++ b/src/dawn_native/DawnNative.cpp
@@ -24,7 +24,7 @@
// Contains the entry-points into dawn_native
-namespace dawn_native {
+namespace dawn::native {
namespace {
struct ComboDeprecatedDawnDeviceDescriptor : DeviceDescriptor {
@@ -281,4 +281,4 @@
return FromAPI(a)->IsLayoutEqual(FromAPI(b), excludePipelineCompatibiltyToken);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Device.cpp b/src/dawn_native/Device.cpp
index ec086fb..a08bc06 100644
--- a/src/dawn_native/Device.cpp
+++ b/src/dawn_native/Device.cpp
@@ -52,7 +52,7 @@
#include <mutex>
#include <unordered_set>
-namespace dawn_native {
+namespace dawn::native {
// DeviceBase sub-structures
@@ -1729,4 +1729,4 @@
return false;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Device.h b/src/dawn_native/Device.h
index 9e2a2c4..89ddcf5 100644
--- a/src/dawn_native/Device.h
+++ b/src/dawn_native/Device.h
@@ -37,7 +37,7 @@
class WorkerTaskPool;
} // namespace dawn::platform
-namespace dawn_native {
+namespace dawn::native {
class AdapterBase;
class AsyncTaskManager;
class AttachmentState;
@@ -540,6 +540,6 @@
std::string mLabel;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_DEVICE_H_
diff --git a/src/dawn_native/DynamicUploader.cpp b/src/dawn_native/DynamicUploader.cpp
index a539723..a8df609 100644
--- a/src/dawn_native/DynamicUploader.cpp
+++ b/src/dawn_native/DynamicUploader.cpp
@@ -16,7 +16,7 @@
#include "common/Math.h"
#include "dawn_native/Device.h"
-namespace dawn_native {
+namespace dawn::native {
DynamicUploader::DynamicUploader(DeviceBase* device) : mDevice(device) {
mRingBuffers.emplace_back(
@@ -126,4 +126,4 @@
uploadHandle.startOffset += additionalOffset;
return uploadHandle;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/DynamicUploader.h b/src/dawn_native/DynamicUploader.h
index 9ab0ea2..310e55b 100644
--- a/src/dawn_native/DynamicUploader.h
+++ b/src/dawn_native/DynamicUploader.h
@@ -22,7 +22,7 @@
// DynamicUploader is the front-end implementation used to manage multiple ring buffers for upload
// usage.
-namespace dawn_native {
+namespace dawn::native {
struct UploadHandle {
uint8_t* mappedBuffer = nullptr;
@@ -61,6 +61,6 @@
SerialQueue<ExecutionSerial, std::unique_ptr<StagingBufferBase>> mReleasedStagingBuffers;
DeviceBase* mDevice;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_DYNAMICUPLOADER_H_
diff --git a/src/dawn_native/EncodingContext.cpp b/src/dawn_native/EncodingContext.cpp
index b218c51..bdc9640 100644
--- a/src/dawn_native/EncodingContext.cpp
+++ b/src/dawn_native/EncodingContext.cpp
@@ -22,7 +22,7 @@
#include "dawn_native/IndirectDrawValidationEncoder.h"
#include "dawn_native/RenderBundleEncoder.h"
-namespace dawn_native {
+namespace dawn::native {
EncodingContext::EncodingContext(DeviceBase* device, const ApiObjectBase* initialEncoder)
: mDevice(device), mTopLevelEncoder(initialEncoder), mCurrentEncoder(initialEncoder) {
@@ -214,4 +214,4 @@
return mTopLevelEncoder == nullptr;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/EncodingContext.h b/src/dawn_native/EncodingContext.h
index a87d5c9..d64865d 100644
--- a/src/dawn_native/EncodingContext.h
+++ b/src/dawn_native/EncodingContext.h
@@ -24,7 +24,7 @@
#include <string>
-namespace dawn_native {
+namespace dawn::native {
class CommandEncoder;
class DeviceBase;
@@ -177,6 +177,6 @@
std::vector<std::string> mDebugGroupLabels;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ENCODINGCONTEXT_H_
diff --git a/src/dawn_native/EnumClassBitmasks.h b/src/dawn_native/EnumClassBitmasks.h
index addaab9..671db23 100644
--- a/src/dawn_native/EnumClassBitmasks.h
+++ b/src/dawn_native/EnumClassBitmasks.h
@@ -17,7 +17,7 @@
#include "dawn/EnumClassBitmasks.h"
-namespace dawn_native {
+namespace dawn::native {
// EnumClassBitmmasks is a helper in the dawn:: namespace.
// Re-export it in the dawn_native namespace.
@@ -34,6 +34,6 @@
return HasZeroOrOneBits(value) && value != T(0);
}
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ENUMCLASSBITMASK_H_
diff --git a/src/dawn_native/EnumMaskIterator.h b/src/dawn_native/EnumMaskIterator.h
index 75d639d..e4fcc17 100644
--- a/src/dawn_native/EnumMaskIterator.h
+++ b/src/dawn_native/EnumMaskIterator.h
@@ -18,7 +18,7 @@
#include "common/BitSetIterator.h"
#include "dawn_native/EnumClassBitmasks.h"
-namespace dawn_native {
+namespace dawn::native {
template <typename T>
class EnumMaskIterator final {
@@ -77,6 +77,6 @@
return EnumMaskIterator<T>(mask);
}
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ENUMMASKITERATOR_H_
diff --git a/src/dawn_native/Error.cpp b/src/dawn_native/Error.cpp
index 6dcc3f8..c014e7f 100644
--- a/src/dawn_native/Error.cpp
+++ b/src/dawn_native/Error.cpp
@@ -17,7 +17,7 @@
#include "dawn_native/ErrorData.h"
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
void IgnoreErrors(MaybeError maybeError) {
if (maybeError.IsError()) {
@@ -61,4 +61,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Error.h b/src/dawn_native/Error.h
index c67fcdd..51cbcf5 100644
--- a/src/dawn_native/Error.h
+++ b/src/dawn_native/Error.h
@@ -22,7 +22,7 @@
#include <string>
-namespace dawn_native {
+namespace dawn::native {
enum class InternalErrorType : uint32_t {
Validation,
@@ -72,7 +72,7 @@
// more clarity.
#define DAWN_MAKE_ERROR(TYPE, MESSAGE) \
- ::dawn_native::ErrorData::Create(TYPE, MESSAGE, __FILE__, __func__, __LINE__)
+ ::dawn::native::ErrorData::Create(TYPE, MESSAGE, __FILE__, __func__, __LINE__)
#define DAWN_VALIDATION_ERROR(MESSAGE) DAWN_MAKE_ERROR(InternalErrorType::Validation, MESSAGE)
@@ -119,17 +119,17 @@
#define DAWN_TRY_CONTEXT(EXPR, ...) \
DAWN_TRY_WITH_CLEANUP(EXPR, { error->AppendContext(absl::StrFormat(__VA_ARGS__)); })
-#define DAWN_TRY_WITH_CLEANUP(EXPR, BODY) \
- { \
- auto DAWN_LOCAL_VAR = EXPR; \
- if (DAWN_UNLIKELY(DAWN_LOCAL_VAR.IsError())) { \
- std::unique_ptr<::dawn_native::ErrorData> error = DAWN_LOCAL_VAR.AcquireError(); \
- {BODY} /* comment to force the formatter to insert a newline */ \
- error->AppendBacktrace(__FILE__, __func__, __LINE__); \
- return {std::move(error)}; \
- } \
- } \
- for (;;) \
+#define DAWN_TRY_WITH_CLEANUP(EXPR, BODY) \
+ { \
+ auto DAWN_LOCAL_VAR = EXPR; \
+ if (DAWN_UNLIKELY(DAWN_LOCAL_VAR.IsError())) { \
+ std::unique_ptr<::dawn::native::ErrorData> error = DAWN_LOCAL_VAR.AcquireError(); \
+ {BODY} /* comment to force the formatter to insert a newline */ \
+ error->AppendBacktrace(__FILE__, __func__, __LINE__); \
+ return {std::move(error)}; \
+ } \
+ } \
+ for (;;) \
break
// DAWN_TRY_ASSIGN is the same as DAWN_TRY for ResultOrError and assigns the success value, if
@@ -192,6 +192,6 @@
wgpu::ErrorType ToWGPUErrorType(InternalErrorType type);
InternalErrorType FromWGPUErrorType(wgpu::ErrorType type);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ERROR_H_
diff --git a/src/dawn_native/ErrorData.cpp b/src/dawn_native/ErrorData.cpp
index 6e28161..5f01530 100644
--- a/src/dawn_native/ErrorData.cpp
+++ b/src/dawn_native/ErrorData.cpp
@@ -18,7 +18,7 @@
#include "dawn_native/ObjectBase.h"
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
std::unique_ptr<ErrorData> ErrorData::Create(InternalErrorType type,
std::string message,
@@ -100,4 +100,4 @@
return ss.str();
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ErrorData.h b/src/dawn_native/ErrorData.h
index 8dce44c..9600c34 100644
--- a/src/dawn_native/ErrorData.h
+++ b/src/dawn_native/ErrorData.h
@@ -30,7 +30,7 @@
using ErrorType = wgpu::ErrorType;
}
-namespace dawn_native {
+namespace dawn::native {
enum class InternalErrorType : uint32_t;
class [[nodiscard]] ErrorData {
@@ -65,6 +65,6 @@
std::vector<std::string> mDebugGroups;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ERRORDATA_H_
diff --git a/src/dawn_native/ErrorInjector.cpp b/src/dawn_native/ErrorInjector.cpp
index 836ef1e..2dd67b9 100644
--- a/src/dawn_native/ErrorInjector.cpp
+++ b/src/dawn_native/ErrorInjector.cpp
@@ -17,7 +17,7 @@
#include "common/Assert.h"
#include "dawn_native/DawnNative.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -67,4 +67,4 @@
sHasPendingInjectedError = true;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ErrorInjector.h b/src/dawn_native/ErrorInjector.h
index 4d7d2b8..ab41886 100644
--- a/src/dawn_native/ErrorInjector.h
+++ b/src/dawn_native/ErrorInjector.h
@@ -18,7 +18,7 @@
#include <stdint.h>
#include <type_traits>
-namespace dawn_native {
+namespace dawn::native {
template <typename ErrorType>
struct InjectedErrorResult {
@@ -43,15 +43,15 @@
return MaybeInjectError(errorTypes...);
}
-} // namespace dawn_native
+} // namespace dawn::native
#if defined(DAWN_ENABLE_ERROR_INJECTION)
# define INJECT_ERROR_OR_RUN(stmt, ...) \
[&]() { \
- if (DAWN_UNLIKELY(::dawn_native::ErrorInjectorEnabled())) { \
+ if (DAWN_UNLIKELY(::dawn::native::ErrorInjectorEnabled())) { \
/* Only used for testing and fuzzing, so it's okay if this is deoptimized */ \
- auto injectedError = ::dawn_native::MaybeInjectError(__VA_ARGS__); \
+ auto injectedError = ::dawn::native::MaybeInjectError(__VA_ARGS__); \
if (injectedError.injected) { \
return injectedError.error; \
} \
diff --git a/src/dawn_native/ErrorScope.cpp b/src/dawn_native/ErrorScope.cpp
index 4aebf1a..b9a8079 100644
--- a/src/dawn_native/ErrorScope.cpp
+++ b/src/dawn_native/ErrorScope.cpp
@@ -16,7 +16,7 @@
#include "common/Assert.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -89,4 +89,4 @@
return false;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ErrorScope.h b/src/dawn_native/ErrorScope.h
index 2d74456..77c88e3 100644
--- a/src/dawn_native/ErrorScope.h
+++ b/src/dawn_native/ErrorScope.h
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
class ErrorScope {
public:
@@ -52,6 +52,6 @@
std::vector<ErrorScope> mScopes;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_ERRORSCOPE_H_
diff --git a/src/dawn_native/ExternalTexture.cpp b/src/dawn_native/ExternalTexture.cpp
index 14a9e1d..63fa385 100644
--- a/src/dawn_native/ExternalTexture.cpp
+++ b/src/dawn_native/ExternalTexture.cpp
@@ -20,7 +20,7 @@
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateExternalTexturePlane(const TextureViewBase* textureView,
wgpu::TextureFormat format) {
@@ -135,4 +135,4 @@
return ObjectType::ExternalTexture;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ExternalTexture.h b/src/dawn_native/ExternalTexture.h
index e8596fb..2179f37 100644
--- a/src/dawn_native/ExternalTexture.h
+++ b/src/dawn_native/ExternalTexture.h
@@ -22,7 +22,7 @@
#include <array>
-namespace dawn_native {
+namespace dawn::native {
struct ExternalTextureDescriptor;
class TextureViewBase;
@@ -58,6 +58,6 @@
std::array<Ref<TextureViewBase>, kMaxPlanesPerFormat> textureViews;
ExternalTextureState mState;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_EXTERNALTEXTURE_H_
diff --git a/src/dawn_native/Features.cpp b/src/dawn_native/Features.cpp
index d6eb622..0d98b4e 100644
--- a/src/dawn_native/Features.cpp
+++ b/src/dawn_native/Features.cpp
@@ -18,7 +18,7 @@
#include "common/BitSetIterator.h"
#include "dawn_native/Features.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
struct FeatureEnumAndInfo {
@@ -274,4 +274,4 @@
return static_cast<wgpu::FeatureName>(-1);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Features.h b/src/dawn_native/Features.h
index 6616e7c..169861a 100644
--- a/src/dawn_native/Features.h
+++ b/src/dawn_native/Features.h
@@ -23,7 +23,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
-namespace dawn_native {
+namespace dawn::native {
enum class Feature {
TextureCompressionBC,
@@ -78,6 +78,6 @@
std::unordered_map<std::string, Feature> mFeatureNameToEnumMap;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_FEATURES_H_
diff --git a/src/dawn_native/Format.cpp b/src/dawn_native/Format.cpp
index 45f89f1..30f4555 100644
--- a/src/dawn_native/Format.cpp
+++ b/src/dawn_native/Format.cpp
@@ -21,7 +21,7 @@
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
// Format
@@ -469,4 +469,4 @@
return table;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Format.h b/src/dawn_native/Format.h
index a0730c6..3a9f1a8 100644
--- a/src/dawn_native/Format.h
+++ b/src/dawn_native/Format.h
@@ -40,7 +40,7 @@
//
// TODO(dawn:551): Consider moving this comment.
-namespace dawn_native {
+namespace dawn::native {
enum class Aspect : uint8_t;
class DeviceBase;
@@ -136,12 +136,12 @@
// Builds the format table with the extensions enabled on the device.
FormatTable BuildFormatTable(const DeviceBase* device);
-} // namespace dawn_native
+} // namespace dawn::native
namespace dawn {
template <>
- struct IsDawnBitmask<dawn_native::SampleTypeBit> {
+ struct IsDawnBitmask<dawn::native::SampleTypeBit> {
static constexpr bool enable = true;
};
diff --git a/src/dawn_native/Forward.h b/src/dawn_native/Forward.h
index 2716f63..36b092c 100644
--- a/src/dawn_native/Forward.h
+++ b/src/dawn_native/Forward.h
@@ -20,7 +20,7 @@
template <typename T>
class Ref;
-namespace dawn_native {
+namespace dawn::native {
enum class ObjectType : uint32_t;
@@ -66,6 +66,6 @@
using RenderPassEncoderBase = RenderPassEncoder;
using SurfaceBase = Surface;
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_FORWARD_H_
diff --git a/src/dawn_native/IndirectDrawMetadata.cpp b/src/dawn_native/IndirectDrawMetadata.cpp
index 40f144b..a1bb084 100644
--- a/src/dawn_native/IndirectDrawMetadata.cpp
+++ b/src/dawn_native/IndirectDrawMetadata.cpp
@@ -23,7 +23,7 @@
#include <algorithm>
#include <utility>
-namespace dawn_native {
+namespace dawn::native {
uint32_t ComputeMaxIndirectValidationBatchOffsetRange(const CombinedLimits& limits) {
return limits.v1.maxStorageBufferBindingSize - limits.v1.minStorageBufferOffsetAlignment -
@@ -190,4 +190,4 @@
std::move(draw));
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/IndirectDrawMetadata.h b/src/dawn_native/IndirectDrawMetadata.h
index e652750..c4f62fa 100644
--- a/src/dawn_native/IndirectDrawMetadata.h
+++ b/src/dawn_native/IndirectDrawMetadata.h
@@ -27,7 +27,7 @@
#include <utility>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
class RenderBundleBase;
struct CombinedLimits;
@@ -121,6 +121,6 @@
uint32_t mMaxBatchOffsetRange;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_INDIRECTDRAWMETADATA_H_
diff --git a/src/dawn_native/IndirectDrawValidationEncoder.cpp b/src/dawn_native/IndirectDrawValidationEncoder.cpp
index 5e63094..a22e6d4 100644
--- a/src/dawn_native/IndirectDrawValidationEncoder.cpp
+++ b/src/dawn_native/IndirectDrawValidationEncoder.cpp
@@ -29,7 +29,7 @@
#include <cstdlib>
#include <limits>
-namespace dawn_native {
+namespace dawn::native {
namespace {
// NOTE: This must match the workgroup_size attribute on the compute entry point below.
@@ -382,4 +382,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/IndirectDrawValidationEncoder.h b/src/dawn_native/IndirectDrawValidationEncoder.h
index aa56b099..84593a9 100644
--- a/src/dawn_native/IndirectDrawValidationEncoder.h
+++ b/src/dawn_native/IndirectDrawValidationEncoder.h
@@ -18,7 +18,7 @@
#include "dawn_native/Error.h"
#include "dawn_native/IndirectDrawMetadata.h"
-namespace dawn_native {
+namespace dawn::native {
class CommandEncoder;
struct CombinedLimits;
@@ -35,6 +35,6 @@
RenderPassResourceUsageTracker* usageTracker,
IndirectDrawMetadata* indirectDrawMetadata);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_INDIRECTDRAWVALIDATIONENCODER_H_
diff --git a/src/dawn_native/Instance.cpp b/src/dawn_native/Instance.cpp
index 1a801f5..12abde6 100644
--- a/src/dawn_native/Instance.cpp
+++ b/src/dawn_native/Instance.cpp
@@ -25,7 +25,7 @@
# include "dawn_native/XlibXcbFunctions.h"
#endif // defined(DAWN_USE_X11)
-namespace dawn_native {
+namespace dawn::native {
// Forward definitions of each backend's "Connect" function that creates new BackendConnection.
// Conditionally compiled declarations are used to avoid using static constructors instead.
@@ -306,4 +306,4 @@
return new Surface(this, descriptor);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Instance.h b/src/dawn_native/Instance.h
index 9ff1799..e7a72ca 100644
--- a/src/dawn_native/Instance.h
+++ b/src/dawn_native/Instance.h
@@ -32,7 +32,7 @@
class Platform;
} // namespace dawn::platform
-namespace dawn_native {
+namespace dawn::native {
class Surface;
class XlibXcbFunctions;
@@ -117,6 +117,6 @@
#endif // defined(DAWN_USE_X11)
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_INSTANCE_H_
diff --git a/src/dawn_native/IntegerTypes.h b/src/dawn_native/IntegerTypes.h
index fbbaf4e..15bdb41 100644
--- a/src/dawn_native/IntegerTypes.h
+++ b/src/dawn_native/IntegerTypes.h
@@ -20,7 +20,7 @@
#include <cstdint>
-namespace dawn_native {
+namespace dawn::native {
// Binding numbers in the shader and BindGroup/BindGroupLayoutDescriptors
using BindingNumber = TypedInteger<struct BindingNumberT, uint32_t>;
@@ -70,6 +70,6 @@
// other pipelines.
using PipelineCompatibilityToken = TypedInteger<struct PipelineCompatibilityTokenT, uint64_t>;
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_INTEGERTYPES_H_
diff --git a/src/dawn_native/InternalPipelineStore.cpp b/src/dawn_native/InternalPipelineStore.cpp
index edfd115..285deab 100644
--- a/src/dawn_native/InternalPipelineStore.cpp
+++ b/src/dawn_native/InternalPipelineStore.cpp
@@ -21,7 +21,7 @@
#include <unordered_map>
-namespace dawn_native {
+namespace dawn::native {
class RenderPipelineBase;
class ShaderModuleBase;
@@ -35,4 +35,4 @@
InternalPipelineStore::~InternalPipelineStore() = default;
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/InternalPipelineStore.h b/src/dawn_native/InternalPipelineStore.h
index 803e0df..38e1893 100644
--- a/src/dawn_native/InternalPipelineStore.h
+++ b/src/dawn_native/InternalPipelineStore.h
@@ -21,7 +21,7 @@
#include <unordered_map>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
class RenderPipelineBase;
@@ -55,6 +55,6 @@
Ref<ComputePipelineBase> dispatchIndirectValidationPipeline;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_INTERNALPIPELINESTORE_H_
diff --git a/src/dawn_native/Limits.cpp b/src/dawn_native/Limits.cpp
index b893e94..4bd1a60 100644
--- a/src/dawn_native/Limits.cpp
+++ b/src/dawn_native/Limits.cpp
@@ -67,7 +67,7 @@
LIMITS_STORAGE_BUFFER_BINDING_SIZE(X) \
LIMITS_OTHER(X)
-namespace dawn_native {
+namespace dawn::native {
namespace {
template <uint32_t A, uint32_t B>
constexpr void StaticAssertSame() {
@@ -210,4 +210,4 @@
return limits;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Limits.h b/src/dawn_native/Limits.h
index 4beed2e..b3e09d0 100644
--- a/src/dawn_native/Limits.h
+++ b/src/dawn_native/Limits.h
@@ -18,7 +18,7 @@
#include "dawn_native/Error.h"
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
struct CombinedLimits {
Limits v1;
@@ -38,6 +38,6 @@
// Returns a copy of |limits| where limit tiers are applied.
Limits ApplyLimitTiers(Limits limits);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_LIMITS_H_
diff --git a/src/dawn_native/ObjectBase.cpp b/src/dawn_native/ObjectBase.cpp
index c6f091a..ece3f48 100644
--- a/src/dawn_native/ObjectBase.cpp
+++ b/src/dawn_native/ObjectBase.cpp
@@ -17,7 +17,7 @@
#include <mutex>
-namespace dawn_native {
+namespace dawn::native {
static constexpr uint64_t kErrorPayload = 0;
static constexpr uint64_t kNotErrorPayload = 1;
@@ -87,4 +87,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ObjectBase.h b/src/dawn_native/ObjectBase.h
index 5c91628..04777c7 100644
--- a/src/dawn_native/ObjectBase.h
+++ b/src/dawn_native/ObjectBase.h
@@ -21,7 +21,7 @@
#include <string>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -92,6 +92,6 @@
std::string mLabel;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_OBJECTBASE_H_
diff --git a/src/dawn_native/ObjectContentHasher.cpp b/src/dawn_native/ObjectContentHasher.cpp
index 901e4cc..9603fe9 100644
--- a/src/dawn_native/ObjectContentHasher.cpp
+++ b/src/dawn_native/ObjectContentHasher.cpp
@@ -14,9 +14,9 @@
#include "dawn_native/ObjectContentHasher.h"
-namespace dawn_native {
+namespace dawn::native {
size_t ObjectContentHasher::GetContentHash() const {
return mContentHash;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ObjectContentHasher.h b/src/dawn_native/ObjectContentHasher.h
index 16509bc..710eadc 100644
--- a/src/dawn_native/ObjectContentHasher.h
+++ b/src/dawn_native/ObjectContentHasher.h
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
// ObjectContentHasher records a hash that can be used as a key to lookup a cached object in a
// cache.
@@ -77,6 +77,6 @@
}
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_OBJECT_CONTENT_HASHER_H_
diff --git a/src/dawn_native/PassResourceUsage.h b/src/dawn_native/PassResourceUsage.h
index 555eb0f..f757ad5 100644
--- a/src/dawn_native/PassResourceUsage.h
+++ b/src/dawn_native/PassResourceUsage.h
@@ -21,7 +21,7 @@
#include <set>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
// This file declares various "ResourceUsage" structures. They are produced by the frontend
// while recording commands to be used for later validation and also some operations in the
@@ -95,6 +95,6 @@
std::set<QuerySetBase*> usedQuerySets;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PASSRESOURCEUSAGE_H
diff --git a/src/dawn_native/PassResourceUsageTracker.cpp b/src/dawn_native/PassResourceUsageTracker.cpp
index 46ceda7..2acb207 100644
--- a/src/dawn_native/PassResourceUsageTracker.cpp
+++ b/src/dawn_native/PassResourceUsageTracker.cpp
@@ -24,7 +24,7 @@
#include <utility>
-namespace dawn_native {
+namespace dawn::native {
void SyncScopeUsageTracker::BufferUsedAs(BufferBase* buffer, wgpu::BufferUsage usage) {
// std::map's operator[] will create the key and return 0 if the key didn't exist
@@ -259,4 +259,4 @@
return mQueryAvailabilities;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/PassResourceUsageTracker.h b/src/dawn_native/PassResourceUsageTracker.h
index 33f33ff..c7f989d 100644
--- a/src/dawn_native/PassResourceUsageTracker.h
+++ b/src/dawn_native/PassResourceUsageTracker.h
@@ -21,7 +21,7 @@
#include <map>
-namespace dawn_native {
+namespace dawn::native {
class BindGroupBase;
class BufferBase;
@@ -81,6 +81,6 @@
QueryAvailabilityMap mQueryAvailabilities;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PASSRESOURCEUSAGETRACKER_H_
diff --git a/src/dawn_native/PerStage.cpp b/src/dawn_native/PerStage.cpp
index 469fd9f..47bbcfd 100644
--- a/src/dawn_native/PerStage.cpp
+++ b/src/dawn_native/PerStage.cpp
@@ -14,7 +14,7 @@
#include "dawn_native/PerStage.h"
-namespace dawn_native {
+namespace dawn::native {
absl::FormatConvertResult<absl::FormatConversionCharSet::kString> AbslFormatConvert(
SingleShaderStage value,
@@ -46,4 +46,4 @@
return static_cast<wgpu::ShaderStage>(1 << static_cast<uint32_t>(stage));
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/PerStage.h b/src/dawn_native/PerStage.h
index a67a08a..3fa65c6 100644
--- a/src/dawn_native/PerStage.h
+++ b/src/dawn_native/PerStage.h
@@ -24,7 +24,7 @@
#include <array>
-namespace dawn_native {
+namespace dawn::native {
enum class SingleShaderStage { Vertex, Fragment, Compute };
@@ -85,6 +85,6 @@
std::array<T, kNumStages> mData;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PERSTAGE_H_
diff --git a/src/dawn_native/PersistentCache.cpp b/src/dawn_native/PersistentCache.cpp
index 7ee7bea..7679275 100644
--- a/src/dawn_native/PersistentCache.cpp
+++ b/src/dawn_native/PersistentCache.cpp
@@ -18,7 +18,7 @@
#include "dawn_native/Device.h"
#include "dawn_platform/DawnPlatform.h"
-namespace dawn_native {
+namespace dawn::native {
PersistentCache::PersistentCache(DeviceBase* device)
: mDevice(device), mCache(GetPlatformCache()) {
@@ -61,4 +61,4 @@
}
return nullptr;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/PersistentCache.h b/src/dawn_native/PersistentCache.h
index c550982..28de28d 100644
--- a/src/dawn_native/PersistentCache.h
+++ b/src/dawn_native/PersistentCache.h
@@ -24,7 +24,7 @@
class CachingInterface;
}
-namespace dawn_native {
+namespace dawn::native {
using PersistentCacheKey = std::vector<uint8_t>;
@@ -87,6 +87,6 @@
std::mutex mMutex;
dawn::platform::CachingInterface* mCache = nullptr;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PERSISTENTCACHE_H_
diff --git a/src/dawn_native/Pipeline.cpp b/src/dawn_native/Pipeline.cpp
index 7b24460..02a9d8d 100644
--- a/src/dawn_native/Pipeline.cpp
+++ b/src/dawn_native/Pipeline.cpp
@@ -21,7 +21,7 @@
#include "dawn_native/PipelineLayout.h"
#include "dawn_native/ShaderModule.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateProgrammableStage(DeviceBase* device,
const ShaderModuleBase* module,
const std::string& entryPoint,
@@ -247,4 +247,4 @@
return true;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Pipeline.h b/src/dawn_native/Pipeline.h
index 10aec50..d640ace 100644
--- a/src/dawn_native/Pipeline.h
+++ b/src/dawn_native/Pipeline.h
@@ -27,7 +27,7 @@
#include <array>
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateProgrammableStage(DeviceBase* device,
const ShaderModuleBase* module,
@@ -93,6 +93,6 @@
RequiredBufferSizes mMinBufferSizes;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PIPELINE_H_
diff --git a/src/dawn_native/PipelineLayout.cpp b/src/dawn_native/PipelineLayout.cpp
index 27e3801..3883bb7 100644
--- a/src/dawn_native/PipelineLayout.cpp
+++ b/src/dawn_native/PipelineLayout.cpp
@@ -23,7 +23,7 @@
#include "dawn_native/ObjectType_autogen.h"
#include "dawn_native/ShaderModule.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidatePipelineLayoutDescriptor(
DeviceBase* device,
@@ -406,4 +406,4 @@
return true;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/PipelineLayout.h b/src/dawn_native/PipelineLayout.h
index 948b344..faf259d 100644
--- a/src/dawn_native/PipelineLayout.h
+++ b/src/dawn_native/PipelineLayout.h
@@ -29,7 +29,7 @@
#include <array>
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidatePipelineLayoutDescriptor(
DeviceBase*,
@@ -92,6 +92,6 @@
BindGroupLayoutMask mMask;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PIPELINELAYOUT_H_
diff --git a/src/dawn_native/PooledResourceMemoryAllocator.cpp b/src/dawn_native/PooledResourceMemoryAllocator.cpp
index 2b6d44a..161493f 100644
--- a/src/dawn_native/PooledResourceMemoryAllocator.cpp
+++ b/src/dawn_native/PooledResourceMemoryAllocator.cpp
@@ -15,7 +15,7 @@
#include "dawn_native/PooledResourceMemoryAllocator.h"
#include "dawn_native/Device.h"
-namespace dawn_native {
+namespace dawn::native {
PooledResourceMemoryAllocator::PooledResourceMemoryAllocator(
ResourceHeapAllocator* heapAllocator)
@@ -57,4 +57,4 @@
uint64_t PooledResourceMemoryAllocator::GetPoolSizeForTesting() const {
return mPool.size();
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/PooledResourceMemoryAllocator.h b/src/dawn_native/PooledResourceMemoryAllocator.h
index 5b6b816..c21c752 100644
--- a/src/dawn_native/PooledResourceMemoryAllocator.h
+++ b/src/dawn_native/PooledResourceMemoryAllocator.h
@@ -20,7 +20,7 @@
#include <deque>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -48,6 +48,6 @@
std::deque<std::unique_ptr<ResourceHeapBase>> mPool;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_POOLEDRESOURCEMEMORYALLOCATOR_H_
diff --git a/src/dawn_native/ProgrammableEncoder.cpp b/src/dawn_native/ProgrammableEncoder.cpp
index 99e2c77..0bd588aa 100644
--- a/src/dawn_native/ProgrammableEncoder.cpp
+++ b/src/dawn_native/ProgrammableEncoder.cpp
@@ -26,7 +26,7 @@
#include <cstring>
-namespace dawn_native {
+namespace dawn::native {
ProgrammableEncoder::ProgrammableEncoder(DeviceBase* device,
const char* label,
@@ -200,4 +200,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ProgrammableEncoder.h b/src/dawn_native/ProgrammableEncoder.h
index 9f88f28..47f6b80 100644
--- a/src/dawn_native/ProgrammableEncoder.h
+++ b/src/dawn_native/ProgrammableEncoder.h
@@ -23,7 +23,7 @@
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -67,6 +67,6 @@
const bool mValidationEnabled;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_PROGRAMMABLEENCODER_H_
diff --git a/src/dawn_native/QueryHelper.cpp b/src/dawn_native/QueryHelper.cpp
index ef8e206..46ce1a5 100644
--- a/src/dawn_native/QueryHelper.cpp
+++ b/src/dawn_native/QueryHelper.cpp
@@ -24,15 +24,15 @@
#include "dawn_native/InternalPipelineStore.h"
#include "dawn_native/utils/WGPUHelpers.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
- // Assert the offsets in dawn_native::TimestampParams are same with the ones in the shader
- static_assert(offsetof(dawn_native::TimestampParams, first) == 0, "");
- static_assert(offsetof(dawn_native::TimestampParams, count) == 4, "");
- static_assert(offsetof(dawn_native::TimestampParams, offset) == 8, "");
- static_assert(offsetof(dawn_native::TimestampParams, period) == 12, "");
+ // Assert the offsets in dawn::native::TimestampParams are same with the ones in the shader
+ static_assert(offsetof(dawn::native::TimestampParams, first) == 0, "");
+ static_assert(offsetof(dawn::native::TimestampParams, count) == 4, "");
+ static_assert(offsetof(dawn::native::TimestampParams, offset) == 8, "");
+ static_assert(offsetof(dawn::native::TimestampParams, period) == 12, "");
static const char sConvertTimestampsToNanoseconds[] = R"(
struct Timestamp {
@@ -184,4 +184,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/QueryHelper.h b/src/dawn_native/QueryHelper.h
index 90f3398..6f8362c 100644
--- a/src/dawn_native/QueryHelper.h
+++ b/src/dawn_native/QueryHelper.h
@@ -18,7 +18,7 @@
#include "dawn_native/Error.h"
#include "dawn_native/ObjectBase.h"
-namespace dawn_native {
+namespace dawn::native {
class BufferBase;
class CommandEncoder;
@@ -35,6 +35,6 @@
BufferBase* availability,
BufferBase* params);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_QUERYHELPER_H_
diff --git a/src/dawn_native/QuerySet.cpp b/src/dawn_native/QuerySet.cpp
index 37d8a99..5c02574 100644
--- a/src/dawn_native/QuerySet.cpp
+++ b/src/dawn_native/QuerySet.cpp
@@ -21,7 +21,7 @@
#include <set>
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -177,4 +177,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/QuerySet.h b/src/dawn_native/QuerySet.h
index 58ebc1a..42c2b87 100644
--- a/src/dawn_native/QuerySet.h
+++ b/src/dawn_native/QuerySet.h
@@ -21,7 +21,7 @@
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateQuerySetDescriptor(DeviceBase* device, const QuerySetDescriptor* descriptor);
@@ -67,6 +67,6 @@
std::vector<bool> mQueryAvailability;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_QUERYSET_H_
diff --git a/src/dawn_native/Queue.cpp b/src/dawn_native/Queue.cpp
index 0fb7ab2..a6d10b7 100644
--- a/src/dawn_native/Queue.cpp
+++ b/src/dawn_native/Queue.cpp
@@ -34,7 +34,7 @@
#include <cstring>
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -509,4 +509,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Queue.h b/src/dawn_native/Queue.h
index 204a4ae..ee8ba17 100644
--- a/src/dawn_native/Queue.h
+++ b/src/dawn_native/Queue.h
@@ -23,7 +23,7 @@
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
class QueueBase : public ApiObjectBase {
public:
@@ -106,6 +106,6 @@
SerialQueue<ExecutionSerial, std::unique_ptr<TaskInFlight>> mTasksInFlight;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_QUEUE_H_
diff --git a/src/dawn_native/RenderBundle.cpp b/src/dawn_native/RenderBundle.cpp
index 9ee9370..7937106 100644
--- a/src/dawn_native/RenderBundle.cpp
+++ b/src/dawn_native/RenderBundle.cpp
@@ -20,7 +20,7 @@
#include "dawn_native/ObjectType_autogen.h"
#include "dawn_native/RenderBundleEncoder.h"
-namespace dawn_native {
+namespace dawn::native {
RenderBundleBase::RenderBundleBase(RenderBundleEncoder* encoder,
const RenderBundleDescriptor* descriptor,
@@ -88,4 +88,4 @@
return mIndirectDrawMetadata;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/RenderBundle.h b/src/dawn_native/RenderBundle.h
index 4ad8daf..a2db78a 100644
--- a/src/dawn_native/RenderBundle.h
+++ b/src/dawn_native/RenderBundle.h
@@ -28,7 +28,7 @@
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
struct RenderBundleDescriptor;
class RenderBundleEncoder;
@@ -68,6 +68,6 @@
RenderPassResourceUsage mResourceUsage;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RENDERBUNDLE_H_
diff --git a/src/dawn_native/RenderBundleEncoder.cpp b/src/dawn_native/RenderBundleEncoder.cpp
index f7aab72..07e2ea7 100644
--- a/src/dawn_native/RenderBundleEncoder.cpp
+++ b/src/dawn_native/RenderBundleEncoder.cpp
@@ -24,7 +24,7 @@
#include "dawn_platform/DawnPlatform.h"
#include "dawn_platform/tracing/TraceEvent.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateColorAttachmentFormat(const DeviceBase* device,
wgpu::TextureFormat textureFormat) {
@@ -164,4 +164,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/RenderBundleEncoder.h b/src/dawn_native/RenderBundleEncoder.h
index 11411b0..ebd2a90 100644
--- a/src/dawn_native/RenderBundleEncoder.h
+++ b/src/dawn_native/RenderBundleEncoder.h
@@ -21,7 +21,7 @@
#include "dawn_native/RenderBundle.h"
#include "dawn_native/RenderEncoderBase.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateRenderBundleEncoderDescriptor(
const DeviceBase* device,
@@ -51,6 +51,6 @@
EncodingContext mBundleEncodingContext;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RENDERBUNDLEENCODER_H_
diff --git a/src/dawn_native/RenderEncoderBase.cpp b/src/dawn_native/RenderEncoderBase.cpp
index 4a5b89c..e548200 100644
--- a/src/dawn_native/RenderEncoderBase.cpp
+++ b/src/dawn_native/RenderEncoderBase.cpp
@@ -27,7 +27,7 @@
#include <math.h>
#include <cstring>
-namespace dawn_native {
+namespace dawn::native {
RenderEncoderBase::RenderEncoderBase(DeviceBase* device,
const char* label,
@@ -411,4 +411,4 @@
dynamicOffsetCount);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/RenderEncoderBase.h b/src/dawn_native/RenderEncoderBase.h
index 2153178..7bd1d5f 100644
--- a/src/dawn_native/RenderEncoderBase.h
+++ b/src/dawn_native/RenderEncoderBase.h
@@ -22,7 +22,7 @@
#include "dawn_native/PassResourceUsageTracker.h"
#include "dawn_native/ProgrammableEncoder.h"
-namespace dawn_native {
+namespace dawn::native {
class RenderEncoderBase : public ProgrammableEncoder {
public:
@@ -82,6 +82,6 @@
bool mStencilReadOnly = false;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RENDERENCODERBASE_H_
diff --git a/src/dawn_native/RenderPassEncoder.cpp b/src/dawn_native/RenderPassEncoder.cpp
index 279fe45..a5b38a0 100644
--- a/src/dawn_native/RenderPassEncoder.cpp
+++ b/src/dawn_native/RenderPassEncoder.cpp
@@ -28,7 +28,7 @@
#include <math.h>
#include <cstring>
-namespace dawn_native {
+namespace dawn::native {
namespace {
// Check the query at queryIndex is unavailable, otherwise it cannot be written.
@@ -390,4 +390,4 @@
"encoding %s.WriteTimestamp(%s, %u).", this, querySet, queryIndex);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/RenderPassEncoder.h b/src/dawn_native/RenderPassEncoder.h
index adaa8da..34adb81 100644
--- a/src/dawn_native/RenderPassEncoder.h
+++ b/src/dawn_native/RenderPassEncoder.h
@@ -19,7 +19,7 @@
#include "dawn_native/Forward.h"
#include "dawn_native/RenderEncoderBase.h"
-namespace dawn_native {
+namespace dawn::native {
class RenderBundleBase;
@@ -85,6 +85,6 @@
bool mOcclusionQueryActive = false;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RENDERPASSENCODER_H_
diff --git a/src/dawn_native/RenderPipeline.cpp b/src/dawn_native/RenderPipeline.cpp
index d16826d..715f8ef 100644
--- a/src/dawn_native/RenderPipeline.cpp
+++ b/src/dawn_native/RenderPipeline.cpp
@@ -27,7 +27,7 @@
#include <cmath>
#include <sstream>
-namespace dawn_native {
+namespace dawn::native {
absl::FormatConvertResult<absl::FormatConversionCharSet::kString> AbslFormatConvert(
VertexFormatBaseType value,
const absl::FormatConversionSpec& spec,
@@ -1062,4 +1062,4 @@
return true;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/RenderPipeline.h b/src/dawn_native/RenderPipeline.h
index f09ca84..78a4996 100644
--- a/src/dawn_native/RenderPipeline.h
+++ b/src/dawn_native/RenderPipeline.h
@@ -26,7 +26,7 @@
#include <array>
#include <bitset>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -139,6 +139,6 @@
bool mWritesStencil = false;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RENDERPIPELINE_H_
diff --git a/src/dawn_native/ResourceHeap.h b/src/dawn_native/ResourceHeap.h
index e9a4a67..465faae 100644
--- a/src/dawn_native/ResourceHeap.h
+++ b/src/dawn_native/ResourceHeap.h
@@ -17,7 +17,7 @@
#include "dawn_native/Error.h"
-namespace dawn_native {
+namespace dawn::native {
// Wrapper for a resource backed by a heap.
class ResourceHeapBase {
@@ -26,6 +26,6 @@
virtual ~ResourceHeapBase() = default;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RESOURCEHEAP_H_
diff --git a/src/dawn_native/ResourceHeapAllocator.h b/src/dawn_native/ResourceHeapAllocator.h
index 1b0fd62..1fcf854 100644
--- a/src/dawn_native/ResourceHeapAllocator.h
+++ b/src/dawn_native/ResourceHeapAllocator.h
@@ -20,7 +20,7 @@
#include <memory>
-namespace dawn_native {
+namespace dawn::native {
// Interface for backend allocators that create memory heaps resoruces can be suballocated in.
class ResourceHeapAllocator {
@@ -32,6 +32,6 @@
virtual void DeallocateResourceHeap(std::unique_ptr<ResourceHeapBase> allocation) = 0;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RESOURCEHEAPALLOCATOR_H_
diff --git a/src/dawn_native/ResourceMemoryAllocation.cpp b/src/dawn_native/ResourceMemoryAllocation.cpp
index b1c35d4..4107b73 100644
--- a/src/dawn_native/ResourceMemoryAllocation.cpp
+++ b/src/dawn_native/ResourceMemoryAllocation.cpp
@@ -15,7 +15,7 @@
#include "dawn_native/ResourceMemoryAllocation.h"
#include "common/Assert.h"
-namespace dawn_native {
+namespace dawn::native {
ResourceMemoryAllocation::ResourceMemoryAllocation()
: mOffset(0), mResourceHeap(nullptr), mMappedPointer(nullptr) {
@@ -50,4 +50,4 @@
mResourceHeap = nullptr;
mInfo = {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ResourceMemoryAllocation.h b/src/dawn_native/ResourceMemoryAllocation.h
index f8b05f5..307d90a 100644
--- a/src/dawn_native/ResourceMemoryAllocation.h
+++ b/src/dawn_native/ResourceMemoryAllocation.h
@@ -17,7 +17,7 @@
#include <cstdint>
-namespace dawn_native {
+namespace dawn::native {
class ResourceHeapBase;
@@ -75,6 +75,6 @@
ResourceHeapBase* mResourceHeap;
uint8_t* mMappedPointer;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RESOURCEMEMORYALLOCATION_H_
diff --git a/src/dawn_native/RingBufferAllocator.cpp b/src/dawn_native/RingBufferAllocator.cpp
index c77f0a5..69d6769 100644
--- a/src/dawn_native/RingBufferAllocator.cpp
+++ b/src/dawn_native/RingBufferAllocator.cpp
@@ -26,7 +26,7 @@
// only two indices that keep increasing (unbounded) but can be still indexed using bit masks.
// However, this 1) requires the size to always be a power-of-two and 2) remove tests that check
// used bytes.
-namespace dawn_native {
+namespace dawn::native {
RingBufferAllocator::RingBufferAllocator(uint64_t maxSize) : mMaxBlockSize(maxSize) {
}
@@ -118,4 +118,4 @@
return startOffset;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/RingBufferAllocator.h b/src/dawn_native/RingBufferAllocator.h
index 3e9fb43..90411ae 100644
--- a/src/dawn_native/RingBufferAllocator.h
+++ b/src/dawn_native/RingBufferAllocator.h
@@ -22,7 +22,7 @@
#include <memory>
// RingBufferAllocator is the front-end implementation used to manage a ring buffer in GPU memory.
-namespace dawn_native {
+namespace dawn::native {
class RingBufferAllocator {
public:
@@ -58,6 +58,6 @@
uint64_t mCurrentRequestSize =
0; // Size of the sub-alloc requests (in bytes) of the current serial.
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_RINGBUFFERALLOCATOR_H_
diff --git a/src/dawn_native/Sampler.cpp b/src/dawn_native/Sampler.cpp
index 12ab8cb..9703e1b 100644
--- a/src/dawn_native/Sampler.cpp
+++ b/src/dawn_native/Sampler.cpp
@@ -20,7 +20,7 @@
#include <cmath>
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateSamplerDescriptor(DeviceBase*, const SamplerDescriptor* descriptor) {
DAWN_INVALID_IF(descriptor->nextInChain != nullptr, "nextInChain must be nullptr");
@@ -150,4 +150,4 @@
a->mCompareFunction == b->mCompareFunction && a->mMaxAnisotropy == b->mMaxAnisotropy;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Sampler.h b/src/dawn_native/Sampler.h
index 0116d47..7c8e762 100644
--- a/src/dawn_native/Sampler.h
+++ b/src/dawn_native/Sampler.h
@@ -22,7 +22,7 @@
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -75,6 +75,6 @@
uint16_t mMaxAnisotropy;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_SAMPLER_H_
diff --git a/src/dawn_native/ScratchBuffer.cpp b/src/dawn_native/ScratchBuffer.cpp
index 976214c..41f241f 100644
--- a/src/dawn_native/ScratchBuffer.cpp
+++ b/src/dawn_native/ScratchBuffer.cpp
@@ -16,7 +16,7 @@
#include "dawn_native/Device.h"
-namespace dawn_native {
+namespace dawn::native {
ScratchBuffer::ScratchBuffer(DeviceBase* device, wgpu::BufferUsage usage)
: mDevice(device), mUsage(usage) {
@@ -44,4 +44,4 @@
return mBuffer.Get();
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ScratchBuffer.h b/src/dawn_native/ScratchBuffer.h
index 7bb446d..16d3e90 100644
--- a/src/dawn_native/ScratchBuffer.h
+++ b/src/dawn_native/ScratchBuffer.h
@@ -20,7 +20,7 @@
#include <cstdint>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -50,6 +50,6 @@
Ref<BufferBase> mBuffer;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_SCRATCHBUFFER_H_
diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp
index b589fa6..9d57787 100644
--- a/src/dawn_native/ShaderModule.cpp
+++ b/src/dawn_native/ShaderModule.cpp
@@ -31,7 +31,7 @@
#include <sstream>
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -1275,4 +1275,4 @@
return hash;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/ShaderModule.h b/src/dawn_native/ShaderModule.h
index 4625ae8..b978c1d 100644
--- a/src/dawn_native/ShaderModule.h
+++ b/src/dawn_native/ShaderModule.h
@@ -47,7 +47,7 @@
} // namespace tint
-namespace dawn_native {
+namespace dawn::native {
struct EntryPointMetadata;
@@ -298,6 +298,6 @@
std::unique_ptr<OwnedCompilationMessages> mCompilationMessages;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_SHADERMODULE_H_
diff --git a/src/dawn_native/SpirvValidation.cpp b/src/dawn_native/SpirvValidation.cpp
index b7844c1..87d50ca 100644
--- a/src/dawn_native/SpirvValidation.cpp
+++ b/src/dawn_native/SpirvValidation.cpp
@@ -19,7 +19,7 @@
#include <spirv-tools/libspirv.hpp>
#include <sstream>
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateSpirv(DeviceBase* device,
const std::vector<uint32_t>& spirv,
@@ -71,4 +71,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/SpirvValidation.h b/src/dawn_native/SpirvValidation.h
index b22fd06..598d011 100644
--- a/src/dawn_native/SpirvValidation.h
+++ b/src/dawn_native/SpirvValidation.h
@@ -16,7 +16,7 @@
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -24,4 +24,4 @@
const std::vector<uint32_t>& spirv,
bool dumpSpirv);
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/StagingBuffer.cpp b/src/dawn_native/StagingBuffer.cpp
index 63dd65e..6378e81 100644
--- a/src/dawn_native/StagingBuffer.cpp
+++ b/src/dawn_native/StagingBuffer.cpp
@@ -14,7 +14,7 @@
#include "dawn_native/StagingBuffer.h"
-namespace dawn_native {
+namespace dawn::native {
StagingBufferBase::StagingBufferBase(size_t size) : mBufferSize(size) {
}
@@ -26,4 +26,4 @@
void* StagingBufferBase::GetMappedPointer() const {
return mMappedPointer;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/StagingBuffer.h b/src/dawn_native/StagingBuffer.h
index 4d19548..3e85765 100644
--- a/src/dawn_native/StagingBuffer.h
+++ b/src/dawn_native/StagingBuffer.h
@@ -17,7 +17,7 @@
#include "dawn_native/Error.h"
-namespace dawn_native {
+namespace dawn::native {
class StagingBufferBase {
public:
@@ -36,6 +36,6 @@
const size_t mBufferSize;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_STAGINGBUFFER_H_
diff --git a/src/dawn_native/Subresource.cpp b/src/dawn_native/Subresource.cpp
index ff0bd53..9e4887f 100644
--- a/src/dawn_native/Subresource.cpp
+++ b/src/dawn_native/Subresource.cpp
@@ -17,7 +17,7 @@
#include "common/Assert.h"
#include "dawn_native/Format.h"
-namespace dawn_native {
+namespace dawn::native {
Aspect ConvertSingleAspect(const Format& format, wgpu::TextureAspect aspect) {
Aspect aspectMask = ConvertAspect(format, aspect);
@@ -129,4 +129,4 @@
return {aspects, {0, layerCount}, {0, levelCount}};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Subresource.h b/src/dawn_native/Subresource.h
index 454e17c..35da7b5 100644
--- a/src/dawn_native/Subresource.h
+++ b/src/dawn_native/Subresource.h
@@ -18,7 +18,7 @@
#include "dawn_native/EnumClassBitmasks.h"
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
// Note: Subresource indices are computed by iterating the aspects in increasing order.
// D3D12 uses these directly, so the order much match D3D12's indices.
@@ -98,12 +98,12 @@
// the per plane index does not exceed the known maximum plane count.
static constexpr uint32_t kMaxPlanesPerFormat = 3;
-} // namespace dawn_native
+} // namespace dawn::native
namespace dawn {
template <>
- struct IsDawnBitmask<dawn_native::Aspect> {
+ struct IsDawnBitmask<dawn::native::Aspect> {
static constexpr bool enable = true;
};
diff --git a/src/dawn_native/SubresourceStorage.h b/src/dawn_native/SubresourceStorage.h
index 16feffc..2b960cc 100644
--- a/src/dawn_native/SubresourceStorage.h
+++ b/src/dawn_native/SubresourceStorage.h
@@ -25,7 +25,7 @@
#include <memory>
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
// SubresourceStorage<T> acts like a simple map from subresource (aspect, layer, level) to a
// value of type T except that it tries to compress similar subresources so that algorithms
@@ -550,6 +550,6 @@
return mData[(aspectIndex * mArrayLayerCount + layer) * mMipLevelCount + level];
}
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_SUBRESOURCESTORAGE_H_
diff --git a/src/dawn_native/Surface.cpp b/src/dawn_native/Surface.cpp
index 5ec5ffd..57734cb 100644
--- a/src/dawn_native/Surface.cpp
+++ b/src/dawn_native/Surface.cpp
@@ -28,7 +28,7 @@
# include "common/xlib_with_undefs.h"
#endif // defined(DAWN_USE_X11)
-namespace dawn_native {
+namespace dawn::native {
absl::FormatConvertResult<absl::FormatConversionCharSet::kString> AbslFormatConvert(
Surface::Type value,
@@ -243,4 +243,4 @@
return mXWindow;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Surface.h b/src/dawn_native/Surface.h
index f9b47d3..1a274b6 100644
--- a/src/dawn_native/Surface.h
+++ b/src/dawn_native/Surface.h
@@ -32,7 +32,7 @@
// non-windows platforms don't have this type
struct IUnknown;
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateSurfaceDescriptor(const InstanceBase* instance,
const SurfaceDescriptor* descriptor);
@@ -105,6 +105,6 @@
const absl::FormatConversionSpec& spec,
absl::FormatSink* s);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_SURFACE_H_
diff --git a/src/dawn_native/Surface_metal.mm b/src/dawn_native/Surface_metal.mm
index 9989674..ecb5d88 100644
--- a/src/dawn_native/Surface_metal.mm
+++ b/src/dawn_native/Surface_metal.mm
@@ -20,11 +20,11 @@
#import <QuartzCore/CAMetalLayer.h>
-namespace dawn_native {
+namespace dawn::native {
bool InheritsFromCAMetalLayer(void* obj) {
id<NSObject> object = static_cast<id>(obj);
return [object isKindOfClass:[CAMetalLayer class]];
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/SwapChain.cpp b/src/dawn_native/SwapChain.cpp
index 20ee991..502e66b 100644
--- a/src/dawn_native/SwapChain.cpp
+++ b/src/dawn_native/SwapChain.cpp
@@ -22,7 +22,7 @@
#include "dawn_native/Texture.h"
#include "dawn_native/ValidationUtils_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -409,4 +409,4 @@
return {};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/SwapChain.h b/src/dawn_native/SwapChain.h
index bb88045..09323d4 100644
--- a/src/dawn_native/SwapChain.h
+++ b/src/dawn_native/SwapChain.h
@@ -22,7 +22,7 @@
#include "dawn/dawn_wsi.h"
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateSwapChainDescriptor(const DeviceBase* device,
const Surface* surface,
@@ -164,6 +164,6 @@
virtual void DetachFromSurfaceImpl() = 0;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_SWAPCHAIN_H_
diff --git a/src/dawn_native/Texture.cpp b/src/dawn_native/Texture.cpp
index cbc81c1..092f7a1 100644
--- a/src/dawn_native/Texture.cpp
+++ b/src/dawn_native/Texture.cpp
@@ -27,7 +27,7 @@
#include "dawn_native/PassResourceUsage.h"
#include "dawn_native/ValidationUtils_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
// WebGPU currently does not have texture format reinterpretation. If it does, the
// code to check for it might go here.
@@ -229,7 +229,7 @@
MaybeError ValidateTextureUsage(const TextureDescriptor* descriptor,
wgpu::TextureUsage usage,
const Format* format) {
- DAWN_TRY(dawn_native::ValidateTextureUsage(usage));
+ DAWN_TRY(dawn::native::ValidateTextureUsage(usage));
constexpr wgpu::TextureUsage kValidCompressedUsages =
wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::CopySrc |
@@ -775,4 +775,4 @@
return mRange;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Texture.h b/src/dawn_native/Texture.h
index 145d7f3..053e6f5 100644
--- a/src/dawn_native/Texture.h
+++ b/src/dawn_native/Texture.h
@@ -26,7 +26,7 @@
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
MaybeError ValidateTextureDescriptor(const DeviceBase* device,
const TextureDescriptor* descriptor);
@@ -152,6 +152,6 @@
SubresourceRange mRange;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_TEXTURE_H_
diff --git a/src/dawn_native/TintUtils.cpp b/src/dawn_native/TintUtils.cpp
index 7315904..aae7de6 100644
--- a/src/dawn_native/TintUtils.cpp
+++ b/src/dawn_native/TintUtils.cpp
@@ -17,7 +17,7 @@
#include <tint/tint.h>
-namespace dawn_native {
+namespace dawn::native {
namespace {
@@ -52,4 +52,4 @@
tlDevice = nullptr;
}
-} // namespace dawn_native
\ No newline at end of file
+} // namespace dawn::native
\ No newline at end of file
diff --git a/src/dawn_native/TintUtils.h b/src/dawn_native/TintUtils.h
index c3761f6..ee094e3 100644
--- a/src/dawn_native/TintUtils.h
+++ b/src/dawn_native/TintUtils.h
@@ -17,7 +17,7 @@
#include "common/NonCopyable.h"
-namespace dawn_native {
+namespace dawn::native {
class DeviceBase;
@@ -32,6 +32,6 @@
ScopedTintICEHandler(ScopedTintICEHandler&&) = delete;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_TEXTURE_H_
\ No newline at end of file
diff --git a/src/dawn_native/ToBackend.h b/src/dawn_native/ToBackend.h
index 5b0f049..9e3db19 100644
--- a/src/dawn_native/ToBackend.h
+++ b/src/dawn_native/ToBackend.h
@@ -17,7 +17,7 @@
#include "dawn_native/Forward.h"
-namespace dawn_native {
+namespace dawn::native {
// ToBackendTraits implements the mapping from base type to member type of BackendTraits
template <typename T, typename BackendTraits>
@@ -150,6 +150,6 @@
common);
}
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_TOBACKEND_H_
diff --git a/src/dawn_native/Toggles.cpp b/src/dawn_native/Toggles.cpp
index 25792b8..63dcdda 100644
--- a/src/dawn_native/Toggles.cpp
+++ b/src/dawn_native/Toggles.cpp
@@ -18,7 +18,7 @@
#include "common/BitSetIterator.h"
#include "dawn_native/Toggles.h"
-namespace dawn_native {
+namespace dawn::native {
namespace {
struct ToggleEnumAndInfo {
@@ -314,4 +314,4 @@
mToggleNameToEnumMapInitialized = true;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/Toggles.h b/src/dawn_native/Toggles.h
index 4682cbd..0fc748f 100644
--- a/src/dawn_native/Toggles.h
+++ b/src/dawn_native/Toggles.h
@@ -21,7 +21,7 @@
#include "dawn_native/DawnNative.h"
-namespace dawn_native {
+namespace dawn::native {
enum class Toggle {
EmulateStoreAndMSAAResolve,
@@ -92,6 +92,6 @@
std::unordered_map<std::string, Toggle> mToggleNameToEnumMap;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_TOGGLES_H_
diff --git a/src/dawn_native/VertexFormat.cpp b/src/dawn_native/VertexFormat.cpp
index b4bdfb7..4cc2c9d 100644
--- a/src/dawn_native/VertexFormat.cpp
+++ b/src/dawn_native/VertexFormat.cpp
@@ -18,7 +18,7 @@
#include <array>
-namespace dawn_native {
+namespace dawn::native {
static constexpr std::array<VertexFormatInfo, 31> sVertexFormatTable = {{
//
@@ -66,4 +66,4 @@
return sVertexFormatTable[static_cast<uint32_t>(format)];
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/VertexFormat.h b/src/dawn_native/VertexFormat.h
index 582c95d..e5c9c62 100644
--- a/src/dawn_native/VertexFormat.h
+++ b/src/dawn_native/VertexFormat.h
@@ -17,7 +17,7 @@
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
enum class VertexFormatBaseType {
Float,
@@ -35,6 +35,6 @@
const VertexFormatInfo& GetVertexFormatInfo(wgpu::VertexFormat format);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_VERTEXFORMAT_H_
diff --git a/src/dawn_native/XlibXcbFunctions.cpp b/src/dawn_native/XlibXcbFunctions.cpp
index 605d250..aa5ccbf 100644
--- a/src/dawn_native/XlibXcbFunctions.cpp
+++ b/src/dawn_native/XlibXcbFunctions.cpp
@@ -14,7 +14,7 @@
#include "dawn_native/XlibXcbFunctions.h"
-namespace dawn_native {
+namespace dawn::native {
XlibXcbFunctions::XlibXcbFunctions() {
if (!mLib.Open("libX11-xcb.so.1") ||
@@ -28,4 +28,4 @@
return xGetXCBConnection != nullptr;
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/XlibXcbFunctions.h b/src/dawn_native/XlibXcbFunctions.h
index f295c2a..05fd583 100644
--- a/src/dawn_native/XlibXcbFunctions.h
+++ b/src/dawn_native/XlibXcbFunctions.h
@@ -22,7 +22,7 @@
class DynamicLib;
-namespace dawn_native {
+namespace dawn::native {
// A helper class that dynamically loads the x11-xcb library that contains XGetXCBConnection
// (and nothing else). This has to be dynamic because this libraries isn't present on all Linux
@@ -41,6 +41,6 @@
DynamicLib mLib;
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_XLIBXCBFUNCTIONS_H_
diff --git a/src/dawn_native/d3d12/AdapterD3D12.cpp b/src/dawn_native/d3d12/AdapterD3D12.cpp
index 1f17979..fd4746d 100644
--- a/src/dawn_native/d3d12/AdapterD3D12.cpp
+++ b/src/dawn_native/d3d12/AdapterD3D12.cpp
@@ -24,7 +24,7 @@
#include <sstream>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
Adapter::Adapter(Backend* backend, ComPtr<IDXGIAdapter3> hardwareAdapter)
: AdapterBase(backend->GetInstance(), wgpu::BackendType::D3D12),
@@ -37,7 +37,7 @@
}
bool Adapter::SupportsExternalImages() const {
- // Via dawn_native::d3d12::ExternalImageDXGI::Create
+ // Via dawn::native::d3d12::ExternalImageDXGI::Create
return true;
}
@@ -412,4 +412,4 @@
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 56b602f..c4d3df1 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::d3d12 {
+namespace dawn::native::d3d12 {
class Backend;
@@ -61,6 +61,6 @@
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 71a9ccf..8476553 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
@@ -207,4 +207,4 @@
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 e41fd7a..8fb237d 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::d3d12 {
+namespace dawn::native::d3d12 {
class PlatformFunctions;
@@ -54,6 +54,6 @@
ComPtr<IDxcValidator> 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 6c19488..7957bd5 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::d3d12 {
+namespace dawn::native::d3d12 {
// static
ResultOrError<Ref<BindGroup>> BindGroup::Create(Device* device,
@@ -282,4 +282,4 @@
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 a0b8c7a..0d32755 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
class SamplerHeapCacheEntry;
@@ -63,6 +63,6 @@
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 527d41c..834bc04 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
D3D12_DESCRIPTOR_RANGE_TYPE WGPUBindingInfoToDescriptorRangeType(
const BindingInfo& bindingInfo) {
@@ -188,4 +188,4 @@
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 377d620..7d00763 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::d3d12 {
+namespace dawn::native::d3d12 {
class BindGroup;
class CPUDescriptorHeapAllocation;
@@ -89,6 +89,6 @@
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 4741f79..c3a691e 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
D3D12_RESOURCE_FLAGS D3D12ResourceFlags(wgpu::BufferUsage usage) {
@@ -490,4 +490,4 @@
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 c5a7148..be99642 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::d3d12 {
+namespace dawn::native::d3d12 {
class CommandRecordingContext;
class Device;
@@ -86,6 +86,6 @@
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 bd71def..5df287e 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::d3d12 {
+namespace dawn::native::d3d12 {
CPUDescriptorHeapAllocation::CPUDescriptorHeapAllocation(
D3D12_CPU_DESCRIPTOR_HANDLE baseDescriptor,
@@ -50,4 +50,4 @@
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 9cff652..57be2a1 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::d3d12 {
+namespace dawn::native::d3d12 {
// Wrapper for a handle into a CPU-only descriptor heap.
class CPUDescriptorHeapAllocation {
@@ -42,6 +42,6 @@
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 01891b8..6dc73df 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::d3d12 {
+namespace dawn::native::d3d12 {
CommandAllocatorManager::CommandAllocatorManager(Device* device)
: device(device), mAllocatorCount(0) {
@@ -69,4 +69,4 @@
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 0ecdada..8a79bcc 100644
--- a/src/dawn_native/d3d12/CommandAllocatorManager.h
+++ b/src/dawn_native/d3d12/CommandAllocatorManager.h
@@ -23,7 +23,7 @@
#include <bitset>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -53,6 +53,6 @@
SerialQueue<ExecutionSerial, IndexedCommandAllocator> 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 5365351..f18a149 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
@@ -190,7 +190,7 @@
const Extent3D& copySize) {
ASSERT(srcCopy.texture->GetFormat().format == dstCopy.texture->GetFormat().format);
ASSERT(srcCopy.aspect == dstCopy.aspect);
- dawn_native::Format format = srcCopy.texture->GetFormat();
+ dawn::native::Format format = srcCopy.texture->GetFormat();
const TexelBlockInfo& blockInfo = format.GetAspectInfo(srcCopy.aspect).block;
ASSERT(copySize.width % blockInfo.width == 0);
uint32_t widthInBlocks = copySize.width / blockInfo.width;
@@ -867,7 +867,7 @@
// TODO(crbug.com/dawn/814): support copying with 1D.
ASSERT(source->GetDimension() != wgpu::TextureDimension::e1D &&
destination->GetDimension() != wgpu::TextureDimension::e1D);
- const dawn_native::Extent3D copyExtentOneSlice = {
+ const dawn::native::Extent3D copyExtentOneSlice = {
copy->copySize.width, copy->copySize.height, 1u};
for (Aspect aspect : IterateEnumMask(srcRange.aspects)) {
@@ -1649,4 +1649,4 @@
}
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 50f28c6..df65433 100644
--- a/src/dawn_native/d3d12/CommandBufferD3D12.h
+++ b/src/dawn_native/d3d12/CommandBufferD3D12.h
@@ -18,11 +18,11 @@
#include "dawn_native/CommandBuffer.h"
#include "dawn_native/Error.h"
-namespace dawn_native {
+namespace dawn::native {
struct BeginRenderPassCmd;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class BindGroupStateTracker;
class CommandRecordingContext;
@@ -52,6 +52,6 @@
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 ad20764..6749c2c 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::d3d12 {
+namespace dawn::native::d3d12 {
void CommandRecordingContext::AddToSharedTextureList(Texture* texture) {
ASSERT(IsOpen());
@@ -128,4 +128,4 @@
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 75a8350..db4d6e7 100644
--- a/src/dawn_native/d3d12/CommandRecordingContext.h
+++ b/src/dawn_native/d3d12/CommandRecordingContext.h
@@ -21,7 +21,7 @@
#include <set>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class CommandAllocatorManager;
class Device;
class Heap;
@@ -53,6 +53,6 @@
std::vector<Ref<Buffer>> 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 d50f210..933f62d 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::d3d12 {
+namespace dawn::native::d3d12 {
Ref<ComputePipeline> ComputePipeline::CreateUninitialized(
Device* device,
@@ -102,4 +102,4 @@
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 3e14217..9fb2d60 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -53,6 +53,6 @@
ComPtr<ID3D12PipelineState> 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 55b2393..245de6c 100644
--- a/src/dawn_native/d3d12/D3D11on12Util.cpp
+++ b/src/dawn_native/d3d12/D3D11on12Util.cpp
@@ -24,7 +24,7 @@
#include <dawn_native/D3D12Backend.h>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
void Flush11On12DeviceToAvoidLeaks(ComPtr<ID3D11On12Device> d3d11on12Device) {
if (d3d11on12Device == nullptr) {
@@ -184,4 +184,4 @@
return entry;
}
-} // namespace dawn_native::d3d12
+} // namespace dawn::native::d3d12
diff --git a/src/dawn_native/d3d12/D3D11on12Util.h b/src/dawn_native/d3d12/D3D11on12Util.h
index 9abf7c6..6970cdd 100644
--- a/src/dawn_native/d3d12/D3D11on12Util.h
+++ b/src/dawn_native/d3d12/D3D11on12Util.h
@@ -26,7 +26,7 @@
struct ID3D11On12Device;
struct IDXGIKeyedMutex;
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
// Wraps 11 wrapped resources in a cache.
class D3D11on12ResourceCacheEntry : public RefCounted {
@@ -87,6 +87,6 @@
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 c0cbe48..a79be15 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::d3d12 {
+namespace dawn::native::d3d12 {
ComPtr<ID3D12Device> GetD3D12Device(WGPUDevice device) {
return ToBackend(FromAPI(device))->GetD3D12Device();
@@ -176,4 +176,4 @@
AdapterDiscoveryOptions::AdapterDiscoveryOptions(ComPtr<IDXGIAdapter> 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 914ff23..9b2522b 100644
--- a/src/dawn_native/d3d12/D3D12Error.cpp
+++ b/src/dawn_native/d3d12/D3D12Error.cpp
@@ -18,7 +18,7 @@
#include <sstream>
#include <string>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
MaybeError CheckHRESULTImpl(HRESULT result, const char* context) {
if (DAWN_LIKELY(SUCCEEDED(result))) {
return {};
@@ -48,4 +48,4 @@
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 6d01c9e..931c59b 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::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 =
@@ -31,15 +31,15 @@
// Uses CheckRESULT but returns OOM specific error when recoverable.
MaybeError CheckOutOfMemoryHRESULTImpl(HRESULT result, const char* context);
-#define CheckHRESULT(resultIn, contextIn) \
- ::dawn_native::d3d12::CheckHRESULTImpl( \
+#define CheckHRESULT(resultIn, contextIn) \
+ ::dawn::native::d3d12::CheckHRESULTImpl( \
INJECT_ERROR_OR_RUN(resultIn, E_FAKE_ERROR_FOR_TESTING), contextIn)
#define CheckOutOfMemoryHRESULT(resultIn, contextIn) \
- ::dawn_native::d3d12::CheckOutOfMemoryHRESULTImpl( \
+ ::dawn::native::d3d12::CheckOutOfMemoryHRESULTImpl( \
INJECT_ERROR_OR_RUN(resultIn, E_FAKE_OUTOFMEMORY_ERROR_FOR_TESTING, \
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 ab68487..154803f 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::d3d12 {
+namespace dawn::native::d3d12 {
ResultOrError<D3D12DeviceInfo> GatherDeviceInfo(const Adapter& adapter) {
D3D12DeviceInfo info = {};
@@ -119,4 +119,4 @@
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 b8c7c0b..b5ef7fc 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::d3d12 {
+namespace dawn::native::d3d12 {
class Adapter;
@@ -36,6 +36,6 @@
};
ResultOrError<D3D12DeviceInfo> 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 d0d06c1..fd68df3 100644
--- a/src/dawn_native/d3d12/DeviceD3D12.cpp
+++ b/src/dawn_native/d3d12/DeviceD3D12.cpp
@@ -44,7 +44,7 @@
#include <sstream>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
// TODO(dawn:155): Figure out these values.
static constexpr uint16_t kShaderVisibleDescriptorHeapSize = 1024;
@@ -740,4 +740,4 @@
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 64c0e35..09b2246 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::d3d12 {
+namespace dawn::native::d3d12 {
class CommandAllocatorManager;
class PlatformFunctions;
@@ -259,6 +259,6 @@
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 de2b0b4..15d1739 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::d3d12 {
+namespace dawn::native::d3d12 {
class Adapter;
class BindGroup;
@@ -64,6 +64,6 @@
return ToBackendBase<D3D12BackendTraits>(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 59288b1..3ee011d 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::d3d12 {
+namespace dawn::native::d3d12 {
GPUDescriptorHeapAllocation::GPUDescriptorHeapAllocation(
D3D12_GPU_DESCRIPTOR_HANDLE baseDescriptor,
@@ -36,4 +36,4 @@
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 58b39fe..34cc805 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::d3d12 {
+namespace dawn::native::d3d12 {
// Wrapper for a handle into a GPU-only descriptor heap.
class GPUDescriptorHeapAllocation {
@@ -39,6 +39,6 @@
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 bb333e7..27ba044 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::d3d12 {
+namespace dawn::native::d3d12 {
HeapAllocator::HeapAllocator(Device* device,
D3D12_HEAP_TYPE heapType,
@@ -68,4 +68,4 @@
mDevice->ReferenceUntilUnused(static_cast<Heap*>(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 f8e58be..fbb083b 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -43,6 +43,6 @@
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 d560505..6e08cd3 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::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 @@
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 6b04177..0ff6fd2 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -35,6 +35,6 @@
private:
ComPtr<ID3D12Heap> 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 b2f3309..54dcda8 100644
--- a/src/dawn_native/d3d12/IntegerTypes.h
+++ b/src/dawn_native/d3d12/IntegerTypes.h
@@ -20,12 +20,12 @@
#include <cstdint>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
// An ID used to desambiguate between multiple uses of the same descriptor heap in the
// BindGroup allocations.
using HeapVersionID = TypedInteger<struct HeapVersionIDT, uint64_t>;
-} // 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 933e44d..7884e13 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
DXGI_USAGE D3D12SwapChainBufferUsage(WGPUTextureUsage allowedUsages) {
@@ -117,4 +117,4 @@
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 f3f7215..35927e5 100644
--- a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h
+++ b/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h
@@ -23,7 +23,7 @@
#include <vector>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -55,6 +55,6 @@
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 06b8d8b..fe84d48 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::d3d12 {
+namespace dawn::native::d3d12 {
Pageable::Pageable(ComPtr<ID3D12Pageable> d3d12Pageable,
MemorySegment memorySegment,
uint64_t size)
@@ -73,4 +73,4 @@
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 0a7a46a..c706c5c 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::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 @@
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 bd38998..b934ca9 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
// Reserve register names for internal use. This registers map to bindings in the shader,
@@ -364,4 +364,4 @@
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 2a477b1..444266e 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -95,6 +95,6 @@
ComPtr<ID3D12CommandSignature> 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 c89b392..c3b3d17 100644
--- a/src/dawn_native/d3d12/PlatformFunctions.cpp
+++ b/src/dawn_native/d3d12/PlatformFunctions.cpp
@@ -20,7 +20,7 @@
#include <array>
#include <sstream>
-namespace dawn_native::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::d3d12
+} // namespace dawn::native::d3d12
diff --git a/src/dawn_native/d3d12/PlatformFunctions.h b/src/dawn_native/d3d12/PlatformFunctions.h
index be8c48f..56473c7 100644
--- a/src/dawn_native/d3d12/PlatformFunctions.h
+++ b/src/dawn_native/d3d12/PlatformFunctions.h
@@ -22,7 +22,7 @@
#include <d3dcompiler.h>
-namespace dawn_native::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 @@
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 933b085..0f8cb3f 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
D3D12_QUERY_HEAP_TYPE D3D12QueryHeapType(wgpu::QueryType type) {
@@ -72,4 +72,4 @@
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 c7a2193..e41f305 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -41,6 +41,6 @@
ComPtr<ID3D12QueryHeap> 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 0bf4edc..9693feb 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::d3d12 {
+namespace dawn::native::d3d12 {
Queue::Queue(Device* device) : QueueBase(device) {
}
@@ -51,4 +51,4 @@
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 446dc1a..b085e9b 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -32,6 +32,6 @@
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 d63d77e..f86f525 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE D3D12BeginningAccessType(wgpu::LoadOp loadOp) {
@@ -149,7 +149,7 @@
void RenderPassBuilder::SetRenderTargetBeginningAccess(ColorAttachmentIndex attachment,
wgpu::LoadOp loadOp,
- dawn_native::Color clearColor,
+ dawn::native::Color clearColor,
DXGI_FORMAT format) {
mRenderPassRenderTargetDescriptors[attachment].BeginningAccess.Type =
D3D12BeginningAccessType(loadOp);
@@ -235,4 +235,4 @@
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 7fa7c6c..47c1746 100644
--- a/src/dawn_native/d3d12/RenderPassBuilderD3D12.h
+++ b/src/dawn_native/d3d12/RenderPassBuilderD3D12.h
@@ -24,7 +24,7 @@
#include <array>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class TextureView;
@@ -61,7 +61,7 @@
void SetDepthStencilNoAccess();
void SetRenderTargetBeginningAccess(ColorAttachmentIndex attachment,
wgpu::LoadOp loadOp,
- dawn_native::Color clearColor,
+ dawn::native::Color clearColor,
DXGI_FORMAT format);
void SetRenderTargetEndingAccess(ColorAttachmentIndex attachment, wgpu::StoreOp storeOp);
void SetRenderTargetEndingAccessResolve(ColorAttachmentIndex attachment,
@@ -93,6 +93,6 @@
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 c8efa7f..c2fc7ef 100644
--- a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp
+++ b/src/dawn_native/d3d12/RenderPipelineD3D12.cpp
@@ -27,7 +27,7 @@
#include <d3dcompiler.h>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
DXGI_FORMAT VertexFormatType(wgpu::VertexFormat format) {
@@ -487,4 +487,4 @@
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 6ac5a19..0c0c7e6 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -57,6 +57,6 @@
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 8eea16a..e35941c 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::d3d12 {
+namespace dawn::native::d3d12 {
ResidencyManager::ResidencyManager(Device* device)
: mDevice(device),
@@ -368,4 +368,4 @@
}
}
-} // 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 7c10aa5..c9530b3 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
class Heap;
@@ -77,6 +77,6 @@
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 832b193..6f1b477 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::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::d3d12
+} // namespace dawn::native::d3d12
diff --git a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h b/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h
index f8ddaac..8129e3d 100644
--- a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h
+++ b/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h
@@ -24,7 +24,7 @@
#include <array>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -102,6 +102,6 @@
SerialQueue<ExecutionSerial, ResourceHeapAllocation> 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 514a9b4..9e4dac4 100644
--- a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp
+++ b/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp
@@ -19,7 +19,7 @@
#include <utility>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
ResourceHeapAllocation::ResourceHeapAllocation(const AllocationInfo& info,
uint64_t offset,
ComPtr<ID3D12Resource> resource,
@@ -40,4 +40,4 @@
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 8c2951d..3ca80a2 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::d3d12 {
+namespace dawn::native::d3d12 {
class Heap;
@@ -43,6 +43,6 @@
ComPtr<ID3D12Resource> 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 a72dd1d..0ece76d 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
D3D12_TEXTURE_ADDRESS_MODE AddressMode(wgpu::AddressMode mode) {
@@ -103,4 +103,4 @@
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 f1ad94e..b28ab93 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -35,6 +35,6 @@
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 de8f136..4131e97 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::d3d12 {
+namespace dawn::native::d3d12 {
SamplerHeapCacheEntry::SamplerHeapCacheEntry(std::vector<Sampler*> samplers)
: mSamplers(std::move(samplers)) {
@@ -163,4 +163,4 @@
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 09064f7..e8c86ef 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::d3d12 {
+namespace dawn::native::d3d12 {
class BindGroup;
class Device;
@@ -102,6 +102,6 @@
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 b580a08..4cf58e2 100644
--- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp
+++ b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp
@@ -34,7 +34,7 @@
#include <sstream>
#include <unordered_map>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
ResultOrError<uint64_t> GetDXCompilerVersion(ComPtr<IDxcValidator> dxcValidator) {
@@ -828,4 +828,4 @@
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 9ab5e49..3eb91e1 100644
--- a/src/dawn_native/d3d12/ShaderModuleD3D12.h
+++ b/src/dawn_native/d3d12/ShaderModuleD3D12.h
@@ -20,11 +20,11 @@
#include "dawn_native/d3d12/d3d12_platform.h"
-namespace dawn_native {
+namespace dawn::native {
struct ProgrammableStage;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
class PipelineLayout;
@@ -64,6 +64,6 @@
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 631a02e..9ac146d 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::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 @@
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 72a207e..ee6009c 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
class GPUDescriptorHeapAllocation;
@@ -100,6 +100,6 @@
// 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 46ce9ec..c1a3073 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::d3d12 {
+namespace dawn::native::d3d12 {
StagingBuffer::StagingBuffer(size_t size, Device* device)
: StagingBufferBase(size), mDevice(device) {
@@ -74,4 +74,4 @@
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 64c32aba..455adda 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -36,6 +36,6 @@
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 151d155..83b9eee 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::d3d12 {
+namespace dawn::native::d3d12 {
StagingDescriptorAllocator::StagingDescriptorAllocator(Device* device,
uint32_t descriptorCount,
@@ -149,4 +149,4 @@
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 3bcaff2..64e9c3f 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
@@ -80,6 +80,6 @@
SerialQueue<ExecutionSerial, CPUDescriptorHeapAllocation> 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 bf8a955..1b6175c 100644
--- a/src/dawn_native/d3d12/SwapChainD3D12.cpp
+++ b/src/dawn_native/d3d12/SwapChainD3D12.cpp
@@ -23,7 +23,7 @@
#include <windows.ui.xaml.media.dxinterop.h>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
uint32_t PresentModeToBufferCount(wgpu::PresentMode mode) {
@@ -374,4 +374,4 @@
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 0a77777..8a27cef 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::d3d12 {
+namespace dawn::native::d3d12 {
class Device;
class Texture;
@@ -84,6 +84,6 @@
Ref<Texture> 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 b1d4b73..cc1688e 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
Origin3D ComputeTexelOffsets(const TexelBlockInfo& blockInfo,
@@ -536,4 +536,4 @@
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 3cb93e2..e75e192 100644
--- a/src/dawn_native/d3d12/TextureCopySplitter.h
+++ b/src/dawn_native/d3d12/TextureCopySplitter.h
@@ -19,13 +19,13 @@
#include <array>
-namespace dawn_native {
+namespace dawn::native {
struct TexelBlockInfo;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
struct TextureCopySubresource {
static constexpr unsigned int kMaxTextureCopyRegions = 4;
@@ -92,6 +92,6 @@
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 623ac02..85ceabc 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::d3d12 {
+namespace dawn::native::d3d12 {
namespace {
@@ -1373,4 +1373,4 @@
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 9bc6ced..b7371dd 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::d3d12 {
+namespace dawn::native::d3d12 {
class CommandRecordingContext;
class Device;
@@ -157,6 +157,6 @@
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 e19bebf..04be72b 100644
--- a/src/dawn_native/d3d12/UtilsD3D12.cpp
+++ b/src/dawn_native/d3d12/UtilsD3D12.cpp
@@ -23,7 +23,7 @@
#include <stringapiset.h>
-namespace dawn_native::d3d12 {
+namespace dawn::native::d3d12 {
ResultOrError<std::wstring> ConvertStringToWstring(const char* str) {
size_t len = strlen(str);
@@ -388,4 +388,4 @@
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 8e4520a..dcfb5ae 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::d3d12 {
+namespace dawn::native::d3d12 {
ResultOrError<std::wstring> ConvertStringToWstring(const char* str);
@@ -86,6 +86,6 @@
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/dawn_platform.h b/src/dawn_native/dawn_platform.h
index de9ef50..90e729c 100644
--- a/src/dawn_native/dawn_platform.h
+++ b/src/dawn_native/dawn_platform.h
@@ -20,7 +20,7 @@
#include <dawn_native/dawn_platform_autogen.h>
-namespace dawn_native {
+namespace dawn::native {
// kEnumCount is a constant specifying the number of enums in a WebGPU enum type,
// if the enums are contiguous, making it suitable for iteration.
@@ -57,6 +57,6 @@
static constexpr wgpu::BufferBindingType kInternalStorageBufferBinding =
static_cast<wgpu::BufferBindingType>(0xFFFFFFFF);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_DAWNPLATFORM_H_
diff --git a/src/dawn_native/metal/BackendMTL.h b/src/dawn_native/metal/BackendMTL.h
index daa8ac2..da67335 100644
--- a/src/dawn_native/metal/BackendMTL.h
+++ b/src/dawn_native/metal/BackendMTL.h
@@ -17,7 +17,7 @@
#include "dawn_native/BackendConnection.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Backend : public BackendConnection {
public:
@@ -28,6 +28,6 @@
const AdapterDiscoveryOptionsBase* optionsBase) override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BACKENDMTL_H_
diff --git a/src/dawn_native/metal/BackendMTL.mm b/src/dawn_native/metal/BackendMTL.mm
index fd5e507..bc9c6fc 100644
--- a/src/dawn_native/metal/BackendMTL.mm
+++ b/src/dawn_native/metal/BackendMTL.mm
@@ -31,7 +31,7 @@
#include <vector>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -272,7 +272,7 @@
// AdapterBase Implementation
bool SupportsExternalImages() const override {
- // Via dawn_native::metal::WrapIOSurface
+ // Via dawn::native::metal::WrapIOSurface
return true;
}
@@ -613,4 +613,4 @@
return new Backend(instance);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/BindGroupLayoutMTL.h b/src/dawn_native/metal/BindGroupLayoutMTL.h
index 9b1771c..dc2566e 100644
--- a/src/dawn_native/metal/BindGroupLayoutMTL.h
+++ b/src/dawn_native/metal/BindGroupLayoutMTL.h
@@ -18,7 +18,7 @@
#include "common/SlabAllocator.h"
#include "dawn_native/BindGroupLayout.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class BindGroup;
class Device;
@@ -41,6 +41,6 @@
SlabAllocator<BindGroup> mBindGroupAllocator;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BINDGROUPLAYOUTMTL_H_
diff --git a/src/dawn_native/metal/BindGroupLayoutMTL.mm b/src/dawn_native/metal/BindGroupLayoutMTL.mm
index b3e7c35..bfe6870 100644
--- a/src/dawn_native/metal/BindGroupLayoutMTL.mm
+++ b/src/dawn_native/metal/BindGroupLayoutMTL.mm
@@ -16,7 +16,7 @@
#include "dawn_native/metal/BindGroupMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
Ref<BindGroupLayout> BindGroupLayout::Create(
@@ -42,4 +42,4 @@
mBindGroupAllocator.Deallocate(bindGroup);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/BindGroupMTL.h b/src/dawn_native/metal/BindGroupMTL.h
index 0905664..c94a409 100644
--- a/src/dawn_native/metal/BindGroupMTL.h
+++ b/src/dawn_native/metal/BindGroupMTL.h
@@ -18,7 +18,7 @@
#include "common/PlacementAllocated.h"
#include "dawn_native/BindGroup.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -34,6 +34,6 @@
void DestroyImpl() override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BINDGROUPMTL_H_
diff --git a/src/dawn_native/metal/BindGroupMTL.mm b/src/dawn_native/metal/BindGroupMTL.mm
index c867342..272703e 100644
--- a/src/dawn_native/metal/BindGroupMTL.mm
+++ b/src/dawn_native/metal/BindGroupMTL.mm
@@ -16,7 +16,7 @@
#include "dawn_native/metal/BindGroupLayoutMTL.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
BindGroup::BindGroup(Device* device, const BindGroupDescriptor* descriptor)
: BindGroupBase(this, device, descriptor) {
@@ -34,4 +34,4 @@
return ToBackend(descriptor->layout)->AllocateBindGroup(device, descriptor);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/BufferMTL.h b/src/dawn_native/metal/BufferMTL.h
index 7b6c586..9397d69 100644
--- a/src/dawn_native/metal/BufferMTL.h
+++ b/src/dawn_native/metal/BufferMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class CommandRecordingContext;
class Device;
@@ -62,6 +62,6 @@
NSPRef<id<MTLBuffer>> mMtlBuffer;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_BUFFERMTL_H_
diff --git a/src/dawn_native/metal/BufferMTL.mm b/src/dawn_native/metal/BufferMTL.mm
index c3a4a98..d40f883 100644
--- a/src/dawn_native/metal/BufferMTL.mm
+++ b/src/dawn_native/metal/BufferMTL.mm
@@ -21,7 +21,7 @@
#include <limits>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// The size of uniform buffer and storage buffer need to be aligned to 16 bytes which is the
// largest alignment of supported data types
static constexpr uint32_t kMinUniformOrStorageBufferAlignment = 16u;
@@ -237,4 +237,4 @@
value:clearValue];
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/CommandBufferMTL.h b/src/dawn_native/metal/CommandBufferMTL.h
index eb236a9..69427f4 100644
--- a/src/dawn_native/metal/CommandBufferMTL.h
+++ b/src/dawn_native/metal/CommandBufferMTL.h
@@ -20,11 +20,11 @@
#import <Metal/Metal.h>
-namespace dawn_native {
+namespace dawn::native {
class CommandEncoder;
}
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class CommandRecordingContext;
class Device;
@@ -64,6 +64,6 @@
uint32_t height);
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_COMMANDBUFFERMTL_H_
diff --git a/src/dawn_native/metal/CommandBufferMTL.mm b/src/dawn_native/metal/CommandBufferMTL.mm
index 11e655b..d353e99 100644
--- a/src/dawn_native/metal/CommandBufferMTL.mm
+++ b/src/dawn_native/metal/CommandBufferMTL.mm
@@ -34,7 +34,7 @@
#include <tint/tint.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -1564,4 +1564,4 @@
UNREACHABLE();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/CommandRecordingContext.h b/src/dawn_native/metal/CommandRecordingContext.h
index 4caeb0f..662cdcd 100644
--- a/src/dawn_native/metal/CommandRecordingContext.h
+++ b/src/dawn_native/metal/CommandRecordingContext.h
@@ -20,7 +20,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// This class wraps a MTLCommandBuffer and tracks which Metal encoder is open.
// Only one encoder may be open at a time.
@@ -54,6 +54,6 @@
bool mUsed = false;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_COMMANDRECORDINGCONTEXT_H_
diff --git a/src/dawn_native/metal/CommandRecordingContext.mm b/src/dawn_native/metal/CommandRecordingContext.mm
index 95d7b2e..4b3e158 100644
--- a/src/dawn_native/metal/CommandRecordingContext.mm
+++ b/src/dawn_native/metal/CommandRecordingContext.mm
@@ -16,7 +16,7 @@
#include "common/Assert.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
CommandRecordingContext::CommandRecordingContext() = default;
@@ -129,4 +129,4 @@
mInEncoder = false;
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/ComputePipelineMTL.h b/src/dawn_native/metal/ComputePipelineMTL.h
index 64e9356..b3f70d9 100644
--- a/src/dawn_native/metal/ComputePipelineMTL.h
+++ b/src/dawn_native/metal/ComputePipelineMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -48,6 +48,6 @@
std::vector<uint32_t> mWorkgroupAllocations;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_COMPUTEPIPELINEMTL_H_
diff --git a/src/dawn_native/metal/ComputePipelineMTL.mm b/src/dawn_native/metal/ComputePipelineMTL.mm
index 5041961..9f5255f 100644
--- a/src/dawn_native/metal/ComputePipelineMTL.mm
+++ b/src/dawn_native/metal/ComputePipelineMTL.mm
@@ -19,7 +19,7 @@
#include "dawn_native/metal/ShaderModuleMTL.h"
#include "dawn_native/metal/UtilsMetal.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
Ref<ComputePipeline> ComputePipeline::CreateUninitialized(
@@ -83,4 +83,4 @@
CreateComputePipelineAsyncTask::RunAsync(std::move(asyncTask));
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/DeviceMTL.h b/src/dawn_native/metal/DeviceMTL.h
index 779b726..f7817c4 100644
--- a/src/dawn_native/metal/DeviceMTL.h
+++ b/src/dawn_native/metal/DeviceMTL.h
@@ -30,7 +30,7 @@
#include <memory>
#include <mutex>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
struct KalmanInfo;
@@ -149,6 +149,6 @@
std::unique_ptr<KalmanInfo> mKalmanInfo;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_DEVICEMTL_H_
diff --git a/src/dawn_native/metal/DeviceMTL.mm b/src/dawn_native/metal/DeviceMTL.mm
index 978b2f6..c62417f 100644
--- a/src/dawn_native/metal/DeviceMTL.mm
+++ b/src/dawn_native/metal/DeviceMTL.mm
@@ -40,7 +40,7 @@
#include <type_traits>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -503,4 +503,4 @@
return mTimestampPeriod;
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/Forward.h b/src/dawn_native/metal/Forward.h
index 5d590b1..cfa2cac 100644
--- a/src/dawn_native/metal/Forward.h
+++ b/src/dawn_native/metal/Forward.h
@@ -17,7 +17,7 @@
#include "dawn_native/ToBackend.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Adapter;
class BindGroup;
@@ -63,6 +63,6 @@
return ToBackendBase<MetalBackendTraits>(common);
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_FORWARD_H_
diff --git a/src/dawn_native/metal/MetalBackend.mm b/src/dawn_native/metal/MetalBackend.mm
index 9289774..95174eb 100644
--- a/src/dawn_native/metal/MetalBackend.mm
+++ b/src/dawn_native/metal/MetalBackend.mm
@@ -20,7 +20,7 @@
#include "dawn_native/metal/DeviceMTL.h"
#include "dawn_native/metal/TextureMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
id<MTLDevice> GetMetalDevice(WGPUDevice device) {
return ToBackend(FromAPI(device))->GetMTLDevice();
@@ -46,4 +46,4 @@
ToBackend(FromAPI(device))->WaitForCommandsToBeScheduled();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/PipelineLayoutMTL.h b/src/dawn_native/metal/PipelineLayoutMTL.h
index 9aa4f7b..715da14 100644
--- a/src/dawn_native/metal/PipelineLayoutMTL.h
+++ b/src/dawn_native/metal/PipelineLayoutMTL.h
@@ -23,7 +23,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -57,6 +57,6 @@
PerStage<uint32_t> mBufferBindingCount;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_PIPELINELAYOUTMTL_H_
diff --git a/src/dawn_native/metal/PipelineLayoutMTL.mm b/src/dawn_native/metal/PipelineLayoutMTL.mm
index ac908ab..956ba58 100644
--- a/src/dawn_native/metal/PipelineLayoutMTL.mm
+++ b/src/dawn_native/metal/PipelineLayoutMTL.mm
@@ -18,7 +18,7 @@
#include "dawn_native/BindGroupLayout.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
Ref<PipelineLayout> PipelineLayout::Create(Device* device,
@@ -79,4 +79,4 @@
return mBufferBindingCount[stage];
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/QuerySetMTL.h b/src/dawn_native/metal/QuerySetMTL.h
index 6bde84f..27ac10c 100644
--- a/src/dawn_native/metal/QuerySetMTL.h
+++ b/src/dawn_native/metal/QuerySetMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -49,6 +49,6 @@
ios(14.0)) = nullptr;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_QUERYSETMTL_H_
diff --git a/src/dawn_native/metal/QuerySetMTL.mm b/src/dawn_native/metal/QuerySetMTL.mm
index e92991a..ac732c8 100644
--- a/src/dawn_native/metal/QuerySetMTL.mm
+++ b/src/dawn_native/metal/QuerySetMTL.mm
@@ -18,7 +18,7 @@
#include "common/Platform.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
@@ -136,4 +136,4 @@
}
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/QueueMTL.h b/src/dawn_native/metal/QueueMTL.h
index b608166..6df9801 100644
--- a/src/dawn_native/metal/QueueMTL.h
+++ b/src/dawn_native/metal/QueueMTL.h
@@ -17,7 +17,7 @@
#include "dawn_native/Queue.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -29,6 +29,6 @@
MaybeError SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_QUEUEMTL_H_
diff --git a/src/dawn_native/metal/QueueMTL.mm b/src/dawn_native/metal/QueueMTL.mm
index 09cc2ff..09aadd6 100644
--- a/src/dawn_native/metal/QueueMTL.mm
+++ b/src/dawn_native/metal/QueueMTL.mm
@@ -24,7 +24,7 @@
#include "dawn_platform/DawnPlatform.h"
#include "dawn_platform/tracing/TraceEvent.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
Queue::Queue(Device* device) : QueueBase(device) {
}
@@ -45,4 +45,4 @@
return device->SubmitPendingCommandBuffer();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/RenderPipelineMTL.h b/src/dawn_native/metal/RenderPipelineMTL.h
index d4bc69c..ca150f1c 100644
--- a/src/dawn_native/metal/RenderPipelineMTL.h
+++ b/src/dawn_native/metal/RenderPipelineMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -65,6 +65,6 @@
wgpu::ShaderStage mStagesRequiringStorageBufferLength = wgpu::ShaderStage::None;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_RENDERPIPELINEMTL_H_
diff --git a/src/dawn_native/metal/RenderPipelineMTL.mm b/src/dawn_native/metal/RenderPipelineMTL.mm
index 74cf3bd..695684c 100644
--- a/src/dawn_native/metal/RenderPipelineMTL.mm
+++ b/src/dawn_native/metal/RenderPipelineMTL.mm
@@ -22,7 +22,7 @@
#include "dawn_native/metal/TextureMTL.h"
#include "dawn_native/metal/UtilsMetal.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
MTLVertexFormat VertexFormatType(wgpu::VertexFormat format) {
@@ -503,4 +503,4 @@
CreateRenderPipelineAsyncTask::RunAsync(std::move(asyncTask));
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/SamplerMTL.h b/src/dawn_native/metal/SamplerMTL.h
index 52c4ef0..a90f518 100644
--- a/src/dawn_native/metal/SamplerMTL.h
+++ b/src/dawn_native/metal/SamplerMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -39,6 +39,6 @@
NSPRef<id<MTLSamplerState>> mMtlSamplerState;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_SAMPLERMTL_H_
diff --git a/src/dawn_native/metal/SamplerMTL.mm b/src/dawn_native/metal/SamplerMTL.mm
index 809c793..ef9960c 100644
--- a/src/dawn_native/metal/SamplerMTL.mm
+++ b/src/dawn_native/metal/SamplerMTL.mm
@@ -17,7 +17,7 @@
#include "dawn_native/metal/DeviceMTL.h"
#include "dawn_native/metal/UtilsMetal.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
MTLSamplerMinMagFilter FilterModeToMinMagFilter(wgpu::FilterMode mode) {
@@ -103,4 +103,4 @@
return mMtlSamplerState.Get();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/ShaderModuleMTL.h b/src/dawn_native/metal/ShaderModuleMTL.h
index 9380086..4bf2014 100644
--- a/src/dawn_native/metal/ShaderModuleMTL.h
+++ b/src/dawn_native/metal/ShaderModuleMTL.h
@@ -22,7 +22,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
class PipelineLayout;
@@ -65,6 +65,6 @@
MaybeError Initialize(ShaderModuleParseResult* parseResult);
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_SHADERMODULEMTL_H_
diff --git a/src/dawn_native/metal/ShaderModuleMTL.mm b/src/dawn_native/metal/ShaderModuleMTL.mm
index 79de704..c09720d 100644
--- a/src/dawn_native/metal/ShaderModuleMTL.mm
+++ b/src/dawn_native/metal/ShaderModuleMTL.mm
@@ -24,7 +24,7 @@
#include <sstream>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// static
ResultOrError<Ref<ShaderModule>> ShaderModule::Create(Device* device,
@@ -257,4 +257,4 @@
return {};
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/StagingBufferMTL.h b/src/dawn_native/metal/StagingBufferMTL.h
index c545b07..3b177f2 100644
--- a/src/dawn_native/metal/StagingBufferMTL.h
+++ b/src/dawn_native/metal/StagingBufferMTL.h
@@ -21,7 +21,7 @@
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
@@ -37,6 +37,6 @@
Device* mDevice;
NSPRef<id<MTLBuffer>> mBuffer;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_STAGINGBUFFERMETAL_H_
diff --git a/src/dawn_native/metal/StagingBufferMTL.mm b/src/dawn_native/metal/StagingBufferMTL.mm
index 5ca18e5..6820e58 100644
--- a/src/dawn_native/metal/StagingBufferMTL.mm
+++ b/src/dawn_native/metal/StagingBufferMTL.mm
@@ -15,7 +15,7 @@
#include "dawn_native/metal/StagingBufferMTL.h"
#include "dawn_native/metal/DeviceMTL.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
StagingBuffer::StagingBuffer(size_t size, Device* device)
: StagingBufferBase(size), mDevice(device) {
@@ -43,4 +43,4 @@
return mBuffer.Get();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/SwapChainMTL.h b/src/dawn_native/metal/SwapChainMTL.h
index 5513e4f..ef173cb 100644
--- a/src/dawn_native/metal/SwapChainMTL.h
+++ b/src/dawn_native/metal/SwapChainMTL.h
@@ -22,7 +22,7 @@
@class CAMetalLayer;
@protocol CAMetalDrawable;
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class Device;
class Texture;
@@ -62,6 +62,6 @@
void DetachFromSurfaceImpl() override;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_SWAPCHAINMTL_H_
diff --git a/src/dawn_native/metal/SwapChainMTL.mm b/src/dawn_native/metal/SwapChainMTL.mm
index 8ec989c..cc978d7 100644
--- a/src/dawn_native/metal/SwapChainMTL.mm
+++ b/src/dawn_native/metal/SwapChainMTL.mm
@@ -22,7 +22,7 @@
#import <QuartzCore/CAMetalLayer.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
// OldSwapChain
@@ -152,4 +152,4 @@
}
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/TextureMTL.h b/src/dawn_native/metal/TextureMTL.h
index 1858167..711f683 100644
--- a/src/dawn_native/metal/TextureMTL.h
+++ b/src/dawn_native/metal/TextureMTL.h
@@ -23,7 +23,7 @@
#include <IOSurface/IOSurfaceRef.h>
#import <Metal/Metal.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
class CommandRecordingContext;
class Device;
@@ -91,6 +91,6 @@
NSPRef<id<MTLTexture>> mMtlTextureView;
};
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_TEXTUREMTL_H_
diff --git a/src/dawn_native/metal/TextureMTL.mm b/src/dawn_native/metal/TextureMTL.mm
index c166f4f..a3e9745 100644
--- a/src/dawn_native/metal/TextureMTL.mm
+++ b/src/dawn_native/metal/TextureMTL.mm
@@ -25,7 +25,7 @@
#include <CoreVideo/CVPixelBuffer.h>
-namespace dawn_native::metal {
+namespace dawn::native::metal {
namespace {
bool UsageNeedsTextureView(wgpu::TextureUsage usage) {
@@ -849,4 +849,4 @@
ASSERT(mMtlTextureView != nullptr);
return mMtlTextureView.Get();
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/metal/UtilsMetal.h b/src/dawn_native/metal/UtilsMetal.h
index 8dfb744..ef993a4 100644
--- a/src/dawn_native/metal/UtilsMetal.h
+++ b/src/dawn_native/metal/UtilsMetal.h
@@ -22,13 +22,13 @@
#import <Metal/Metal.h>
-namespace dawn_native {
+namespace dawn::native {
struct ProgrammableStage;
struct EntryPointMetadata;
enum class SingleShaderStage;
}
-namespace dawn_native::metal {
+namespace dawn::native::metal {
MTLCompareFunction ToMetalCompareFunction(wgpu::CompareFunction compareFunction);
@@ -81,6 +81,6 @@
uint32_t sampleMask = 0xFFFFFFFF,
const RenderPipeline* renderPipeline = nullptr);
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // DAWNNATIVE_METAL_UTILSMETAL_H_
diff --git a/src/dawn_native/metal/UtilsMetal.mm b/src/dawn_native/metal/UtilsMetal.mm
index 8d163ac..084c6a6 100644
--- a/src/dawn_native/metal/UtilsMetal.mm
+++ b/src/dawn_native/metal/UtilsMetal.mm
@@ -19,7 +19,7 @@
#include "common/Assert.h"
-namespace dawn_native::metal {
+namespace dawn::native::metal {
MTLCompareFunction ToMetalCompareFunction(wgpu::CompareFunction compareFunction) {
switch (compareFunction) {
@@ -287,4 +287,4 @@
return {};
}
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
diff --git a/src/dawn_native/null/DeviceNull.cpp b/src/dawn_native/null/DeviceNull.cpp
index 548426c..3259f44 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::null {
+namespace dawn::native::null {
// Implementation of pre-Device objects: the null adapter, null backend connection and Connect()
@@ -517,4 +517,4 @@
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 b25de26..9052cfd 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::null {
+namespace dawn::native::null {
class Adapter;
class BindGroup;
@@ -335,6 +335,6 @@
std::unique_ptr<uint8_t[]> 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 431e149..9e28695 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::null {
+namespace dawn::native::null {
DawnSwapChainImplementation CreateNativeSwapChainImpl() {
DawnSwapChainImplementation impl;
@@ -29,4 +29,4 @@
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 7726ed2..2d5901e 100644
--- a/src/dawn_native/opengl/BackendGL.cpp
+++ b/src/dawn_native/opengl/BackendGL.cpp
@@ -22,7 +22,7 @@
#include <cstring>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
namespace {
@@ -132,7 +132,7 @@
// AdapterBase Implementation
bool SupportsExternalImages() const override {
- // Via dawn_native::opengl::WrapExternalEGLImage
+ // Via dawn::native::opengl::WrapExternalEGLImage
return GetBackendType() == wgpu::BackendType::OpenGLES;
}
@@ -242,7 +242,7 @@
if (supportsS3TC && (supportsTextureSRGB || supportsS3TCSRGB) && supportsRGTC &&
supportsBPTC) {
- mSupportedFeatures.EnableFeature(dawn_native::Feature::TextureCompressionBC);
+ mSupportedFeatures.EnableFeature(dawn::native::Feature::TextureCompressionBC);
}
}
@@ -303,4 +303,4 @@
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 02db43f..9b925e4 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::opengl {
+namespace dawn::native::opengl {
class Backend : public BackendConnection {
public:
@@ -31,6 +31,6 @@
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 3c381f3..f4e4d1a 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::opengl {
+namespace dawn::native::opengl {
MaybeError ValidateGLBindGroupDescriptor(const BindGroupDescriptor* descriptor) {
const BindGroupLayoutBase::BindingMap& bindingMap = descriptor->layout->GetBindingMap();
@@ -62,4 +62,4 @@
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 6982c49..a4720489 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -36,6 +36,6 @@
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 df28bc4..bb14bec 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::opengl {
+namespace dawn::native::opengl {
BindGroupLayout::BindGroupLayout(DeviceBase* device,
const BindGroupLayoutDescriptor* descriptor,
@@ -34,4 +34,4 @@
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 7e1eb77..7e70eb0 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::opengl {
+namespace dawn::native::opengl {
class BindGroup;
class Device;
@@ -37,6 +37,6 @@
SlabAllocator<BindGroup> 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 5e7458e..294ea5e 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::opengl {
+namespace dawn::native::opengl {
// Buffer
@@ -181,4 +181,4 @@
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 32cf277..ef81ba7 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -53,6 +53,6 @@
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 ac1fa15..2601d61 100644
--- a/src/dawn_native/opengl/CommandBufferGL.cpp
+++ b/src/dawn_native/opengl/CommandBufferGL.cpp
@@ -34,7 +34,7 @@
#include <cstring>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
namespace {
@@ -1488,4 +1488,4 @@
}
}
-} // 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 0fd222b..2caf707 100644
--- a/src/dawn_native/opengl/CommandBufferGL.h
+++ b/src/dawn_native/opengl/CommandBufferGL.h
@@ -17,11 +17,11 @@
#include "dawn_native/CommandBuffer.h"
-namespace dawn_native {
+namespace dawn::native {
struct BeginRenderPassCmd;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
class Device;
struct OpenGLFunctions;
@@ -44,6 +44,6 @@
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 0c93f29..513972e 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::opengl {
+namespace dawn::native::opengl {
// static
Ref<ComputePipeline> ComputePipeline::CreateUninitialized(
@@ -42,4 +42,4 @@
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 060bd65..61b9ac3 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -41,6 +41,6 @@
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 a562cc6..438cb45 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::opengl {
+namespace dawn::native::opengl {
// static
ResultOrError<Ref<Device>> Device::Create(AdapterBase* adapter,
@@ -312,4 +312,4 @@
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 66cd785..a0aa597 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::opengl {
+namespace dawn::native::opengl {
class Device final : public DeviceBase {
public:
@@ -126,6 +126,6 @@
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 fcf6d2c..066bd2e 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::opengl {
+namespace dawn::native::opengl {
class Adapter;
class BindGroup;
@@ -61,6 +61,6 @@
return ToBackendBase<OpenGLBackendTraits>(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 4bab9e2..cc2cf49 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::opengl {
+namespace dawn::native::opengl {
GLFormatTable BuildGLFormatTable() {
GLFormatTable table;
@@ -117,4 +117,4 @@
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 b04fa5e..a6c3332 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -37,6 +37,6 @@
using GLFormatTable = std::array<GLFormat, kKnownFormatCount>;
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 03c9eb0..178e5d6 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::opengl {
+namespace dawn::native::opengl {
NativeSwapChainImpl::NativeSwapChainImpl(Device* device,
PresentCallback present,
@@ -85,4 +85,4 @@
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 ddf2b26..56a25ec 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -53,6 +53,6 @@
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 ca46537..727e36a 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::opengl {
+namespace dawn::native::opengl {
AdapterDiscoveryOptions::AdapterDiscoveryOptions()
: AdapterDiscoveryOptionsBase(WGPUBackendType_OpenGL) {
@@ -62,4 +62,4 @@
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 05e5014..d0d2e50 100644
--- a/src/dawn_native/opengl/OpenGLFunctions.cpp
+++ b/src/dawn_native/opengl/OpenGLFunctions.cpp
@@ -16,7 +16,7 @@
#include <cctype>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
MaybeError OpenGLFunctions::Initialize(GetProcAddress getProc) {
DAWN_TRY(mVersion.Initialize(getProc));
@@ -58,4 +58,4 @@
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 ff728a6..6b86735 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::opengl {
+namespace dawn::native::opengl {
struct OpenGLFunctions : OpenGLFunctionsBase {
public:
@@ -40,6 +40,6 @@
std::unordered_set<std::string> 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 a97ba5d..2c3eb8c 100644
--- a/src/dawn_native/opengl/OpenGLVersion.cpp
+++ b/src/dawn_native/opengl/OpenGLVersion.cpp
@@ -17,7 +17,7 @@
#include <cctype>
#include <tuple>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
MaybeError OpenGLVersion::Initialize(GetProcAddress getProc) {
PFNGLGETSTRINGPROC getString = reinterpret_cast<PFNGLGETSTRINGPROC>(getProc("glGetString"));
@@ -73,4 +73,4 @@
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 295e771..d489dae 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::opengl {
+namespace dawn::native::opengl {
struct OpenGLVersion {
public:
@@ -39,6 +39,6 @@
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 edbffd0..41daac5 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::opengl {
+namespace dawn::native::opengl {
void PersistentPipelineState::SetDefaultState(const OpenGLFunctions& gl) {
CallGLStencilFunc(gl);
@@ -55,4 +55,4 @@
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 553d07a..e17e060 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::opengl {
+namespace dawn::native::opengl {
struct OpenGLFunctions;
@@ -40,6 +40,6 @@
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 21f522c..80d1bf8 100644
--- a/src/dawn_native/opengl/PipelineGL.cpp
+++ b/src/dawn_native/opengl/PipelineGL.cpp
@@ -27,7 +27,7 @@
#include <set>
#include <sstream>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
namespace {
@@ -215,4 +215,4 @@
}
}
-} // 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 6199e6ec..7aef649 100644
--- a/src/dawn_native/opengl/PipelineGL.h
+++ b/src/dawn_native/opengl/PipelineGL.h
@@ -22,11 +22,11 @@
#include <vector>
-namespace dawn_native {
+namespace dawn::native {
struct ProgrammableStage;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
struct OpenGLFunctions;
class PipelineLayout;
@@ -64,6 +64,6 @@
Ref<Sampler> 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 9c8fffa..eb61df8 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::opengl {
+namespace dawn::native::opengl {
PipelineLayout::PipelineLayout(Device* device, const PipelineLayoutDescriptor* descriptor)
: PipelineLayoutBase(device, descriptor) {
@@ -92,4 +92,4 @@
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 2386fe2..3348770 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -45,6 +45,6 @@
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 3d701d4..8b41cc8 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::opengl {
+namespace dawn::native::opengl {
QuerySet::QuerySet(Device* device, const QuerySetDescriptor* descriptor)
: QuerySetBase(device, descriptor) {
@@ -24,4 +24,4 @@
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 0a39e8b..adfa039 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -29,6 +29,6 @@
~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 c9ecbb0..6bba686 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::opengl {
+namespace dawn::native::opengl {
Queue::Queue(Device* device) : QueueBase(device) {
}
@@ -77,4 +77,4 @@
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 2534297..f0d997d 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -37,6 +37,6 @@
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 fe04fcd..26b8521 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::opengl {
+namespace dawn::native::opengl {
namespace {
@@ -342,4 +342,4 @@
}
}
-} // 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 44d01a5..6c49143 100644
--- a/src/dawn_native/opengl/RenderPipelineGL.h
+++ b/src/dawn_native/opengl/RenderPipelineGL.h
@@ -22,7 +22,7 @@
#include <vector>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
class Device;
class PersistentPipelineState;
@@ -57,6 +57,6 @@
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 9e5435c0..942fd80 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::opengl {
+namespace dawn::native::opengl {
namespace {
GLenum MagFilterMode(wgpu::FilterMode filter) {
@@ -127,4 +127,4 @@
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 f8b21b9..1e5c597 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -43,6 +43,6 @@
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 6517502..fef2671 100644
--- a/src/dawn_native/opengl/ShaderModuleGL.cpp
+++ b/src/dawn_native/opengl/ShaderModuleGL.cpp
@@ -34,7 +34,7 @@
#include <sstream>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
std::string GetBindingName(BindGroupIndex group, BindingNumber bindingNumber) {
std::ostringstream o;
@@ -397,4 +397,4 @@
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 f3d5462..6cadf82 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::opengl {
+namespace dawn::native::opengl {
class Device;
class PipelineLayout;
@@ -70,6 +70,6 @@
BindingInfoArrayTable mGLBindings;
};
-} // namespace dawn_native::opengl
+} // namespace dawn::native::opengl
#endif // DAWNNATIVE_OPENGL_SHADERMODULEGL_H_
diff --git a/src/dawn_native/opengl/SpirvUtils.cpp b/src/dawn_native/opengl/SpirvUtils.cpp
index 6ce41ca..2864791 100644
--- a/src/dawn_native/opengl/SpirvUtils.cpp
+++ b/src/dawn_native/opengl/SpirvUtils.cpp
@@ -14,7 +14,7 @@
#include "dawn_native/opengl/SpirvUtils.h"
-namespace dawn_native {
+namespace dawn::native {
spv::ExecutionModel ShaderStageToExecutionModel(SingleShaderStage stage) {
switch (stage) {
@@ -176,4 +176,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/opengl/SpirvUtils.h b/src/dawn_native/opengl/SpirvUtils.h
index 844b0b7..15ea9c5 100644
--- a/src/dawn_native/opengl/SpirvUtils.h
+++ b/src/dawn_native/opengl/SpirvUtils.h
@@ -25,7 +25,7 @@
#include <spirv_cross.hpp>
-namespace dawn_native {
+namespace dawn::native {
// Returns the spirv_cross equivalent for this shader stage and vice-versa.
spv::ExecutionModel ShaderStageToExecutionModel(SingleShaderStage stage);
@@ -46,6 +46,6 @@
VertexFormatBaseType SpirvBaseTypeToVertexFormatBaseType(
spirv_cross::SPIRType::BaseType spirvBaseType);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_OPENGL_SPIRV_UTILS_H_
diff --git a/src/dawn_native/opengl/SwapChainGL.cpp b/src/dawn_native/opengl/SwapChainGL.cpp
index f8043a4..551569c 100644
--- a/src/dawn_native/opengl/SwapChainGL.cpp
+++ b/src/dawn_native/opengl/SwapChainGL.cpp
@@ -20,7 +20,7 @@
#include <dawn/dawn_wsi.h>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
SwapChain::SwapChain(Device* device, const SwapChainDescriptor* descriptor)
: OldSwapChainBase(device, descriptor) {
@@ -48,4 +48,4 @@
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 1868972..d0dda2d 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::opengl {
+namespace dawn::native::opengl {
class Device;
@@ -33,6 +33,6 @@
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 7c7cb9f..225fd9c 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::opengl {
+namespace dawn::native::opengl {
namespace {
@@ -467,7 +467,7 @@
}
size_t bufferSize = static_cast<size_t>(bufferSize64);
- dawn_native::BufferDescriptor descriptor = {};
+ dawn::native::BufferDescriptor descriptor = {};
descriptor.mappedAtCreation = true;
descriptor.usage = wgpu::BufferUsage::CopySrc;
descriptor.size = bufferSize;
@@ -577,4 +577,4 @@
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 f6deaf5..729df60 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::opengl {
+namespace dawn::native::opengl {
class Device;
struct GLFormat;
@@ -64,6 +64,6 @@
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 1dd7a69..a16cc4c 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::opengl {
+namespace dawn::native::opengl {
GLuint ToOpenGLCompareFunction(wgpu::CompareFunction compareFunction) {
switch (compareFunction) {
@@ -52,4 +52,4 @@
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 fe8a940..cd57a9e 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::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 3fb0549..7071661 100644
--- a/src/dawn_native/utils/WGPUHelpers.cpp
+++ b/src/dawn_native/utils/WGPUHelpers.cpp
@@ -31,7 +31,7 @@
#include <mutex>
#include <sstream>
-namespace dawn_native::utils {
+namespace dawn::native::utils {
ResultOrError<Ref<ShaderModuleBase>> CreateShaderModule(DeviceBase* device,
const char* source) {
@@ -189,4 +189,4 @@
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 0077059..8335d72 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::utils {
+namespace dawn::native::utils {
ResultOrError<Ref<ShaderModuleBase>> CreateShaderModule(DeviceBase* device, const char* source);
@@ -118,6 +118,6 @@
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 9ac789e..76c2033 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::vulkan {
+namespace dawn::native::vulkan {
Adapter::Adapter(InstanceBase* instance,
VulkanInstance* vulkanInstance,
@@ -340,7 +340,7 @@
}
bool Adapter::SupportsExternalImages() const {
- // Via dawn_native::vulkan::WrapVulkanImage
+ // Via dawn::native::vulkan::WrapVulkanImage
return external_memory::Service::CheckSupport(mDeviceInfo) &&
external_semaphore::Service::CheckSupport(mDeviceInfo, mPhysicalDevice,
mVulkanInstance->GetFunctions());
@@ -350,4 +350,4 @@
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 c61b70e..700c09e 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::vulkan {
+namespace dawn::native::vulkan {
class VulkanInstance;
@@ -54,6 +54,6 @@
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 24340b4..4378413 100644
--- a/src/dawn_native/vulkan/BackendVk.cpp
+++ b/src/dawn_native/vulkan/BackendVk.cpp
@@ -77,7 +77,7 @@
"SYNC_FRAGMENT_SHADER_SHADER_STORAGE_READ, read_barriers: VK_PIPELINE_STAGE_2_NONE_KHR, "},
};
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -444,4 +444,4 @@
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 2532e91..dd4a5da 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::vulkan {
+namespace dawn::native::vulkan {
enum class ICD {
None,
@@ -81,6 +81,6 @@
ityp::array<ICD, Ref<VulkanInstance>, 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 2641887..695301e 100644
--- a/src/dawn_native/vulkan/BindGroupLayoutVk.cpp
+++ b/src/dawn_native/vulkan/BindGroupLayoutVk.cpp
@@ -25,7 +25,7 @@
#include <map>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -196,4 +196,4 @@
reinterpret_cast<uint64_t&>(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 c144562..7ec7f08 100644
--- a/src/dawn_native/vulkan/BindGroupLayoutVk.h
+++ b/src/dawn_native/vulkan/BindGroupLayoutVk.h
@@ -22,7 +22,7 @@
#include <vector>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class BindGroup;
struct DescriptorSetAllocation;
@@ -75,6 +75,6 @@
Ref<DescriptorSetAllocator> 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 b415685..fca8d88 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::vulkan {
+namespace dawn::native::vulkan {
// static
ResultOrError<Ref<BindGroup>> BindGroup::Create(Device* device,
@@ -131,7 +131,7 @@
}
case BindingInfoType::ExternalTexture: {
- const std::array<Ref<dawn_native::TextureViewBase>, kMaxPlanesPerFormat>&
+ const std::array<Ref<dawn::native::TextureViewBase>, kMaxPlanesPerFormat>&
textureViews = GetBindingAsExternalTexture(bindingIndex)->GetTextureViews();
// Only single-plane formats are supported right now, so ensure only one view
@@ -177,4 +177,4 @@
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 95d2be0..6c85a85 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -50,6 +50,6 @@
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 8331dd2..794f226 100644
--- a/src/dawn_native/vulkan/BufferVk.cpp
+++ b/src/dawn_native/vulkan/BufferVk.cpp
@@ -24,7 +24,7 @@
#include <cstring>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -410,4 +410,4 @@
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 6dfe3c0..7c31692 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::vulkan {
+namespace dawn::native::vulkan {
struct CommandRecordingContext;
class Device;
@@ -77,6 +77,6 @@
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 8d73790..1783ffd 100644
--- a/src/dawn_native/vulkan/CommandBufferVk.cpp
+++ b/src/dawn_native/vulkan/CommandBufferVk.cpp
@@ -38,7 +38,7 @@
#include <algorithm>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -444,7 +444,7 @@
const Extent3D& copySize) {
ASSERT(srcCopy.texture->GetFormat().format == dstCopy.texture->GetFormat().format);
ASSERT(srcCopy.aspect == dstCopy.aspect);
- dawn_native::Format format = srcCopy.texture->GetFormat();
+ dawn::native::Format format = srcCopy.texture->GetFormat();
const TexelBlockInfo& blockInfo = format.GetAspectInfo(srcCopy.aspect).block;
ASSERT(copySize.width % blockInfo.width == 0);
uint32_t widthInBlocks = copySize.width / blockInfo.width;
@@ -1321,4 +1321,4 @@
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 53d604e..a9a6b46 100644
--- a/src/dawn_native/vulkan/CommandBufferVk.h
+++ b/src/dawn_native/vulkan/CommandBufferVk.h
@@ -20,12 +20,12 @@
#include "common/vulkan_platform.h"
-namespace dawn_native {
+namespace dawn::native {
struct BeginRenderPassCmd;
struct TextureCopy;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
struct CommandRecordingContext;
class Device;
@@ -50,6 +50,6 @@
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 ccd5a01..931540e 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::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 @@
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 7def0e1..6b2ae24 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::vulkan {
+namespace dawn::native::vulkan {
// static
Ref<ComputePipeline> ComputePipeline::CreateUninitialized(
@@ -113,4 +113,4 @@
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 3164bdf..c1b2884 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -48,6 +48,6 @@
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 0e49d34..a3221be 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::vulkan {
+namespace dawn::native::vulkan {
// Contains a descriptor set along with data necessary to track its allocation.
struct DescriptorSetAllocation {
@@ -26,6 +26,6 @@
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 47f68ad..c18d44a 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::vulkan {
+namespace dawn::native::vulkan {
// TODO(enga): Figure out this value.
static constexpr uint32_t kMaxDescriptorsPerPool = 512;
@@ -185,4 +185,4 @@
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 dfeba15..6fedcaa 100644
--- a/src/dawn_native/vulkan/DescriptorSetAllocator.h
+++ b/src/dawn_native/vulkan/DescriptorSetAllocator.h
@@ -25,7 +25,7 @@
#include <map>
#include <vector>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class BindGroupLayout;
@@ -71,6 +71,6 @@
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 2bce878..84dc1ee 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::vulkan {
+namespace dawn::native::vulkan {
// static
ResultOrError<Ref<Device>> Device::Create(Adapter* adapter,
@@ -1015,4 +1015,4 @@
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 5bdb6d9..9d90311 100644
--- a/src/dawn_native/vulkan/DeviceVk.h
+++ b/src/dawn_native/vulkan/DeviceVk.h
@@ -32,7 +32,7 @@
#include <memory>
#include <queue>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Adapter;
class BindGroupLayout;
@@ -208,6 +208,6 @@
std::vector<VkSemaphore>* 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 84e672c..e87da41 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::vulkan {
+namespace dawn::native::vulkan {
#if DAWN_PLATFORM_LINUX
// File descriptor
@@ -21,6 +21,6 @@
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 9607a47..03a158c 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::vulkan {
+namespace dawn::native::vulkan {
FencedDeleter::FencedDeleter(Device* device) : mDevice(device) {
}
@@ -180,4 +180,4 @@
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 a137d49..cc9e572 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -65,6 +65,6 @@
SerialQueue<ExecutionSerial, VkSwapchainKHR> 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 bc34458..d01e40d 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::vulkan {
+namespace dawn::native::vulkan {
class Adapter;
class BindGroup;
@@ -64,6 +64,6 @@
return ToBackendBase<VulkanBackendTraits>(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 8b7cc55..4182333 100644
--- a/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp
+++ b/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp
@@ -20,7 +20,7 @@
#include <limits>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -222,4 +222,4 @@
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 b908fd9..7af843f 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -66,6 +66,6 @@
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 6a34c23..64f9ef8 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::vulkan {
+namespace dawn::native::vulkan {
// static
ResultOrError<Ref<PipelineLayout>> PipelineLayout::Create(
@@ -81,4 +81,4 @@
reinterpret_cast<uint64_t&>(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 86a1caf..894084e 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -45,6 +45,6 @@
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 f8373ba..975f323 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::vulkan {
+namespace dawn::native::vulkan {
namespace {
VkQueryType VulkanQueryType(wgpu::QueryType type) {
@@ -114,4 +114,4 @@
reinterpret_cast<uint64_t&>(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 9632d6e..a4cd898 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -42,6 +42,6 @@
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 79f2973..c59f22c 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::vulkan {
+namespace dawn::native::vulkan {
// static
Queue* Queue::Create(Device* device) {
@@ -56,4 +56,4 @@
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 effc6ad..5cf000c 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -33,6 +33,6 @@
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 091a574..20fefe8 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::vulkan {
+namespace dawn::native::vulkan {
namespace {
VkAttachmentLoadOp VulkanAttachmentLoadOp(wgpu::LoadOp op) {
@@ -291,4 +291,4 @@
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 400c575..08c55c3 100644
--- a/src/dawn_native/vulkan/RenderPassCache.h
+++ b/src/dawn_native/vulkan/RenderPassCache.h
@@ -28,7 +28,7 @@
#include <mutex>
#include <unordered_map>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -101,6 +101,6 @@
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 2f19386..f38766a 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::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -360,11 +360,11 @@
shaderStage.pName = programmableStage.entryPoint.c_str();
switch (stage) {
- case dawn_native::SingleShaderStage::Vertex: {
+ case dawn::native::SingleShaderStage::Vertex: {
shaderStage.stage = VK_SHADER_STAGE_VERTEX_BIT;
break;
}
- case dawn_native::SingleShaderStage::Fragment: {
+ case dawn::native::SingleShaderStage::Fragment: {
shaderStage.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
break;
}
@@ -624,4 +624,4 @@
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 810041a..f47e239 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -54,6 +54,6 @@
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 c0af2d3..8e07030 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::vulkan {
+namespace dawn::native::vulkan {
ResourceHeap::ResourceHeap(VkDeviceMemory memory, size_t memoryType)
: mMemory(memory), mMemoryType(memoryType) {
@@ -28,4 +28,4 @@
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 b87600b..318f5f7 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::vulkan {
+namespace dawn::native::vulkan {
// Wrapper for physical memory used with or without a resource object.
class ResourceHeap : public ResourceHeapBase {
@@ -34,6 +34,6 @@
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 abfd3aa..3e8d55e 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::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -289,4 +289,4 @@
}
}
-} // 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 788ea1c..f77cc48 100644
--- a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h
+++ b/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h
@@ -25,7 +25,7 @@
#include <memory>
#include <vector>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -61,6 +61,6 @@
SerialQueue<ExecutionSerial, ResourceMemoryAllocation> 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 0885d55..9b02204 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::vulkan {
+namespace dawn::native::vulkan {
namespace {
VkSamplerAddressMode VulkanSamplerAddressMode(wgpu::AddressMode mode) {
@@ -128,4 +128,4 @@
reinterpret_cast<uint64_t&>(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 e3aea2c..1367967 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -43,6 +43,6 @@
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 53d8f3e..79dba89 100644
--- a/src/dawn_native/vulkan/ShaderModuleVk.cpp
+++ b/src/dawn_native/vulkan/ShaderModuleVk.cpp
@@ -26,7 +26,7 @@
#include <tint/tint.h>
#include <spirv-tools/libspirv.hpp>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
ShaderModule::ConcurrentTransformedShaderModuleCache::ConcurrentTransformedShaderModuleCache(
Device* device)
@@ -200,4 +200,4 @@
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 d91b8f0..862f30a 100644
--- a/src/dawn_native/vulkan/ShaderModuleVk.h
+++ b/src/dawn_native/vulkan/ShaderModuleVk.h
@@ -22,7 +22,7 @@
#include <mutex>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Device;
class PipelineLayout;
@@ -62,6 +62,6 @@
std::unique_ptr<ConcurrentTransformedShaderModuleCache> 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 d8cbb88..58920c9 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::vulkan {
+namespace dawn::native::vulkan {
StagingBuffer::StagingBuffer(size_t size, Device* device)
: StagingBufferBase(size), mDevice(device) {
@@ -74,4 +74,4 @@
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 477bed5..ed6f6c6 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -37,6 +37,6 @@
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 8cf6cff..020719f 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::vulkan {
+namespace dawn::native::vulkan {
// OldSwapChain
@@ -259,7 +259,7 @@
DAWN_INVALID_IF(previousInstance != ToBackend(GetDevice())->GetVkInstance(),
"Vulkan SwapChain cannot switch between Vulkan instances.");
- // The previous swapchain is a dawn_native::vulkan::SwapChain so we can reuse its
+ // The previous swapchain is a dawn::native::vulkan::SwapChain so we can reuse its
// VkSurfaceKHR provided since they are on the same instance.
std::swap(previousVulkanSwapChain->mVkSurface, mVkSurface);
@@ -661,4 +661,4 @@
}
}
-} // 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 c85aa32..2becbe9 100644
--- a/src/dawn_native/vulkan/SwapChainVk.h
+++ b/src/dawn_native/vulkan/SwapChainVk.h
@@ -21,7 +21,7 @@
#include <vector>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Device;
class Texture;
@@ -93,6 +93,6 @@
Ref<Texture> 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 3fc2b85..83982e8 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::vulkan {
+namespace dawn::native::vulkan {
namespace {
// Converts an Dawn texture dimension to a Vulkan image view type.
@@ -577,7 +577,7 @@
return {};
}
- bool IsSampleCountSupported(const dawn_native::vulkan::Device* device,
+ bool IsSampleCountSupported(const dawn::native::vulkan::Device* device,
const VkImageCreateInfo& imageCreateInfo) {
ASSERT(device);
@@ -1364,4 +1364,4 @@
reinterpret_cast<uint64_t&>(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 d339e99c..a2a8f70 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::vulkan {
+namespace dawn::native::vulkan {
struct CommandRecordingContext;
class Device;
@@ -37,7 +37,7 @@
MaybeError ValidateVulkanImageCanBeWrapped(const DeviceBase* device,
const TextureDescriptor* descriptor);
- bool IsSampleCountSupported(const dawn_native::vulkan::Device* device,
+ bool IsSampleCountSupported(const dawn::native::vulkan::Device* device,
const VkImageCreateInfo& imageCreateInfo);
class Texture final : public TextureBase {
@@ -197,6 +197,6 @@
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 5109534..bc2adee 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::vulkan {
+namespace dawn::native::vulkan {
VkCompareOp ToVulkanCompareOp(wgpu::CompareFunction op) {
switch (op) {
@@ -261,4 +261,4 @@
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 f91c782..1b5013c 100644
--- a/src/dawn_native/vulkan/UtilsVulkan.h
+++ b/src/dawn_native/vulkan/UtilsVulkan.h
@@ -19,12 +19,12 @@
#include "dawn_native/Commands.h"
#include "dawn_native/dawn_platform.h"
-namespace dawn_native {
+namespace dawn::native {
struct ProgrammableStage;
union OverridableConstantScalar;
-} // namespace dawn_native
+} // namespace dawn::native
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Device;
@@ -116,6 +116,6 @@
std::vector<OverridableConstantScalar>* specializationDataEntries,
std::vector<VkSpecializationMapEntry>* 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 658e8fd..f15cb8a 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::vulkan {
+namespace dawn::native::vulkan {
VkInstance GetInstance(WGPUDevice device) {
Device* backendDevice = ToBackend(FromAPI(device));
@@ -126,4 +126,4 @@
#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 9b58d16..8a84bc8 100644
--- a/src/dawn_native/vulkan/VulkanError.cpp
+++ b/src/dawn_native/vulkan/VulkanError.cpp
@@ -16,7 +16,7 @@
#include <string>
-namespace dawn_native::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::vulkan
+} // namespace dawn::native::vulkan
diff --git a/src/dawn_native/vulkan/VulkanError.h b/src/dawn_native/vulkan/VulkanError.h
index 0d7ee5f..885aae2 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<VkResult>(VK_RESULT_MAX_ENUM - 1);
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
// Returns a string version of the result.
const char* VkResultAsString(::VkResult result);
@@ -34,17 +34,17 @@
//
// DAWN_TRY(CheckVkSuccess(vkDoSomething, "doing something"));
#define CheckVkSuccess(resultIn, contextIn) \
- ::dawn_native::vulkan::CheckVkSuccessImpl( \
- ::dawn_native::vulkan::VkResult::WrapUnsafe( \
+ ::dawn::native::vulkan::CheckVkSuccessImpl( \
+ ::dawn::native::vulkan::VkResult::WrapUnsafe( \
INJECT_ERROR_OR_RUN(resultIn, VK_FAKE_ERROR_FOR_TESTING)), \
contextIn)
#define CheckVkOOMThenSuccess(resultIn, contextIn) \
- ::dawn_native::vulkan::CheckVkOOMThenSuccessImpl( \
- ::dawn_native::vulkan::VkResult::WrapUnsafe(INJECT_ERROR_OR_RUN( \
+ ::dawn::native::vulkan::CheckVkOOMThenSuccessImpl( \
+ ::dawn::native::vulkan::VkResult::WrapUnsafe(INJECT_ERROR_OR_RUN( \
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 96b1e50..660b564 100644
--- a/src/dawn_native/vulkan/VulkanExtensions.cpp
+++ b/src/dawn_native/vulkan/VulkanExtensions.cpp
@@ -20,7 +20,7 @@
#include <array>
#include <limits>
-namespace dawn_native::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 @@
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 dd59747..caf2280 100644
--- a/src/dawn_native/vulkan/VulkanExtensions.h
+++ b/src/dawn_native/vulkan/VulkanExtensions.h
@@ -19,7 +19,7 @@
#include <unordered_map>
-namespace dawn_native::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 @@
// Returns a map that maps a Vulkan layer name to its VulkanLayer.
std::unordered_map<std::string, VulkanLayer> 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 99c9acd..7146e0a 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::vulkan {
+namespace dawn::native::vulkan {
#define GET_GLOBAL_PROC(name) \
do { \
@@ -329,4 +329,4 @@
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 a677cd2..41938c6 100644
--- a/src/dawn_native/vulkan/VulkanFunctions.h
+++ b/src/dawn_native/vulkan/VulkanFunctions.h
@@ -21,7 +21,7 @@
class DynamicLib;
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
struct VulkanGlobalInfo;
struct VulkanDeviceInfo;
@@ -299,7 +299,7 @@
#endif
};
- // Create a wrapper around VkResult in the dawn_native::vulkan namespace. This shadows the
+ // Create a wrapper around VkResult in the dawn::native::vulkan namespace. This shadows the
// default VkResult (::VkResult). This ensures that assigning or creating a VkResult from a raw
// ::VkResult uses WrapUnsafe. This makes it clear that users of VkResult must be intentional
// about handling error cases.
@@ -321,6 +321,6 @@
::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 c3883cd..202d6d1 100644
--- a/src/dawn_native/vulkan/VulkanInfo.cpp
+++ b/src/dawn_native/vulkan/VulkanInfo.cpp
@@ -21,12 +21,12 @@
#include <cstring>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
ResultOrError<InstanceExtSet> GatherInstanceExtensions(
const char* layerName,
- const dawn_native::vulkan::VulkanFunctions& vkFunctions,
+ const dawn::native::vulkan::VulkanFunctions& vkFunctions,
const std::unordered_map<std::string, InstanceExt>& knownExts) {
uint32_t count = 0;
VkResult vkResult = VkResult::WrapUnsafe(
@@ -331,4 +331,4 @@
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 83fd137..1d466f7 100644
--- a/src/dawn_native/vulkan/VulkanInfo.h
+++ b/src/dawn_native/vulkan/VulkanInfo.h
@@ -22,7 +22,7 @@
#include <vector>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
class Adapter;
class Backend;
@@ -84,6 +84,6 @@
ResultOrError<VulkanDeviceInfo> GatherDeviceInfo(const Adapter& adapter);
ResultOrError<VulkanSurfaceInfo> 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 3e8ae3e..89254f0 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
struct VulkanDeviceInfo;
-} // namespace dawn_native::vulkan
+} // namespace dawn::native::vulkan
-namespace dawn_native { namespace vulkan::external_memory {
+namespace dawn::native { namespace vulkan::external_memory {
struct MemoryImportParams {
VkDeviceSize allocationSize;
@@ -73,6 +73,6 @@
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 3317b43..2bf8874 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::external_memory {
+namespace dawn::native { namespace vulkan::external_memory {
namespace {
@@ -354,4 +354,4 @@
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 aefe550..081cd21 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::external_memory {
+namespace dawn::native { namespace vulkan::external_memory {
Service::Service(Device* device) : mDevice(device) {
DAWN_UNUSED(mDevice);
@@ -62,4 +62,4 @@
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 0222833..e8762d2 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::external_memory {
+namespace dawn::native { namespace vulkan::external_memory {
Service::Service(Device* device)
: mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) {
@@ -153,4 +153,4 @@
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 7c37135..2966144 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::external_memory {
+namespace dawn::native { namespace vulkan::external_memory {
Service::Service(Device* device)
: mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) {
@@ -155,4 +155,4 @@
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 5824c52..58cc8e9 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::vulkan {
+namespace dawn::native::vulkan {
class Device;
-} // namespace dawn_native::vulkan
+} // namespace dawn::native::vulkan
-namespace dawn_native { namespace vulkan::external_semaphore {
+namespace dawn::native { namespace vulkan::external_semaphore {
class Service {
public:
@@ -55,6 +55,6 @@
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 58c6f96..d7038bc 100644
--- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp
+++ b/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp
@@ -25,7 +25,7 @@
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
#endif // defined(DAWN_USE_SYNC_FDS)
-namespace dawn_native { namespace vulkan::external_semaphore {
+namespace dawn::native { namespace vulkan::external_semaphore {
Service::Service(Device* device)
: mDevice(device),
@@ -134,4 +134,4 @@
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 8c99da1..b3c7a60 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::external_semaphore {
+namespace dawn::native { namespace vulkan::external_semaphore {
Service::Service(Device* device) : mDevice(device) {
DAWN_UNUSED(mDevice);
@@ -47,4 +47,4 @@
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 35c2b2b..bc069dc 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::external_semaphore {
+namespace dawn::native { namespace vulkan::external_semaphore {
Service::Service(Device* device)
: mDevice(device),
@@ -132,4 +132,4 @@
return handle;
}
-}} // namespace dawn_native::vulkan::external_semaphore
+}} // namespace dawn::native::vulkan::external_semaphore
diff --git a/src/dawn_native/webgpu_absl_format.cpp b/src/dawn_native/webgpu_absl_format.cpp
index 465fd2c..f112b9f 100644
--- a/src/dawn_native/webgpu_absl_format.cpp
+++ b/src/dawn_native/webgpu_absl_format.cpp
@@ -18,7 +18,7 @@
#include "dawn_native/ObjectBase.h"
#include "dawn_native/Texture.h"
-namespace dawn_native {
+namespace dawn::native {
//
// Structs
@@ -130,4 +130,4 @@
return {true};
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/dawn_native/webgpu_absl_format.h b/src/dawn_native/webgpu_absl_format.h
index 340e106..21e4312 100644
--- a/src/dawn_native/webgpu_absl_format.h
+++ b/src/dawn_native/webgpu_absl_format.h
@@ -19,7 +19,7 @@
#include "dawn_native/dawn_platform.h"
#include "dawn_native/webgpu_absl_format_autogen.h"
-namespace dawn_native {
+namespace dawn::native {
//
// Structs
@@ -67,6 +67,6 @@
const absl::FormatConversionSpec& spec,
absl::FormatSink* s);
-} // namespace dawn_native
+} // namespace dawn::native
#endif // DAWNNATIVE_WEBGPUABSLFORMAT_H_
diff --git a/src/dawn_node/Module.cpp b/src/dawn_node/Module.cpp
index 96fce3f..4f07c4d 100644
--- a/src/dawn_node/Module.cpp
+++ b/src/dawn_node/Module.cpp
@@ -51,7 +51,7 @@
// object.
Napi::Object Initialize(Napi::Env env, Napi::Object exports) {
// Begin by setting the Dawn procedure function pointers.
- dawnProcSetProcs(&dawn_native::GetProcs());
+ dawnProcSetProcs(&dawn::native::GetProcs());
// Register all the interop types
wgpu::interop::Initialize(env);
diff --git a/src/dawn_node/binding/GPU.cpp b/src/dawn_node/binding/GPU.cpp
index c123c1e..4e18a91 100644
--- a/src/dawn_node/binding/GPU.cpp
+++ b/src/dawn_node/binding/GPU.cpp
@@ -59,7 +59,7 @@
GPU::GPU(Flags flags) : flags_(std::move(flags)) {
// TODO: Disable in 'release'
instance_.EnableBackendValidation(true);
- instance_.SetBackendValidationLevel(dawn_native::BackendValidationLevel::Full);
+ instance_.SetBackendValidationLevel(dawn::native::BackendValidationLevel::Full);
// Setting the DllDir changes where we load adapter DLLs from (e.g. d3dcompiler_47.dll)
if (auto dir = flags_.Get("dlldir")) {
diff --git a/src/dawn_node/binding/GPU.h b/src/dawn_node/binding/GPU.h
index e526403..c840b95 100644
--- a/src/dawn_node/binding/GPU.h
+++ b/src/dawn_node/binding/GPU.h
@@ -22,7 +22,7 @@
#include "src/dawn_node/interop/WebGPU.h"
namespace wgpu::binding {
- // GPU is an implementation of interop::GPU that wraps a dawn_native::Instance.
+ // GPU is an implementation of interop::GPU that wraps a dawn::native::Instance.
class GPU final : public interop::GPU {
public:
GPU(Flags flags);
@@ -34,7 +34,7 @@
private:
const Flags flags_;
- dawn_native::Instance instance_;
+ dawn::native::Instance instance_;
};
} // namespace wgpu::binding
diff --git a/src/dawn_node/binding/GPUAdapter.cpp b/src/dawn_node/binding/GPUAdapter.cpp
index 44c70d4..e91fb89 100644
--- a/src/dawn_node/binding/GPUAdapter.cpp
+++ b/src/dawn_node/binding/GPUAdapter.cpp
@@ -117,7 +117,7 @@
// wgpu::bindings::GPUAdapter
// TODO(crbug.com/dawn/1133): This is a stub implementation. Properly implement.
////////////////////////////////////////////////////////////////////////////////
- GPUAdapter::GPUAdapter(dawn_native::Adapter a, const Flags& flags)
+ GPUAdapter::GPUAdapter(dawn::native::Adapter a, const Flags& flags)
: adapter_(a), flags_(flags) {
}
diff --git a/src/dawn_node/binding/GPUAdapter.h b/src/dawn_node/binding/GPUAdapter.h
index a54cd0b..3bcd7d34 100644
--- a/src/dawn_node/binding/GPUAdapter.h
+++ b/src/dawn_node/binding/GPUAdapter.h
@@ -23,10 +23,10 @@
namespace wgpu::binding {
class Flags;
- // GPUAdapter is an implementation of interop::GPUAdapter that wraps a dawn_native::Adapter.
+ // GPUAdapter is an implementation of interop::GPUAdapter that wraps a dawn::native::Adapter.
class GPUAdapter final : public interop::GPUAdapter {
public:
- GPUAdapter(dawn_native::Adapter a, const Flags& flags);
+ GPUAdapter(dawn::native::Adapter a, const Flags& flags);
// interop::GPUAdapter interface compliance
std::string getName(Napi::Env) override;
@@ -38,7 +38,7 @@
interop::GPUDeviceDescriptor descriptor) override;
private:
- dawn_native::Adapter adapter_;
+ dawn::native::Adapter adapter_;
const Flags& flags_;
};
diff --git a/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp b/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp
index 7921136..f170e04 100644
--- a/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp
@@ -24,11 +24,11 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return DawnWireServerFuzzer::Run(
data, size,
- [](dawn_native::Instance* instance) {
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
+ [](dawn::native::Instance* instance) {
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
wgpu::Device device;
- for (dawn_native::Adapter adapter : adapters) {
+ for (dawn::native::Adapter adapter : adapters) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
diff --git a/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp b/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp
index f41b8cb..0a6f3f0 100644
--- a/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp
@@ -25,11 +25,11 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return DawnWireServerFuzzer::Run(
data, size,
- [](dawn_native::Instance* instance) {
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
+ [](dawn::native::Instance* instance) {
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
wgpu::Device nullDevice;
- for (dawn_native::Adapter adapter : adapters) {
+ for (dawn::native::Adapter adapter : adapters) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
diff --git a/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp b/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp
index b23b132..6a0e951 100644
--- a/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp
@@ -24,11 +24,11 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return DawnWireServerFuzzer::Run(
data, size,
- [](dawn_native::Instance* instance) {
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
+ [](dawn::native::Instance* instance) {
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
wgpu::Device device;
- for (dawn_native::Adapter adapter : adapters) {
+ for (dawn::native::Adapter adapter : adapters) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
diff --git a/src/fuzzers/DawnWireServerFuzzer.cpp b/src/fuzzers/DawnWireServerFuzzer.cpp
index e514304..367d79a 100644
--- a/src/fuzzers/DawnWireServerFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerFuzzer.cpp
@@ -48,7 +48,7 @@
std::vector<char> buf;
};
- std::unique_ptr<dawn_native::Instance> sInstance;
+ std::unique_ptr<dawn::native::Instance> sInstance;
WGPUProcDeviceCreateSwapChain sOriginalDeviceCreateSwapChain = nullptr;
bool sCommandsComplete = false;
@@ -68,7 +68,7 @@
// TODO(crbug.com/1038952): The Instance must be static because destructing the vkInstance with
// Swiftshader crashes libFuzzer. When this is fixed, move this into Run so that error injection
// for adapter discovery can be fuzzed.
- sInstance = std::make_unique<dawn_native::Instance>();
+ sInstance = std::make_unique<dawn::native::Instance>();
sInstance->DiscoverDefaultAdapters();
return 0;
@@ -89,15 +89,15 @@
size -= sizeof(uint64_t);
if (supportsErrorInjection) {
- dawn_native::EnableErrorInjector();
+ dawn::native::EnableErrorInjector();
// Clear the error injector since it has the previous run's call counts.
- dawn_native::ClearErrorInjector();
+ dawn::native::ClearErrorInjector();
- dawn_native::InjectErrorAt(injectedErrorIndex);
+ dawn::native::InjectErrorAt(injectedErrorIndex);
}
- DawnProcTable procs = dawn_native::GetProcs();
+ DawnProcTable procs = dawn::native::GetProcs();
// Swapchains receive a pointer to an implementation. The fuzzer will pass garbage in so we
// intercept calls to create swapchains and make sure they always return error swapchains.
diff --git a/src/fuzzers/DawnWireServerFuzzer.h b/src/fuzzers/DawnWireServerFuzzer.h
index c2e1767..83b6d3a 100644
--- a/src/fuzzers/DawnWireServerFuzzer.h
+++ b/src/fuzzers/DawnWireServerFuzzer.h
@@ -17,15 +17,15 @@
#include <cstdint>
#include <functional>
-namespace dawn_native {
+namespace dawn::native {
class Instance;
-} // namespace dawn_native
+} // namespace dawn::native
namespace DawnWireServerFuzzer {
- using MakeDeviceFn = std::function<wgpu::Device(dawn_native::Instance*)>;
+ using MakeDeviceFn = std::function<wgpu::Device(dawn::native::Instance*)>;
int Initialize(int* argc, char*** argv);
diff --git a/src/include/dawn_native/D3D12Backend.h b/src/include/dawn_native/D3D12Backend.h
index d614b16..afb389b 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::d3d12 {
+namespace dawn::native::d3d12 {
class D3D11on12ResourceCache;
@@ -106,6 +106,6 @@
Microsoft::WRL::ComPtr<IDXGIAdapter> dxgiAdapter;
};
-} // namespace dawn_native::d3d12
+} // namespace dawn::native::d3d12
#endif // DAWNNATIVE_D3D12BACKEND_H_
diff --git a/src/include/dawn_native/DawnNative.h b/src/include/dawn_native/DawnNative.h
index 82df688..e8a6e13 100644
--- a/src/include/dawn_native/DawnNative.h
+++ b/src/include/dawn_native/DawnNative.h
@@ -31,7 +31,7 @@
struct DeviceDescriptor;
}
-namespace dawn_native {
+namespace dawn::native {
class InstanceBase;
class AdapterBase;
@@ -247,6 +247,9 @@
DAWN_NATIVE_EXPORT bool BindGroupLayoutBindingsEqualForTesting(WGPUBindGroupLayout a,
WGPUBindGroupLayout b);
-} // namespace dawn_native
+} // namespace dawn::native
+
+// TODO(dawn:824): Remove once the deprecation period is passed.
+namespace dawn_native = dawn::native;
#endif // DAWNNATIVE_DAWNNATIVE_H_
diff --git a/src/include/dawn_native/MetalBackend.h b/src/include/dawn_native/MetalBackend.h
index a8c1106..17e304e 100644
--- a/src/include/dawn_native/MetalBackend.h
+++ b/src/include/dawn_native/MetalBackend.h
@@ -32,7 +32,7 @@
# import <Metal/Metal.h>
#endif //__OBJC__
-namespace dawn_native::metal {
+namespace dawn::native::metal {
struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase {
AdapterDiscoveryOptions();
@@ -56,14 +56,14 @@
// scheduled could lead to races in who gets scheduled first and incorrect rendering.
DAWN_NATIVE_EXPORT void WaitForCommandsToBeScheduled(WGPUDevice device);
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#ifdef __OBJC__
-namespace dawn_native::metal {
+namespace dawn::native::metal {
DAWN_NATIVE_EXPORT id<MTLDevice> GetMetalDevice(WGPUDevice device);
-} // namespace dawn_native::metal
+} // namespace dawn::native::metal
#endif // __OBJC__
#pragma clang diagnostic pop
diff --git a/src/include/dawn_native/NullBackend.h b/src/include/dawn_native/NullBackend.h
index 02f8b95..a3928b8 100644
--- a/src/include/dawn_native/NullBackend.h
+++ b/src/include/dawn_native/NullBackend.h
@@ -18,8 +18,8 @@
#include <dawn/dawn_wsi.h>
#include <dawn_native/DawnNative.h>
-namespace dawn_native::null {
+namespace dawn::native::null {
DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl();
-} // namespace dawn_native::null
+} // namespace dawn::native::null
#endif // DAWNNATIVE_NULLBACKEND_H_
diff --git a/src/include/dawn_native/OpenGLBackend.h b/src/include/dawn_native/OpenGLBackend.h
index d8d4afd..5aaa723 100644
--- a/src/include/dawn_native/OpenGLBackend.h
+++ b/src/include/dawn_native/OpenGLBackend.h
@@ -20,7 +20,7 @@
#include <dawn/dawn_wsi.h>
#include <dawn_native/DawnNative.h>
-namespace dawn_native::opengl {
+namespace dawn::native::opengl {
struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase {
AdapterDiscoveryOptions();
@@ -50,6 +50,6 @@
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 4c8cfb5..756ae4a 100644
--- a/src/include/dawn_native/VulkanBackend.h
+++ b/src/include/dawn_native/VulkanBackend.h
@@ -22,7 +22,7 @@
#include <vector>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device);
@@ -135,6 +135,6 @@
VkImageLayout desiredLayout,
ExternalImageExportInfoVk* info);
-} // namespace dawn_native::vulkan
+} // namespace dawn::native::vulkan
#endif // DAWNNATIVE_VULKANBACKEND_H_
diff --git a/src/tests/DawnNativeTest.cpp b/src/tests/DawnNativeTest.cpp
index 20d7146..7532dfd 100644
--- a/src/tests/DawnNativeTest.cpp
+++ b/src/tests/DawnNativeTest.cpp
@@ -19,7 +19,7 @@
#include "dawn/dawn_proc.h"
#include "dawn_native/ErrorData.h"
-namespace dawn_native {
+namespace dawn::native {
void AddFatalDawnFailure(const char* expression, const ErrorData* error) {
const auto& backtrace = error->GetBacktrace();
@@ -29,10 +29,10 @@
::testing::TestPartResult::kFatalFailure);
}
-} // namespace dawn_native
+} // namespace dawn::native
DawnNativeTest::DawnNativeTest() {
- dawnProcSetProcs(&dawn_native::GetProcs());
+ dawnProcSetProcs(&dawn::native::GetProcs());
}
DawnNativeTest::~DawnNativeTest() {
@@ -41,10 +41,10 @@
}
void DawnNativeTest::SetUp() {
- instance = std::make_unique<dawn_native::Instance>();
+ instance = std::make_unique<dawn::native::Instance>();
instance->DiscoverDefaultAdapters();
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
// DawnNative unittests run against the null backend, find the corresponding adapter
bool foundNullAdapter = false;
diff --git a/src/tests/DawnNativeTest.h b/src/tests/DawnNativeTest.h
index 91904a3..ab44e39 100644
--- a/src/tests/DawnNativeTest.h
+++ b/src/tests/DawnNativeTest.h
@@ -21,7 +21,7 @@
#include "dawn_native/DawnNative.h"
#include "dawn_native/ErrorData.h"
-namespace dawn_native {
+namespace dawn::native {
// This is similar to DAWN_TRY_ASSIGN but produces a fatal GTest error if EXPR is an error.
#define DAWN_ASSERT_AND_ASSIGN(VAR, EXPR) \
@@ -29,7 +29,7 @@
void AddFatalDawnFailure(const char* expression, const ErrorData* error);
-} // namespace dawn_native
+} // namespace dawn::native
class DawnNativeTest : public ::testing::Test {
public:
@@ -42,8 +42,8 @@
virtual WGPUDevice CreateTestDevice();
protected:
- std::unique_ptr<dawn_native::Instance> instance;
- dawn_native::Adapter adapter;
+ std::unique_ptr<dawn::native::Instance> instance;
+ dawn::native::Adapter adapter;
wgpu::Device device;
private:
diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp
index 4102c0f..5189592 100644
--- a/src/tests/DawnTest.cpp
+++ b/src/tests/DawnTest.cpp
@@ -234,7 +234,7 @@
DawnTestEnvironment::DawnTestEnvironment(int argc, char** argv) {
ParseArgs(argc, argv);
- if (mBackendValidationLevel != dawn_native::BackendValidationLevel::Disabled) {
+ if (mBackendValidationLevel != dawn::native::BackendValidationLevel::Disabled) {
mPlatformDebugLogger =
std::unique_ptr<utils::PlatformDebugLogger>(utils::CreatePlatformDebugLogger());
}
@@ -245,7 +245,7 @@
// because the Vulkan validation layers use static global mutexes which behave badly when
// Chromium's test launcher forks the test process. The instance will be recreated on test
// environment setup.
- std::unique_ptr<dawn_native::Instance> instance = CreateInstanceAndDiscoverAdapters();
+ std::unique_ptr<dawn::native::Instance> instance = CreateInstanceAndDiscoverAdapters();
ASSERT(instance);
SelectPreferredAdapterProperties(instance.get());
@@ -273,17 +273,17 @@
const char* level = argv[i] + argLen;
if (level[0] != '\0') {
if (strcmp(level, "=full") == 0) {
- mBackendValidationLevel = dawn_native::BackendValidationLevel::Full;
+ mBackendValidationLevel = dawn::native::BackendValidationLevel::Full;
} else if (strcmp(level, "=partial") == 0) {
- mBackendValidationLevel = dawn_native::BackendValidationLevel::Partial;
+ mBackendValidationLevel = dawn::native::BackendValidationLevel::Partial;
} else if (strcmp(level, "=disabled") == 0) {
- mBackendValidationLevel = dawn_native::BackendValidationLevel::Disabled;
+ mBackendValidationLevel = dawn::native::BackendValidationLevel::Disabled;
} else {
dawn::ErrorLog() << "Invalid backend validation level" << level;
UNREACHABLE();
}
} else {
- mBackendValidationLevel = dawn_native::BackendValidationLevel::Partial;
+ mBackendValidationLevel = dawn::native::BackendValidationLevel::Partial;
}
continue;
}
@@ -410,8 +410,8 @@
}
}
-std::unique_ptr<dawn_native::Instance> DawnTestEnvironment::CreateInstanceAndDiscoverAdapters() {
- auto instance = std::make_unique<dawn_native::Instance>();
+std::unique_ptr<dawn::native::Instance> DawnTestEnvironment::CreateInstanceAndDiscoverAdapters() {
+ auto instance = std::make_unique<dawn::native::Instance>();
instance->EnableBeginCaptureOnStartup(mBeginCaptureOnStartup);
instance->SetBackendValidationLevel(mBackendValidationLevel);
instance->DiscoverDefaultAdapters();
@@ -430,7 +430,7 @@
mOpenGLWindow = glfwCreateWindow(400, 400, "Dawn OpenGL test window", nullptr, nullptr);
glfwMakeContextCurrent(mOpenGLWindow);
- dawn_native::opengl::AdapterDiscoveryOptions adapterOptions;
+ dawn::native::opengl::AdapterDiscoveryOptions adapterOptions;
adapterOptions.getProc = reinterpret_cast<void* (*)(const char*)>(glfwGetProcAddress);
instance->DiscoverAdapters(&adapterOptions);
#endif // DAWN_ENABLE_BACKEND_DESKTOP_GL
@@ -455,7 +455,7 @@
mOpenGLESWindow = glfwCreateWindow(400, 400, "Dawn OpenGLES test window", nullptr, nullptr);
glfwMakeContextCurrent(mOpenGLESWindow);
- dawn_native::opengl::AdapterDiscoveryOptionsES adapterOptionsES;
+ dawn::native::opengl::AdapterDiscoveryOptionsES adapterOptionsES;
adapterOptionsES.getProc = reinterpret_cast<void* (*)(const char*)>(glfwGetProcAddress);
instance->DiscoverAdapters(&adapterOptionsES);
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
@@ -472,12 +472,12 @@
return mOpenGLESWindow;
}
-void DawnTestEnvironment::SelectPreferredAdapterProperties(const dawn_native::Instance* instance) {
+void DawnTestEnvironment::SelectPreferredAdapterProperties(const dawn::native::Instance* instance) {
// Get the first available preferred device type.
wgpu::AdapterType preferredDeviceType = static_cast<wgpu::AdapterType>(-1);
bool hasDevicePreference = false;
for (wgpu::AdapterType devicePreference : mDevicePreferences) {
- for (const dawn_native::Adapter& adapter : instance->GetAdapters()) {
+ for (const dawn::native::Adapter& adapter : instance->GetAdapters()) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
@@ -493,7 +493,7 @@
}
std::set<std::pair<wgpu::BackendType, std::string>> adapterNameSet;
- for (const dawn_native::Adapter& adapter : instance->GetAdapters()) {
+ for (const dawn::native::Adapter& adapter : instance->GetAdapters()) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
@@ -559,7 +559,7 @@
}
void DawnTestEnvironment::PrintTestConfigurationAndAdapterInfo(
- dawn_native::Instance* instance) const {
+ dawn::native::Instance* instance) const {
dawn::LogMessage log = dawn::InfoLog();
log << "Testing configuration\n"
"---------------------\n"
@@ -572,13 +572,13 @@
"BackendValidation: ";
switch (mBackendValidationLevel) {
- case dawn_native::BackendValidationLevel::Full:
+ case dawn::native::BackendValidationLevel::Full:
log << "full";
break;
- case dawn_native::BackendValidationLevel::Partial:
+ case dawn::native::BackendValidationLevel::Partial:
log << "partial";
break;
- case dawn_native::BackendValidationLevel::Disabled:
+ case dawn::native::BackendValidationLevel::Disabled:
log << "disabled";
break;
default:
@@ -589,7 +589,7 @@
log << "\n"
"Enabled Toggles\n";
for (const std::string& toggle : GetEnabledToggles()) {
- const dawn_native::ToggleInfo* info = instance->GetToggleInfo(toggle.c_str());
+ const dawn::native::ToggleInfo* info = instance->GetToggleInfo(toggle.c_str());
ASSERT(info != nullptr);
log << " - " << info->name << ": " << info->description << "\n";
}
@@ -599,7 +599,7 @@
log << "\n"
"Disabled Toggles\n";
for (const std::string& toggle : GetDisabledToggles()) {
- const dawn_native::ToggleInfo* info = instance->GetToggleInfo(toggle.c_str());
+ const dawn::native::ToggleInfo* info = instance->GetToggleInfo(toggle.c_str());
ASSERT(info != nullptr);
log << " - " << info->name << ": " << info->description << "\n";
}
@@ -651,11 +651,11 @@
return mRunSuppressedTests;
}
-dawn_native::BackendValidationLevel DawnTestEnvironment::GetBackendValidationLevel() const {
+dawn::native::BackendValidationLevel DawnTestEnvironment::GetBackendValidationLevel() const {
return mBackendValidationLevel;
}
-dawn_native::Instance* DawnTestEnvironment::GetInstance() const {
+dawn::native::Instance* DawnTestEnvironment::GetInstance() const {
return mInstance.get();
}
@@ -807,7 +807,7 @@
}
bool DawnTestBase::IsBackendValidationEnabled() const {
- return gTestEnv->GetBackendValidationLevel() != dawn_native::BackendValidationLevel::Disabled;
+ return gTestEnv->GetBackendValidationLevel() != dawn::native::BackendValidationLevel::Disabled;
}
bool DawnTestBase::RunSuppressedTests() const {
@@ -827,7 +827,7 @@
}
bool DawnTestBase::HasToggleEnabled(const char* toggle) const {
- auto toggles = dawn_native::GetTogglesUsed(backendDevice);
+ auto toggles = dawn::native::GetTogglesUsed(backendDevice);
return std::find_if(toggles.begin(), toggles.end(), [toggle](const char* name) {
return strcmp(toggle, name) == 0;
}) != toggles.end();
@@ -853,7 +853,7 @@
return gTestEnv->GetInstance()->Get();
}
-dawn_native::Adapter DawnTestBase::GetAdapter() const {
+dawn::native::Adapter DawnTestBase::GetAdapter() const {
return mBackendAdapter;
}
@@ -872,7 +872,7 @@
wgpu::SupportedLimits DawnTestBase::GetSupportedLimits() {
WGPUSupportedLimits supportedLimits;
supportedLimits.nextInChain = nullptr;
- dawn_native::GetProcs().deviceGetLimits(backendDevice, &supportedLimits);
+ dawn::native::GetProcs().deviceGetLimits(backendDevice, &supportedLimits);
return *reinterpret_cast<wgpu::SupportedLimits*>(&supportedLimits);
}
@@ -880,9 +880,9 @@
ASSERT(mBackendAdapter);
std::vector<wgpu::FeatureName> supportedFeatures;
uint32_t count =
- dawn_native::GetProcs().adapterEnumerateFeatures(mBackendAdapter.Get(), nullptr);
+ dawn::native::GetProcs().adapterEnumerateFeatures(mBackendAdapter.Get(), nullptr);
supportedFeatures.resize(count);
- dawn_native::GetProcs().adapterEnumerateFeatures(
+ dawn::native::GetProcs().adapterEnumerateFeatures(
mBackendAdapter.Get(), reinterpret_cast<WGPUFeatureName*>(&supportedFeatures[0]));
std::unordered_set<wgpu::FeatureName> supportedSet;
@@ -903,7 +903,7 @@
// Find the adapter that exactly matches our adapter properties.
const auto& adapters = gTestEnv->GetInstance()->GetAdapters();
const auto& it = std::find_if(
- adapters.begin(), adapters.end(), [&](const dawn_native::Adapter& adapter) {
+ adapters.begin(), adapters.end(), [&](const dawn::native::Adapter& adapter) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
@@ -943,14 +943,14 @@
forceDisabledToggles.push_back("disallow_unsafe_apis");
for (const std::string& toggle : gTestEnv->GetEnabledToggles()) {
- const dawn_native::ToggleInfo* info =
+ const dawn::native::ToggleInfo* info =
gTestEnv->GetInstance()->GetToggleInfo(toggle.c_str());
ASSERT(info != nullptr);
forceEnabledToggles.push_back(info->name);
}
for (const std::string& toggle : gTestEnv->GetDisabledToggles()) {
- const dawn_native::ToggleInfo* info =
+ const dawn::native::ToggleInfo* info =
gTestEnv->GetInstance()->GetToggleInfo(toggle.c_str());
ASSERT(info != nullptr);
forceDisabledToggles.push_back(info->name);
@@ -1024,7 +1024,7 @@
if (!UsesWire()) {
EXPECT_EQ(mLastWarningCount,
- dawn_native::GetDeprecationWarningCountForTesting(device.Get()));
+ dawn::native::GetDeprecationWarningCountForTesting(device.Get()));
}
// The device will be destroyed soon after, so we want to set the expectation.
diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h
index e79a3e4..9c9f228 100644
--- a/src/tests/DawnTest.h
+++ b/src/tests/DawnTest.h
@@ -224,8 +224,8 @@
void TearDown() override;
bool UsesWire() const;
- dawn_native::BackendValidationLevel GetBackendValidationLevel() const;
- dawn_native::Instance* GetInstance() const;
+ dawn::native::BackendValidationLevel GetBackendValidationLevel() const;
+ dawn::native::Instance* GetInstance() const;
bool HasVendorIdFilter() const;
uint32_t GetVendorIdFilter() const;
bool HasBackendTypeFilter() const;
@@ -240,17 +240,17 @@
bool RunSuppressedTests() const;
protected:
- std::unique_ptr<dawn_native::Instance> mInstance;
+ std::unique_ptr<dawn::native::Instance> mInstance;
private:
void ParseArgs(int argc, char** argv);
- std::unique_ptr<dawn_native::Instance> CreateInstanceAndDiscoverAdapters();
- void SelectPreferredAdapterProperties(const dawn_native::Instance* instance);
- void PrintTestConfigurationAndAdapterInfo(dawn_native::Instance* instance) const;
+ std::unique_ptr<dawn::native::Instance> CreateInstanceAndDiscoverAdapters();
+ void SelectPreferredAdapterProperties(const dawn::native::Instance* instance);
+ void PrintTestConfigurationAndAdapterInfo(dawn::native::Instance* instance) const;
bool mUseWire = false;
- dawn_native::BackendValidationLevel mBackendValidationLevel =
- dawn_native::BackendValidationLevel::Disabled;
+ dawn::native::BackendValidationLevel mBackendValidationLevel =
+ dawn::native::BackendValidationLevel::Disabled;
bool mBeginCaptureOnStartup = false;
bool mHasVendorIdFilter = false;
uint32_t mVendorIdFilter = 0;
@@ -322,7 +322,7 @@
wgpu::BackendType GetBackendTypeFilter() const;
wgpu::Instance GetInstance() const;
- dawn_native::Adapter GetAdapter() const;
+ dawn::native::Adapter GetAdapter() const;
virtual std::unique_ptr<dawn::platform::Platform> CreateTestPlatform();
@@ -597,7 +597,7 @@
// Assuming the data is mapped, checks all expectations
void ResolveExpectations();
- dawn_native::Adapter mBackendAdapter;
+ dawn::native::Adapter mBackendAdapter;
std::unique_ptr<dawn::platform::Platform> mTestPlatform;
};
@@ -621,22 +621,22 @@
#define DAWN_SUPPRESS_TEST_IF(condition) \
DAWN_SKIP_TEST_IF_BASE(!RunSuppressedTests() && condition, "suppressed", condition)
-#define EXPECT_DEPRECATION_WARNINGS(statement, n) \
- do { \
- if (UsesWire()) { \
- statement; \
- } else { \
- size_t warningsBefore = \
- dawn_native::GetDeprecationWarningCountForTesting(device.Get()); \
- statement; \
- size_t warningsAfter = \
- dawn_native::GetDeprecationWarningCountForTesting(device.Get()); \
- EXPECT_EQ(mLastWarningCount, warningsBefore); \
- if (!HasToggleEnabled("skip_validation")) { \
- EXPECT_EQ(warningsAfter, warningsBefore + n); \
- } \
- mLastWarningCount = warningsAfter; \
- } \
+#define EXPECT_DEPRECATION_WARNINGS(statement, n) \
+ do { \
+ if (UsesWire()) { \
+ statement; \
+ } else { \
+ size_t warningsBefore = \
+ dawn::native::GetDeprecationWarningCountForTesting(device.Get()); \
+ statement; \
+ size_t warningsAfter = \
+ dawn::native::GetDeprecationWarningCountForTesting(device.Get()); \
+ EXPECT_EQ(mLastWarningCount, warningsBefore); \
+ if (!HasToggleEnabled("skip_validation")) { \
+ EXPECT_EQ(warningsAfter, warningsBefore + n); \
+ } \
+ mLastWarningCount = warningsAfter; \
+ } \
} while (0)
#define EXPECT_DEPRECATION_WARNING(statement) EXPECT_DEPRECATION_WARNINGS(statement, 1)
diff --git a/src/tests/end2end/AdapterDiscoveryTests.cpp b/src/tests/end2end/AdapterDiscoveryTests.cpp
index a15fb70..8957ee4 100644
--- a/src/tests/end2end/AdapterDiscoveryTests.cpp
+++ b/src/tests/end2end/AdapterDiscoveryTests.cpp
@@ -48,9 +48,9 @@
#if defined(DAWN_ENABLE_BACKEND_VULKAN)
// Test only discovering the SwiftShader adapter
TEST(AdapterDiscoveryTests, OnlySwiftShader) {
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::vulkan::AdapterDiscoveryOptions options;
+ dawn::native::vulkan::AdapterDiscoveryOptions options;
options.forceSwiftShader = true;
instance.DiscoverAdapters(&options);
@@ -68,9 +68,9 @@
// Test discovering only Vulkan adapters
TEST(AdapterDiscoveryTests, OnlyVulkan) {
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::vulkan::AdapterDiscoveryOptions options;
+ dawn::native::vulkan::AdapterDiscoveryOptions options;
instance.DiscoverAdapters(&options);
const auto& adapters = instance.GetAdapters();
@@ -86,9 +86,9 @@
#if defined(DAWN_ENABLE_BACKEND_D3D12)
// Test discovering only D3D12 adapters
TEST(AdapterDiscoveryTests, OnlyD3D12) {
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::d3d12::AdapterDiscoveryOptions options;
+ dawn::native::d3d12::AdapterDiscoveryOptions options;
instance.DiscoverAdapters(&options);
const auto& adapters = instance.GetAdapters();
@@ -114,9 +114,9 @@
break; // No more adapters to enumerate.
}
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::d3d12::AdapterDiscoveryOptions options;
+ dawn::native::d3d12::AdapterDiscoveryOptions options;
options.dxgiAdapter = std::move(dxgiAdapter);
instance.DiscoverAdapters(&options);
@@ -134,9 +134,9 @@
#if defined(DAWN_ENABLE_BACKEND_METAL)
// Test discovering only Metal adapters
TEST(AdapterDiscoveryTests, OnlyMetal) {
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::metal::AdapterDiscoveryOptions options;
+ dawn::native::metal::AdapterDiscoveryOptions options;
instance.DiscoverAdapters(&options);
const auto& adapters = instance.GetAdapters();
@@ -166,9 +166,9 @@
glfwCreateWindow(400, 400, "Dawn OpenGL test window", nullptr, nullptr);
glfwMakeContextCurrent(window);
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::opengl::AdapterDiscoveryOptions options;
+ dawn::native::opengl::AdapterDiscoveryOptions options;
options.getProc = reinterpret_cast<void* (*)(const char*)>(glfwGetProcAddress);
instance.DiscoverAdapters(&options);
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
@@ -207,9 +207,9 @@
glfwCreateWindow(400, 400, "Dawn OpenGLES test window", nullptr, nullptr);
glfwMakeContextCurrent(window);
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
- dawn_native::opengl::AdapterDiscoveryOptionsES options;
+ dawn::native::opengl::AdapterDiscoveryOptionsES options;
options.getProc = reinterpret_cast<void* (*)(const char*)>(glfwGetProcAddress);
instance.DiscoverAdapters(&options);
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
@@ -230,10 +230,10 @@
// Test discovering the Metal backend, then the Vulkan backend
// does not duplicate adapters.
TEST(AdapterDiscoveryTests, OneBackendThenTheOther) {
- dawn_native::Instance instance;
+ dawn::native::Instance instance;
uint32_t metalAdapterCount = 0;
{
- dawn_native::metal::AdapterDiscoveryOptions options;
+ dawn::native::metal::AdapterDiscoveryOptions options;
instance.DiscoverAdapters(&options);
const auto& adapters = instance.GetAdapters();
@@ -246,7 +246,7 @@
}
}
{
- dawn_native::vulkan::AdapterDiscoveryOptions options;
+ dawn::native::vulkan::AdapterDiscoveryOptions options;
instance.DiscoverAdapters(&options);
uint32_t metalAdapterCount2 = 0;
diff --git a/src/tests/end2end/BufferZeroInitTests.cpp b/src/tests/end2end/BufferZeroInitTests.cpp
index 76f51fe..dfda1fd 100644
--- a/src/tests/end2end/BufferZeroInitTests.cpp
+++ b/src/tests/end2end/BufferZeroInitTests.cpp
@@ -19,16 +19,16 @@
#include "utils/TestUtils.h"
#include "utils/WGPUHelpers.h"
-#define EXPECT_LAZY_CLEAR(N, statement) \
- do { \
- if (UsesWire()) { \
- statement; \
- } else { \
- size_t lazyClearsBefore = dawn_native::GetLazyClearCountForTesting(device.Get()); \
- statement; \
- size_t lazyClearsAfter = dawn_native::GetLazyClearCountForTesting(device.Get()); \
- EXPECT_EQ(N, lazyClearsAfter - lazyClearsBefore); \
- } \
+#define EXPECT_LAZY_CLEAR(N, statement) \
+ do { \
+ if (UsesWire()) { \
+ statement; \
+ } else { \
+ size_t lazyClearsBefore = dawn::native::GetLazyClearCountForTesting(device.Get()); \
+ statement; \
+ size_t lazyClearsAfter = dawn::native::GetLazyClearCountForTesting(device.Get()); \
+ EXPECT_EQ(N, lazyClearsAfter - lazyClearsBefore); \
+ } \
} while (0)
namespace {
diff --git a/src/tests/end2end/D3D12ResourceWrappingTests.cpp b/src/tests/end2end/D3D12ResourceWrappingTests.cpp
index 81a6b52..8d780cb 100644
--- a/src/tests/end2end/D3D12ResourceWrappingTests.cpp
+++ b/src/tests/end2end/D3D12ResourceWrappingTests.cpp
@@ -27,7 +27,7 @@
namespace {
- using dawn_native::d3d12::kDXGIKeyedMutexAcquireReleaseKey;
+ using dawn::native::d3d12::kDXGIKeyedMutexAcquireReleaseKey;
class D3D12ResourceTestBase : public DawnTest {
protected:
@@ -43,7 +43,7 @@
}
// Create the D3D11 device/contexts that will be used in subsequent tests
- ComPtr<ID3D12Device> d3d12Device = dawn_native::d3d12::GetD3D12Device(device.Get());
+ ComPtr<ID3D12Device> d3d12Device = dawn::native::d3d12::GetD3D12Device(device.Get());
const LUID adapterLuid = d3d12Device->GetAdapterLuid();
@@ -94,7 +94,7 @@
const D3D11_TEXTURE2D_DESC* baseD3dDescriptor,
wgpu::Texture* dawnTexture,
ID3D11Texture2D** d3d11TextureOut,
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI>*
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI>*
externalImageOut = nullptr) const {
ComPtr<ID3D11Texture2D> d3d11Texture;
HRESULT hr = mD3d11Device->CreateTexture2D(baseD3dDescriptor, nullptr, &d3d11Texture);
@@ -110,13 +110,13 @@
&sharedHandle);
ASSERT_EQ(hr, S_OK);
- dawn_native::d3d12::ExternalImageDescriptorDXGISharedHandle externalImageDesc;
+ dawn::native::d3d12::ExternalImageDescriptorDXGISharedHandle externalImageDesc;
externalImageDesc.cTextureDescriptor =
reinterpret_cast<const WGPUTextureDescriptor*>(dawnDesc);
externalImageDesc.sharedHandle = sharedHandle;
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage =
- dawn_native::d3d12::ExternalImageDXGI::Create(device.Get(), &externalImageDesc);
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage =
+ dawn::native::d3d12::ExternalImageDXGI::Create(device.Get(), &externalImageDesc);
// Now that we've created all of our resources, we can close the handle
// since we no longer need it.
@@ -127,7 +127,7 @@
return;
}
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.usage = static_cast<WGPUTextureUsageFlags>(dawnDesc->usage);
*dawnTexture = wgpu::Texture::Acquire(
@@ -377,15 +377,15 @@
hr = dxgiKeyedMutex->ReleaseSync(kDXGIKeyedMutexAcquireReleaseKey);
ASSERT_EQ(hr, S_OK);
- dawn_native::d3d12::ExternalImageDescriptorDXGISharedHandle externalImageDesc = {};
+ dawn::native::d3d12::ExternalImageDescriptorDXGISharedHandle externalImageDesc = {};
externalImageDesc.sharedHandle = sharedHandle;
externalImageDesc.cTextureDescriptor =
reinterpret_cast<const WGPUTextureDescriptor*>(dawnDescriptor);
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage =
- dawn_native::d3d12::ExternalImageDXGI::Create(device.Get(), &externalImageDesc);
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage =
+ dawn::native::d3d12::ExternalImageDXGI::Create(device.Get(), &externalImageDesc);
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.isInitialized = isInitialized;
externalAccessDesc.usage = static_cast<WGPUTextureUsageFlags>(dawnDescriptor->usage);
@@ -588,7 +588,7 @@
// Create the first Dawn texture then clear it to red.
wgpu::Texture texture;
ComPtr<ID3D11Texture2D> d3d11Texture;
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage;
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage;
WrapSharedHandle(&baseDawnDescriptor, &baseD3dDescriptor, &texture, &d3d11Texture,
&externalImage);
{
@@ -604,7 +604,7 @@
texture.Destroy();
// Create another Dawn texture then clear it with another color.
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.isInitialized = true;
externalAccessDesc.usage = static_cast<WGPUTextureUsageFlags>(baseDawnDescriptor.usage);
@@ -630,7 +630,7 @@
// Create the first Dawn texture then clear it to red.
wgpu::Texture texture1;
ComPtr<ID3D11Texture2D> d3d11Texture;
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage;
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage;
WrapSharedHandle(&baseDawnDescriptor, &baseD3dDescriptor, &texture1, &d3d11Texture,
&externalImage);
{
@@ -642,7 +642,7 @@
}
// Create another Dawn texture then clear it with another color.
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.isInitialized = true;
externalAccessDesc.usage = static_cast<WGPUTextureUsageFlags>(baseDawnDescriptor.usage);
@@ -673,12 +673,12 @@
TEST_P(D3D12SharedHandleUsageTests, ExternalImageUsage) {
DAWN_TEST_UNSUPPORTED_IF(UsesWire());
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.isInitialized = true;
wgpu::Texture texture;
ComPtr<ID3D11Texture2D> d3d11Texture;
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage;
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage;
WrapSharedHandle(&baseDawnDescriptor, &baseD3dDescriptor, &texture, &d3d11Texture,
&externalImage);
ASSERT_NE(texture.Get(), nullptr);
@@ -700,7 +700,7 @@
wgpu::Texture texture;
ComPtr<ID3D11Texture2D> d3d11Texture;
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage;
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage;
// Create the Dawn texture then clear it to red using the first (default) device.
WrapSharedHandle(&baseDawnDescriptor, &baseD3dDescriptor, &texture, &d3d11Texture,
@@ -715,7 +715,7 @@
texture.Destroy();
// Create the Dawn texture then clear it to blue using the second device.
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.usage = static_cast<WGPUTextureUsageFlags>(baseDawnDescriptor.usage);
wgpu::Device otherDevice = wgpu::Device::Acquire(GetAdapter().CreateDevice());
diff --git a/src/tests/end2end/DeviceInitializationTests.cpp b/src/tests/end2end/DeviceInitializationTests.cpp
index 0eb1795..0c342cc 100644
--- a/src/tests/end2end/DeviceInitializationTests.cpp
+++ b/src/tests/end2end/DeviceInitializationTests.cpp
@@ -19,7 +19,7 @@
class DeviceInitializationTest : public testing::Test {
void SetUp() override {
- dawnProcSetProcs(&dawn_native::GetProcs());
+ dawnProcSetProcs(&dawn::native::GetProcs());
}
void TearDown() override {
@@ -34,9 +34,9 @@
// We want to create a device on a fresh instance and adapter each time.
std::vector<wgpu::AdapterProperties> availableAdapterProperties;
{
- auto instance = std::make_unique<dawn_native::Instance>();
+ auto instance = std::make_unique<dawn::native::Instance>();
instance->DiscoverDefaultAdapters();
- for (const dawn_native::Adapter& adapter : instance->GetAdapters()) {
+ for (const dawn::native::Adapter& adapter : instance->GetAdapters()) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
@@ -50,9 +50,9 @@
for (const wgpu::AdapterProperties& desiredProperties : availableAdapterProperties) {
wgpu::Device device;
- auto instance = std::make_unique<dawn_native::Instance>();
+ auto instance = std::make_unique<dawn::native::Instance>();
instance->DiscoverDefaultAdapters();
- for (dawn_native::Adapter& adapter : instance->GetAdapters()) {
+ for (dawn::native::Adapter& adapter : instance->GetAdapters()) {
wgpu::AdapterProperties properties;
adapter.GetProperties(&properties);
diff --git a/src/tests/end2end/IOSurfaceWrappingTests.cpp b/src/tests/end2end/IOSurfaceWrappingTests.cpp
index f8af8a0..98781c4 100644
--- a/src/tests/end2end/IOSurfaceWrappingTests.cpp
+++ b/src/tests/end2end/IOSurfaceWrappingTests.cpp
@@ -98,13 +98,13 @@
IOSurfaceRef ioSurface,
uint32_t plane,
bool isInitialized = true) {
- dawn_native::metal::ExternalImageDescriptorIOSurface externDesc;
+ dawn::native::metal::ExternalImageDescriptorIOSurface externDesc;
externDesc.cTextureDescriptor =
reinterpret_cast<const WGPUTextureDescriptor*>(descriptor);
externDesc.ioSurface = ioSurface;
externDesc.plane = plane;
externDesc.isInitialized = isInitialized;
- WGPUTexture texture = dawn_native::metal::WrapIOSurface(device.Get(), &externDesc);
+ WGPUTexture texture = dawn::native::metal::WrapIOSurface(device.Get(), &externDesc);
return wgpu::Texture::Acquire(texture);
}
};
@@ -362,7 +362,7 @@
queue.Submit(1, &commands);
// Wait for the commands touching the IOSurface to be scheduled
- dawn_native::metal::WaitForCommandsToBeScheduled(device.Get());
+ dawn::native::metal::WaitForCommandsToBeScheduled(device.Get());
// Check the correct data was written
IOSurfaceLock(ioSurface, kIOSurfaceLockReadOnly, nullptr);
diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp
index 63ccded..403712b 100644
--- a/src/tests/end2end/TextureZeroInitTests.cpp
+++ b/src/tests/end2end/TextureZeroInitTests.cpp
@@ -19,16 +19,16 @@
#include "utils/TestUtils.h"
#include "utils/WGPUHelpers.h"
-#define EXPECT_LAZY_CLEAR(N, statement) \
- do { \
- if (UsesWire()) { \
- statement; \
- } else { \
- size_t lazyClearsBefore = dawn_native::GetLazyClearCountForTesting(device.Get()); \
- statement; \
- size_t lazyClearsAfter = dawn_native::GetLazyClearCountForTesting(device.Get()); \
- EXPECT_EQ(N, lazyClearsAfter - lazyClearsBefore); \
- } \
+#define EXPECT_LAZY_CLEAR(N, statement) \
+ do { \
+ if (UsesWire()) { \
+ statement; \
+ } else { \
+ size_t lazyClearsBefore = dawn::native::GetLazyClearCountForTesting(device.Get()); \
+ statement; \
+ size_t lazyClearsAfter = dawn::native::GetLazyClearCountForTesting(device.Get()); \
+ EXPECT_EQ(N, lazyClearsAfter - lazyClearsBefore); \
+ } \
} while (0)
class TextureZeroInitTest : public DawnTest {
@@ -136,7 +136,7 @@
EXPECT_LAZY_CLEAR(1u, EXPECT_PIXEL_RGBA8_EQ(filledWithZeros, texture, 0, 0));
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// This tests that the code path of CopyTextureToBuffer with multiple texture array layers clears
@@ -171,7 +171,8 @@
EXPECT_LAZY_CLEAR(1u, queue.Submit(1, &commandBuffer));
// Expect texture subresource initialized to be true
- EXPECT_TRUE(dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, kArrayLayers));
+ EXPECT_TRUE(
+ dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, kArrayLayers));
const std::vector<RGBA8> kExpectedAllZero(kSize * kSize, {0, 0, 0, 0});
for (uint32_t layer = 0; layer < kArrayLayers; ++layer) {
@@ -220,7 +221,7 @@
baseMipLevel);
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
renderPass.color.Get(), baseMipLevel, 1, baseArrayLayer, 1));
}
@@ -263,7 +264,7 @@
baseMipLevel);
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
renderPass.color.Get(), baseMipLevel, 1, baseArrayLayer, 1));
}
@@ -295,7 +296,7 @@
EXPECT_TEXTURE_EQ(expected.data(), texture, {0, 0}, {kSize, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// Test for a copy only to a subset of the subresource, lazy init is necessary to clear the other
@@ -330,7 +331,7 @@
EXPECT_TEXTURE_EQ(expectedZeros.data(), texture, {kSize / 2, 0}, {kSize / 2, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// This tests CopyBufferToTexture fully overwrites a range of subresources, so lazy initialization
@@ -361,8 +362,8 @@
EXPECT_LAZY_CLEAR(0u, queue.Submit(1, &commands));
// Expect texture subresource initialized to be true
- EXPECT_TRUE(dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, kBaseArrayLayer,
- kCopyLayerCount));
+ EXPECT_TRUE(dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, kBaseArrayLayer,
+ kCopyLayerCount));
const std::vector<RGBA8> expected100(kSize * kSize, {100, 100, 100, 100});
for (uint32_t layer = kBaseArrayLayer; layer < kBaseArrayLayer + kCopyLayerCount; ++layer) {
@@ -402,8 +403,8 @@
EXPECT_TEXTURE_EQ(expected.data(), dstTexture, {0, 0}, {kSize, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(dstTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(dstTexture.Get(), 0, 1, 0, 1));
}
// This Tests the CopyTextureToTexture's copy only to a subset of the subresource, lazy init is
@@ -459,8 +460,8 @@
EXPECT_TEXTURE_EQ(expectedWithZeros.data(), dstTexture, {kSize / 2, 0}, {kSize / 2, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(dstTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(dstTexture.Get(), 0, 1, 0, 1));
}
// This tests the texture with depth attachment and load op load will init depth stencil texture to
@@ -502,7 +503,7 @@
EXPECT_TEXTURE_EQ(expected.data(), srcTexture, {0, 0}, {kSize, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
}
// This tests the texture with stencil attachment and load op load will init depth stencil texture
@@ -544,7 +545,7 @@
EXPECT_TEXTURE_EQ(expected.data(), srcTexture, {0, 0}, {kSize, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
}
// This tests the texture with depth stencil attachment and load op load will init depth stencil
@@ -583,7 +584,7 @@
EXPECT_TEXTURE_EQ(expected.data(), srcTexture, {0, 0}, {kSize, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(srcTexture.Get(), 0, 1, 0, 1));
}
// Test that clear state is tracked independently for depth/stencil textures.
@@ -615,11 +616,11 @@
}
// "all" subresources are not initialized; Depth is not initialized
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_All));
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_DepthOnly));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_StencilOnly));
// Now load both depth and stencil. Depth should be cleared and stencil should stay the same
@@ -654,11 +655,11 @@
}
// Everything is initialized now
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_All));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_DepthOnly));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_StencilOnly));
// TODO(crbug.com/dawn/439): Implement stencil copies on other platforms
@@ -690,11 +691,11 @@
}
// "all" subresources are not initialized; Stencil is not initialized
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_All));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_DepthOnly));
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_StencilOnly));
// Now load both depth and stencil. Stencil should be cleared and depth should stay the same
@@ -728,11 +729,11 @@
}
// Everything is initialized now
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_All));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_DepthOnly));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_StencilOnly));
// TODO(crbug.com/dawn/439): Implement stencil copies on other platforms
@@ -775,11 +776,11 @@
}
// "all" subresources are not initialized; Stencil is not initialized
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1,
- 0, 1, WGPUTextureAspect_All));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1, 0,
- 1, WGPUTextureAspect_DepthOnly));
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1,
+ 0, 1, WGPUTextureAspect_All));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
+ depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_DepthOnly));
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(
depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_StencilOnly));
// Check by copy that the stencil data is lazily cleared to 0.
@@ -788,12 +789,12 @@
{kSize, kSize}, 0, wgpu::TextureAspect::StencilOnly));
// Everything is initialized now
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1, 0,
- 1, WGPUTextureAspect_All));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1, 0,
- 1, WGPUTextureAspect_DepthOnly));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1, 0,
- 1, WGPUTextureAspect_StencilOnly));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1,
+ 0, 1, WGPUTextureAspect_All));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
+ depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_DepthOnly));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
+ depthStencilTexture.Get(), 0, 1, 0, 1, WGPUTextureAspect_StencilOnly));
// Now load both depth and stencil. Stencil should be cleared and depth should stay the same
// at 0.3.
@@ -846,7 +847,7 @@
// Expect texture subresource initialized to be true
EXPECT_EQ(true,
- dawn_native::IsTextureSubresourceInitialized(renderPass.color.Get(), 0, 1, 0, 1));
+ dawn::native::IsTextureSubresourceInitialized(renderPass.color.Get(), 0, 1, 0, 1));
}
// This tests the clearing of sampled textures in render pass
@@ -890,7 +891,7 @@
EXPECT_TEXTURE_EQ(expectedWithZeros.data(), renderTexture, {0, 0}, {kSize, kSize});
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(renderTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(renderTexture.Get(), 0, 1, 0, 1));
}
// This is a regression test for a bug where a texture wouldn't get clear for a pass if at least
@@ -950,7 +951,7 @@
EXPECT_TEXTURE_EQ(&RGBA8::kZero, texture, {0, 0, 1}, {1, 1});
// The whole texture is now initialized.
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 2));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 2));
}
// This tests the clearing of sampled textures during compute pass
@@ -1012,7 +1013,7 @@
EXPECT_BUFFER_U32_RANGE_EQ(expectedWithZeros.data(), bufferTex, 0, kFormatBlockByteSize);
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
@@ -1045,7 +1046,7 @@
EXPECT_BUFFER_U32_RANGE_EQ(expectedWithZeros.data(), bufferDst, 0, kSize);
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
@@ -1080,7 +1081,7 @@
EXPECT_BUFFER_U32_RANGE_EQ(expectedWithZeros.data(), bufferDst, 0, kUnalignedSize);
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
@@ -1114,7 +1115,7 @@
EXPECT_BUFFER_U32_RANGE_EQ(expectedWithZeros.data(), bufferDst, 0, 8);
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 1, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 1, 1));
}
// This tests that storeOp clear resets resource state to uninitialized.
@@ -1178,8 +1179,8 @@
1u, EXPECT_TEXTURE_EQ(expectedWithZeros.data(), renderTexture, {0, 0}, {kSize, kSize}));
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(renderTexture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(renderTexture.Get(), 0, 1, 0, 1));
}
// This tests storeOp Clear on depth and stencil textures.
@@ -1232,8 +1233,8 @@
// Expect texture subresource initialized to be false since storeop is clear, sets
// subresource as uninitialized
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0,
- 1, 0, 1));
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0,
+ 1, 0, 1));
}
// Now we put the depth stencil texture back into renderpass, it should be cleared by loadop
@@ -1257,8 +1258,8 @@
// Expect texture subresource initialized to be false since storeop is clear, sets
// subresource as uninitialized
- EXPECT_EQ(false, dawn_native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0,
- 1, 0, 1));
+ EXPECT_EQ(false, dawn::native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0,
+ 1, 0, 1));
}
}
@@ -1335,7 +1336,7 @@
{mipSize, mipSize}, 1));
// Expect the whole texture to be initialized
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(sampleTexture.Get(), 0, 2, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(sampleTexture.Get(), 0, 2, 0, 1));
}
// Test that if one layer of a texture is initialized and another is uninitialized, lazy clearing
@@ -1419,7 +1420,7 @@
0u, EXPECT_TEXTURE_EQ(expectedWithTwos.data(), sampleTexture, {0, 0, 1}, {kSize, kSize}));
// Expect the whole texture to be initialized
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(sampleTexture.Get(), 0, 1, 0, 2));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(sampleTexture.Get(), 0, 1, 0, 2));
}
// This is a regression test for crbug.com/dawn/451 where the lazy texture
@@ -1461,7 +1462,7 @@
}
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
}
// In this test WriteTexture fully overwrites a texture
@@ -1490,7 +1491,7 @@
&textureDataLayout, ©Size));
// Expect texture initialized to be true
- EXPECT_TRUE(dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_TRUE(dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
EXPECT_TEXTURE_EQ(data.data(), texture, {0, 0}, {kSize, kSize});
}
@@ -1524,7 +1525,7 @@
&textureDataLayout, ©Size));
// Expect texture initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, 0, 1));
std::vector<RGBA8> expectedZeros((kSize / 2) * kSize, {0, 0, 0, 0});
// first half filled with 100, by the data
@@ -1565,8 +1566,8 @@
&textureDataLayout, ©Size));
// Expect texture subresource initialized to be true
- EXPECT_TRUE(dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, kBaseArrayLayer,
- kCopyLayerCount));
+ EXPECT_TRUE(dawn::native::IsTextureSubresourceInitialized(texture.Get(), 0, 1, kBaseArrayLayer,
+ kCopyLayerCount));
for (uint32_t layer = kBaseArrayLayer; layer < kBaseArrayLayer + kCopyLayerCount; ++layer) {
EXPECT_TEXTURE_EQ(data.data(), texture, {0, 0, layer}, {kSize, kSize});
@@ -1606,8 +1607,8 @@
&textureDataLayout, ©Size));
// Expect texture subresource initialized to be true
- EXPECT_EQ(true, dawn_native::IsTextureSubresourceInitialized(texture.Get(), 0, 1,
- kBaseArrayLayer, kCopyLayerCount));
+ EXPECT_EQ(true, dawn::native::IsTextureSubresourceInitialized(
+ texture.Get(), 0, 1, kBaseArrayLayer, kCopyLayerCount));
std::vector<RGBA8> expectedZeros((kSize / 2) * kSize, {0, 0, 0, 0});
for (uint32_t layer = kBaseArrayLayer; layer < kBaseArrayLayer + kCopyLayerCount; ++layer) {
@@ -1648,7 +1649,7 @@
&textureDataLayout, ©Size));
// Expect texture initialized to be true
- EXPECT_TRUE(dawn_native::IsTextureSubresourceInitialized(texture.Get(), kMipLevel, 1, 0, 1));
+ EXPECT_TRUE(dawn::native::IsTextureSubresourceInitialized(texture.Get(), kMipLevel, 1, 0, 1));
EXPECT_TEXTURE_EQ(data.data(), texture, {0, 0}, {kMipSize, kMipSize}, kMipLevel);
}
@@ -1687,7 +1688,7 @@
// Expect texture initialized to be true
EXPECT_EQ(true,
- dawn_native::IsTextureSubresourceInitialized(texture.Get(), kMipLevel, 1, 0, 1));
+ dawn::native::IsTextureSubresourceInitialized(texture.Get(), kMipLevel, 1, 0, 1));
std::vector<RGBA8> expectedZeros((kMipSize / 2) * kMipSize, {0, 0, 0, 0});
// first half filled with 100, by the data
@@ -1823,8 +1824,8 @@
{0x00, 0x20, 0x08, 0xFF});
EXPECT_TEXTURE_EQ(expected.data(), renderPass.color, {0, 0},
{nonPaddedCopyExtent.width, nonPaddedCopyExtent.height});
- EXPECT_TRUE(dawn_native::IsTextureSubresourceInitialized(bcTexture.Get(), viewMipmapLevel,
- 1, baseArrayLayer, 1));
+ EXPECT_TRUE(dawn::native::IsTextureSubresourceInitialized(bcTexture.Get(), viewMipmapLevel,
+ 1, baseArrayLayer, 1));
// If we only copied to half the texture, check the other half is initialized to black
if (halfCopyTest) {
diff --git a/src/tests/end2end/VideoViewsTests_gbm.cpp b/src/tests/end2end/VideoViewsTests_gbm.cpp
index 946eb84..a2540e9 100644
--- a/src/tests/end2end/VideoViewsTests_gbm.cpp
+++ b/src/tests/end2end/VideoViewsTests_gbm.cpp
@@ -158,7 +158,7 @@
internalDesc.internalUsage = wgpu::TextureUsage::CopySrc;
textureDesc.nextInChain = &internalDesc;
- dawn_native::vulkan::ExternalImageDescriptorDmaBuf descriptor = {};
+ dawn::native::vulkan::ExternalImageDescriptorDmaBuf descriptor = {};
descriptor.cTextureDescriptor =
reinterpret_cast<const WGPUTextureDescriptor*>(&textureDesc);
descriptor.isInitialized = true;
@@ -169,16 +169,16 @@
descriptor.waitFDs = {};
return std::make_unique<PlatformTextureGbm>(
- wgpu::Texture::Acquire(dawn_native::vulkan::WrapVulkanImage(mWGPUDevice, &descriptor)),
+ wgpu::Texture::Acquire(dawn::native::vulkan::WrapVulkanImage(mWGPUDevice, &descriptor)),
gbmBo);
}
void DestroyVideoTextureForTest(
std::unique_ptr<VideoViewsTestBackend::PlatformTexture>&& platformTexture) override {
// Exports the signal and ignores it.
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(platformTexture->wgpuTexture.Get(),
- VK_IMAGE_LAYOUT_GENERAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(platformTexture->wgpuTexture.Get(),
+ VK_IMAGE_LAYOUT_GENERAL, &exportInfo);
for (int fd : exportInfo.semaphoreHandles) {
ASSERT_NE(fd, -1);
close(fd);
diff --git a/src/tests/end2end/VideoViewsTests_win.cpp b/src/tests/end2end/VideoViewsTests_win.cpp
index 18b63a0..1d38e8f 100644
--- a/src/tests/end2end/VideoViewsTests_win.cpp
+++ b/src/tests/end2end/VideoViewsTests_win.cpp
@@ -43,7 +43,7 @@
mWGPUDevice = device;
// Create the D3D11 device/contexts that will be used in subsequent tests
- ComPtr<ID3D12Device> d3d12Device = dawn_native::d3d12::GetD3D12Device(device);
+ ComPtr<ID3D12Device> d3d12Device = dawn::native::d3d12::GetD3D12Device(device);
const LUID adapterLuid = d3d12Device->GetAdapterLuid();
@@ -144,7 +144,7 @@
hr = d3d11Texture.As(&dxgiKeyedMutex);
ASSERT(hr == S_OK);
- using dawn_native::d3d12::kDXGIKeyedMutexAcquireReleaseKey;
+ using dawn::native::d3d12::kDXGIKeyedMutexAcquireReleaseKey;
hr = dxgiKeyedMutex->AcquireSync(kDXGIKeyedMutexAcquireReleaseKey, INFINITE);
ASSERT(hr == S_OK);
@@ -153,18 +153,18 @@
// Open the DX11 texture in Dawn from the shared handle and return it as a WebGPU
// texture.
- dawn_native::d3d12::ExternalImageDescriptorDXGISharedHandle externalImageDesc;
+ dawn::native::d3d12::ExternalImageDescriptorDXGISharedHandle externalImageDesc;
externalImageDesc.cTextureDescriptor =
reinterpret_cast<const WGPUTextureDescriptor*>(&textureDesc);
externalImageDesc.sharedHandle = sharedHandle;
- std::unique_ptr<dawn_native::d3d12::ExternalImageDXGI> externalImage =
- dawn_native::d3d12::ExternalImageDXGI::Create(mWGPUDevice, &externalImageDesc);
+ std::unique_ptr<dawn::native::d3d12::ExternalImageDXGI> externalImage =
+ dawn::native::d3d12::ExternalImageDXGI::Create(mWGPUDevice, &externalImageDesc);
// Handle is no longer needed once resources are created.
::CloseHandle(sharedHandle);
- dawn_native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
+ dawn::native::d3d12::ExternalImageAccessDescriptorDXGIKeyedMutex externalAccessDesc;
externalAccessDesc.isInitialized = true;
externalAccessDesc.usage = static_cast<WGPUTextureUsageFlags>(textureDesc.usage);
diff --git a/src/tests/end2end/WindowSurfaceTests.cpp b/src/tests/end2end/WindowSurfaceTests.cpp
index c6b5481..d8160b6 100644
--- a/src/tests/end2end/WindowSurfaceTests.cpp
+++ b/src/tests/end2end/WindowSurfaceTests.cpp
@@ -50,7 +50,7 @@
});
DAWN_TEST_UNSUPPORTED_IF(!glfwInit());
- dawnProcSetProcs(&dawn_native::GetProcs());
+ dawnProcSetProcs(&dawn::native::GetProcs());
mInstance = wgpu::CreateInstance();
}
diff --git a/src/tests/unittests/AsyncTaskTests.cpp b/src/tests/unittests/AsyncTaskTests.cpp
index 0593d4c..2eb0b05 100644
--- a/src/tests/unittests/AsyncTaskTests.cpp
+++ b/src/tests/unittests/AsyncTaskTests.cpp
@@ -13,7 +13,7 @@
// limitations under the License.
//
// AsyncTaskTests:
-// Simple tests for dawn_native::AsyncTask and dawn_native::AsnycTaskManager.
+// Simple tests for dawn::native::AsyncTask and dawn::native::AsnycTaskManager.
#include <gtest/gtest.h>
@@ -67,13 +67,13 @@
dawn::platform::Platform platform;
std::unique_ptr<dawn::platform::WorkerTaskPool> pool = platform.CreateWorkerTaskPool();
- dawn_native::AsyncTaskManager taskManager(pool.get());
+ dawn::native::AsyncTaskManager taskManager(pool.get());
ConcurrentTaskResultQueue taskResultQueue;
constexpr size_t kTaskCount = 4u;
std::set<uint32_t> idset;
for (uint32_t i = 0; i < kTaskCount; ++i) {
- dawn_native::AsyncTask asyncTask([&taskResultQueue, i] { DoTask(&taskResultQueue, i); });
+ dawn::native::AsyncTask asyncTask([&taskResultQueue, i] { DoTask(&taskResultQueue, i); });
taskManager.PostTask(std::move(asyncTask));
idset.insert(i);
}
diff --git a/src/tests/unittests/BuddyAllocatorTests.cpp b/src/tests/unittests/BuddyAllocatorTests.cpp
index 5d46630..7e4c282 100644
--- a/src/tests/unittests/BuddyAllocatorTests.cpp
+++ b/src/tests/unittests/BuddyAllocatorTests.cpp
@@ -15,7 +15,7 @@
#include <gtest/gtest.h>
#include "dawn_native/BuddyAllocator.h"
-using namespace dawn_native;
+using namespace dawn::native;
constexpr uint64_t BuddyAllocator::kInvalidOffset;
diff --git a/src/tests/unittests/BuddyMemoryAllocatorTests.cpp b/src/tests/unittests/BuddyMemoryAllocatorTests.cpp
index 3876ad8..0bc198f 100644
--- a/src/tests/unittests/BuddyMemoryAllocatorTests.cpp
+++ b/src/tests/unittests/BuddyMemoryAllocatorTests.cpp
@@ -21,7 +21,7 @@
#include <set>
#include <vector>
-using namespace dawn_native;
+using namespace dawn::native;
class DummyResourceHeapAllocator : public ResourceHeapAllocator {
public:
diff --git a/src/tests/unittests/ChainUtilsTests.cpp b/src/tests/unittests/ChainUtilsTests.cpp
index 2d43729..aa4c274 100644
--- a/src/tests/unittests/ChainUtilsTests.cpp
+++ b/src/tests/unittests/ChainUtilsTests.cpp
@@ -19,21 +19,21 @@
// Checks that we cannot find any structs in an empty chain
TEST(ChainUtilsTests, FindEmptyChain) {
- const dawn_native::PrimitiveDepthClampingState* info = nullptr;
- dawn_native::FindInChain(nullptr, &info);
+ const dawn::native::PrimitiveDepthClampingState* info = nullptr;
+ dawn::native::FindInChain(nullptr, &info);
ASSERT_EQ(nullptr, info);
}
// Checks that searching a chain for a present struct returns that struct
TEST(ChainUtilsTests, FindPresentInChain) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
chain1.nextInChain = &chain2;
- const dawn_native::PrimitiveDepthClampingState* info1 = nullptr;
- const dawn_native::ShaderModuleSPIRVDescriptor* info2 = nullptr;
- dawn_native::FindInChain(&chain1, &info1);
- dawn_native::FindInChain(&chain1, &info2);
+ const dawn::native::PrimitiveDepthClampingState* info1 = nullptr;
+ const dawn::native::ShaderModuleSPIRVDescriptor* info2 = nullptr;
+ dawn::native::FindInChain(&chain1, &info1);
+ dawn::native::FindInChain(&chain1, &info2);
ASSERT_NE(nullptr, info1);
ASSERT_NE(nullptr, info2);
@@ -41,40 +41,41 @@
// Checks that searching a chain for a struct that doesn't exist returns a nullptr
TEST(ChainUtilsTests, FindMissingInChain) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
chain1.nextInChain = &chain2;
- const dawn_native::SurfaceDescriptorFromMetalLayer* info = nullptr;
- dawn_native::FindInChain(&chain1, &info);
+ const dawn::native::SurfaceDescriptorFromMetalLayer* info = nullptr;
+ dawn::native::FindInChain(&chain1, &info);
ASSERT_EQ(nullptr, info);
}
// Checks that validation rejects chains with duplicate STypes
TEST(ChainUtilsTests, ValidateDuplicateSTypes) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
- dawn_native::PrimitiveDepthClampingState chain3;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::PrimitiveDepthClampingState chain3;
chain1.nextInChain = &chain2;
chain2.nextInChain = &chain3;
- dawn_native::MaybeError result = dawn_native::ValidateSTypes(&chain1, {});
+ dawn::native::MaybeError result = dawn::native::ValidateSTypes(&chain1, {});
ASSERT_TRUE(result.IsError());
result.AcquireError();
}
// Checks that validation rejects chains that contain unspecified STypes
TEST(ChainUtilsTests, ValidateUnspecifiedSTypes) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
- dawn_native::ShaderModuleWGSLDescriptor chain3;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::ShaderModuleWGSLDescriptor chain3;
chain1.nextInChain = &chain2;
chain2.nextInChain = &chain3;
- dawn_native::MaybeError result = dawn_native::ValidateSTypes(&chain1, {
- {wgpu::SType::PrimitiveDepthClampingState},
- {wgpu::SType::ShaderModuleSPIRVDescriptor},
- });
+ dawn::native::MaybeError result =
+ dawn::native::ValidateSTypes(&chain1, {
+ {wgpu::SType::PrimitiveDepthClampingState},
+ {wgpu::SType::ShaderModuleSPIRVDescriptor},
+ });
ASSERT_TRUE(result.IsError());
result.AcquireError();
}
@@ -82,13 +83,14 @@
// Checks that validation rejects chains that contain multiple STypes from the same oneof
// constraint.
TEST(ChainUtilsTests, ValidateOneOfFailure) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
- dawn_native::ShaderModuleWGSLDescriptor chain3;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::ShaderModuleWGSLDescriptor chain3;
chain1.nextInChain = &chain2;
chain2.nextInChain = &chain3;
- dawn_native::MaybeError result = dawn_native::ValidateSTypes(&chain1,
+ dawn::native::MaybeError result = dawn::native::ValidateSTypes(
+ &chain1,
{{wgpu::SType::ShaderModuleSPIRVDescriptor, wgpu::SType::ShaderModuleWGSLDescriptor}});
ASSERT_TRUE(result.IsError());
result.AcquireError();
@@ -96,86 +98,89 @@
// Checks that validation accepts chains that match the constraints.
TEST(ChainUtilsTests, ValidateSuccess) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
chain1.nextInChain = &chain2;
- dawn_native::MaybeError result = dawn_native::ValidateSTypes(&chain1, {
- {wgpu::SType::ShaderModuleSPIRVDescriptor, wgpu::SType::ShaderModuleWGSLDescriptor},
- {wgpu::SType::PrimitiveDepthClampingState},
- {wgpu::SType::SurfaceDescriptorFromMetalLayer},
- });
+ dawn::native::MaybeError result = dawn::native::ValidateSTypes(
+ &chain1,
+ {
+ {wgpu::SType::ShaderModuleSPIRVDescriptor, wgpu::SType::ShaderModuleWGSLDescriptor},
+ {wgpu::SType::PrimitiveDepthClampingState},
+ {wgpu::SType::SurfaceDescriptorFromMetalLayer},
+ });
ASSERT_TRUE(result.IsSuccess());
}
// Checks that validation always passes on empty chains.
TEST(ChainUtilsTests, ValidateEmptyChain) {
- dawn_native::MaybeError result = dawn_native::ValidateSTypes(nullptr, {
- {wgpu::SType::ShaderModuleSPIRVDescriptor},
- {wgpu::SType::PrimitiveDepthClampingState},
- });
+ dawn::native::MaybeError result =
+ dawn::native::ValidateSTypes(nullptr, {
+ {wgpu::SType::ShaderModuleSPIRVDescriptor},
+ {wgpu::SType::PrimitiveDepthClampingState},
+ });
ASSERT_TRUE(result.IsSuccess());
- result = dawn_native::ValidateSTypes(nullptr, {});
+ result = dawn::native::ValidateSTypes(nullptr, {});
ASSERT_TRUE(result.IsSuccess());
}
// Checks that singleton validation always passes on empty chains.
TEST(ChainUtilsTests, ValidateSingleEmptyChain) {
- dawn_native::MaybeError result = dawn_native::ValidateSingleSType(nullptr,
- wgpu::SType::ShaderModuleSPIRVDescriptor);
+ dawn::native::MaybeError result =
+ dawn::native::ValidateSingleSType(nullptr, wgpu::SType::ShaderModuleSPIRVDescriptor);
ASSERT_TRUE(result.IsSuccess());
- result = dawn_native::ValidateSingleSType(nullptr,
- wgpu::SType::ShaderModuleSPIRVDescriptor, wgpu::SType::PrimitiveDepthClampingState);
+ result = dawn::native::ValidateSingleSType(nullptr, wgpu::SType::ShaderModuleSPIRVDescriptor,
+ wgpu::SType::PrimitiveDepthClampingState);
ASSERT_TRUE(result.IsSuccess());
}
// Checks that singleton validation always fails on chains with multiple children.
TEST(ChainUtilsTests, ValidateSingleMultiChain) {
- dawn_native::PrimitiveDepthClampingState chain1;
- dawn_native::ShaderModuleSPIRVDescriptor chain2;
+ dawn::native::PrimitiveDepthClampingState chain1;
+ dawn::native::ShaderModuleSPIRVDescriptor chain2;
chain1.nextInChain = &chain2;
- dawn_native::MaybeError result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::PrimitiveDepthClampingState);
+ dawn::native::MaybeError result =
+ dawn::native::ValidateSingleSType(&chain1, wgpu::SType::PrimitiveDepthClampingState);
ASSERT_TRUE(result.IsError());
result.AcquireError();
- result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::PrimitiveDepthClampingState, wgpu::SType::ShaderModuleSPIRVDescriptor);
+ result = dawn::native::ValidateSingleSType(&chain1, wgpu::SType::PrimitiveDepthClampingState,
+ wgpu::SType::ShaderModuleSPIRVDescriptor);
ASSERT_TRUE(result.IsError());
result.AcquireError();
}
// Checks that singleton validation passes when the oneof constraint is met.
TEST(ChainUtilsTests, ValidateSingleSatisfied) {
- dawn_native::ShaderModuleWGSLDescriptor chain1;
+ dawn::native::ShaderModuleWGSLDescriptor chain1;
- dawn_native::MaybeError result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::ShaderModuleWGSLDescriptor);
+ dawn::native::MaybeError result =
+ dawn::native::ValidateSingleSType(&chain1, wgpu::SType::ShaderModuleWGSLDescriptor);
ASSERT_TRUE(result.IsSuccess());
- result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::ShaderModuleSPIRVDescriptor, wgpu::SType::ShaderModuleWGSLDescriptor);
+ result = dawn::native::ValidateSingleSType(&chain1, wgpu::SType::ShaderModuleSPIRVDescriptor,
+ wgpu::SType::ShaderModuleWGSLDescriptor);
ASSERT_TRUE(result.IsSuccess());
- result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::ShaderModuleWGSLDescriptor, wgpu::SType::ShaderModuleSPIRVDescriptor);
+ result = dawn::native::ValidateSingleSType(&chain1, wgpu::SType::ShaderModuleWGSLDescriptor,
+ wgpu::SType::ShaderModuleSPIRVDescriptor);
ASSERT_TRUE(result.IsSuccess());
}
// Checks that singleton validation passes when the oneof constraint is not met.
TEST(ChainUtilsTests, ValidateSingleUnsatisfied) {
- dawn_native::PrimitiveDepthClampingState chain1;
+ dawn::native::PrimitiveDepthClampingState chain1;
- dawn_native::MaybeError result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::ShaderModuleWGSLDescriptor);
+ dawn::native::MaybeError result =
+ dawn::native::ValidateSingleSType(&chain1, wgpu::SType::ShaderModuleWGSLDescriptor);
ASSERT_TRUE(result.IsError());
result.AcquireError();
- result = dawn_native::ValidateSingleSType(&chain1,
- wgpu::SType::ShaderModuleSPIRVDescriptor, wgpu::SType::ShaderModuleWGSLDescriptor);
+ result = dawn::native::ValidateSingleSType(&chain1, wgpu::SType::ShaderModuleSPIRVDescriptor,
+ wgpu::SType::ShaderModuleWGSLDescriptor);
ASSERT_TRUE(result.IsError());
result.AcquireError();
}
diff --git a/src/tests/unittests/CommandAllocatorTests.cpp b/src/tests/unittests/CommandAllocatorTests.cpp
index 5d1ca9d..70bfc51 100644
--- a/src/tests/unittests/CommandAllocatorTests.cpp
+++ b/src/tests/unittests/CommandAllocatorTests.cpp
@@ -18,7 +18,7 @@
#include <limits>
-using namespace dawn_native;
+using namespace dawn::native;
// Definition of the command types used in the tests
enum class CommandType {
diff --git a/src/tests/unittests/ConcurrentCacheTests.cpp b/src/tests/unittests/ConcurrentCacheTests.cpp
index 957e4dd..b733397 100644
--- a/src/tests/unittests/ConcurrentCacheTests.cpp
+++ b/src/tests/unittests/ConcurrentCacheTests.cpp
@@ -55,7 +55,7 @@
protected:
dawn::platform::Platform mPlatform;
std::unique_ptr<dawn::platform::WorkerTaskPool> mPool;
- dawn_native::AsyncTaskManager mTaskManager;
+ dawn::native::AsyncTaskManager mTaskManager;
ConcurrentCache<SimpleCachedObject> mCache;
};
@@ -69,10 +69,10 @@
std::pair<SimpleCachedObject*, bool> anotherInsertOutput = {};
ConcurrentCache<SimpleCachedObject>* cachePtr = &mCache;
- dawn_native::AsyncTask asyncTask1([&insertOutput, cachePtr, &cachedObject] {
+ dawn::native::AsyncTask asyncTask1([&insertOutput, cachePtr, &cachedObject] {
insertOutput = cachePtr->Insert(&cachedObject);
});
- dawn_native::AsyncTask asyncTask2([&anotherInsertOutput, cachePtr, &anotherCachedObject] {
+ dawn::native::AsyncTask asyncTask2([&anotherInsertOutput, cachePtr, &anotherCachedObject] {
anotherInsertOutput = cachePtr->Insert(&anotherCachedObject);
});
mTaskManager.PostTask(std::move(asyncTask1));
@@ -91,12 +91,12 @@
std::pair<SimpleCachedObject*, bool> insertOutput = {};
ConcurrentCache<SimpleCachedObject>* cachePtr = &mCache;
- dawn_native::AsyncTask insertTask([&insertOutput, cachePtr, &cachedObject] {
+ dawn::native::AsyncTask insertTask([&insertOutput, cachePtr, &cachedObject] {
insertOutput = cachePtr->Insert(&cachedObject);
});
size_t erasedObjectCount = 0;
- dawn_native::AsyncTask eraseTask([&erasedObjectCount, cachePtr, &cachedObject] {
+ dawn::native::AsyncTask eraseTask([&erasedObjectCount, cachePtr, &cachedObject] {
while (cachePtr->Find(&cachedObject) == nullptr) {
utils::USleep(100);
}
diff --git a/src/tests/unittests/EnumMaskIteratorTests.cpp b/src/tests/unittests/EnumMaskIteratorTests.cpp
index d5e0bb5..59b008f 100644
--- a/src/tests/unittests/EnumMaskIteratorTests.cpp
+++ b/src/tests/unittests/EnumMaskIteratorTests.cpp
@@ -16,7 +16,7 @@
#include "gtest/gtest.h"
-namespace dawn_native {
+namespace dawn::native {
enum class TestAspect : uint8_t {
Color = 1,
@@ -29,18 +29,18 @@
static constexpr unsigned value = 3;
};
-} // namespace dawn_native
+} // namespace dawn::native
namespace dawn {
template <>
- struct IsDawnBitmask<dawn_native::TestAspect> {
+ struct IsDawnBitmask<dawn::native::TestAspect> {
static constexpr bool enable = true;
};
} // namespace dawn
-namespace dawn_native {
+namespace dawn::native {
static_assert(EnumBitmaskSize<TestAspect>::value == 3, "");
@@ -69,4 +69,4 @@
}
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/tests/unittests/ErrorTests.cpp b/src/tests/unittests/ErrorTests.cpp
index ff7b7fe..bd1bf8c 100644
--- a/src/tests/unittests/ErrorTests.cpp
+++ b/src/tests/unittests/ErrorTests.cpp
@@ -17,7 +17,7 @@
#include "dawn_native/Error.h"
#include "dawn_native/ErrorData.h"
-using namespace dawn_native;
+using namespace dawn::native;
namespace {
diff --git a/src/tests/unittests/FeatureTests.cpp b/src/tests/unittests/FeatureTests.cpp
index 4e1e797..d7844ff 100644
--- a/src/tests/unittests/FeatureTests.cpp
+++ b/src/tests/unittests/FeatureTests.cpp
@@ -22,24 +22,24 @@
public:
FeatureTests()
: testing::Test(),
- mInstanceBase(dawn_native::InstanceBase::Create()),
+ mInstanceBase(dawn::native::InstanceBase::Create()),
mAdapterBase(mInstanceBase.Get()) {
}
std::vector<wgpu::FeatureName> GetAllFeatureNames() {
std::vector<wgpu::FeatureName> allFeatureNames(kTotalFeaturesCount);
for (size_t i = 0; i < kTotalFeaturesCount; ++i) {
- allFeatureNames[i] = FeatureEnumToAPIFeature(static_cast<dawn_native::Feature>(i));
+ allFeatureNames[i] = FeatureEnumToAPIFeature(static_cast<dawn::native::Feature>(i));
}
return allFeatureNames;
}
static constexpr size_t kTotalFeaturesCount =
- static_cast<size_t>(dawn_native::Feature::EnumCount);
+ static_cast<size_t>(dawn::native::Feature::EnumCount);
protected:
- Ref<dawn_native::InstanceBase> mInstanceBase;
- dawn_native::null::Adapter mAdapterBase;
+ Ref<dawn::native::InstanceBase> mInstanceBase;
+ dawn::native::null::Adapter mAdapterBase;
};
// Test the creation of a device will fail if the requested feature is not supported on the
@@ -47,13 +47,13 @@
TEST_F(FeatureTests, AdapterWithRequiredFeatureDisabled) {
const std::vector<wgpu::FeatureName> kAllFeatureNames = GetAllFeatureNames();
for (size_t i = 0; i < kTotalFeaturesCount; ++i) {
- dawn_native::Feature notSupportedFeature = static_cast<dawn_native::Feature>(i);
+ dawn::native::Feature notSupportedFeature = static_cast<dawn::native::Feature>(i);
std::vector<wgpu::FeatureName> featureNamesWithoutOne = kAllFeatureNames;
featureNamesWithoutOne.erase(featureNamesWithoutOne.begin() + i);
mAdapterBase.SetSupportedFeatures(featureNamesWithoutOne);
- dawn_native::Adapter adapterWithoutFeature(&mAdapterBase);
+ dawn::native::Adapter adapterWithoutFeature(&mAdapterBase);
wgpu::DeviceDescriptor deviceDescriptor;
wgpu::FeatureName featureName = FeatureEnumToAPIFeature(notSupportedFeature);
@@ -68,16 +68,16 @@
// Test Device.GetEnabledFeatures() can return the names of the enabled features correctly.
TEST_F(FeatureTests, GetEnabledFeatures) {
- dawn_native::Adapter adapter(&mAdapterBase);
+ dawn::native::Adapter adapter(&mAdapterBase);
for (size_t i = 0; i < kTotalFeaturesCount; ++i) {
- dawn_native::Feature feature = static_cast<dawn_native::Feature>(i);
+ dawn::native::Feature feature = static_cast<dawn::native::Feature>(i);
wgpu::FeatureName featureName = FeatureEnumToAPIFeature(feature);
wgpu::DeviceDescriptor deviceDescriptor;
deviceDescriptor.requiredFeatures = &featureName;
deviceDescriptor.requiredFeaturesCount = 1;
- dawn_native::DeviceBase* deviceBase = dawn_native::FromAPI(
+ dawn::native::DeviceBase* deviceBase = dawn::native::FromAPI(
adapter.CreateDevice(reinterpret_cast<const WGPUDeviceDescriptor*>(&deviceDescriptor)));
ASSERT_EQ(1u, deviceBase->APIEnumerateFeatures(nullptr));
diff --git a/src/tests/unittests/GetProcAddressTests.cpp b/src/tests/unittests/GetProcAddressTests.cpp
index 1305dbc..abf65d3 100644
--- a/src/tests/unittests/GetProcAddressTests.cpp
+++ b/src/tests/unittests/GetProcAddressTests.cpp
@@ -51,7 +51,7 @@
public:
GetProcAddressTests()
: testing::TestWithParam<DawnFlavor>(),
- mNativeInstance(dawn_native::InstanceBase::Create()),
+ mNativeInstance(dawn::native::InstanceBase::Create()),
mNativeAdapter(mNativeInstance.Get()) {
}
@@ -60,7 +60,7 @@
case DawnFlavor::Native: {
mDevice = wgpu::Device::Acquire(
reinterpret_cast<WGPUDevice>(mNativeAdapter.APICreateDevice()));
- mProcs = dawn_native::GetProcs();
+ mProcs = dawn::native::GetProcs();
break;
}
@@ -90,8 +90,8 @@
}
protected:
- Ref<dawn_native::InstanceBase> mNativeInstance;
- dawn_native::null::Adapter mNativeAdapter;
+ Ref<dawn::native::InstanceBase> mNativeInstance;
+ dawn::native::null::Adapter mNativeAdapter;
std::unique_ptr<utils::TerribleCommandBuffer> mC2sBuf;
std::unique_ptr<dawn::wire::WireClient> mWireClient;
@@ -155,7 +155,7 @@
testing::PrintToStringParamName());
TEST(GetProcAddressInternalTests, CheckDawnNativeProcMapOrder) {
- std::vector<const char*> names = dawn_native::GetProcMapNamesForTesting();
+ std::vector<const char*> names = dawn::native::GetProcMapNamesForTesting();
for (size_t i = 1; i < names.size(); i++) {
ASSERT_LT(std::string(names[i - 1]), std::string(names[i]));
}
diff --git a/src/tests/unittests/LimitsTests.cpp b/src/tests/unittests/LimitsTests.cpp
index e931855..88ac356 100644
--- a/src/tests/unittests/LimitsTests.cpp
+++ b/src/tests/unittests/LimitsTests.cpp
@@ -18,10 +18,10 @@
// Test |GetDefaultLimits| returns the default.
TEST(Limits, GetDefaultLimits) {
- dawn_native::Limits limits = {};
+ dawn::native::Limits limits = {};
EXPECT_NE(limits.maxBindGroups, 4u);
- dawn_native::GetDefaultLimits(&limits);
+ dawn::native::GetDefaultLimits(&limits);
EXPECT_EQ(limits.maxBindGroups, 4u);
}
@@ -29,11 +29,11 @@
// Test |ReifyDefaultLimits| populates the default if
// values are undefined.
TEST(Limits, ReifyDefaultLimits_PopulatesDefault) {
- dawn_native::Limits limits;
+ dawn::native::Limits limits;
limits.maxComputeWorkgroupStorageSize = wgpu::kLimitU32Undefined;
limits.maxStorageBufferBindingSize = wgpu::kLimitU64Undefined;
- dawn_native::Limits reified = dawn_native::ReifyDefaultLimits(limits);
+ dawn::native::Limits reified = dawn::native::ReifyDefaultLimits(limits);
EXPECT_EQ(reified.maxComputeWorkgroupStorageSize, 16352u);
EXPECT_EQ(reified.maxStorageBufferBindingSize, 134217728ul);
}
@@ -41,11 +41,11 @@
// Test |ReifyDefaultLimits| clamps to the default if
// values are worse than the default.
TEST(Limits, ReifyDefaultLimits_Clamps) {
- dawn_native::Limits limits;
+ dawn::native::Limits limits;
limits.maxStorageBuffersPerShaderStage = 4;
limits.minUniformBufferOffsetAlignment = 512;
- dawn_native::Limits reified = dawn_native::ReifyDefaultLimits(limits);
+ dawn::native::Limits reified = dawn::native::ReifyDefaultLimits(limits);
EXPECT_EQ(reified.maxStorageBuffersPerShaderStage, 8u);
EXPECT_EQ(reified.minUniformBufferOffsetAlignment, 256u);
}
@@ -54,19 +54,19 @@
// than supported.
TEST(Limits, ValidateLimits) {
// Start with the default for supported.
- dawn_native::Limits defaults;
- dawn_native::GetDefaultLimits(&defaults);
+ dawn::native::Limits defaults;
+ dawn::native::GetDefaultLimits(&defaults);
// Test supported == required is valid.
{
- dawn_native::Limits required = defaults;
+ dawn::native::Limits required = defaults;
EXPECT_TRUE(ValidateLimits(defaults, required).IsSuccess());
}
// Test supported == required is valid, when they are not default.
{
- dawn_native::Limits supported = defaults;
- dawn_native::Limits required = defaults;
+ dawn::native::Limits supported = defaults;
+ dawn::native::Limits required = defaults;
supported.maxBindGroups += 1;
required.maxBindGroups += 1;
EXPECT_TRUE(ValidateLimits(supported, required).IsSuccess());
@@ -74,38 +74,38 @@
// Test that default-initialized (all undefined) is valid.
{
- dawn_native::Limits required = {};
+ dawn::native::Limits required = {};
EXPECT_TRUE(ValidateLimits(defaults, required).IsSuccess());
}
// Test that better than max is invalid.
{
- dawn_native::Limits required = {};
+ dawn::native::Limits required = {};
required.maxTextureDimension3D = defaults.maxTextureDimension3D + 1;
- dawn_native::MaybeError err = ValidateLimits(defaults, required);
+ dawn::native::MaybeError err = ValidateLimits(defaults, required);
EXPECT_TRUE(err.IsError());
err.AcquireError();
}
// Test that worse than max is valid.
{
- dawn_native::Limits required = {};
+ dawn::native::Limits required = {};
required.maxComputeWorkgroupSizeX = defaults.maxComputeWorkgroupSizeX - 1;
EXPECT_TRUE(ValidateLimits(defaults, required).IsSuccess());
}
// Test that better than min is invalid.
{
- dawn_native::Limits required = {};
+ dawn::native::Limits required = {};
required.minUniformBufferOffsetAlignment = defaults.minUniformBufferOffsetAlignment / 2;
- dawn_native::MaybeError err = ValidateLimits(defaults, required);
+ dawn::native::MaybeError err = ValidateLimits(defaults, required);
EXPECT_TRUE(err.IsError());
err.AcquireError();
}
// Test that worse than min is valid.
{
- dawn_native::Limits required = {};
+ dawn::native::Limits required = {};
required.minStorageBufferOffsetAlignment = defaults.minStorageBufferOffsetAlignment * 2;
EXPECT_TRUE(ValidateLimits(defaults, required).IsSuccess());
}
@@ -113,38 +113,38 @@
// Test that |ApplyLimitTiers| degrades limits to the next best tier.
TEST(Limits, ApplyLimitTiers) {
- auto SetLimitsStorageBufferBindingSizeTier2 = [](dawn_native::Limits* limits) {
+ auto SetLimitsStorageBufferBindingSizeTier2 = [](dawn::native::Limits* limits) {
limits->maxStorageBufferBindingSize = 1073741824;
};
- dawn_native::Limits limitsStorageBufferBindingSizeTier2;
- dawn_native::GetDefaultLimits(&limitsStorageBufferBindingSizeTier2);
+ dawn::native::Limits limitsStorageBufferBindingSizeTier2;
+ dawn::native::GetDefaultLimits(&limitsStorageBufferBindingSizeTier2);
SetLimitsStorageBufferBindingSizeTier2(&limitsStorageBufferBindingSizeTier2);
- auto SetLimitsStorageBufferBindingSizeTier3 = [](dawn_native::Limits* limits) {
+ auto SetLimitsStorageBufferBindingSizeTier3 = [](dawn::native::Limits* limits) {
limits->maxStorageBufferBindingSize = 2147483647;
};
- dawn_native::Limits limitsStorageBufferBindingSizeTier3;
- dawn_native::GetDefaultLimits(&limitsStorageBufferBindingSizeTier3);
+ dawn::native::Limits limitsStorageBufferBindingSizeTier3;
+ dawn::native::GetDefaultLimits(&limitsStorageBufferBindingSizeTier3);
SetLimitsStorageBufferBindingSizeTier3(&limitsStorageBufferBindingSizeTier3);
- auto SetLimitsComputeWorkgroupStorageSizeTier1 = [](dawn_native::Limits* limits) {
+ auto SetLimitsComputeWorkgroupStorageSizeTier1 = [](dawn::native::Limits* limits) {
limits->maxComputeWorkgroupStorageSize = 16352;
};
- dawn_native::Limits limitsComputeWorkgroupStorageSizeTier1;
- dawn_native::GetDefaultLimits(&limitsComputeWorkgroupStorageSizeTier1);
+ dawn::native::Limits limitsComputeWorkgroupStorageSizeTier1;
+ dawn::native::GetDefaultLimits(&limitsComputeWorkgroupStorageSizeTier1);
SetLimitsComputeWorkgroupStorageSizeTier1(&limitsComputeWorkgroupStorageSizeTier1);
- auto SetLimitsComputeWorkgroupStorageSizeTier3 = [](dawn_native::Limits* limits) {
+ auto SetLimitsComputeWorkgroupStorageSizeTier3 = [](dawn::native::Limits* limits) {
limits->maxComputeWorkgroupStorageSize = 65536;
};
- dawn_native::Limits limitsComputeWorkgroupStorageSizeTier3;
- dawn_native::GetDefaultLimits(&limitsComputeWorkgroupStorageSizeTier3);
+ dawn::native::Limits limitsComputeWorkgroupStorageSizeTier3;
+ dawn::native::GetDefaultLimits(&limitsComputeWorkgroupStorageSizeTier3);
SetLimitsComputeWorkgroupStorageSizeTier3(&limitsComputeWorkgroupStorageSizeTier3);
// Test that applying tiers to limits that are exactly
// equal to a tier returns the same values.
{
- dawn_native::Limits limits = limitsStorageBufferBindingSizeTier2;
+ dawn::native::Limits limits = limitsStorageBufferBindingSizeTier2;
EXPECT_EQ(ApplyLimitTiers(limits), limits);
limits = limitsStorageBufferBindingSizeTier3;
@@ -153,7 +153,7 @@
// Test all limits slightly worse than tier 3.
{
- dawn_native::Limits limits = limitsStorageBufferBindingSizeTier3;
+ dawn::native::Limits limits = limitsStorageBufferBindingSizeTier3;
limits.maxStorageBufferBindingSize -= 1;
EXPECT_EQ(ApplyLimitTiers(limits), limitsStorageBufferBindingSizeTier2);
}
@@ -161,28 +161,28 @@
// Test that limits may match one tier exactly and be degraded in another tier.
// Degrading to one tier does not affect the other tier.
{
- dawn_native::Limits limits = limitsComputeWorkgroupStorageSizeTier3;
+ dawn::native::Limits limits = limitsComputeWorkgroupStorageSizeTier3;
// Set tier 3 and change one limit to be insufficent.
SetLimitsStorageBufferBindingSizeTier3(&limits);
limits.maxStorageBufferBindingSize -= 1;
- dawn_native::Limits tiered = ApplyLimitTiers(limits);
+ dawn::native::Limits tiered = ApplyLimitTiers(limits);
// Check that |tiered| has the limits of memorySize tier 2
- dawn_native::Limits tieredWithMemorySizeTier2 = tiered;
+ dawn::native::Limits tieredWithMemorySizeTier2 = tiered;
SetLimitsStorageBufferBindingSizeTier2(&tieredWithMemorySizeTier2);
EXPECT_EQ(tiered, tieredWithMemorySizeTier2);
// Check that |tiered| has the limits of bindingSpace tier 3
- dawn_native::Limits tieredWithBindingSpaceTier3 = tiered;
+ dawn::native::Limits tieredWithBindingSpaceTier3 = tiered;
SetLimitsComputeWorkgroupStorageSizeTier3(&tieredWithBindingSpaceTier3);
EXPECT_EQ(tiered, tieredWithBindingSpaceTier3);
}
// Test that limits may be simultaneously degraded in two tiers independently.
{
- dawn_native::Limits limits;
- dawn_native::GetDefaultLimits(&limits);
+ dawn::native::Limits limits;
+ dawn::native::GetDefaultLimits(&limits);
SetLimitsComputeWorkgroupStorageSizeTier3(&limits);
SetLimitsStorageBufferBindingSizeTier3(&limits);
limits.maxComputeWorkgroupStorageSize =
@@ -190,9 +190,9 @@
limits.maxStorageBufferBindingSize =
limitsStorageBufferBindingSizeTier2.maxStorageBufferBindingSize + 1;
- dawn_native::Limits tiered = ApplyLimitTiers(limits);
+ dawn::native::Limits tiered = ApplyLimitTiers(limits);
- dawn_native::Limits expected = tiered;
+ dawn::native::Limits expected = tiered;
SetLimitsComputeWorkgroupStorageSizeTier1(&expected);
SetLimitsStorageBufferBindingSizeTier2(&expected);
EXPECT_EQ(tiered, expected);
diff --git a/src/tests/unittests/PerStageTests.cpp b/src/tests/unittests/PerStageTests.cpp
index dcecd83..736bb76 100644
--- a/src/tests/unittests/PerStageTests.cpp
+++ b/src/tests/unittests/PerStageTests.cpp
@@ -16,7 +16,7 @@
#include "dawn_native/PerStage.h"
-using namespace dawn_native;
+using namespace dawn::native;
// Tests for StageBit
TEST(PerStage, StageBit) {
diff --git a/src/tests/unittests/PerThreadProcTests.cpp b/src/tests/unittests/PerThreadProcTests.cpp
index 6151a6c..47b2934 100644
--- a/src/tests/unittests/PerThreadProcTests.cpp
+++ b/src/tests/unittests/PerThreadProcTests.cpp
@@ -25,14 +25,14 @@
class PerThreadProcTests : public testing::Test {
public:
PerThreadProcTests()
- : mNativeInstance(dawn_native::InstanceBase::Create()),
+ : mNativeInstance(dawn::native::InstanceBase::Create()),
mNativeAdapter(mNativeInstance.Get()) {
}
~PerThreadProcTests() override = default;
protected:
- Ref<dawn_native::InstanceBase> mNativeInstance;
- dawn_native::null::Adapter mNativeAdapter;
+ Ref<dawn::native::InstanceBase> mNativeInstance;
+ dawn::native::null::Adapter mNativeAdapter;
};
// Test that procs can be set per thread. This test overrides deviceCreateBuffer with a dummy proc
@@ -63,7 +63,7 @@
wgpu::Device::Acquire(reinterpret_cast<WGPUDevice>(mNativeAdapter.APICreateDevice()));
std::thread threadA([&]() {
- DawnProcTable procs = dawn_native::GetProcs();
+ DawnProcTable procs = dawn::native::GetProcs();
procs.deviceCreateBuffer = [](WGPUDevice device,
WGPUBufferDescriptor const* descriptor) -> WGPUBuffer {
EXPECT_EQ(std::this_thread::get_id(), threadIdA);
@@ -84,7 +84,7 @@
});
std::thread threadB([&]() {
- DawnProcTable procs = dawn_native::GetProcs();
+ DawnProcTable procs = dawn::native::GetProcs();
procs.deviceCreateBuffer = [](WGPUDevice device,
WGPUBufferDescriptor const* bufferDesc) -> WGPUBuffer {
EXPECT_EQ(std::this_thread::get_id(), threadIdB);
diff --git a/src/tests/unittests/RingBufferAllocatorTests.cpp b/src/tests/unittests/RingBufferAllocatorTests.cpp
index aa14e7c..3787ba3 100644
--- a/src/tests/unittests/RingBufferAllocatorTests.cpp
+++ b/src/tests/unittests/RingBufferAllocatorTests.cpp
@@ -16,7 +16,7 @@
#include "dawn_native/RingBufferAllocator.h"
-using namespace dawn_native;
+using namespace dawn::native;
constexpr uint64_t RingBufferAllocator::kInvalidOffset;
diff --git a/src/tests/unittests/SubresourceStorageTests.cpp b/src/tests/unittests/SubresourceStorageTests.cpp
index b9b4fc3..f1e28b3 100644
--- a/src/tests/unittests/SubresourceStorageTests.cpp
+++ b/src/tests/unittests/SubresourceStorageTests.cpp
@@ -18,7 +18,7 @@
#include "common/Log.h"
-using namespace dawn_native;
+using namespace dawn::native;
// A fake class that replicates the behavior of SubresourceStorage but without any compression and
// is used to compare the results of operations on SubresourceStorage against the "ground truth" of
diff --git a/src/tests/unittests/ToBackendTests.cpp b/src/tests/unittests/ToBackendTests.cpp
index 01bbc17..7651350 100644
--- a/src/tests/unittests/ToBackendTests.cpp
+++ b/src/tests/unittests/ToBackendTests.cpp
@@ -20,11 +20,11 @@
#include <type_traits>
// Make our own Base - Backend object pair, reusing the AdapterBase name
-namespace dawn_native {
+namespace dawn::native {
class AdapterBase : public RefCounted {};
-} // namespace dawn_native
+} // namespace dawn::native
-using namespace dawn_native;
+using namespace dawn::native;
class MyAdapter : public AdapterBase {};
diff --git a/src/tests/unittests/d3d12/CopySplitTests.cpp b/src/tests/unittests/d3d12/CopySplitTests.cpp
index f8feafe..0e265a2 100644
--- a/src/tests/unittests/d3d12/CopySplitTests.cpp
+++ b/src/tests/unittests/d3d12/CopySplitTests.cpp
@@ -23,7 +23,7 @@
#include "dawn_native/d3d12/d3d12_platform.h"
#include "utils/TestUtils.h"
-using namespace dawn_native::d3d12;
+using namespace dawn::native::d3d12;
namespace {
diff --git a/src/tests/unittests/native/CommandBufferEncodingTests.cpp b/src/tests/unittests/native/CommandBufferEncodingTests.cpp
index c1ca2d9..6515067 100644
--- a/src/tests/unittests/native/CommandBufferEncodingTests.cpp
+++ b/src/tests/unittests/native/CommandBufferEncodingTests.cpp
@@ -21,11 +21,11 @@
class CommandBufferEncodingTests : public DawnNativeTest {
protected:
- void ExpectCommands(dawn_native::CommandIterator* commands,
- std::vector<std::pair<dawn_native::Command,
- std::function<void(dawn_native::CommandIterator*)>>>
+ void ExpectCommands(dawn::native::CommandIterator* commands,
+ std::vector<std::pair<dawn::native::Command,
+ std::function<void(dawn::native::CommandIterator*)>>>
expectedCommands) {
- dawn_native::Command commandId;
+ dawn::native::Command commandId;
for (uint32_t commandIndex = 0; commands->NextCommandId(&commandId); ++commandIndex) {
ASSERT_LT(commandIndex, expectedCommands.size()) << "Unexpected command";
ASSERT_EQ(commandId, expectedCommands[commandIndex].first)
@@ -38,7 +38,7 @@
// Indirect dispatch validation changes the bind groups in the middle
// of a pass. Test that bindings are restored after the validation runs.
TEST_F(CommandBufferEncodingTests, ComputePassEncoderIndirectDispatchStateRestoration) {
- using namespace dawn_native;
+ using namespace dawn::native;
wgpu::BindGroupLayout staticLayout =
utils::MakeBindGroupLayout(device, {{
@@ -274,7 +274,7 @@
// and does not leak state changes that occured between a snapshot and the
// state restoration.
TEST_F(CommandBufferEncodingTests, StateNotLeakedAfterRestore) {
- using namespace dawn_native;
+ using namespace dawn::native;
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::ComputePassEncoder pass = encoder.BeginComputePass();
diff --git a/src/tests/unittests/native/DestroyObjectTests.cpp b/src/tests/unittests/native/DestroyObjectTests.cpp
index 99acf28..bff4820 100644
--- a/src/tests/unittests/native/DestroyObjectTests.cpp
+++ b/src/tests/unittests/native/DestroyObjectTests.cpp
@@ -32,7 +32,7 @@
#include "tests/DawnNativeTest.h"
#include "utils/ComboRenderPipelineDescriptor.h"
-namespace dawn_native { namespace {
+namespace dawn::native { namespace {
using ::testing::_;
using ::testing::ByMove;
@@ -754,4 +754,4 @@
EXPECT_FALSE(textureView->IsAlive());
}
-}} // namespace dawn_native::
+}} // namespace dawn::native::
diff --git a/src/tests/unittests/native/DeviceCreationTests.cpp b/src/tests/unittests/native/DeviceCreationTests.cpp
index 6402286..1a8ddb6 100644
--- a/src/tests/unittests/native/DeviceCreationTests.cpp
+++ b/src/tests/unittests/native/DeviceCreationTests.cpp
@@ -27,11 +27,11 @@
class DeviceCreationTest : public testing::Test {
protected:
void SetUp() override {
- dawnProcSetProcs(&dawn_native::GetProcs());
+ dawnProcSetProcs(&dawn::native::GetProcs());
- instance = std::make_unique<dawn_native::Instance>();
+ instance = std::make_unique<dawn::native::Instance>();
instance->DiscoverDefaultAdapters();
- for (dawn_native::Adapter& nativeAdapter : instance->GetAdapters()) {
+ for (dawn::native::Adapter& nativeAdapter : instance->GetAdapters()) {
wgpu::AdapterProperties properties;
nativeAdapter.GetProperties(&properties);
@@ -49,7 +49,7 @@
dawnProcSetProcs(nullptr);
}
- std::unique_ptr<dawn_native::Instance> instance;
+ std::unique_ptr<dawn::native::Instance> instance;
wgpu::Adapter adapter;
};
@@ -79,7 +79,7 @@
wgpu::Device device = adapter.CreateDevice(&desc);
EXPECT_NE(device, nullptr);
- auto toggles = dawn_native::GetTogglesUsed(device.Get());
+ auto toggles = dawn::native::GetTogglesUsed(device.Get());
EXPECT_THAT(toggles, testing::Contains(testing::StrEq(toggle)));
}
diff --git a/src/tests/unittests/native/mocks/BindGroupLayoutMock.h b/src/tests/unittests/native/mocks/BindGroupLayoutMock.h
index 56df374..841e5c8 100644
--- a/src/tests/unittests/native/mocks/BindGroupLayoutMock.h
+++ b/src/tests/unittests/native/mocks/BindGroupLayoutMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class BindGroupLayoutMock final : public BindGroupLayoutBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUPLAYOUT_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/BindGroupMock.h b/src/tests/unittests/native/mocks/BindGroupMock.h
index bc5e234..6faec4e 100644
--- a/src/tests/unittests/native/mocks/BindGroupMock.h
+++ b/src/tests/unittests/native/mocks/BindGroupMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class BindGroupMock : public BindGroupBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUP_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/BufferMock.h b/src/tests/unittests/native/mocks/BufferMock.h
index 4b66854..9b69e2a 100644
--- a/src/tests/unittests/native/mocks/BufferMock.h
+++ b/src/tests/unittests/native/mocks/BufferMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class BufferMock : public BufferBase {
public:
@@ -44,6 +44,6 @@
MOCK_METHOD(bool, IsCPUWritableAtCreation, (), (const, override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUP_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/CommandBufferMock.h b/src/tests/unittests/native/mocks/CommandBufferMock.h
index 88caa23..7b0ee08 100644
--- a/src/tests/unittests/native/mocks/CommandBufferMock.h
+++ b/src/tests/unittests/native/mocks/CommandBufferMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class CommandBufferMock : public CommandBufferBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_COMMANDBUFFER_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/ComputePipelineMock.h b/src/tests/unittests/native/mocks/ComputePipelineMock.h
index 84b6278..c6208d8 100644
--- a/src/tests/unittests/native/mocks/ComputePipelineMock.h
+++ b/src/tests/unittests/native/mocks/ComputePipelineMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class ComputePipelineMock : public ComputePipelineBase {
public:
@@ -36,6 +36,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_COMPUTEPIPELINE_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/DeviceMock.h b/src/tests/unittests/native/mocks/DeviceMock.h
index 97df57f..4e673f3 100644
--- a/src/tests/unittests/native/mocks/DeviceMock.h
+++ b/src/tests/unittests/native/mocks/DeviceMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class DeviceMock : public DeviceBase {
public:
@@ -112,6 +112,6 @@
MOCK_METHOD(MaybeError, WaitForIdleForDestruction, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_DEVICE_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/ExternalTextureMock.h b/src/tests/unittests/native/mocks/ExternalTextureMock.h
index 57c0c9f..3e3ba2c 100644
--- a/src/tests/unittests/native/mocks/ExternalTextureMock.h
+++ b/src/tests/unittests/native/mocks/ExternalTextureMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class ExternalTextureMock : public ExternalTextureBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_EXTERNALTEXTURE_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/PipelineLayoutMock.h b/src/tests/unittests/native/mocks/PipelineLayoutMock.h
index c35d5ed..5201f3b 100644
--- a/src/tests/unittests/native/mocks/PipelineLayoutMock.h
+++ b/src/tests/unittests/native/mocks/PipelineLayoutMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class PipelineLayoutMock : public PipelineLayoutBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_PIPELINELAYOUT_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/QuerySetMock.h b/src/tests/unittests/native/mocks/QuerySetMock.h
index 1554fff..138b143 100644
--- a/src/tests/unittests/native/mocks/QuerySetMock.h
+++ b/src/tests/unittests/native/mocks/QuerySetMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class QuerySetMock : public QuerySetBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_QUERYSET_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/RenderPipelineMock.h b/src/tests/unittests/native/mocks/RenderPipelineMock.h
index 12701c3..f573dcd 100644
--- a/src/tests/unittests/native/mocks/RenderPipelineMock.h
+++ b/src/tests/unittests/native/mocks/RenderPipelineMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class RenderPipelineMock : public RenderPipelineBase {
public:
@@ -36,6 +36,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_RENDERPIPELINE_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/SamplerMock.h b/src/tests/unittests/native/mocks/SamplerMock.h
index 56df161..4103398 100644
--- a/src/tests/unittests/native/mocks/SamplerMock.h
+++ b/src/tests/unittests/native/mocks/SamplerMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class SamplerMock : public SamplerBase {
public:
@@ -34,6 +34,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_SAMPLER_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/ShaderModuleMock.cpp b/src/tests/unittests/native/mocks/ShaderModuleMock.cpp
index 9b5ab09..4c7da22 100644
--- a/src/tests/unittests/native/mocks/ShaderModuleMock.cpp
+++ b/src/tests/unittests/native/mocks/ShaderModuleMock.cpp
@@ -14,7 +14,7 @@
#include "ShaderModuleMock.h"
-namespace dawn_native {
+namespace dawn::native {
ShaderModuleMock::ShaderModuleMock(DeviceBase* device) : ShaderModuleBase(device) {
ON_CALL(*this, DestroyImpl).WillByDefault([this]() {
@@ -37,4 +37,4 @@
return AcquireRef(mock);
}
-} // namespace dawn_native
+} // namespace dawn::native
diff --git a/src/tests/unittests/native/mocks/ShaderModuleMock.h b/src/tests/unittests/native/mocks/ShaderModuleMock.h
index 0b3e650..349377a 100644
--- a/src/tests/unittests/native/mocks/ShaderModuleMock.h
+++ b/src/tests/unittests/native/mocks/ShaderModuleMock.h
@@ -23,7 +23,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class ShaderModuleMock : public ShaderModuleBase {
public:
@@ -36,6 +36,6 @@
static ResultOrError<Ref<ShaderModuleMock>> Create(DeviceBase* device, const char* source);
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_SHADERMODULE_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/SwapChainMock.h b/src/tests/unittests/native/mocks/SwapChainMock.h
index 233da73..4619c57 100644
--- a/src/tests/unittests/native/mocks/SwapChainMock.h
+++ b/src/tests/unittests/native/mocks/SwapChainMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class SwapChainMock : public SwapChainBase {
public:
@@ -41,6 +41,6 @@
MOCK_METHOD(void, APIPresent, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_SWAPCHAIN_MOCK_H_
diff --git a/src/tests/unittests/native/mocks/TextureMock.h b/src/tests/unittests/native/mocks/TextureMock.h
index 95e53be..181bd55 100644
--- a/src/tests/unittests/native/mocks/TextureMock.h
+++ b/src/tests/unittests/native/mocks/TextureMock.h
@@ -20,7 +20,7 @@
#include <gmock/gmock.h>
-namespace dawn_native {
+namespace dawn::native {
class TextureMock : public TextureBase {
public:
@@ -44,6 +44,6 @@
MOCK_METHOD(void, DestroyImpl, (), (override));
};
-} // namespace dawn_native
+} // namespace dawn::native
#endif // TESTS_UNITTESTS_NATIVE_MOCKS_TEXTURE_MOCK_H_
diff --git a/src/tests/unittests/validation/CommandBufferValidationTests.cpp b/src/tests/unittests/validation/CommandBufferValidationTests.cpp
index 7ec37af..e6e2818 100644
--- a/src/tests/unittests/validation/CommandBufferValidationTests.cpp
+++ b/src/tests/unittests/validation/CommandBufferValidationTests.cpp
@@ -318,7 +318,7 @@
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&dummyRenderPass);
pass.EndPass();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
ASSERT_DEVICE_ERROR(encoder.Finish(), HasSubstr("Destroyed encoder cannot be finished."));
}
@@ -327,13 +327,13 @@
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&dummyRenderPass);
pass.EndPass();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
}
// Destroyed encoder should allow encoding, and emit error on finish.
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&dummyRenderPass);
pass.EndPass();
ASSERT_DEVICE_ERROR(encoder.Finish(), HasSubstr("Destroyed encoder cannot be finished."));
@@ -342,7 +342,7 @@
// Destroyed encoder should allow encoding and shouldn't emit an error if never finished.
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&dummyRenderPass);
pass.EndPass();
}
@@ -353,21 +353,21 @@
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&dummyRenderPass);
pass.EndPass();
encoder.Finish();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
}
// Destroying an encoder twice should not emit any errors.
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
- dawn_native::FromAPI(encoder.Get())->Destroy();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
}
// Destroying an encoder twice and then calling finish should fail.
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
- dawn_native::FromAPI(encoder.Get())->Destroy();
- dawn_native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
+ dawn::native::FromAPI(encoder.Get())->Destroy();
ASSERT_DEVICE_ERROR(encoder.Finish(), HasSubstr("Destroyed encoder cannot be finished."));
}
}
diff --git a/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp b/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
index 62ccab9..625f29e 100644
--- a/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
+++ b/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
@@ -234,50 +234,50 @@
};
// Textures not used default to non-filtering
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(emptyVertexModule, unusedTextureFragmentModule).Get(),
nonFilteringBGL.Get()));
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(emptyVertexModule, unusedTextureFragmentModule).Get(), filteringBGL.Get()));
// Textures used with textureLoad default to non-filtering
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(emptyVertexModule, textureLoadFragmentModule).Get(), nonFilteringBGL.Get()));
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(emptyVertexModule, textureLoadFragmentModule).Get(), filteringBGL.Get()));
// Textures used with textureLoad on both stages default to non-filtering
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureLoadVertexModule, textureLoadFragmentModule).Get(),
nonFilteringBGL.Get()));
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureLoadVertexModule, textureLoadFragmentModule).Get(),
filteringBGL.Get()));
// Textures used with textureSample default to filtering
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(emptyVertexModule, textureSampleFragmentModule).Get(),
nonFilteringBGL.Get()));
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(emptyVertexModule, textureSampleFragmentModule).Get(), filteringBGL.Get()));
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureSampleVertexModule, unusedTextureFragmentModule).Get(),
nonFilteringBGL.Get()));
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureSampleVertexModule, unusedTextureFragmentModule).Get(),
filteringBGL.Get()));
// Textures used with both textureLoad and textureSample default to filtering
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureLoadVertexModule, textureSampleFragmentModule).Get(),
nonFilteringBGL.Get()));
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureLoadVertexModule, textureSampleFragmentModule).Get(),
filteringBGL.Get()));
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureSampleVertexModule, textureLoadFragmentModule).Get(),
nonFilteringBGL.Get()));
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
BGLFromModules(textureSampleVertexModule, textureLoadFragmentModule).Get(),
filteringBGL.Get()));
}
@@ -317,7 +317,7 @@
desc.entryCount = 1;
desc.entries = &binding;
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -351,7 +351,7 @@
[[stage(fragment)]] fn main() {
var pos : vec4<f32> = ssbo.pos;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
{
@@ -365,7 +365,7 @@
[[stage(fragment)]] fn main() {
var pos : vec4<f32> = uniforms.pos;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -380,7 +380,7 @@
[[stage(fragment)]] fn main() {
var pos : vec4<f32> = ssbo.pos;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -394,7 +394,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -406,7 +406,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -419,7 +419,7 @@
[[stage(fragment)]] fn main() {
_ = mySampler;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
}
@@ -447,7 +447,7 @@
[[stage(fragment)]] fn main() {
_ = myExternalTexture;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -475,7 +475,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -487,7 +487,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -499,7 +499,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -511,7 +511,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -523,7 +523,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -535,7 +535,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
}
@@ -563,7 +563,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -575,7 +575,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -587,7 +587,7 @@
[[stage(fragment)]] fn main() {
textureDimensions(myTexture);
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
}
@@ -620,7 +620,7 @@
[[stage(fragment)]] fn main() {
var pos : vec4<f32> = uniforms.pos;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -635,7 +635,7 @@
[[stage(fragment)]] fn main() {
var pos : vec4<f32> = uniforms.pos;
})");
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
@@ -650,7 +650,7 @@
[[stage(fragment)]] fn main() {
var pos : vec4<f32> = uniforms.pos;
})");
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get()));
}
}
@@ -762,7 +762,7 @@
descriptor.vertex.module = vsModule4;
descriptor.cFragment.module = fsModule4;
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), bgl4.Get()));
}
@@ -771,7 +771,7 @@
descriptor.vertex.module = vsModule64;
descriptor.cFragment.module = fsModule4;
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), bgl64.Get()));
}
@@ -780,7 +780,7 @@
descriptor.vertex.module = vsModule4;
descriptor.cFragment.module = fsModule64;
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), bgl64.Get()));
}
}
@@ -834,7 +834,7 @@
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
binding.visibility = wgpu::ShaderStage::Vertex;
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), device.CreateBindGroupLayout(&desc).Get()));
}
@@ -845,7 +845,7 @@
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
binding.visibility = wgpu::ShaderStage::Fragment;
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), device.CreateBindGroupLayout(&desc).Get()));
}
@@ -856,7 +856,7 @@
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
binding.visibility = wgpu::ShaderStage::Fragment | wgpu::ShaderStage::Vertex;
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), device.CreateBindGroupLayout(&desc).Get()));
}
}
@@ -1005,13 +1005,13 @@
wgpu::BindGroupLayout emptyBindGroupLayout = device.CreateBindGroupLayout(&desc);
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(0).Get(), emptyBindGroupLayout.Get())); // Used
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(1).Get(), emptyBindGroupLayout.Get())); // Not Used.
- EXPECT_FALSE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_FALSE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(2).Get(), emptyBindGroupLayout.Get())); // Used.
- EXPECT_TRUE(dawn_native::BindGroupLayoutBindingsEqualForTesting(
+ EXPECT_TRUE(dawn::native::BindGroupLayoutBindingsEqualForTesting(
pipeline.GetBindGroupLayout(3).Get(), emptyBindGroupLayout.Get())); // Not used
}
diff --git a/src/tests/unittests/validation/LabelTests.cpp b/src/tests/unittests/validation/LabelTests.cpp
index f8fd3b6..f05d0e1 100644
--- a/src/tests/unittests/validation/LabelTests.cpp
+++ b/src/tests/unittests/validation/LabelTests.cpp
@@ -33,7 +33,7 @@
// The label should be empty if one was not set.
{
wgpu::BindGroup bindGroup = device.CreateBindGroup(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(bindGroup.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(bindGroup.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -41,7 +41,7 @@
{
wgpu::BindGroup bindGroup = device.CreateBindGroup(&descriptor);
bindGroup.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(bindGroup.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(bindGroup.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -49,7 +49,7 @@
{
descriptor.label = label.c_str();
wgpu::BindGroup bindGroup = device.CreateBindGroup(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(bindGroup.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(bindGroup.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -65,7 +65,7 @@
// The label should be empty if one was not set.
{
wgpu::BindGroupLayout bindGroupLayout = device.CreateBindGroupLayout(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(bindGroupLayout.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(bindGroupLayout.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -73,7 +73,7 @@
{
wgpu::BindGroupLayout bindGroupLayout = device.CreateBindGroupLayout(&descriptor);
bindGroupLayout.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(bindGroupLayout.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(bindGroupLayout.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -81,7 +81,7 @@
{
descriptor.label = label.c_str();
wgpu::BindGroupLayout bindGroupLayout = device.CreateBindGroupLayout(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(bindGroupLayout.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(bindGroupLayout.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -96,7 +96,7 @@
// The label should be empty if one was not set.
{
wgpu::Buffer buffer = device.CreateBuffer(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(buffer.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(buffer.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -104,7 +104,7 @@
{
wgpu::Buffer buffer = device.CreateBuffer(&descriptor);
buffer.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(buffer.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(buffer.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -112,7 +112,7 @@
{
descriptor.label = label.c_str();
wgpu::Buffer buffer = device.CreateBuffer(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(buffer.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(buffer.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -126,7 +126,7 @@
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::CommandBuffer commandBuffer = encoder.Finish(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(commandBuffer.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(commandBuffer.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -135,7 +135,7 @@
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::CommandBuffer commandBuffer = encoder.Finish(&descriptor);
commandBuffer.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(commandBuffer.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(commandBuffer.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -144,7 +144,7 @@
descriptor.label = label.c_str();
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::CommandBuffer commandBuffer = encoder.Finish(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(commandBuffer.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(commandBuffer.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -157,7 +157,7 @@
// The label should be empty if one was not set.
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -165,7 +165,7 @@
{
wgpu::CommandEncoder encoder = device.CreateCommandEncoder(&descriptor);
encoder.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -173,7 +173,7 @@
{
descriptor.label = label.c_str();
wgpu::CommandEncoder encoder = device.CreateCommandEncoder(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -188,7 +188,7 @@
// The label should be empty if one was not set.
{
wgpu::ComputePassEncoder encoder = commandEncoder.BeginComputePass(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_TRUE(readbackLabel.empty());
encoder.EndPass();
}
@@ -197,7 +197,7 @@
{
wgpu::ComputePassEncoder encoder = commandEncoder.BeginComputePass(&descriptor);
encoder.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
encoder.EndPass();
}
@@ -206,7 +206,7 @@
{
descriptor.label = label.c_str();
wgpu::ComputePassEncoder encoder = commandEncoder.BeginComputePass(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
encoder.EndPass();
}
@@ -234,7 +234,7 @@
// The label should be empty if one was not set.
{
wgpu::ExternalTexture externalTexture = device.CreateExternalTexture(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(externalTexture.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(externalTexture.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -242,7 +242,7 @@
{
wgpu::ExternalTexture externalTexture = device.CreateExternalTexture(&descriptor);
externalTexture.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(externalTexture.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(externalTexture.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -250,7 +250,7 @@
{
descriptor.label = label.c_str();
wgpu::ExternalTexture externalTexture = device.CreateExternalTexture(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(externalTexture.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(externalTexture.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -267,7 +267,7 @@
// The label should be empty if one was not set.
{
wgpu::PipelineLayout pipelineLayout = device.CreatePipelineLayout(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipelineLayout.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipelineLayout.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -275,7 +275,7 @@
{
wgpu::PipelineLayout pipelineLayout = device.CreatePipelineLayout(&descriptor);
pipelineLayout.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipelineLayout.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipelineLayout.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -283,7 +283,7 @@
{
descriptor.label = label.c_str();
wgpu::PipelineLayout pipelineLayout = device.CreatePipelineLayout(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipelineLayout.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipelineLayout.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -298,7 +298,7 @@
// The label should be empty if one was not set.
{
wgpu::QuerySet querySet = device.CreateQuerySet(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(querySet.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(querySet.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -306,7 +306,7 @@
{
wgpu::QuerySet querySet = device.CreateQuerySet(&descriptor);
querySet.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(querySet.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(querySet.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -314,7 +314,7 @@
{
descriptor.label = label.c_str();
wgpu::QuerySet querySet = device.CreateQuerySet(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(querySet.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(querySet.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -330,7 +330,7 @@
// The label should be empty if one was not set.
{
wgpu::RenderBundleEncoder encoder = device.CreateRenderBundleEncoder(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -338,7 +338,7 @@
{
wgpu::RenderBundleEncoder encoder = device.CreateRenderBundleEncoder(&descriptor);
encoder.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -346,7 +346,7 @@
{
descriptor.label = label.c_str();
wgpu::RenderBundleEncoder encoder = device.CreateRenderBundleEncoder(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -367,7 +367,7 @@
// The label should be empty if one was not set.
{
wgpu::RenderPassEncoder encoder = commandEncoder.BeginRenderPass(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_TRUE(readbackLabel.empty());
encoder.EndPass();
}
@@ -376,7 +376,7 @@
{
wgpu::RenderPassEncoder encoder = commandEncoder.BeginRenderPass(&descriptor);
encoder.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
encoder.EndPass();
}
@@ -385,7 +385,7 @@
{
descriptor.label = label.c_str();
wgpu::RenderPassEncoder encoder = commandEncoder.BeginRenderPass(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(encoder.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(encoder.Get());
ASSERT_EQ(label, readbackLabel);
encoder.EndPass();
}
@@ -399,7 +399,7 @@
// The label should be empty if one was not set.
{
wgpu::Sampler sampler = device.CreateSampler(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(sampler.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(sampler.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -407,7 +407,7 @@
{
wgpu::Sampler sampler = device.CreateSampler(&descriptor);
sampler.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(sampler.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(sampler.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -415,7 +415,7 @@
{
descriptor.label = label.c_str();
wgpu::Sampler sampler = device.CreateSampler(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(sampler.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(sampler.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -436,7 +436,7 @@
// The label should be empty if one was not set.
{
wgpu::Texture texture = device.CreateTexture(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(texture.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(texture.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -444,7 +444,7 @@
{
wgpu::Texture texture = device.CreateTexture(&descriptor);
texture.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(texture.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(texture.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -452,7 +452,7 @@
{
descriptor.label = label.c_str();
wgpu::Texture texture = device.CreateTexture(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(texture.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(texture.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -475,7 +475,7 @@
// The label should be empty if one was not set.
{
wgpu::TextureView textureView = texture.CreateView();
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(textureView.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(textureView.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -483,7 +483,7 @@
{
wgpu::TextureView textureView = texture.CreateView();
textureView.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(textureView.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(textureView.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -492,7 +492,7 @@
wgpu::TextureViewDescriptor viewDescriptor;
viewDescriptor.label = label.c_str();
wgpu::TextureView textureView = texture.CreateView(&viewDescriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(textureView.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(textureView.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -518,7 +518,7 @@
// The label should be empty if one was not set.
{
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipeline.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipeline.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -526,7 +526,7 @@
{
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
pipeline.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipeline.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipeline.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -534,7 +534,7 @@
{
descriptor.label = label.c_str();
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipeline.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipeline.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -555,7 +555,7 @@
// The label should be empty if one was not set.
{
wgpu::ComputePipeline pipeline = device.CreateComputePipeline(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipeline.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipeline.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -563,7 +563,7 @@
{
wgpu::ComputePipeline pipeline = device.CreateComputePipeline(&descriptor);
pipeline.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipeline.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipeline.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -571,7 +571,7 @@
{
descriptor.label = label.c_str();
wgpu::ComputePipeline pipeline = device.CreateComputePipeline(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(pipeline.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(pipeline.Get());
ASSERT_EQ(label, readbackLabel);
}
}
@@ -592,7 +592,7 @@
// The label should be empty if one was not set.
{
wgpu::ShaderModule shaderModule = device.CreateShaderModule(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(shaderModule.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(shaderModule.Get());
ASSERT_TRUE(readbackLabel.empty());
}
@@ -600,7 +600,7 @@
{
wgpu::ShaderModule shaderModule = device.CreateShaderModule(&descriptor);
shaderModule.SetLabel(label.c_str());
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(shaderModule.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(shaderModule.Get());
ASSERT_EQ(label, readbackLabel);
}
@@ -608,7 +608,7 @@
{
descriptor.label = label.c_str();
wgpu::ShaderModule shaderModule = device.CreateShaderModule(&descriptor);
- std::string readbackLabel = dawn_native::GetObjectLabelForTesting(shaderModule.Get());
+ std::string readbackLabel = dawn::native::GetObjectLabelForTesting(shaderModule.Get());
ASSERT_EQ(label, readbackLabel);
}
}
\ No newline at end of file
diff --git a/src/tests/unittests/validation/ShaderModuleValidationTests.cpp b/src/tests/unittests/validation/ShaderModuleValidationTests.cpp
index 4ff0edb..e0da854 100644
--- a/src/tests/unittests/validation/ShaderModuleValidationTests.cpp
+++ b/src/tests/unittests/validation/ShaderModuleValidationTests.cpp
@@ -158,7 +158,7 @@
// Tests that shader module compilation messages can be queried.
TEST_F(ShaderModuleValidationTest, GetCompilationMessages) {
- // This test works assuming ShaderModule is backed by a dawn_native::ShaderModuleBase, which
+ // This test works assuming ShaderModule is backed by a dawn::native::ShaderModuleBase, which
// is not the case on the wire.
DAWN_SKIP_TEST_IF(UsesWire());
@@ -167,8 +167,8 @@
return vec4<f32>(0.0, 1.0, 0.0, 1.0);
})");
- dawn_native::ShaderModuleBase* shaderModuleBase = dawn_native::FromAPI(shaderModule.Get());
- dawn_native::OwnedCompilationMessages* messages = shaderModuleBase->GetCompilationMessages();
+ dawn::native::ShaderModuleBase* shaderModuleBase = dawn::native::FromAPI(shaderModule.Get());
+ dawn::native::OwnedCompilationMessages* messages = shaderModuleBase->GetCompilationMessages();
messages->ClearMessages();
messages->AddMessageForTesting("Info Message");
messages->AddMessageForTesting("Warning Message", wgpu::CompilationMessageType::Warning);
diff --git a/src/tests/unittests/validation/ToggleValidationTests.cpp b/src/tests/unittests/validation/ToggleValidationTests.cpp
index 9a8b22a..4e32af7 100644
--- a/src/tests/unittests/validation/ToggleValidationTests.cpp
+++ b/src/tests/unittests/validation/ToggleValidationTests.cpp
@@ -18,12 +18,12 @@
class ToggleValidationTest : public ValidationTest {};
- // Tests querying the detail of a toggle from dawn_native::InstanceBase works correctly.
+ // Tests querying the detail of a toggle from dawn::native::InstanceBase works correctly.
TEST_F(ToggleValidationTest, QueryToggleInfo) {
// Query with a valid toggle name
{
const char* kValidToggleName = "emulate_store_and_msaa_resolve";
- const dawn_native::ToggleInfo* toggleInfo = instance->GetToggleInfo(kValidToggleName);
+ const dawn::native::ToggleInfo* toggleInfo = instance->GetToggleInfo(kValidToggleName);
ASSERT_NE(nullptr, toggleInfo);
ASSERT_NE(nullptr, toggleInfo->name);
ASSERT_NE(nullptr, toggleInfo->description);
@@ -33,7 +33,8 @@
// Query with an invalid toggle name
{
const char* kInvalidToggleName = "!@#$%^&*";
- const dawn_native::ToggleInfo* toggleInfo = instance->GetToggleInfo(kInvalidToggleName);
+ const dawn::native::ToggleInfo* toggleInfo =
+ instance->GetToggleInfo(kInvalidToggleName);
ASSERT_EQ(nullptr, toggleInfo);
}
}
@@ -50,7 +51,7 @@
togglesDesc.forceEnabledTogglesCount = 1;
WGPUDevice deviceWithToggle = adapter.CreateDevice(&descriptor);
- std::vector<const char*> toggleNames = dawn_native::GetTogglesUsed(deviceWithToggle);
+ std::vector<const char*> toggleNames = dawn::native::GetTogglesUsed(deviceWithToggle);
bool validToggleExists = false;
for (const char* toggle : toggleNames) {
if (strcmp(toggle, kValidToggleName) == 0) {
@@ -70,7 +71,7 @@
togglesDesc.forceEnabledTogglesCount = 1;
WGPUDevice deviceWithToggle = adapter.CreateDevice(&descriptor);
- std::vector<const char*> toggleNames = dawn_native::GetTogglesUsed(deviceWithToggle);
+ std::vector<const char*> toggleNames = dawn::native::GetTogglesUsed(deviceWithToggle);
bool InvalidToggleExists = false;
for (const char* toggle : toggleNames) {
if (strcmp(toggle, kInvalidToggleName) == 0) {
@@ -90,7 +91,7 @@
togglesDesc.forceEnabledTogglesCount = 1;
WGPUDevice deviceWithToggle = adapter.CreateDevice(&descriptor);
- std::vector<const char*> toggleNames = dawn_native::GetTogglesUsed(deviceWithToggle);
+ std::vector<const char*> toggleNames = dawn::native::GetTogglesUsed(deviceWithToggle);
bool validToggleExists = false;
for (const char* toggle : toggleNames) {
if (strcmp(toggle, kValidToggleName) == 0) {
diff --git a/src/tests/unittests/validation/ValidationTest.cpp b/src/tests/unittests/validation/ValidationTest.cpp
index f7bb69b..4bbe6f2 100644
--- a/src/tests/unittests/validation/ValidationTest.cpp
+++ b/src/tests/unittests/validation/ValidationTest.cpp
@@ -83,10 +83,10 @@
}
void ValidationTest::SetUp() {
- instance = std::make_unique<dawn_native::Instance>();
+ instance = std::make_unique<dawn::native::Instance>();
instance->DiscoverDefaultAdapters();
- std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
+ std::vector<dawn::native::Adapter> adapters = instance->GetAdapters();
// Validation tests run against the null backend, find the corresponding adapter
bool foundNullAdapter = false;
@@ -125,7 +125,7 @@
if (device) {
EXPECT_EQ(mLastWarningCount,
- dawn_native::GetDeprecationWarningCountForTesting(backendDevice));
+ dawn::native::GetDeprecationWarningCountForTesting(backendDevice));
}
}
@@ -180,7 +180,7 @@
}
bool ValidationTest::HasToggleEnabled(const char* toggle) const {
- auto toggles = dawn_native::GetTogglesUsed(backendDevice);
+ auto toggles = dawn::native::GetTogglesUsed(backendDevice);
return std::find_if(toggles.begin(), toggles.end(), [toggle](const char* name) {
return strcmp(toggle, name) == 0;
}) != toggles.end();
@@ -189,7 +189,7 @@
wgpu::SupportedLimits ValidationTest::GetSupportedLimits() {
WGPUSupportedLimits supportedLimits;
supportedLimits.nextInChain = nullptr;
- dawn_native::GetProcs().deviceGetLimits(backendDevice, &supportedLimits);
+ dawn::native::GetProcs().deviceGetLimits(backendDevice, &supportedLimits);
return *reinterpret_cast<wgpu::SupportedLimits*>(&supportedLimits);
}
diff --git a/src/tests/unittests/validation/ValidationTest.h b/src/tests/unittests/validation/ValidationTest.h
index 4550b42..8a8e9f6 100644
--- a/src/tests/unittests/validation/ValidationTest.h
+++ b/src/tests/unittests/validation/ValidationTest.h
@@ -72,16 +72,16 @@
} \
} while (0)
-#define EXPECT_DEPRECATION_WARNINGS(statement, n) \
- do { \
- FlushWire(); \
- size_t warningsBefore = dawn_native::GetDeprecationWarningCountForTesting(backendDevice); \
- EXPECT_EQ(mLastWarningCount, warningsBefore); \
- statement; \
- FlushWire(); \
- size_t warningsAfter = dawn_native::GetDeprecationWarningCountForTesting(backendDevice); \
- EXPECT_EQ(warningsAfter, warningsBefore + n); \
- mLastWarningCount = warningsAfter; \
+#define EXPECT_DEPRECATION_WARNINGS(statement, n) \
+ do { \
+ FlushWire(); \
+ size_t warningsBefore = dawn::native::GetDeprecationWarningCountForTesting(backendDevice); \
+ EXPECT_EQ(mLastWarningCount, warningsBefore); \
+ statement; \
+ FlushWire(); \
+ size_t warningsAfter = dawn::native::GetDeprecationWarningCountForTesting(backendDevice); \
+ EXPECT_EQ(warningsAfter, warningsBefore + n); \
+ mLastWarningCount = warningsAfter; \
} while (0)
#define EXPECT_DEPRECATION_WARNING(statement) EXPECT_DEPRECATION_WARNINGS(statement, 1)
@@ -135,8 +135,8 @@
protected:
virtual WGPUDevice CreateTestDevice();
- std::unique_ptr<dawn_native::Instance> instance;
- dawn_native::Adapter adapter;
+ std::unique_ptr<dawn::native::Instance> instance;
+ dawn::native::Adapter adapter;
wgpu::Device device;
WGPUDevice backendDevice;
diff --git a/src/tests/white_box/BufferAllocatedSizeTests.cpp b/src/tests/white_box/BufferAllocatedSizeTests.cpp
index 15c1437..e100dc7 100644
--- a/src/tests/white_box/BufferAllocatedSizeTests.cpp
+++ b/src/tests/white_box/BufferAllocatedSizeTests.cpp
@@ -53,7 +53,7 @@
{
const uint32_t bufferSize = kMinBufferSize;
wgpu::Buffer buffer = CreateBuffer(wgpu::BufferUsage::Uniform, bufferSize);
- EXPECT_EQ(dawn_native::GetAllocatedSizeForTesting(buffer.Get()),
+ EXPECT_EQ(dawn::native::GetAllocatedSizeForTesting(buffer.Get()),
Align(bufferSize, requiredBufferAlignment));
}
@@ -63,7 +63,7 @@
const uint32_t bufferSize = std::max(1u + requiredBufferAlignment, kMinBufferSize);
wgpu::Buffer buffer =
CreateBuffer(wgpu::BufferUsage::Uniform | wgpu::BufferUsage::Storage, bufferSize);
- EXPECT_EQ(dawn_native::GetAllocatedSizeForTesting(buffer.Get()),
+ EXPECT_EQ(dawn::native::GetAllocatedSizeForTesting(buffer.Get()),
Align(bufferSize, requiredBufferAlignment));
}
@@ -72,7 +72,7 @@
const uint32_t bufferSize = kMinBufferSize;
wgpu::Buffer buffer =
CreateBuffer(wgpu::BufferUsage::Uniform | wgpu::BufferUsage::Storage, bufferSize);
- EXPECT_EQ(dawn_native::GetAllocatedSizeForTesting(buffer.Get()),
+ EXPECT_EQ(dawn::native::GetAllocatedSizeForTesting(buffer.Get()),
Align(bufferSize, requiredBufferAlignment));
}
}
diff --git a/src/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/tests/white_box/D3D12DescriptorHeapTests.cpp
index 14bf526..3ea6ab8 100644
--- a/src/tests/white_box/D3D12DescriptorHeapTests.cpp
+++ b/src/tests/white_box/D3D12DescriptorHeapTests.cpp
@@ -30,7 +30,7 @@
// should be updated if the internals of Tick() change.
constexpr uint32_t kFrameDepth = 2;
-using namespace dawn_native::d3d12;
+using namespace dawn::native::d3d12;
class D3D12DescriptorHeapTests : public DawnTest {
protected:
@@ -108,7 +108,7 @@
}
CPUDescriptorHeapAllocation AllocateCPUDescriptors() {
- dawn_native::ResultOrError<CPUDescriptorHeapAllocation> result =
+ dawn::native::ResultOrError<CPUDescriptorHeapAllocation> result =
mAllocator.AllocateCPUDescriptors();
return (result.IsSuccess()) ? result.AcquireSuccess() : CPUDescriptorHeapAllocation{};
}
@@ -124,7 +124,7 @@
// Verify the shader visible view heaps switch over within a single submit.
TEST_P(D3D12DescriptorHeapTests, SwitchOverViewHeap) {
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
utils::ComboRenderPipelineDescriptor renderPipelineDescriptor;
@@ -224,7 +224,7 @@
TEST_P(D3D12DescriptorHeapTests, PoolHeapsInMultipleSubmits) {
// Use small heaps to count only pool-allocated switches.
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
ShaderVisibleDescriptorAllocator* allocator =
mD3DDevice->GetSamplerShaderVisibleDescriptorAllocator();
@@ -265,7 +265,7 @@
TEST_P(D3D12DescriptorHeapTests, PoolHeapsInPendingSubmit) {
// Use small heaps to count only pool-allocated switches.
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
constexpr uint32_t kNumOfSwitches = 5;
@@ -297,7 +297,7 @@
TEST_P(D3D12DescriptorHeapTests, PoolHeapsInPendingAndMultipleSubmits) {
// Use small heaps to count only pool-allocated switches.
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
constexpr uint32_t kNumOfSwitches = 5;
@@ -435,7 +435,7 @@
// the result is the arithmetic sum of the sequence after the framebuffer is blended by
// accumulation. By checking for this sum, we ensure each bindgroup was encoded correctly.
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
utils::BasicRenderPass renderPass =
MakeRenderPass(kRTSize, kRTSize, wgpu::TextureFormat::R16Float);
@@ -509,7 +509,7 @@
// descriptors.
TEST_P(D3D12DescriptorHeapTests, EncodeUBOOverflowMultipleSubmit) {
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
// TODO(crbug.com/dawn/742): Test output is wrong with D3D12 + WARP.
DAWN_SUPPRESS_TEST_IF(IsD3D12() && IsWARP());
@@ -597,7 +597,7 @@
// in the heap.
TEST_P(D3D12DescriptorHeapTests, EncodeReuseUBOOverflow) {
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
@@ -658,7 +658,7 @@
// first descriptor at the same offset in the heap.
TEST_P(D3D12DescriptorHeapTests, EncodeReuseUBOMultipleSubmits) {
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
@@ -738,7 +738,7 @@
// Shader-visible heaps should switch out |kNumOfViewHeaps| times.
TEST_P(D3D12DescriptorHeapTests, EncodeManyUBOAndSamplers) {
DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled(
- dawn_native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
+ dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting));
// Create a solid filled texture.
wgpu::TextureDescriptor descriptor;
diff --git a/src/tests/white_box/D3D12ResidencyTests.cpp b/src/tests/white_box/D3D12ResidencyTests.cpp
index 6622db1..f8812e3 100644
--- a/src/tests/white_box/D3D12ResidencyTests.cpp
+++ b/src/tests/white_box/D3D12ResidencyTests.cpp
@@ -41,8 +41,8 @@
DAWN_TEST_UNSUPPORTED_IF(UsesWire());
// Restrict Dawn's budget to create an artificial budget.
- dawn_native::d3d12::Device* d3dDevice =
- dawn_native::d3d12::ToBackend(dawn_native::FromAPI((device.Get())));
+ dawn::native::d3d12::Device* d3dDevice =
+ dawn::native::d3d12::ToBackend(dawn::native::FromAPI((device.Get())));
d3dDevice->GetResidencyManager()->RestrictBudgetForTesting(kRestrictedBudgetSize);
// Initialize a source buffer on the GPU to serve as a source to quickly copy data to other
@@ -92,20 +92,20 @@
class D3D12ResourceResidencyTests : public D3D12ResidencyTestBase {
protected:
bool CheckAllocationMethod(wgpu::Buffer buffer,
- dawn_native::AllocationMethod allocationMethod) const {
- dawn_native::d3d12::Buffer* d3dBuffer =
- dawn_native::d3d12::ToBackend(dawn_native::FromAPI((buffer.Get())));
+ dawn::native::AllocationMethod allocationMethod) const {
+ dawn::native::d3d12::Buffer* d3dBuffer =
+ dawn::native::d3d12::ToBackend(dawn::native::FromAPI((buffer.Get())));
return d3dBuffer->CheckAllocationMethodForTesting(allocationMethod);
}
bool CheckIfBufferIsResident(wgpu::Buffer buffer) const {
- dawn_native::d3d12::Buffer* d3dBuffer =
- dawn_native::d3d12::ToBackend(dawn_native::FromAPI((buffer.Get())));
+ dawn::native::d3d12::Buffer* d3dBuffer =
+ dawn::native::d3d12::ToBackend(dawn::native::FromAPI((buffer.Get())));
return d3dBuffer->CheckIsResidentForTesting();
}
bool IsUMA() const {
- return dawn_native::d3d12::ToBackend(dawn_native::FromAPI(device.Get()))
+ return dawn::native::d3d12::ToBackend(dawn::native::FromAPI(device.Get()))
->GetDeviceInfo()
.isUMA;
}
@@ -128,7 +128,7 @@
for (uint32_t i = 0; i < bufferSet1.size(); i++) {
EXPECT_TRUE(CheckIfBufferIsResident(bufferSet1[i]));
EXPECT_TRUE(
- CheckAllocationMethod(bufferSet1[i], dawn_native::AllocationMethod::kSubAllocated));
+ CheckAllocationMethod(bufferSet1[i], dawn::native::AllocationMethod::kSubAllocated));
}
// Create enough directly-allocated buffers to use the entire budget.
@@ -166,7 +166,7 @@
// allocated internally.
for (uint32_t i = 0; i < bufferSet1.size(); i++) {
EXPECT_TRUE(CheckIfBufferIsResident(bufferSet1[i]));
- EXPECT_TRUE(CheckAllocationMethod(bufferSet1[i], dawn_native::AllocationMethod::kDirect));
+ EXPECT_TRUE(CheckAllocationMethod(bufferSet1[i], dawn::native::AllocationMethod::kDirect));
}
// Create enough directly-allocated buffers to use the entire budget.
@@ -317,14 +317,14 @@
TEST_P(D3D12ResourceResidencyTests, SetExternalReservation) {
// Set an external reservation of 20% the budget. We should succesfully reserve the amount we
// request.
- uint64_t amountReserved = dawn_native::d3d12::SetExternalMemoryReservation(
- device.Get(), kRestrictedBudgetSize * .2, dawn_native::d3d12::MemorySegment::Local);
+ uint64_t amountReserved = dawn::native::d3d12::SetExternalMemoryReservation(
+ device.Get(), kRestrictedBudgetSize * .2, dawn::native::d3d12::MemorySegment::Local);
EXPECT_EQ(amountReserved, kRestrictedBudgetSize * .2);
// If we're on a non-UMA device, we should also check the NON_LOCAL memory segment.
if (!IsUMA()) {
- amountReserved = dawn_native::d3d12::SetExternalMemoryReservation(
- device.Get(), kRestrictedBudgetSize * .2, dawn_native::d3d12::MemorySegment::NonLocal);
+ amountReserved = dawn::native::d3d12::SetExternalMemoryReservation(
+ device.Get(), kRestrictedBudgetSize * .2, dawn::native::d3d12::MemorySegment::NonLocal);
EXPECT_EQ(amountReserved, kRestrictedBudgetSize * .2);
}
}
@@ -368,14 +368,14 @@
wgpu::Sampler sampler = device.CreateSampler();
- dawn_native::d3d12::Device* d3dDevice =
- dawn_native::d3d12::ToBackend(dawn_native::FromAPI(device.Get()));
+ dawn::native::d3d12::Device* d3dDevice =
+ dawn::native::d3d12::ToBackend(dawn::native::FromAPI(device.Get()));
- dawn_native::d3d12::ShaderVisibleDescriptorAllocator* allocator =
+ dawn::native::d3d12::ShaderVisibleDescriptorAllocator* allocator =
d3dDevice->GetViewShaderVisibleDescriptorAllocator();
const uint64_t heapSize = allocator->GetShaderVisibleHeapSizeForTesting();
- const dawn_native::d3d12::HeapVersionID heapSerial =
+ const dawn::native::d3d12::HeapVersionID heapSerial =
allocator->GetShaderVisibleHeapSerialForTesting();
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
@@ -402,7 +402,7 @@
// Check the heap serial to ensure the heap has switched.
EXPECT_EQ(allocator->GetShaderVisibleHeapSerialForTesting(),
- heapSerial + dawn_native::d3d12::HeapVersionID(1));
+ heapSerial + dawn::native::d3d12::HeapVersionID(1));
// Check that currrently bound ShaderVisibleHeap is locked resident.
EXPECT_TRUE(allocator->IsShaderVisibleHeapLockedResidentForTesting());
diff --git a/src/tests/white_box/D3D12ResourceHeapTests.cpp b/src/tests/white_box/D3D12ResourceHeapTests.cpp
index 8f1155b..f68c12f 100644
--- a/src/tests/white_box/D3D12ResourceHeapTests.cpp
+++ b/src/tests/white_box/D3D12ResourceHeapTests.cpp
@@ -17,7 +17,7 @@
#include "dawn_native/d3d12/BufferD3D12.h"
#include "dawn_native/d3d12/TextureD3D12.h"
-using namespace dawn_native::d3d12;
+using namespace dawn::native::d3d12;
class D3D12ResourceHeapTests : public DawnTest {
protected:
diff --git a/src/tests/white_box/EGLImageWrappingTests.cpp b/src/tests/white_box/EGLImageWrappingTests.cpp
index 7d7d71c..7fb5fa6 100644
--- a/src/tests/white_box/EGLImageWrappingTests.cpp
+++ b/src/tests/white_box/EGLImageWrappingTests.cpp
@@ -127,9 +127,9 @@
GLenum type,
void* data,
size_t size) {
- dawn_native::opengl::Device* openglDevice =
- dawn_native::opengl::ToBackend(dawn_native::FromAPI(device.Get()));
- const dawn_native::opengl::OpenGLFunctions& gl = openglDevice->gl;
+ dawn::native::opengl::Device* openglDevice =
+ dawn::native::opengl::ToBackend(dawn::native::FromAPI(device.Get()));
+ const dawn::native::opengl::OpenGLFunctions& gl = openglDevice->gl;
GLuint tex;
gl.GenTextures(1, &tex);
gl.BindTexture(GL_TEXTURE_2D, tex);
@@ -144,10 +144,10 @@
return ScopedEGLImage(egl.DestroyImage, gl.DeleteTextures, dpy, eglImage, tex);
}
wgpu::Texture WrapEGLImage(const wgpu::TextureDescriptor* descriptor, EGLImage eglImage) {
- dawn_native::opengl::ExternalImageDescriptorEGLImage externDesc;
+ dawn::native::opengl::ExternalImageDescriptorEGLImage externDesc;
externDesc.cTextureDescriptor = reinterpret_cast<const WGPUTextureDescriptor*>(descriptor);
externDesc.image = eglImage;
- WGPUTexture texture = dawn_native::opengl::WrapExternalEGLImage(device.Get(), &externDesc);
+ WGPUTexture texture = dawn::native::opengl::WrapExternalEGLImage(device.Get(), &externDesc);
return wgpu::Texture::Acquire(texture);
}
EGLFunctions egl;
@@ -299,9 +299,9 @@
GLenum glType,
void* data,
size_t dataSize) {
- dawn_native::opengl::Device* openglDevice =
- dawn_native::opengl::ToBackend(dawn_native::FromAPI(device.Get()));
- const dawn_native::opengl::OpenGLFunctions& gl = openglDevice->gl;
+ dawn::native::opengl::Device* openglDevice =
+ dawn::native::opengl::ToBackend(dawn::native::FromAPI(device.Get()));
+ const dawn::native::opengl::OpenGLFunctions& gl = openglDevice->gl;
// Get a texture view for the eglImage
wgpu::TextureDescriptor textureDescriptor;
diff --git a/src/tests/white_box/InternalResourceUsageTests.cpp b/src/tests/white_box/InternalResourceUsageTests.cpp
index a260fe5..db61b9c 100644
--- a/src/tests/white_box/InternalResourceUsageTests.cpp
+++ b/src/tests/white_box/InternalResourceUsageTests.cpp
@@ -32,9 +32,9 @@
TEST_P(InternalResourceUsageTests, InternalBufferUsage) {
DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("skip_validation"));
- ASSERT_DEVICE_ERROR(CreateBuffer(dawn_native::kReadOnlyStorageBuffer));
+ ASSERT_DEVICE_ERROR(CreateBuffer(dawn::native::kReadOnlyStorageBuffer));
- ASSERT_DEVICE_ERROR(CreateBuffer(dawn_native::kInternalStorageBuffer));
+ ASSERT_DEVICE_ERROR(CreateBuffer(dawn::native::kInternalStorageBuffer));
}
DAWN_INSTANTIATE_TEST(InternalResourceUsageTests, NullBackend());
@@ -48,7 +48,7 @@
wgpu::BindGroupLayoutEntry bglEntry;
bglEntry.binding = 0;
- bglEntry.buffer.type = dawn_native::kInternalStorageBufferBinding;
+ bglEntry.buffer.type = dawn::native::kInternalStorageBufferBinding;
bglEntry.visibility = wgpu::ShaderStage::Compute;
wgpu::BindGroupLayoutDescriptor bglDesc;
diff --git a/src/tests/white_box/InternalStorageBufferBindingTests.cpp b/src/tests/white_box/InternalStorageBufferBindingTests.cpp
index 8ee4f1a..745278a 100644
--- a/src/tests/white_box/InternalStorageBufferBindingTests.cpp
+++ b/src/tests/white_box/InternalStorageBufferBindingTests.cpp
@@ -44,22 +44,22 @@
)");
// Create binding group layout with internal storage buffer binding type
- dawn_native::BindGroupLayoutEntry bglEntry;
+ dawn::native::BindGroupLayoutEntry bglEntry;
bglEntry.binding = 0;
- bglEntry.buffer.type = dawn_native::kInternalStorageBufferBinding;
+ bglEntry.buffer.type = dawn::native::kInternalStorageBufferBinding;
bglEntry.visibility = wgpu::ShaderStage::Compute;
- dawn_native::BindGroupLayoutDescriptor bglDesc;
+ dawn::native::BindGroupLayoutDescriptor bglDesc;
bglDesc.entryCount = 1;
bglDesc.entries = &bglEntry;
- dawn_native::DeviceBase* nativeDevice = dawn_native::FromAPI(device.Get());
+ dawn::native::DeviceBase* nativeDevice = dawn::native::FromAPI(device.Get());
- Ref<dawn_native::BindGroupLayoutBase> bglRef =
+ Ref<dawn::native::BindGroupLayoutBase> bglRef =
nativeDevice->CreateBindGroupLayout(&bglDesc, true).AcquireSuccess();
wgpu::BindGroupLayout bgl =
- wgpu::BindGroupLayout::Acquire(dawn_native::ToAPI(bglRef.Detach()));
+ wgpu::BindGroupLayout::Acquire(dawn::native::ToAPI(bglRef.Detach()));
// Create pipeline layout
wgpu::PipelineLayoutDescriptor plDesc;
diff --git a/src/tests/white_box/MetalAutoreleasePoolTests.mm b/src/tests/white_box/MetalAutoreleasePoolTests.mm
index 1202307..3a741d5 100644
--- a/src/tests/white_box/MetalAutoreleasePoolTests.mm
+++ b/src/tests/white_box/MetalAutoreleasePoolTests.mm
@@ -16,7 +16,7 @@
#include "dawn_native/metal/DeviceMTL.h"
-using namespace dawn_native::metal;
+using namespace dawn::native::metal;
class MetalAutoreleasePoolTests : public DawnTest {
private:
diff --git a/src/tests/white_box/QueryInternalShaderTests.cpp b/src/tests/white_box/QueryInternalShaderTests.cpp
index 58d6a37..5217998 100644
--- a/src/tests/white_box/QueryInternalShaderTests.cpp
+++ b/src/tests/white_box/QueryInternalShaderTests.cpp
@@ -25,11 +25,11 @@
wgpu::Buffer timestamps,
wgpu::Buffer availability,
wgpu::Buffer params) {
- ASSERT_TRUE(dawn_native::EncodeConvertTimestampsToNanoseconds(
- dawn_native::FromAPI(encoder.Get()), dawn_native::FromAPI(timestamps.Get()),
- dawn_native::FromAPI(availability.Get()),
- dawn_native::FromAPI(params.Get()))
- .IsSuccess());
+ ASSERT_TRUE(
+ dawn::native::EncodeConvertTimestampsToNanoseconds(
+ dawn::native::FromAPI(encoder.Get()), dawn::native::FromAPI(timestamps.Get()),
+ dawn::native::FromAPI(availability.Get()), dawn::native::FromAPI(params.Get()))
+ .IsSuccess());
}
class InternalShaderExpectation : public detail::Expectation {
@@ -147,7 +147,7 @@
kQueryCount * sizeof(uint32_t), wgpu::BufferUsage::Storage);
// The params uniform buffer
- dawn_native::TimestampParams params = {firstQuery, queryCount, destinationOffset, kPeriod};
+ dawn::native::TimestampParams params = {firstQuery, queryCount, destinationOffset, kPeriod};
wgpu::Buffer paramsBuffer = utils::CreateBufferFromData(device, ¶ms, sizeof(params),
wgpu::BufferUsage::Uniform);
diff --git a/src/tests/white_box/VulkanErrorInjectorTests.cpp b/src/tests/white_box/VulkanErrorInjectorTests.cpp
index 2f3e33b..e442279 100644
--- a/src/tests/white_box/VulkanErrorInjectorTests.cpp
+++ b/src/tests/white_box/VulkanErrorInjectorTests.cpp
@@ -29,11 +29,11 @@
DawnTest::SetUp();
DAWN_TEST_UNSUPPORTED_IF(UsesWire());
- mDeviceVk = dawn_native::vulkan::ToBackend(dawn_native::FromAPI(device.Get()));
+ mDeviceVk = dawn::native::vulkan::ToBackend(dawn::native::FromAPI(device.Get()));
}
protected:
- dawn_native::vulkan::Device* mDeviceVk;
+ dawn::native::vulkan::Device* mDeviceVk;
};
} // anonymous namespace
@@ -56,7 +56,7 @@
auto CreateTestBuffer = [&]() -> bool {
VkBuffer buffer = VK_NULL_HANDLE;
- dawn_native::MaybeError err = CheckVkSuccess(
+ dawn::native::MaybeError err = CheckVkSuccess(
mDeviceVk->fn.CreateBuffer(mDeviceVk->GetVkDevice(), &createInfo, nullptr, &buffer),
"vkCreateBuffer");
if (err.IsError()) {
@@ -78,45 +78,45 @@
EXPECT_TRUE(CreateTestBuffer());
// The error injector call count should be empty
- EXPECT_EQ(dawn_native::AcquireErrorInjectorCallCount(), 0u);
+ EXPECT_EQ(dawn::native::AcquireErrorInjectorCallCount(), 0u);
}
// Test error injection works.
- dawn_native::EnableErrorInjector();
+ dawn::native::EnableErrorInjector();
{
EXPECT_TRUE(CreateTestBuffer());
EXPECT_TRUE(CreateTestBuffer());
// The error injector call count should be two.
- EXPECT_EQ(dawn_native::AcquireErrorInjectorCallCount(), 2u);
+ EXPECT_EQ(dawn::native::AcquireErrorInjectorCallCount(), 2u);
// Inject an error at index 0. The first should fail, the second succeed.
{
- dawn_native::InjectErrorAt(0u);
+ dawn::native::InjectErrorAt(0u);
EXPECT_FALSE(CreateTestBuffer());
EXPECT_TRUE(CreateTestBuffer());
- dawn_native::ClearErrorInjector();
+ dawn::native::ClearErrorInjector();
}
// Inject an error at index 1. The second should fail, the first succeed.
{
- dawn_native::InjectErrorAt(1u);
+ dawn::native::InjectErrorAt(1u);
EXPECT_TRUE(CreateTestBuffer());
EXPECT_FALSE(CreateTestBuffer());
- dawn_native::ClearErrorInjector();
+ dawn::native::ClearErrorInjector();
}
// Inject an error and then clear the injector. Calls should be successful.
{
- dawn_native::InjectErrorAt(0u);
- dawn_native::DisableErrorInjector();
+ dawn::native::InjectErrorAt(0u);
+ dawn::native::DisableErrorInjector();
EXPECT_TRUE(CreateTestBuffer());
EXPECT_TRUE(CreateTestBuffer());
- dawn_native::ClearErrorInjector();
+ dawn::native::ClearErrorInjector();
}
}
}
diff --git a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp
index c0afd94..709e0bc 100644
--- a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp
+++ b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp
@@ -28,7 +28,7 @@
#include <fcntl.h>
#include <gbm.h>
-namespace dawn_native::vulkan {
+namespace dawn::native::vulkan {
namespace {
@@ -44,7 +44,7 @@
DAWN_TEST_UNSUPPORTED_IF(UsesWire());
gbmDevice = CreateGbmDevice();
- deviceVk = dawn_native::vulkan::ToBackend(dawn_native::FromAPI(device.Get()));
+ deviceVk = dawn::native::vulkan::ToBackend(dawn::native::FromAPI(device.Get()));
defaultGbmBo = CreateGbmBo(1, 1, true /* linear */);
defaultStride = gbm_bo_get_stride_for_plane(defaultGbmBo, 0);
@@ -116,7 +116,7 @@
std::vector<int> waitFDs,
bool isInitialized = true,
bool expectValid = true) {
- dawn_native::vulkan::ExternalImageDescriptorDmaBuf descriptor;
+ dawn::native::vulkan::ExternalImageDescriptorDmaBuf descriptor;
return WrapVulkanImage(dawnDevice, textureDescriptor, memoryFd, stride, drmModifier,
waitFDs, descriptor.releasedOldLayout,
descriptor.releasedNewLayout, isInitialized, expectValid);
@@ -132,7 +132,7 @@
VkImageLayout releasedNewLayout,
bool isInitialized = true,
bool expectValid = true) {
- dawn_native::vulkan::ExternalImageDescriptorDmaBuf descriptor;
+ dawn::native::vulkan::ExternalImageDescriptorDmaBuf descriptor;
descriptor.cTextureDescriptor =
reinterpret_cast<const WGPUTextureDescriptor*>(textureDescriptor);
descriptor.isInitialized = isInitialized;
@@ -144,7 +144,7 @@
descriptor.releasedNewLayout = releasedNewLayout;
WGPUTexture texture =
- dawn_native::vulkan::WrapVulkanImage(dawnDevice.Get(), &descriptor);
+ dawn::native::vulkan::WrapVulkanImage(dawnDevice.Get(), &descriptor);
if (expectValid) {
EXPECT_NE(texture, nullptr) << "Failed to wrap image, are external memory / "
@@ -160,8 +160,9 @@
// We have to export the signal before destroying the wrapped texture else it's an
// assertion failure
void IgnoreSignalSemaphore(wgpu::Texture wrappedTexture) {
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(), VK_IMAGE_LAYOUT_GENERAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_GENERAL, &exportInfo);
for (int handle : exportInfo.semaphoreHandles) {
ASSERT_NE(handle, -1);
close(handle);
@@ -169,7 +170,7 @@
}
protected:
- dawn_native::vulkan::Device* deviceVk;
+ dawn::native::vulkan::Device* deviceVk;
gbm_device* gbmDevice;
wgpu::TextureDescriptor defaultDescriptor;
gbm_bo* defaultGbmBo;
@@ -267,8 +268,8 @@
ASSERT_NE(texture.Get(), nullptr);
IgnoreSignalSemaphore(texture);
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- ASSERT_DEVICE_ERROR(bool success = dawn_native::vulkan::ExportVulkanImage(
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ ASSERT_DEVICE_ERROR(bool success = dawn::native::vulkan::ExportVulkanImage(
texture.Get(), VK_IMAGE_LAYOUT_GENERAL, &exportInfo));
ASSERT_FALSE(success);
}
@@ -280,8 +281,8 @@
wgpu::Texture texture = device.CreateTexture(&defaultDescriptor);
ASSERT_NE(texture.Get(), nullptr);
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- ASSERT_DEVICE_ERROR(bool success = dawn_native::vulkan::ExportVulkanImage(
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ ASSERT_DEVICE_ERROR(bool success = dawn::native::vulkan::ExportVulkanImage(
texture.Get(), VK_IMAGE_LAYOUT_GENERAL, &exportInfo));
ASSERT_FALSE(success);
}
@@ -294,8 +295,8 @@
ASSERT_NE(texture.Get(), nullptr);
texture.Destroy();
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- ASSERT_DEVICE_ERROR(bool success = dawn_native::vulkan::ExportVulkanImage(
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ ASSERT_DEVICE_ERROR(bool success = dawn::native::vulkan::ExportVulkanImage(
texture.Get(), VK_IMAGE_LAYOUT_GENERAL, &exportInfo));
ASSERT_FALSE(success);
}
@@ -311,7 +312,7 @@
}
// Create another device based on the original
- backendAdapter = dawn_native::vulkan::ToBackend(deviceVk->GetAdapter());
+ backendAdapter = dawn::native::vulkan::ToBackend(deviceVk->GetAdapter());
deviceDescriptor.nextInChain = &togglesDesc;
togglesDesc.forceEnabledToggles = GetParam().forceEnabledWorkarounds.data();
togglesDesc.forceEnabledTogglesCount = GetParam().forceEnabledWorkarounds.size();
@@ -319,17 +320,17 @@
togglesDesc.forceDisabledTogglesCount = GetParam().forceDisabledWorkarounds.size();
secondDeviceVk =
- dawn_native::vulkan::ToBackend(backendAdapter->APICreateDevice(&deviceDescriptor));
- secondDevice = wgpu::Device::Acquire(dawn_native::ToAPI(secondDeviceVk));
+ dawn::native::vulkan::ToBackend(backendAdapter->APICreateDevice(&deviceDescriptor));
+ secondDevice = wgpu::Device::Acquire(dawn::native::ToAPI(secondDeviceVk));
}
protected:
- dawn_native::vulkan::Adapter* backendAdapter;
- dawn_native::DeviceDescriptor deviceDescriptor;
- dawn_native::DawnTogglesDeviceDescriptor togglesDesc;
+ dawn::native::vulkan::Adapter* backendAdapter;
+ dawn::native::DeviceDescriptor deviceDescriptor;
+ dawn::native::DawnTogglesDeviceDescriptor togglesDesc;
wgpu::Device secondDevice;
- dawn_native::vulkan::Device* secondDeviceVk;
+ dawn::native::vulkan::Device* secondDeviceVk;
// Clear a texture on a given device
void ClearImage(wgpu::Device dawnDevice,
@@ -382,9 +383,9 @@
// Clear |wrappedTexture| on |secondDevice|
ClearImage(secondDevice, wrappedTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
// Import the image to |device|, making sure we wait on signalFd
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -410,9 +411,9 @@
// Clear |wrappedTexture| on |secondDevice|
ClearImage(secondDevice, wrappedTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
// Import the image to |device|, making sure we wait on signalFd
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -440,9 +441,9 @@
// Clear |wrappedTexture| on |secondDevice|
ClearImage(secondDevice, wrappedTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
// Import the image to |device|, making sure we wait on |signalFd|
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -481,9 +482,9 @@
// Clear |wrappedTexture| on |device|
ClearImage(device, wrappedTexture, {5 / 255.0f, 6 / 255.0f, 7 / 255.0f, 8 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &exportInfo);
// Import the image to |secondDevice|, making sure we wait on |signalFd|
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -502,10 +503,10 @@
secondDeviceWrappedTexture);
// Re-import back into |device|, waiting on |secondDevice|'s signal
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf secondExportInfo;
- dawn_native::vulkan::ExportVulkanImage(secondDeviceWrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
- &secondExportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf secondExportInfo;
+ dawn::native::vulkan::ExportVulkanImage(secondDeviceWrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
+ &secondExportInfo);
nextFd = gbm_bo_get_fd(defaultGbmBo);
wgpu::Texture nextWrappedTexture =
@@ -532,9 +533,9 @@
// Clear |wrappedTexture| on |secondDevice|
ClearImage(secondDevice, wrappedTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
// Import the image to |device|, making sure we wait on |signalFd|
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -585,9 +586,9 @@
// Clear |wrappedTexture| on |device|
ClearImage(device, wrappedTexture, {5 / 255.0f, 6 / 255.0f, 7 / 255.0f, 8 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
// Import the image to |secondDevice|, making sure we wait on |signalFd|
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -616,10 +617,10 @@
secondDeviceQueue.Submit(1, &commands);
// Re-import back into |device|, waiting on |secondDevice|'s signal
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf secondExportInfo;
- dawn_native::vulkan::ExportVulkanImage(secondDeviceWrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
- &secondExportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf secondExportInfo;
+ dawn::native::vulkan::ExportVulkanImage(secondDeviceWrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
+ &secondExportInfo);
nextFd = gbm_bo_get_fd(defaultGbmBo);
wgpu::Texture nextWrappedTexture =
@@ -647,9 +648,9 @@
// Clear |wrappedTexture| on |secondDevice|
ClearImage(secondDevice, wrappedTexture, {1 / 255.0f, 2 / 255.0f, 3 / 255.0f, 4 / 255.0f});
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
- dawn_native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfo;
+ dawn::native::vulkan::ExportVulkanImage(wrappedTexture.Get(),
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfo);
// Import the image to |device|, making sure we wait on |signalFd|
int nextFd = gbm_bo_get_fd(defaultGbmBo);
@@ -694,9 +695,9 @@
// device 1 = |device|
// device 2 = |secondDevice|
// Create device 3
- dawn_native::vulkan::Device* thirdDeviceVk =
- dawn_native::vulkan::ToBackend(backendAdapter->APICreateDevice(&deviceDescriptor));
- wgpu::Device thirdDevice = wgpu::Device::Acquire(dawn_native::ToAPI(thirdDeviceVk));
+ dawn::native::vulkan::Device* thirdDeviceVk =
+ dawn::native::vulkan::ToBackend(backendAdapter->APICreateDevice(&deviceDescriptor));
+ wgpu::Device thirdDevice = wgpu::Device::Acquire(dawn::native::ToAPI(thirdDeviceVk));
// Make queue for device 2 and 3
wgpu::Queue secondDeviceQueue = secondDevice.GetQueue();
@@ -735,8 +736,8 @@
SimpleCopyTextureToTexture(thirdDevice, thirdDeviceQueue, wrappedTexADevice3,
wrappedTexBDevice3);
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfoTexBDevice3;
- dawn_native::vulkan::ExportVulkanImage(
+ dawn::native::vulkan::ExternalImageExportInfoDmaBuf exportInfoTexBDevice3;
+ dawn::native::vulkan::ExportVulkanImage(
wrappedTexBDevice3.Get(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &exportInfoTexBDevice3);
IgnoreSignalSemaphore(wrappedTexADevice3);
@@ -755,8 +756,8 @@
SimpleCopyTextureToTexture(secondDevice, secondDeviceQueue, wrappedTexBDevice2,
wrappedTexCDevice2);
- dawn_native::vulkan::ExternalImageExportInfoDmaBuf exportInfoTexCDevice2;
- dawn_native::vulkan::ExportVulkanImage(