-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make unit tests more resilient before adding new rewrite (#366)
Co-authored-by: Laurent Le Brun <laurentlb@gmail.com>
- Loading branch information
1 parent
f6bfbd2
commit c643d34
Showing
11 changed files
with
176 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#version 400 | ||
|
||
out vec4 fragColor; | ||
void main() | ||
{ | ||
double pi=acos(-1.),minus_pi=-acos(-1.),tau=2.*acos(-1.),minus_tau=-2.*acos(-1.),half_pi=acos(0.),minus_half_pi=-acos(0.),precise_pi=acos(-1.); | ||
fragColor=vec4(pi+minus_pi+tau+minus_tau+half_pi+minus_half_pi+precise_pi); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
float simple_var_decl_reuse(float x) | ||
{ | ||
float a = 1.+x; | ||
int b = 3+int(x); | ||
vec3 sep = vec3(0.); // prevents squeezeConsecutiveDeclarations | ||
int b2 = 5+int(a); | ||
float c = a; | ||
sep += vec3(0.); // prevents squeezeConsecutiveDeclarations | ||
float c2 = 9.+a; | ||
int d = 3+b+b2; | ||
sep += vec3(0.); // prevents squeezeConsecutiveDeclarations | ||
int d2 = d+b2-b; | ||
float e = c*c2; | ||
sep += vec3(0.); // prevents squeezeConsecutiveDeclarations | ||
float e2 = 4.-c-c2; | ||
int f = 3*d*d2; | ||
sep += vec3(0.); // prevents squeezeConsecutiveDeclarations | ||
int f2 = 4/d2-d; | ||
float g = e-float(f)+e2; | ||
int g2 = int(4.-g+e2+e); | ||
int h = 3*f-f2; | ||
sep += vec3(0.); // prevents squeezeConsecutiveDeclarations | ||
int h2 = 7*f2-f; | ||
return length(sep)+float(h*h2)*g*float(g2)*x + float(g2/h2-h); | ||
} | ||
float multidecl_var_decl_reuse(float x) | ||
{ | ||
float a = 1.+x; | ||
int b = 3+int(x), b2 = 5+int(a); | ||
float c = a, c2 = 9.+a; | ||
int d = 3+b+b2, d2 = d+b2-b; | ||
float e = c*c2, e2 = 4.-c-c2; | ||
int f = 3*d*d2, f2 = 4/d2-d; | ||
float g = e-float(f)+e2, g2 = 4.-g+e2+e; | ||
int h = 3*f-f2, h2 = 7*f2-f; | ||
return float(h*h2)*g*g2*x + g2/float(h2-h); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
float simple_var_decl_reuse(float x) | ||
{ | ||
float a=1.+x; | ||
int b=3+int(x); | ||
vec3 sep=vec3(0); | ||
int b2=5+int(a); | ||
float c=a; | ||
sep+=vec3(0); | ||
float c2=9.+a; | ||
int d=3+b+b2; | ||
sep+=vec3(0); | ||
int d2=d+b2-b; | ||
float e=c*c2; | ||
sep+=vec3(0); | ||
float e2=4.-c-c2; | ||
int f=3*d*d2; | ||
sep+=vec3(0); | ||
int f2=4/d2-d; | ||
float g=e-float(f)+e2; | ||
int g2=int(4.-g+e2+e),h=3*f-f2; | ||
sep+=vec3(0); | ||
int h2=7*f2-f; | ||
return length(sep)+float(h*h2)*g*float(g2)*x+float(g2/h2-h); | ||
} | ||
float multidecl_var_decl_reuse(float x) | ||
{ | ||
float a=1.+x; | ||
int b=3+int(x),b2=5+int(a); | ||
float c=a,c2=9.+a; | ||
int d=3+b+b2,d2=d+b2-b; | ||
float e=c*c2,e2=4.-c-c2; | ||
int f=3*d*d2,f2=4/d2-d; | ||
float g=e-float(f)+e2,g2=4.-g+e2+e; | ||
int h=3*f-f2,h2=7*f2-f; | ||
return float(h*h2)*g*g2*x+g2/float(h2-h); | ||
} |