Autoformat all tests and examples
Bug: none
Change-Id: I69904944db1d4c2fbcca74bb8b66b5a7524e76bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24642
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/examples/CppHelloTriangle.cpp b/examples/CppHelloTriangle.cpp
index fbc598d..378afa8 100644
--- a/examples/CppHelloTriangle.cpp
+++ b/examples/CppHelloTriangle.cpp
@@ -36,15 +36,15 @@
void initBuffers() {
static const uint32_t indexData[3] = {
- 0, 1, 2,
+ 0,
+ 1,
+ 2,
};
indexBuffer =
utils::CreateBufferFromData(device, indexData, sizeof(indexData), wgpu::BufferUsage::Index);
static const float vertexData[12] = {
- 0.0f, 0.5f, 0.0f, 1.0f,
- -0.5f, -0.5f, 0.0f, 1.0f,
- 0.5f, -0.5f, 0.0f, 1.0f,
+ 0.0f, 0.5f, 0.0f, 1.0f, -0.5f, -0.5f, 0.0f, 1.0f, 0.5f, -0.5f, 0.0f, 1.0f,
};
vertexBuffer = utils::CreateBufferFromData(device, vertexData, sizeof(vertexData),
wgpu::BufferUsage::Vertex);
@@ -141,17 +141,19 @@
wgpu::TextureView view = texture.CreateView();
- bindGroup = utils::MakeBindGroup(device, bgl, {
- {0, sampler},
- {1, view}
- });
+ bindGroup = utils::MakeBindGroup(device, bgl, {{0, sampler}, {1, view}});
}
-struct {uint32_t a; float b;} s;
+struct {
+ uint32_t a;
+ float b;
+} s;
void frame() {
s.a = (s.a + 1) % 256;
s.b += 0.02f;
- if (s.b >= 1.0f) {s.b = 0.0f;}
+ if (s.b >= 1.0f) {
+ s.b = 0.0f;
+ }
wgpu::TextureView backbufferView = swapchain.GetCurrentTextureView();
utils::ComboRenderPassDescriptor renderPass({backbufferView}, depthStencilView);