Don't test floats with the form ‘1f’

There is nothing in the GLSL spec which says you can have a float
literal without an exponent or a decimal point even if you add the ‘f’
suffix. This patch replaces that literal with some other variations
that should be accepted according to the spec.

Reviewed-by: Matt Turner <mattst88 at gmail.com>
util/gl: link against OPENGL_gl_LIBRARY on waffle aware systems

Similar to the earlier patch for waffle-less (glut) builds. The need
for this patch became apparent as we removed the libGL link dependency
in waffle.

v2: Try to handle both gl and gles*.

Reported-by: Mark Janes <mark.a.janes@intel.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gen_outerproduct_tests.py: Move template to templates dir

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_outerproduct_tests.py: refactor and cleanup

This is mostly formating changes, plus the use of.path.join instead of
statically assigned path names.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_uniform_initializer_tests.py: fix double assignment

This is one of those odd python features, the ability to assign multiple
values at a time. Of course, that's not what the original commiter
intended (it wasn't me for once). It doesn't cause any problems now, but
it's odd to look at.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_uniform_initializer_tests.py: Use templates folder for templates

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_uniform_initializer_tests.py: Cleanup style problems

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_uniform_initializer_tests.py: use print_function

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_uniform_initializer_tests templates: minor cleanups and refactors

This patch changes some of the implementation details of the templates.
These can be changes can be broken down into two types,
using mako features:
- converting from ${'{}.{}'.format(a, b)} to ${a}.${b}

making the code more pythonic and less C-like

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_uniform_initializer_tests.py: optimize and cleanup further

This patch makes this generator use more python features:
- the with statement for open()
- enumerate
- str.format()
- lots of generators and generator statements
- remove unused function
- move assignments out of loops that don't need to be in the loop

This creates a cleaner, simpler generator that runs faster.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
interpolation_qualifier...: use with statement and print_function

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
interpolation-qualifier...: put templates in templates dir

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
interpolation-qualifier...: use if __name__ == '__main__' pattern

By pulling all of the loops into a single function we also get the
advantage of combining some code.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
interpolation_qualifier...: combine loops

This uses a single loop (generated by itertools.product), and individual
generators functions to produce tests. The obvious advantage is that we
loop over the same data a fewer number of times, the other advantage is
a clearer division of code by splitting a function with several hundred
lines of code into multiple functions.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
interpolation-qualifier...: cleanup style problems

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_non-lvalue_tests.py: refactor generator

Removes use of class and puts templates in the templates directory.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_outerproduct_invalid_params.py: use os.path.join for dirnames

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_outerproduct_invalid_params.py: Put template in templates dir

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_interpolation_tests.py: Use mako to generate tests

This patch converts gen_interpolation_tests from concatenating a ton of
strings to generating it's output with a mako template. There are
cosmetic changes to the output file.

Using mako is possibly a little faster, but mainly has the benefit of
being much more readable than a long series of string concatenations,
even at the cost of a little more code.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
gen_interpolation_tests.py: make docstring a propper docstring

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>