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:
parent
d82ef86b79
commit
6328356129
|
@ -197,4 +197,4 @@ class LinkedList {
|
|||
private:
|
||||
LinkNode<T> root_;
|
||||
};
|
||||
#endif // COMMON_LINKED_LIST_H
|
||||
#endif // COMMON_LINKED_LIST_H
|
||||
|
|
|
@ -159,4 +159,4 @@ uint64_t RoundUp(uint64_t n, uint64_t m) {
|
|||
ASSERT(n > 0);
|
||||
ASSERT(m <= std::numeric_limits<uint64_t>::max() - n);
|
||||
return ((n + m - 1) / m) * m;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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" ]
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -108,4 +108,4 @@ namespace dawn_native {
|
|||
}
|
||||
mReleasedStagingBuffers.ClearUpTo(lastCompletedSerial);
|
||||
}
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -43,4 +43,4 @@ namespace dawn_native {
|
|||
}
|
||||
mInflightRequests.ClearUpTo(finishedSerial);
|
||||
}
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -102,4 +102,4 @@ namespace dawn_native {
|
|||
return bgl;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -316,4 +316,4 @@ namespace dawn_native {
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -28,4 +28,4 @@ namespace dawn_native {
|
|||
|
||||
} // namespace dawn_native
|
||||
|
||||
#endif // DAWNNATIVE_RESOURCEHEAP_H_
|
||||
#endif // DAWNNATIVE_RESOURCEHEAP_H_
|
||||
|
|
|
@ -50,4 +50,4 @@ namespace dawn_native {
|
|||
mResourceHeap = nullptr;
|
||||
mInfo = {};
|
||||
}
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -56,4 +56,4 @@ namespace dawn_native {
|
|||
};
|
||||
} // namespace dawn_native
|
||||
|
||||
#endif // DAWNNATIVE_RINGBUFFERALLOCATOR_H_
|
||||
#endif // DAWNNATIVE_RINGBUFFERALLOCATOR_H_
|
||||
|
|
|
@ -26,4 +26,4 @@ namespace dawn_native {
|
|||
void* StagingBufferBase::GetMappedPointer() const {
|
||||
return mMappedPointer;
|
||||
}
|
||||
} // namespace dawn_native
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -38,4 +38,4 @@ namespace dawn_native {
|
|||
|
||||
} // namespace dawn_native
|
||||
|
||||
#endif // DAWNNATIVE_STAGINGBUFFER_H_
|
||||
#endif // DAWNNATIVE_STAGINGBUFFER_H_
|
||||
|
|
|
@ -47,4 +47,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_BACKENDD3D12_H_
|
||||
#endif // DAWNNATIVE_D3D12_BACKENDD3D12_H_
|
||||
|
|
|
@ -50,4 +50,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
mBaseDescriptor = {0};
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -44,4 +44,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_CPUDESCRIPTORHEAPALLOCATION_H_
|
||||
#endif // DAWNNATIVE_D3D12_CPUDESCRIPTORHEAPALLOCATION_H_
|
||||
|
|
|
@ -42,4 +42,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_D3D12ERROR_H_
|
||||
#endif // DAWNNATIVE_D3D12_D3D12ERROR_H_
|
||||
|
|
|
@ -37,4 +37,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
ResultOrError<D3D12DeviceInfo> GatherDeviceInfo(const Adapter& adapter);
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_D3D12INFO_H_
|
||||
#endif // DAWNNATIVE_D3D12_D3D12INFO_H_
|
||||
|
|
|
@ -36,4 +36,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
Serial GPUDescriptorHeapAllocation::GetHeapSerial() const {
|
||||
return mHeapSerial;
|
||||
}
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -40,4 +40,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_CPUDESCRIPTORHEAPALLOCATION_H_
|
||||
#endif // DAWNNATIVE_D3D12_CPUDESCRIPTORHEAPALLOCATION_H_
|
||||
|
|
|
@ -28,4 +28,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
return mD3d12Heap.Get();
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -37,4 +37,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
};
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_HEAPD3D12_H_
|
||||
#endif // DAWNNATIVE_D3D12_HEAPD3D12_H_
|
||||
|
|
|
@ -73,4 +73,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
bool Pageable::IsResidencyLocked() const {
|
||||
return mResidencyLockRefCount != 0;
|
||||
}
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -234,4 +234,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS;
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -88,4 +88,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
};
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_RENDERPASSBUILDERD3D12_H_
|
||||
#endif // DAWNNATIVE_D3D12_RENDERPASSBUILDERD3D12_H_
|
||||
|
|
|
@ -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())));
|
||||
|
||||
|
|
|
@ -367,4 +367,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
}
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -80,4 +80,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_RESIDENCYMANAGERD3D12_H_
|
||||
#endif // DAWNNATIVE_D3D12_RESIDENCYMANAGERD3D12_H_
|
||||
|
|
|
@ -164,4 +164,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
const SamplerHeapCacheEntry* b) const {
|
||||
return a->mSamplers == b->mSamplers;
|
||||
}
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -105,4 +105,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_SAMPLERHEAPCACHE_H_
|
||||
#endif // DAWNNATIVE_D3D12_SAMPLERHEAPCACHE_H_
|
||||
|
|
|
@ -209,4 +209,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
ID3D12DescriptorHeap* ShaderVisibleDescriptorHeap::GetD3D12DescriptorHeap() const {
|
||||
return mD3d12DescriptorHeap.Get();
|
||||
}
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -94,4 +94,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
};
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_SHADERVISIBLEDESCRIPTORALLOCATOR_H_
|
||||
#endif // DAWNNATIVE_D3D12_SHADERVISIBLEDESCRIPTORALLOCATOR_H_
|
||||
|
|
|
@ -149,4 +149,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
mAllocationsToDelete.ClearUpTo(completedSerial);
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
|
|
@ -82,4 +82,4 @@ namespace dawn_native { namespace d3d12 {
|
|||
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12_STAGINGDESCRIPTORALLOCATOR_H_
|
||||
#endif // DAWNNATIVE_D3D12_STAGINGDESCRIPTORALLOCATOR_H_
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,5 @@ source_set("dawn_platform") {
|
|||
"tracing/TraceEvent.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"${dawn_root}/src/common",
|
||||
]
|
||||
deps = [ "${dawn_root}/src/common" ]
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace dawn_wire {
|
|||
namespace client {
|
||||
class Client;
|
||||
class MemoryTransferService;
|
||||
}
|
||||
} // namespace client
|
||||
|
||||
struct ReservedTexture {
|
||||
WGPUTexture texture;
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace dawn_wire {
|
|||
namespace server {
|
||||
class Server;
|
||||
class MemoryTransferService;
|
||||
}
|
||||
} // namespace server
|
||||
|
||||
struct DAWN_WIRE_EXPORT WireServerDescriptor {
|
||||
WGPUDevice device;
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -20,4 +20,4 @@ namespace utils {
|
|||
void USleep(unsigned int usecs);
|
||||
}
|
||||
|
||||
#endif // UTILS_SYSTEMUTILS_H_
|
||||
#endif // UTILS_SYSTEMUTILS_H_
|
||||
|
|
Loading…
Reference in New Issue