GLSL: clean up GLSL output whitespace generation.
More line() and less std::endl.
More automated indents and less manual spacing.
Put a single newline after every struct and function declaration.
Note that this does touch every test result, but only affects whitespace.
Change-Id: I7506b9029b79b91fb335911dba44369b36f09bbe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78300
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.glsl b/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.glsl
index 034c499..88b1b8f 100644
--- a/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
mat3 r = (a + b);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.glsl b/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.glsl
index a11adca..0b90ef1 100644
--- a/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.glsl
@@ -6,8 +6,8 @@
float r = (1.0f + 2.0f);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.glsl b/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.glsl
index 4390508..5803fdc 100644
--- a/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.glsl
@@ -6,8 +6,8 @@
int r = (1 + 2);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.glsl b/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.glsl
index 5e1db81..a7ec957 100644
--- a/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.glsl
@@ -6,8 +6,8 @@
uint r = (1u + 2u);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.glsl b/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.glsl
index 0655ac2..e54fe43 100644
--- a/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
vec3 r = (a + b);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.glsl b/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.glsl
index ea0ed84..a9808d1 100644
--- a/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
ivec3 r = (a + b);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.glsl b/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.glsl
index 0fe0f75..6144b34 100644
--- a/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
uvec3 r = (a + b);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.glsl b/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.glsl
index e7a27305..63461e9 100644
--- a/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.glsl
@@ -7,8 +7,8 @@
vec3 r = (a + 4.0f);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.glsl b/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.glsl
index 7882f3b..b13d477 100644
--- a/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.glsl
@@ -7,8 +7,8 @@
ivec3 r = (a + 4);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.glsl b/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.glsl
index 160e65c..b1d217c 100644
--- a/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.glsl
@@ -7,8 +7,8 @@
uvec3 r = (a + 4u);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.glsl b/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.glsl
index 7bd2c34..5afc728 100644
--- a/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
vec3 r = (a + b);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.glsl b/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.glsl
index 0b48495..14f55b4 100644
--- a/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
ivec3 r = (a + b);
return;
}
+
void main() {
f();
}
-
diff --git a/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.glsl b/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.glsl
index bff24ce..9956af3 100644
--- a/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.glsl
+++ b/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.glsl
@@ -8,8 +8,8 @@
uvec3 r = (a + b);
return;
}
+
void main() {
f();
}
-