Autoformat everything except tests/examples

Done by:
- Appending an extra newline at the end of src/**/*.{cpp,h,mm,gn}
  except src/tests/*
- Running git cl format --full to format the full contents of every
  changed file

Bug: none
Change-Id: Id88fc5ed0c5efbbc93b2c6a305c2f98465fe646d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24641
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Kai Ninomiya 2020-07-10 18:19:38 +00:00 committed by Commit Bot service account
parent d82ef86b79
commit 6328356129
44 changed files with 53 additions and 78 deletions

View File

@ -280,8 +280,8 @@ SerialStorage<Derived>::ConstIterator::ConstIterator(
}
template <typename Derived>
typename SerialStorage<Derived>::ConstIterator& SerialStorage<Derived>::ConstIterator::
operator++() {
typename SerialStorage<Derived>::ConstIterator&
SerialStorage<Derived>::ConstIterator::operator++() {
const Value* vectorData = mStorageIterator->second.data();
if (mSerialIterator == nullptr) {

View File

@ -39,9 +39,7 @@ dawn_json_generator("emscripten_bits_gen") {
source_set("dawn_headers") {
all_dependent_configs = [ "${dawn_root}/src/common:dawn_public_include_dirs" ]
public_deps = [
":dawn_headers_gen",
]
public_deps = [ ":dawn_headers_gen" ]
sources = get_target_outputs(":dawn_headers_gen")
sources += [ "${dawn_root}/src/include/dawn/dawn_wsi.h" ]
@ -53,9 +51,7 @@ source_set("dawn_headers") {
dawn_json_generator("dawncpp_headers_gen") {
target = "dawncpp_headers"
outputs = [
"src/include/dawn/webgpu_cpp.h",
]
outputs = [ "src/include/dawn/webgpu_cpp.h" ]
}
source_set("dawncpp_headers") {
@ -74,9 +70,7 @@ source_set("dawncpp_headers") {
dawn_json_generator("dawncpp_gen") {
target = "dawncpp"
outputs = [
"src/dawn/webgpu_cpp.cpp",
]
outputs = [ "src/dawn/webgpu_cpp.cpp" ]
}
source_set("dawncpp") {
@ -93,20 +87,14 @@ source_set("dawncpp") {
dawn_json_generator("dawn_proc_gen") {
target = "dawn_proc"
outputs = [
"src/dawn/dawn_proc.c",
]
outputs = [ "src/dawn/dawn_proc.c" ]
}
dawn_component("dawn_proc") {
DEFINE_PREFIX = "WGPU"
public_deps = [
":dawn_headers",
]
deps = [
":dawn_proc_gen",
]
public_deps = [ ":dawn_headers" ]
deps = [ ":dawn_proc_gen" ]
sources = get_target_outputs(":dawn_proc_gen")
sources += [ "${dawn_root}/src/include/dawn/dawn_proc.h" ]
}

View File

@ -415,7 +415,7 @@ namespace dawn_native {
}
if (binding.viewDimension == wgpu::TextureViewDimension::Undefined) {
mBindingInfo[i].viewDimension = wgpu::TextureViewDimension::e2D;
mBindingInfo[i].viewDimension = wgpu::TextureViewDimension::e2D;
} else {
mBindingInfo[i].viewDimension = binding.viewDimension;
}

View File

@ -145,7 +145,7 @@ namespace dawn_native {
# if defined(DAWN_ENABLE_SWIFTSHADER)
Register(vulkan::Connect(this, true), wgpu::BackendType::Vulkan);
# endif // defined(DAWN_ENABLE_SWIFTSHADER)
#endif // defined(DAWN_ENABLE_BACKEND_VULKAN)
#endif // defined(DAWN_ENABLE_BACKEND_VULKAN)
#if defined(DAWN_ENABLE_BACKEND_OPENGL)
Register(opengl::Connect(this), wgpu::BackendType::OpenGL);
#endif // defined(DAWN_ENABLE_BACKEND_OPENGL)

View File

@ -327,7 +327,6 @@ namespace dawn_native { namespace d3d12 {
wgpu::ShaderStage renderStages = wgpu::ShaderStage::Vertex | wgpu::ShaderStage::Fragment;
for (auto stage : IterateStages(renderStages)) {
std::string hlslSource;
DAWN_TRY_ASSIGN(hlslSource, modules[stage]->GetHLSLSource(ToBackend(GetLayout())));

View File

@ -49,9 +49,7 @@ namespace dawn_native { namespace metal {
Device::Device(AdapterBase* adapter,
id<MTLDevice> mtlDevice,
const DeviceDescriptor* descriptor)
: DeviceBase(adapter, descriptor),
mMtlDevice([mtlDevice retain]),
mCompletedSerial(0) {
: DeviceBase(adapter, descriptor), mMtlDevice([mtlDevice retain]), mCompletedSerial(0) {
[mMtlDevice retain];
}

View File

@ -24,7 +24,5 @@ source_set("dawn_platform") {
"tracing/TraceEvent.h",
]
deps = [
"${dawn_root}/src/common",
]
deps = [ "${dawn_root}/src/common" ]
}

View File

@ -20,9 +20,7 @@
namespace dawn_wire { namespace client {
Client::Client(CommandSerializer* serializer, MemoryTransferService* memoryTransferService)
: ClientBase(),
mSerializer(serializer),
mMemoryTransferService(memoryTransferService) {
: ClientBase(), mSerializer(serializer), mMemoryTransferService(memoryTransferService) {
if (mMemoryTransferService == nullptr) {
// If a MemoryTransferService is not provided, fall back to inline memory.
mOwnedMemoryTransferService = CreateInlineMemoryTransferService();

View File

@ -23,6 +23,7 @@
#include <vector>
namespace dawn_native { namespace vulkan {
DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device);
DAWN_NATIVE_EXPORT PFN_vkVoidFunction GetInstanceProcAddr(WGPUDevice device, const char* pName);
@ -75,6 +76,7 @@ namespace dawn_native { namespace vulkan {
DAWN_NATIVE_EXPORT WGPUTexture WrapVulkanImage(WGPUDevice cDevice,
const ExternalImageDescriptor* descriptor);
#endif // __linux__
}} // namespace dawn_native::vulkan
#endif // DAWNNATIVE_VULKANBACKEND_H_

View File

@ -26,7 +26,7 @@ namespace dawn_wire {
namespace client {
class Client;
class MemoryTransferService;
}
} // namespace client
struct ReservedTexture {
WGPUTexture texture;

View File

@ -26,7 +26,7 @@ namespace dawn_wire {
namespace server {
class Server;
class MemoryTransferService;
}
} // namespace server
struct DAWN_WIRE_EXPORT WireServerDescriptor {
WGPUDevice device;

View File

@ -25,9 +25,7 @@ import("${dawn_root}/scripts/dawn_features.gni")
# use the real library from third_party/.
if (dawn_supports_glfw_for_windowing) {
group("dawn_glfw") {
public_deps = [
"${dawn_root}/third_party/gn/glfw",
]
public_deps = [ "${dawn_root}/third_party/gn/glfw" ]
}
} else if (is_fuchsia) {
# The mock implementation of GLFW on Fuchsia
@ -52,9 +50,7 @@ if (dawn_supports_glfw_for_windowing) {
"Glfw3Fuchsia.cpp",
]
public_configs = [ ":dawn_glfw_public_config" ]
deps = [
"${dawn_root}/src/common",
]
deps = [ "${dawn_root}/src/common" ]
}
} else {
# Just skip GLFW on other systems
@ -118,9 +114,7 @@ static_library("dawn_utils") {
}
}
public_deps = [
"${dawn_root}/src/dawn:dawncpp_headers",
]
public_deps = [ "${dawn_root}/src/dawn:dawncpp_headers" ]
}
###############################################################################
@ -137,9 +131,7 @@ if (dawn_standalone) {
"BackendBinding.h",
]
public_deps = [
"${dawn_root}/src/dawn:dawn_headers",
]
public_deps = [ "${dawn_root}/src/dawn:dawn_headers" ]
deps = [
":dawn_glfw",