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/intrinsics/gen/modf/180fed.wgsl.expected.glsl b/test/intrinsics/gen/modf/180fed.wgsl.expected.glsl
index efa2621..7ca9bdf 100644
--- a/test/intrinsics/gen/modf/180fed.wgsl.expected.glsl
+++ b/test/intrinsics/gen/modf/180fed.wgsl.expected.glsl
@@ -7,6 +7,7 @@
float fract;
float whole;
};
+
modf_result tint_modf(float param_0) {
float whole;
float fract = modf(param_0, whole);
@@ -34,6 +35,8 @@
wrapper_result.value = inner_result;
return wrapper_result;
}
+
+
void main() {
tint_symbol outputs;
outputs = vertex_main();
@@ -42,10 +45,9 @@
gl_Position.y = -gl_Position.y;
}
-
Error parsing GLSL shader:
-ERROR: 0:11: '{ } style initializers' : not supported with this profile: es
-ERROR: 0:11: '' : compilation terminated
+ERROR: 0:12: '{ } style initializers' : not supported with this profile: es
+ERROR: 0:12: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -57,6 +59,7 @@
float fract;
float whole;
};
+
modf_result tint_modf(float param_0) {
float whole;
float fract = modf(param_0, whole);
@@ -77,14 +80,14 @@
modf_180fed();
return;
}
+
void main() {
fragment_main();
}
-
Error parsing GLSL shader:
-ERROR: 0:11: '{ } style initializers' : not supported with this profile: es
-ERROR: 0:11: '' : compilation terminated
+ERROR: 0:12: '{ } style initializers' : not supported with this profile: es
+ERROR: 0:12: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -96,6 +99,7 @@
float fract;
float whole;
};
+
modf_result tint_modf(float param_0) {
float whole;
float fract = modf(param_0, whole);
@@ -117,14 +121,14 @@
modf_180fed();
return;
}
+
void main() {
compute_main();
}
-
Error parsing GLSL shader:
-ERROR: 0:11: '{ } style initializers' : not supported with this profile: es
-ERROR: 0:11: '' : compilation terminated
+ERROR: 0:12: '{ } style initializers' : not supported with this profile: es
+ERROR: 0:12: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.