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/textureNumLevels/076cb5.wgsl.expected.glsl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.glsl
index ebffe19..8af1de3 100644
--- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.glsl
@@ -4,7 +4,6 @@
precision mediump float;
uniform highp samplerCube arg_0_1;
-
void textureNumLevels_076cb5() {
int res = textureQueryLevels(arg_0_1);;
}
@@ -24,6 +23,8 @@
wrapper_result.value = inner_result;
return wrapper_result;
}
+
+
void main() {
tint_symbol outputs;
outputs = vertex_main();
@@ -32,11 +33,10 @@
gl_Position.y = -gl_Position.y;
}
-
Error parsing GLSL shader:
-ERROR: 0:7: 'textureQueryLevels' : no matching overloaded function found
-ERROR: 0:7: '=' : cannot convert from ' const float' to ' temp highp int'
-ERROR: 0:7: '' : compilation terminated
+ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp highp int'
+ERROR: 0:6: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
@@ -45,7 +45,6 @@
precision mediump float;
uniform highp samplerCube arg_0_1;
-
void textureNumLevels_076cb5() {
int res = textureQueryLevels(arg_0_1);;
}
@@ -58,15 +57,15 @@
textureNumLevels_076cb5();
return;
}
+
void main() {
fragment_main();
}
-
Error parsing GLSL shader:
-ERROR: 0:7: 'textureQueryLevels' : no matching overloaded function found
-ERROR: 0:7: '=' : cannot convert from ' const float' to ' temp mediump int'
-ERROR: 0:7: '' : compilation terminated
+ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int'
+ERROR: 0:6: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
@@ -75,7 +74,6 @@
precision mediump float;
uniform highp samplerCube arg_0_1;
-
void textureNumLevels_076cb5() {
int res = textureQueryLevels(arg_0_1);;
}
@@ -89,15 +87,15 @@
textureNumLevels_076cb5();
return;
}
+
void main() {
compute_main();
}
-
Error parsing GLSL shader:
-ERROR: 0:7: 'textureQueryLevels' : no matching overloaded function found
-ERROR: 0:7: '=' : cannot convert from ' const float' to ' temp highp int'
-ERROR: 0:7: '' : compilation terminated
+ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp highp int'
+ERROR: 0:6: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.