glsl: be more consistent about printing constants
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 28 May 2014 01:23:02 +0000 (21:23 -0400)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 28 May 2014 22:05:59 +0000 (15:05 -0700)
commitbbaec0f76c714a369014a47cca588fa3c2c9ce1e
tree7bc6935190d4981e38e1097d0172cb0a0da47d7c
parenta7aca3919ba29ccdac01136fa9ba79f571bc797d
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>
23 files changed:
src/glsl/ir_print_visitor.cpp
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected
src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected
src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected
src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected
src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected
src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected
src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected
src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected
src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected
src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test