summaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2014-05-27 21:23:02 -0400
committerKenneth Graunke <kenneth@whitecape.org>2014-05-28 15:05:59 -0700
commitbbaec0f76c714a369014a47cca588fa3c2c9ce1e (patch)
tree7bc6935190d4981e38e1097d0172cb0a0da47d7c /src/glsl/tests
parenta7aca3919ba29ccdac01136fa9ba79f571bc797d (diff)
downloadexternal_mesa3d-bbaec0f76c714a369014a47cca588fa3c2c9ce1e.zip
external_mesa3d-bbaec0f76c714a369014a47cca588fa3c2c9ce1e.tar.gz
external_mesa3d-bbaec0f76c714a369014a47cca588fa3c2c9ce1e.tar.bz2
glsl: be more consistent about printing constants
Make sure that we print the same number of digits when printing 0.0 as any other floating-point number. This will make generating expected output files for tests easier. To avoid breaking "make check," update the generated tests for lower_jumps before the next commit which will bring create_test_cases.py in line with them. Signed-off-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/tests')
-rwxr-xr-xsrc/glsl/tests/lower_jumps/lower_breaks_1.opt_test3
-rw-r--r--src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected3
-rw-r--r--src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected2
-rw-r--r--src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected2
-rw-r--r--src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected2
-rw-r--r--src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected2
-rw-r--r--src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected10
-rw-r--r--src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected6
-rw-r--r--src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected8
-rw-r--r--src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected4
-rw-r--r--src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected2
-rw-r--r--src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected4
-rw-r--r--src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected4
-rw-r--r--src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected4
-rw-r--r--src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected4
-rw-r--r--src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected8
-rwxr-xr-xsrc/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test3
-rw-r--r--src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected3
-rwxr-xr-xsrc/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test3
-rw-r--r--src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected3
-rwxr-xr-xsrc/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test3
-rwxr-xr-xsrc/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test3
22 files changed, 39 insertions, 47 deletions
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
index b412ba8..e2d4ed1 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
@@ -8,6 +8,5 @@
((declare (out) float a)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) break))))))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) break))))))
EOF
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected b/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected
index 56ef3e4..270a43d 100644
--- a/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected
@@ -1,5 +1,4 @@
((declare (out) float a)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) break))))))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) break))))))
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected b/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected
index dc231f9..73a1d56 100644
--- a/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected
@@ -3,5 +3,5 @@
(signature void (parameters)
((loop
((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.0))) (break)
+ (if (expression bool > (var_ref b) (constant float (0.000000))) (break)
())))))))
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected b/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected
index 8131b66..53d5392 100644
--- a/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected
@@ -3,6 +3,6 @@
(signature void (parameters)
((loop
((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.0)))
+ (if (expression bool > (var_ref b) (constant float (0.000000)))
((assign (x) (var_ref c) (constant float (1.000000))) break)
())))))))
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected b/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected
index 94dcb37..ecf28c4 100644
--- a/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected
@@ -3,5 +3,5 @@
(signature void (parameters)
((loop
((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.0))) ()
+ (if (expression bool > (var_ref b) (constant float (0.000000))) ()
(break))))))))
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected b/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected
index 5b46ccb..418f879 100644
--- a/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected
@@ -3,5 +3,5 @@
(signature void (parameters)
((loop
((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.0))) ()
+ (if (expression bool > (var_ref b) (constant float (0.000000))) ()
((assign (x) (var_ref c) (constant float (1.000000))) break))))))))
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected b/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected
index 967ce64..5582d08 100644
--- a/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected
@@ -8,15 +8,15 @@
(loop
((declare (temporary) bool execute_flag)
(assign (x) (var_ref execute_flag) (constant bool (1)))
- (if (expression bool > (var_ref a) (constant float (0.0)))
- ((if (expression bool > (var_ref ba) (constant float (0.0)))
- ((if (expression bool > (var_ref bb) (constant float (0.0)))
+ (if (expression bool > (var_ref a) (constant float (0.000000)))
+ ((if (expression bool > (var_ref ba) (constant float (0.000000)))
+ ((if (expression bool > (var_ref bb) (constant float (0.000000)))
((assign (x) (var_ref execute_flag) (constant bool (0))))
()))
())
(if (var_ref execute_flag)
- ((if (expression bool > (var_ref ca) (constant float (0.0)))
- ((if (expression bool > (var_ref cb) (constant float (0.0)))
+ ((if (expression bool > (var_ref ca) (constant float (0.000000)))
+ ((if (expression bool > (var_ref cb) (constant float (0.000000)))
((assign (x) (var_ref break_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
diff --git a/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected b/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected
index 841073e..0379206 100644
--- a/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected
@@ -6,13 +6,13 @@
(loop
((declare (temporary) bool execute_flag)
(assign (x) (var_ref execute_flag) (constant bool (1)))
- (if (expression bool > (var_ref aa) (constant float (0.0)))
- ((if (expression bool > (var_ref ab) (constant float (0.0)))
+ (if (expression bool > (var_ref aa) (constant float (0.000000)))
+ ((if (expression bool > (var_ref ab) (constant float (0.000000)))
((assign (x) (var_ref execute_flag) (constant bool (0))))
()))
())
(if (var_ref execute_flag)
- ((if (expression bool > (var_ref b) (constant float (0.0)))
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
((assign (x) (var_ref break_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
diff --git a/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected b/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected
index cf2ef3f..47e8c79 100644
--- a/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected
@@ -7,16 +7,16 @@
(assign (x) (var_ref execute_flag) (constant bool (1)))
(declare (temporary) bool return_flag)
(assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref aa) (constant float (0.0)))
- ((if (expression bool > (var_ref ab) (constant float (0.0)))
+ (if (expression bool > (var_ref aa) (constant float (0.000000)))
+ ((if (expression bool > (var_ref ab) (constant float (0.000000)))
((assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
())
(if (var_ref execute_flag)
((loop
- ((if (expression bool > (var_ref b) (constant float (0.0)))
- ((if (expression bool > (var_ref c) (constant float (0.0))) ()
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
+ ((if (expression bool > (var_ref c) (constant float (0.000000))) ()
(continue)))
((assign (x) (var_ref return_flag) (constant bool (1)))))
break))
diff --git a/src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected b/src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected
index 5b62bbc..d4835e9 100644
--- a/src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected
@@ -6,8 +6,8 @@
(declare (temporary) float return_value)
(declare (temporary) bool return_flag)
(assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.0)))
- ((if (expression bool > (var_ref b) (constant float (0.0)))
+ (if (expression bool > (var_ref a) (constant float (0.000000)))
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
((assign (x) (var_ref return_value) (constant float (1.000000)))
(assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
diff --git a/src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected b/src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected
index 07c6842..b551a06 100644
--- a/src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected
@@ -6,7 +6,7 @@
(declare (temporary) float return_value)
(declare (temporary) bool return_flag)
(assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.0)))
+ (if (expression bool > (var_ref a) (constant float (0.000000)))
((assign (x) (var_ref return_value) (constant float (1.000000)))
(assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
diff --git a/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected b/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected
index 7e3fe31..e8b36f1 100644
--- a/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected
@@ -1,8 +1,8 @@
((declare (in) float a) (declare (in) float b)
(function main
(signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.0)))
- ((if (expression bool > (var_ref b) (constant float (0.0)))
+ ((if (expression bool > (var_ref a) (constant float (0.000000)))
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
((return))
()))
())))))
diff --git a/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected b/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected
index b47f5a4..e15a97d 100644
--- a/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected
@@ -5,8 +5,8 @@
(assign (x) (var_ref execute_flag) (constant bool (1)))
(declare (temporary) bool return_flag)
(assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.0)))
- ((if (expression bool > (var_ref b) (constant float (0.0)))
+ (if (expression bool > (var_ref a) (constant float (0.000000)))
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
((assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
diff --git a/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected b/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected
index 7424968..07db6e7 100644
--- a/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected
@@ -1,8 +1,8 @@
((declare (in) float a) (declare (in) float b)
(function sub
(signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.0)))
- ((if (expression bool > (var_ref b) (constant float (0.0)))
+ ((if (expression bool > (var_ref a) (constant float (0.000000)))
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
((return))
()))
())))))
diff --git a/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected b/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected
index 1a3eae5..3110980 100644
--- a/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected
@@ -5,8 +5,8 @@
(assign (x) (var_ref execute_flag) (constant bool (1)))
(declare (temporary) bool return_flag)
(assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.0)))
- ((if (expression bool > (var_ref b) (constant float (0.0)))
+ (if (expression bool > (var_ref a) (constant float (0.000000)))
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
((assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
diff --git a/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected b/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected
index c0b51e1..271cd3b 100644
--- a/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected
@@ -6,15 +6,15 @@
(assign (x) (var_ref execute_flag) (constant bool (1)))
(declare (temporary) bool return_flag)
(assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref aa) (constant float (0.0)))
- ((if (expression bool > (var_ref ab) (constant float (0.0)))
+ (if (expression bool > (var_ref aa) (constant float (0.000000)))
+ ((if (expression bool > (var_ref ab) (constant float (0.000000)))
((assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
())
(if (var_ref execute_flag)
- ((if (expression bool > (var_ref b) (constant float (0.0)))
- ((if (expression bool > (var_ref c) (constant float (0.0))) () ())
+ ((if (expression bool > (var_ref b) (constant float (0.000000)))
+ ((if (expression bool > (var_ref c) (constant float (0.000000))) () ())
(assign (x) (var_ref return_flag) (constant bool (1)))
(assign (x) (var_ref execute_flag) (constant bool (0))))
()))
diff --git a/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test b/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
index 8403bb2..5fa1134 100755
--- a/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
+++ b/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
@@ -8,6 +8,5 @@
((declare (out) float a)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) continue))))))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) continue))))))
EOF
diff --git a/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected b/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected
index 98b74d7..2a7ec2e 100644
--- a/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected
@@ -1,5 +1,4 @@
((declare (out) float a)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))))))))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000)))))))))
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
index 0408282..7944243 100755
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
@@ -8,7 +8,6 @@
((declare (out) float a) (declare (out) float b)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
(assign (x) (var_ref b) (constant float (2.000000)))))))
EOF
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected
index 569213e..156e95e 100644
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected
@@ -1,6 +1,5 @@
((declare (out) float a) (declare (out) float b)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
(assign (x) (var_ref b) (constant float (2.000000)))))))
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
index a7e65c8..76469f7 100755
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
@@ -8,7 +8,6 @@
((declare (out) float a) (declare (out) float b)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
(assign (x) (var_ref b) (constant float (2.000000)))))))
EOF
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
index 7a5efe5..1d145b4 100755
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
@@ -8,7 +8,6 @@
((declare (out) float a) (declare (out) float b)
(function main
(signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
+ ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
(assign (x) (var_ref b) (constant float (2.000000)))))))
EOF