mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
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
@ -280,8 +280,8 @@ SerialStorage<Derived>::ConstIterator::ConstIterator(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
typename SerialStorage<Derived>::ConstIterator& SerialStorage<Derived>::ConstIterator::
|
typename SerialStorage<Derived>::ConstIterator&
|
||||||
operator++() {
|
SerialStorage<Derived>::ConstIterator::operator++() {
|
||||||
const Value* vectorData = mStorageIterator->second.data();
|
const Value* vectorData = mStorageIterator->second.data();
|
||||||
|
|
||||||
if (mSerialIterator == nullptr) {
|
if (mSerialIterator == nullptr) {
|
||||||
|
@ -39,9 +39,7 @@ dawn_json_generator("emscripten_bits_gen") {
|
|||||||
|
|
||||||
source_set("dawn_headers") {
|
source_set("dawn_headers") {
|
||||||
all_dependent_configs = [ "${dawn_root}/src/common:dawn_public_include_dirs" ]
|
all_dependent_configs = [ "${dawn_root}/src/common:dawn_public_include_dirs" ]
|
||||||
public_deps = [
|
public_deps = [ ":dawn_headers_gen" ]
|
||||||
":dawn_headers_gen",
|
|
||||||
]
|
|
||||||
|
|
||||||
sources = get_target_outputs(":dawn_headers_gen")
|
sources = get_target_outputs(":dawn_headers_gen")
|
||||||
sources += [ "${dawn_root}/src/include/dawn/dawn_wsi.h" ]
|
sources += [ "${dawn_root}/src/include/dawn/dawn_wsi.h" ]
|
||||||
@ -53,9 +51,7 @@ source_set("dawn_headers") {
|
|||||||
|
|
||||||
dawn_json_generator("dawncpp_headers_gen") {
|
dawn_json_generator("dawncpp_headers_gen") {
|
||||||
target = "dawncpp_headers"
|
target = "dawncpp_headers"
|
||||||
outputs = [
|
outputs = [ "src/include/dawn/webgpu_cpp.h" ]
|
||||||
"src/include/dawn/webgpu_cpp.h",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
source_set("dawncpp_headers") {
|
source_set("dawncpp_headers") {
|
||||||
@ -74,9 +70,7 @@ source_set("dawncpp_headers") {
|
|||||||
|
|
||||||
dawn_json_generator("dawncpp_gen") {
|
dawn_json_generator("dawncpp_gen") {
|
||||||
target = "dawncpp"
|
target = "dawncpp"
|
||||||
outputs = [
|
outputs = [ "src/dawn/webgpu_cpp.cpp" ]
|
||||||
"src/dawn/webgpu_cpp.cpp",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
source_set("dawncpp") {
|
source_set("dawncpp") {
|
||||||
@ -93,20 +87,14 @@ source_set("dawncpp") {
|
|||||||
|
|
||||||
dawn_json_generator("dawn_proc_gen") {
|
dawn_json_generator("dawn_proc_gen") {
|
||||||
target = "dawn_proc"
|
target = "dawn_proc"
|
||||||
outputs = [
|
outputs = [ "src/dawn/dawn_proc.c" ]
|
||||||
"src/dawn/dawn_proc.c",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dawn_component("dawn_proc") {
|
dawn_component("dawn_proc") {
|
||||||
DEFINE_PREFIX = "WGPU"
|
DEFINE_PREFIX = "WGPU"
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [ ":dawn_headers" ]
|
||||||
":dawn_headers",
|
deps = [ ":dawn_proc_gen" ]
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":dawn_proc_gen",
|
|
||||||
]
|
|
||||||
sources = get_target_outputs(":dawn_proc_gen")
|
sources = get_target_outputs(":dawn_proc_gen")
|
||||||
sources += [ "${dawn_root}/src/include/dawn/dawn_proc.h" ]
|
sources += [ "${dawn_root}/src/include/dawn/dawn_proc.h" ]
|
||||||
}
|
}
|
||||||
|
@ -327,7 +327,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
|
|
||||||
wgpu::ShaderStage renderStages = wgpu::ShaderStage::Vertex | wgpu::ShaderStage::Fragment;
|
wgpu::ShaderStage renderStages = wgpu::ShaderStage::Vertex | wgpu::ShaderStage::Fragment;
|
||||||
for (auto stage : IterateStages(renderStages)) {
|
for (auto stage : IterateStages(renderStages)) {
|
||||||
|
|
||||||
std::string hlslSource;
|
std::string hlslSource;
|
||||||
DAWN_TRY_ASSIGN(hlslSource, modules[stage]->GetHLSLSource(ToBackend(GetLayout())));
|
DAWN_TRY_ASSIGN(hlslSource, modules[stage]->GetHLSLSource(ToBackend(GetLayout())));
|
||||||
|
|
||||||
|
@ -49,9 +49,7 @@ namespace dawn_native { namespace metal {
|
|||||||
Device::Device(AdapterBase* adapter,
|
Device::Device(AdapterBase* adapter,
|
||||||
id<MTLDevice> mtlDevice,
|
id<MTLDevice> mtlDevice,
|
||||||
const DeviceDescriptor* descriptor)
|
const DeviceDescriptor* descriptor)
|
||||||
: DeviceBase(adapter, descriptor),
|
: DeviceBase(adapter, descriptor), mMtlDevice([mtlDevice retain]), mCompletedSerial(0) {
|
||||||
mMtlDevice([mtlDevice retain]),
|
|
||||||
mCompletedSerial(0) {
|
|
||||||
[mMtlDevice retain];
|
[mMtlDevice retain];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,5 @@ source_set("dawn_platform") {
|
|||||||
"tracing/TraceEvent.h",
|
"tracing/TraceEvent.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [ "${dawn_root}/src/common" ]
|
||||||
"${dawn_root}/src/common",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,7 @@
|
|||||||
namespace dawn_wire { namespace client {
|
namespace dawn_wire { namespace client {
|
||||||
|
|
||||||
Client::Client(CommandSerializer* serializer, MemoryTransferService* memoryTransferService)
|
Client::Client(CommandSerializer* serializer, MemoryTransferService* memoryTransferService)
|
||||||
: ClientBase(),
|
: ClientBase(), mSerializer(serializer), mMemoryTransferService(memoryTransferService) {
|
||||||
mSerializer(serializer),
|
|
||||||
mMemoryTransferService(memoryTransferService) {
|
|
||||||
if (mMemoryTransferService == nullptr) {
|
if (mMemoryTransferService == nullptr) {
|
||||||
// If a MemoryTransferService is not provided, fall back to inline memory.
|
// If a MemoryTransferService is not provided, fall back to inline memory.
|
||||||
mOwnedMemoryTransferService = CreateInlineMemoryTransferService();
|
mOwnedMemoryTransferService = CreateInlineMemoryTransferService();
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace dawn_native { namespace vulkan {
|
namespace dawn_native { namespace vulkan {
|
||||||
|
|
||||||
DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device);
|
DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device);
|
||||||
|
|
||||||
DAWN_NATIVE_EXPORT PFN_vkVoidFunction GetInstanceProcAddr(WGPUDevice device, const char* pName);
|
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,
|
DAWN_NATIVE_EXPORT WGPUTexture WrapVulkanImage(WGPUDevice cDevice,
|
||||||
const ExternalImageDescriptor* descriptor);
|
const ExternalImageDescriptor* descriptor);
|
||||||
#endif // __linux__
|
#endif // __linux__
|
||||||
|
|
||||||
}} // namespace dawn_native::vulkan
|
}} // namespace dawn_native::vulkan
|
||||||
|
|
||||||
#endif // DAWNNATIVE_VULKANBACKEND_H_
|
#endif // DAWNNATIVE_VULKANBACKEND_H_
|
||||||
|
@ -26,7 +26,7 @@ namespace dawn_wire {
|
|||||||
namespace client {
|
namespace client {
|
||||||
class Client;
|
class Client;
|
||||||
class MemoryTransferService;
|
class MemoryTransferService;
|
||||||
}
|
} // namespace client
|
||||||
|
|
||||||
struct ReservedTexture {
|
struct ReservedTexture {
|
||||||
WGPUTexture texture;
|
WGPUTexture texture;
|
||||||
|
@ -26,7 +26,7 @@ namespace dawn_wire {
|
|||||||
namespace server {
|
namespace server {
|
||||||
class Server;
|
class Server;
|
||||||
class MemoryTransferService;
|
class MemoryTransferService;
|
||||||
}
|
} // namespace server
|
||||||
|
|
||||||
struct DAWN_WIRE_EXPORT WireServerDescriptor {
|
struct DAWN_WIRE_EXPORT WireServerDescriptor {
|
||||||
WGPUDevice device;
|
WGPUDevice device;
|
||||||
|
@ -25,9 +25,7 @@ import("${dawn_root}/scripts/dawn_features.gni")
|
|||||||
# use the real library from third_party/.
|
# use the real library from third_party/.
|
||||||
if (dawn_supports_glfw_for_windowing) {
|
if (dawn_supports_glfw_for_windowing) {
|
||||||
group("dawn_glfw") {
|
group("dawn_glfw") {
|
||||||
public_deps = [
|
public_deps = [ "${dawn_root}/third_party/gn/glfw" ]
|
||||||
"${dawn_root}/third_party/gn/glfw",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
} else if (is_fuchsia) {
|
} else if (is_fuchsia) {
|
||||||
# The mock implementation of GLFW on Fuchsia
|
# The mock implementation of GLFW on Fuchsia
|
||||||
@ -52,9 +50,7 @@ if (dawn_supports_glfw_for_windowing) {
|
|||||||
"Glfw3Fuchsia.cpp",
|
"Glfw3Fuchsia.cpp",
|
||||||
]
|
]
|
||||||
public_configs = [ ":dawn_glfw_public_config" ]
|
public_configs = [ ":dawn_glfw_public_config" ]
|
||||||
deps = [
|
deps = [ "${dawn_root}/src/common" ]
|
||||||
"${dawn_root}/src/common",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# Just skip GLFW on other systems
|
# Just skip GLFW on other systems
|
||||||
@ -118,9 +114,7 @@ static_library("dawn_utils") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [ "${dawn_root}/src/dawn:dawncpp_headers" ]
|
||||||
"${dawn_root}/src/dawn:dawncpp_headers",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -137,9 +131,7 @@ if (dawn_standalone) {
|
|||||||
"BackendBinding.h",
|
"BackendBinding.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [ "${dawn_root}/src/dawn:dawn_headers" ]
|
||||||
"${dawn_root}/src/dawn:dawn_headers",
|
|
||||||
]
|
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":dawn_glfw",
|
":dawn_glfw",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user