Rename namespace dawn_native to dawn::native.
But keep a namespace alias to avoid breaking project that depend on the previous namespace name while they get updated. Done with through the following steps: - git grep -l dawn_native:: | xargs sed -i "" "s/dawn_native::/dawn::native::/g" - git grep -l "namespace dawn_native" | xargs sed -i "" "s/namespace dawn_native/namespace dawn::native/g" - git cl format - Manual fixups in generator/templates (and the addition of namespace_case in dawn_json_generator.py). - The addition of the namespace alias in DawnNative.h Bug: dawn:824 Change-Id: I676cc4e3ced2e0e4bab32a0d66d7eaf9537e3f09 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75982 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
8b3eaa60d8
commit
ec9cf2a85c
|
@ -85,7 +85,7 @@ struct WindowData {
|
|||
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 @@ int main(int argc, const char* argv[]) {
|
|||
|
||||
// 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) {
|
||||
|
|
|
@ -81,7 +81,7 @@ static wgpu::BackendType backendType = wgpu::BackendType::OpenGL;
|
|||
#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 @@ wgpu::Device CreateCppDawnDevice() {
|
|||
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 @@ wgpu::Device CreateCppDawnDevice() {
|
|||
}
|
||||
|
||||
WGPUDevice backendDevice = backendAdapter.CreateDevice();
|
||||
DawnProcTable backendProcs = dawn_native::GetProcs();
|
||||
DawnProcTable backendProcs = dawn::native::GetProcs();
|
||||
|
||||
binding = utils::CreateBinding(backendType, window, backendDevice);
|
||||
if (binding == nullptr) {
|
||||
|
|
|
@ -68,6 +68,9 @@ class Name:
|
|||
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:]:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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}} {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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}} {
|
||||
|
|
|
@ -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}} {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
}
|
||||
|
||||
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)}} (
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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}} {
|
||||
|
|
|
@ -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 @@ namespace {{native_namespace}} {
|
|||
{% endfor %}
|
||||
}
|
||||
|
||||
#endif // {{NATIVE_DIR}}_{{PREFIX}}_PLATFORM_AUTOGEN_H_
|
||||
#endif // {{NATIVE_DIR}}_{{PREFIX}}_PLATFORM_AUTOGEN_H_
|
||||
|
|
|
@ -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 @@ MaybeError OpenGLFunctionsBase::LoadDesktopGLProcs(GetProcAddress getProc, int m
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace dawn_native::opengl
|
||||
} // namespace dawn::native::opengl
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "dawn_native/Error.h"
|
||||
#include "dawn_native/opengl/opengl_platform.h"
|
||||
|
||||
namespace dawn_native::opengl {
|
||||
namespace dawn::native::opengl {
|
||||
using GetProcAddress = void* (*) (const char*);
|
||||
|
||||
struct OpenGLFunctionsBase {
|
||||
|
@ -40,6 +40,6 @@ namespace dawn_native::opengl {
|
|||
MaybeError LoadProc(GetProcAddress getProc, T* memberProc, const char* name);
|
||||
};
|
||||
|
||||
} // namespace dawn_native::opengl
|
||||
} // namespace dawn::native::opengl
|
||||
|
||||
#endif // DAWNNATIVE_OPENGL_OPENGLFUNCTIONSBASE_H_
|
||||
|
|
|
@ -65,7 +65,7 @@ DAWN_DEFINE_NATIVE_NON_DISPATCHABLE_HANDLE(VkSomeHandle)
|
|||
// One way to get the alignment inside structures of a type is to look at the alignment of it
|
||||
// wrapped in a structure. Hence VkSameHandleNativeWrappe
|
||||
|
||||
namespace dawn_native::vulkan {
|
||||
namespace dawn::native::vulkan {
|
||||
|
||||
namespace detail {
|
||||
template <typename T>
|
||||
|
@ -140,17 +140,17 @@ namespace dawn_native::vulkan {
|
|||
return reinterpret_cast<HandleType*>(handle);
|
||||
}
|
||||
|
||||
} // namespace dawn_native::vulkan
|
||||
} // namespace dawn::native::vulkan
|
||||
|
||||
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) \
|
||||
DAWN_DEFINE_NATIVE_NON_DISPATCHABLE_HANDLE(object) \
|
||||
namespace dawn_native::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.
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
"ResetInternalDeviceForTesting should only be used with the D3D12 backend.");
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class DeviceBase;
|
||||
|
||||
|
@ -94,6 +94,6 @@ namespace dawn_native {
|
|||
bool mUseTieredLimits = false;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ADAPTER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
waitableTask->taskManager->HandleTaskCompletion(waitableTask.Get());
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace dawn::platform {
|
|||
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 @@ namespace dawn_native {
|
|||
dawn::platform::WorkerTaskPool* mWorkerTaskPool;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return mSampleCount;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <array>
|
||||
#include <bitset>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class DeviceBase;
|
||||
|
||||
|
@ -78,6 +78,6 @@ namespace dawn_native {
|
|||
~AttachmentState() override;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ATTACHMENTSTATE_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return DAWN_FORMAT_VALIDATION_ERROR("DiscoverAdapters not implemented for this backend.");
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
wgpu::BackendType mType;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BACKENDCONNECTION_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return static_cast<ExternalTextureBase*>(mBindingData.bindings[bindingIndex].Get());
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <array>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class DeviceBase;
|
||||
|
||||
|
@ -87,6 +87,6 @@ namespace dawn_native {
|
|||
BindGroupLayoutBase::BindingDataPointers mBindingData;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BINDGROUP_H_
|
||||
|
|
|
@ -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
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
PipelineCompatibilityToken(0);
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BINDGROUPLAYOUT_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
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BINDGROUPTRACKER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
// For buffer size validation
|
||||
using RequiredBufferSizes = ityp::array<BindGroupIndex, std::vector<uint64_t>, kMaxBindGroups>;
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BINDINGINFO_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
delete block;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
std::vector<BlockList> mFreeLists;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BUDDYALLOCATOR_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return count;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class ResourceHeapAllocator;
|
||||
|
||||
|
@ -69,6 +69,6 @@ namespace dawn_native {
|
|||
std::vector<TrackedSubAllocations> mTrackedSubAllocations;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BUDDYMEMORYALLOCATOR_H_
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <cstring>
|
||||
#include <utility>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
namespace {
|
||||
struct MapRequestTask : QueueBase::TaskInFlight {
|
||||
|
@ -557,4 +557,4 @@ namespace dawn_native {
|
|||
return offset == 0 && size == GetSize();
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
struct CopyTextureToBufferCmd;
|
||||
|
||||
|
@ -130,6 +130,6 @@ namespace dawn_native {
|
|||
size_t mMapSize = 0;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_BUFFER_H_
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "common/Assert.h"
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
bool CachedObject::IsCachedReference() const {
|
||||
return mIsCachedReference;
|
||||
|
@ -41,4 +41,4 @@ namespace dawn_native {
|
|||
mIsContentHashInitialized = true;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
bool mIsContentHashInitialized = false;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_CACHED_OBJECT_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
mCallbackTaskQueue.push_back(std::move(callbackTask));
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
struct CallbackTask {
|
||||
public:
|
||||
|
@ -40,6 +40,6 @@ namespace dawn_native {
|
|||
std::vector<std::unique_ptr<CallbackTask>> mCallbackTaskQueue;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
mEndPtr = reinterpret_cast<uint8_t*>(&mDummyEnum[1]);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
uint8_t* mEndPtr = nullptr;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMMAND_ALLOCATOR_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
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
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
|
||||
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_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return mIndexBufferSize;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
const RequiredBufferSizes* mMinBufferSizes = nullptr;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMMANDBUFFERSTATETRACKER_H
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <cmath>
|
||||
#include <map>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -1134,4 +1134,4 @@ namespace dawn_native {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class CommandEncoder final : public ApiObjectBase {
|
||||
public:
|
||||
|
@ -102,6 +102,6 @@ namespace dawn_native {
|
|||
uint64_t mDebugGroupStackSize = 0;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMMANDENCODER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class QuerySetBase;
|
||||
struct SyncScopeResourceUsage;
|
||||
|
@ -79,6 +79,6 @@ namespace dawn_native {
|
|||
|
||||
MaybeError ValidateCanUseAs(const BufferBase* buffer, wgpu::BufferUsage usage);
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMMANDVALIDATION_H_
|
||||
|
|
|
@ -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
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
Ref<TextureViewBase> resolveTarget;
|
||||
wgpu::LoadOp loadOp;
|
||||
wgpu::StoreOp storeOp;
|
||||
dawn_native::Color clearColor;
|
||||
dawn::native::Color clearColor;
|
||||
};
|
||||
|
||||
struct RenderPassDepthStencilAttachmentInfo {
|
||||
|
@ -285,6 +285,6 @@ namespace dawn_native {
|
|||
// 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_
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <tint/tint.h>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -198,4 +198,4 @@ namespace dawn_native {
|
|||
mFormattedTintMessages.push_back(t.str());
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace tint::diag {
|
|||
class List;
|
||||
} // namespace tint::diag
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class OwnedCompilationMessages : public NonCopyable {
|
||||
public:
|
||||
|
@ -57,6 +57,6 @@ namespace dawn_native {
|
|||
std::vector<std::string> mFormattedTintMessages;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMPILATIONMESSAGES_H_
|
|
@ -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 @@ namespace dawn_native {
|
|||
return &mCommandBufferState;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
Ref<CommandEncoder> mCommandEncoder;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMPUTEPASSENCODER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return PipelineBase::EqualForCache(a, b);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
ComputePipelineBase(DeviceBase* device, ObjectBase::ErrorTag tag);
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COMPUTEPIPELINE_H_
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <unordered_set>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
namespace {
|
||||
|
||||
static const char sCopyTextureForBrowserShader[] = R"(
|
||||
|
@ -594,4 +594,4 @@ namespace dawn_native {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
const Extent3D* copySize,
|
||||
const CopyTextureForBrowserOptions* options);
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_COPYTEXTUREFORBROWSERHELPER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
eventLabel);
|
||||
device->GetAsyncTaskManager()->PostTask(std::move(asyncTask));
|
||||
}
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
void* mUserdata;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_CREATEPIPELINEASYNCTASK_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return FromAPI(a)->IsLayoutEqual(FromAPI(b), excludePipelineCompatibiltyToken);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include <mutex>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
// DeviceBase sub-structures
|
||||
|
||||
|
@ -1729,4 +1729,4 @@ namespace dawn_native {
|
|||
return false;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace dawn::platform {
|
|||
class WorkerTaskPool;
|
||||
} // namespace dawn::platform
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
class AdapterBase;
|
||||
class AsyncTaskManager;
|
||||
class AttachmentState;
|
||||
|
@ -540,6 +540,6 @@ namespace dawn_native {
|
|||
std::string mLabel;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_DEVICE_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
uploadHandle.startOffset += additionalOffset;
|
||||
return uploadHandle;
|
||||
}
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
SerialQueue<ExecutionSerial, std::unique_ptr<StagingBufferBase>> mReleasedStagingBuffers;
|
||||
DeviceBase* mDevice;
|
||||
};
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_DYNAMICUPLOADER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return mTopLevelEncoder == nullptr;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class CommandEncoder;
|
||||
class DeviceBase;
|
||||
|
@ -177,6 +177,6 @@ namespace dawn_native {
|
|||
std::vector<std::string> mDebugGroupLabels;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ENCODINGCONTEXT_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 @@ namespace dawn_native {
|
|||
return HasZeroOrOneBits(value) && value != T(0);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ENUMCLASSBITMASK_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 @@ namespace dawn_native {
|
|||
return EnumMaskIterator<T>(mask);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ENUMMASKITERATOR_H_
|
||||
|
|
|
@ -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
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
enum class InternalErrorType : uint32_t {
|
||||
Validation,
|
||||
|
@ -72,7 +72,7 @@ namespace dawn_native {
|
|||
// 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 @@ namespace dawn_native {
|
|||
#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 @@ namespace dawn_native {
|
|||
wgpu::ErrorType ToWGPUErrorType(InternalErrorType type);
|
||||
InternalErrorType FromWGPUErrorType(wgpu::ErrorType type);
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ERROR_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace dawn {
|
|||
using ErrorType = wgpu::ErrorType;
|
||||
}
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
enum class InternalErrorType : uint32_t;
|
||||
|
||||
class [[nodiscard]] ErrorData {
|
||||
|
@ -65,6 +65,6 @@ namespace dawn_native {
|
|||
std::vector<std::string> mDebugGroups;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ERRORDATA_H_
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "common/Assert.h"
|
||||
#include "dawn_native/DawnNative.h"
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -67,4 +67,4 @@ namespace dawn_native {
|
|||
sHasPendingInjectedError = true;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
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; \
|
||||
} \
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "common/Assert.h"
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -89,4 +89,4 @@ namespace dawn_native {
|
|||
return false;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class ErrorScope {
|
||||
public:
|
||||
|
@ -52,6 +52,6 @@ namespace dawn_native {
|
|||
std::vector<ErrorScope> mScopes;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_ERRORSCOPE_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return ObjectType::ExternalTexture;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <array>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
struct ExternalTextureDescriptor;
|
||||
class TextureViewBase;
|
||||
|
@ -58,6 +58,6 @@ namespace dawn_native {
|
|||
std::array<Ref<TextureViewBase>, kMaxPlanesPerFormat> textureViews;
|
||||
ExternalTextureState mState;
|
||||
};
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_EXTERNALTEXTURE_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return static_cast<wgpu::FeatureName>(-1);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
std::unordered_map<std::string, Feature> mFeatureNameToEnumMap;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_FEATURES_H_
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <bitset>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
// Format
|
||||
|
||||
|
@ -469,4 +469,4 @@ namespace dawn_native {
|
|||
return table;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
// 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;
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
template <typename T>
|
||||
class Ref;
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
enum class ObjectType : uint32_t;
|
||||
|
||||
|
@ -66,6 +66,6 @@ namespace dawn_native {
|
|||
using RenderPassEncoderBase = RenderPassEncoder;
|
||||
using SurfaceBase = Surface;
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_FORWARD_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
std::move(draw));
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class RenderBundleBase;
|
||||
struct CombinedLimits;
|
||||
|
@ -121,6 +121,6 @@ namespace dawn_native {
|
|||
uint32_t mMaxBatchOffsetRange;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_INDIRECTDRAWMETADATA_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
RenderPassResourceUsageTracker* usageTracker,
|
||||
IndirectDrawMetadata* indirectDrawMetadata);
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_INDIRECTDRAWVALIDATIONENCODER_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return new Surface(this, descriptor);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace dawn::platform {
|
|||
class Platform;
|
||||
} // namespace dawn::platform
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class Surface;
|
||||
class XlibXcbFunctions;
|
||||
|
@ -117,6 +117,6 @@ namespace dawn_native {
|
|||
#endif // defined(DAWN_USE_X11)
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_INSTANCE_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 @@ namespace dawn_native {
|
|||
// other pipelines.
|
||||
using PipelineCompatibilityToken = TypedInteger<struct PipelineCompatibilityTokenT, uint64_t>;
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_INTEGERTYPES_H_
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class RenderPipelineBase;
|
||||
class ShaderModuleBase;
|
||||
|
@ -35,4 +35,4 @@ namespace dawn_native {
|
|||
|
||||
InternalPipelineStore::~InternalPipelineStore() = default;
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace dawn_native {
|
||||
namespace dawn::native {
|
||||
|
||||
class DeviceBase;
|
||||
class RenderPipelineBase;
|
||||
|
@ -55,6 +55,6 @@ namespace dawn_native {
|
|||
Ref<ComputePipelineBase> dispatchIndirectValidationPipeline;
|
||||
};
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
||||
#endif // DAWNNATIVE_INTERNALPIPELINESTORE_H_
|
||||
|
|
|
@ -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 @@ namespace dawn_native {
|
|||
return limits;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn::native
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue