mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
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>
This commit is contained in:
committed by
Tint LUCI CQ
parent
b1d2b84f7d
commit
e2f35ba8e0
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
};
|
||||
@@ -26,8 +28,8 @@ void tint_symbol() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
};
|
||||
@@ -26,8 +28,8 @@ void tint_symbol() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
};
|
||||
@@ -26,8 +28,8 @@ void tint_symbol() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,18 +5,20 @@ struct Uniforms {
|
||||
uint i;
|
||||
uint j;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct S1 {
|
||||
InnerS a2[8];
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
S1 a1[8];
|
||||
};
|
||||
|
||||
uint nextIndex = 0u;
|
||||
|
||||
uint getNextIndex() {
|
||||
nextIndex = (nextIndex + 1u);
|
||||
return nextIndex;
|
||||
@@ -34,8 +36,8 @@ void tint_symbol() {
|
||||
s.a1[getNextIndex()].a2[uniforms.j] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
};
|
||||
@@ -22,8 +24,8 @@ void tint_symbol() {
|
||||
s1.a1[uniforms.i] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ struct Uniforms {
|
||||
uint i;
|
||||
uint j;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8][8];
|
||||
};
|
||||
@@ -24,8 +26,8 @@ void tint_symbol() {
|
||||
s1.a1[uniforms.i][uniforms.j] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,12 +4,15 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct S1 {
|
||||
InnerS s2;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
S1 a1[8];
|
||||
};
|
||||
@@ -25,8 +28,8 @@ void tint_symbol() {
|
||||
s1.a1[uniforms.i].s2 = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,12 +5,15 @@ struct Uniforms {
|
||||
uint i;
|
||||
uint j;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct S1 {
|
||||
InnerS a2[8];
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
S1 a1[8];
|
||||
};
|
||||
@@ -27,8 +30,8 @@ void tint_symbol() {
|
||||
s.a1[uniforms.i].a2[uniforms.j] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
@@ -11,18 +12,18 @@ struct InnerS {
|
||||
layout(binding = 4) uniform Uniforms_1 {
|
||||
uint i;
|
||||
} uniforms;
|
||||
|
||||
layout(binding = 0) buffer OuterS_1 {
|
||||
InnerS a1[];
|
||||
} s1;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
InnerS v = InnerS(0);
|
||||
s1.a1[uniforms.i] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ struct Uniforms {
|
||||
uint i;
|
||||
uint j;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct S1 {
|
||||
InnerS a2[8];
|
||||
};
|
||||
@@ -16,18 +18,18 @@ layout(binding = 4) uniform Uniforms_1 {
|
||||
uint i;
|
||||
uint j;
|
||||
} uniforms;
|
||||
|
||||
layout(binding = 0) buffer OuterS_1 {
|
||||
S1 a1[];
|
||||
} s;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
InnerS v = InnerS(0);
|
||||
s.a1[uniforms.i].a2[uniforms.j] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
mat2x4 m1;
|
||||
};
|
||||
@@ -19,8 +20,8 @@ void tint_symbol() {
|
||||
s1.m1[uniforms.i][uniforms.i] = 1.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
InnerS a2[8];
|
||||
@@ -24,8 +26,8 @@ void tint_symbol() {
|
||||
s1.a2[uniforms.i] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,12 +4,15 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct S1 {
|
||||
InnerS a[8];
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
S1 s2;
|
||||
};
|
||||
@@ -25,8 +28,8 @@ void tint_symbol() {
|
||||
s1.s2.a[uniforms.i] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
vec3 v1;
|
||||
};
|
||||
@@ -18,8 +19,8 @@ void tint_symbol() {
|
||||
s1.v1[uniforms.i] = 1.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
uint a1[8];
|
||||
};
|
||||
@@ -24,8 +25,8 @@ void tint_symbol() {
|
||||
v[f(s1.a1[uniforms.i])] = 1.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
};
|
||||
@@ -23,8 +25,8 @@ void tint_symbol() {
|
||||
s1.a1[p_save] = v;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ precision mediump float;
|
||||
struct Uniforms {
|
||||
uint i;
|
||||
};
|
||||
|
||||
struct InnerS {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct OuterS {
|
||||
InnerS a1[8];
|
||||
};
|
||||
@@ -26,8 +28,8 @@ void tint_symbol() {
|
||||
f(s1);
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user