summaryrefslogtreecommitdiff
path: root/generated_tests/templates
AgeCommit message (Collapse)AuthorFilesLines
2015-06-09gen_variable_index_read_tests: make params.col behave like rowDylan Baker1-4/+4
params.row and params.idx automatically add [] around the value for lookups. col is unique in that it doesn't. This patch changes the behavior to be more like the other parameters. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2015-06-09gen_variable_index_read_tests: simplify color assignment with params.rowDylan Baker1-7/+1
This makes the port a little less naive than it was before, and allows us to remove logic from the template, by using logic in the params instance. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2015-06-09gen_variable_index_read_tests use bools instead of 0 and 1Dylan Baker3-11/+9
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2015-06-09generators: port variable-index-read.sh to pythonDylan Baker3-0/+300
This patch replaces a bash based generator with a python generator. This has the obvious advantage of remove a large swath of generated tests from the check-in, and prevents modification of a generated file. It also is much faster than the bash generator, so running at compile time isn't a problem. There are no functional differences between the bash generated versions and the python generated versions, only whitespace/line-wrapping differences, and small changes to the copyright header. All tests that passed with the bash versions pass with the python versions on the i965 driver with multiple hardware revisions. Tested with python2.7 and python3.3 v2: - rename generated test .list file (Emil) - Use a shared function to add the license text (also removes a typo in the text spotted by Emil) Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2015-03-13framework: Add python version to mako template dirsDylan Baker1-0/+2
Since these templates are at the very least not compatible betwen 3.x and 2.x, and possibly not backwards compatible from 3.x to 3.x-1 it makes better sense to actually maintain the version. This allows easy transition between python versions without blowing away the mako cache on every iteration. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-02-23gen_shader_bit_encoding_tests.py: python 2/3 hybridizeDylan Baker1-1/+2
This requires modifications to the mako template and to the generator Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-02-23gen_builtin_packing_tests.py: python2/3 hybridizeDylan Baker4-12/+16
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-02-23gen_shader_precision_tests.py: python2/3 hybridizeDylan Baker3-12/+21
This produces no changes in output. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-02-23gen_texture_query_lod_tests.py: make pyhthon2/3 hybridDylan Baker1-1/+1
One of the things that changed between python2 and 3 is the way str.translate works. It's a complicated thing to convert, and just doing the obvious code seems better. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-02-23generators: python2/3 hybridize gen_outerproduct_tests.pyDylan Baker1-7/+11
This uses six in both the mako templates and in the main python script to create a generator that runs under both python2.7 and python 3.2, and this produces no differences when run with python2 or python3. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-02-23generated_tests: use future division in mako templatesDylan Baker1-0/+5
This provides consistency between the behavior of python2 and python3 There are no changes in the generated files before and after this change, it simply ensures that things work the same for both versions of python. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-01-19arb_shader_precision: Add positional argument specifiers.Vinson Lee3-6/+6
Fix build errors with Python < 2.7. Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2015-01-19arb_shader_precision: add tests for floating point precisionMicah Fedke3-0/+389
Note: A bunch of these currently don't pass on i965. Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2014-12-08generators: Add positional argument specifiers.Vinson Lee1-1/+1
Fix build errors with Python < 2.7. Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2014-12-01gen_interpolation_tests.py: put template in templates dirDylan Baker1-0/+74
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-12-01gen_outerproduct_invalid_params.py: Put template in templates dirDylan Baker1-0/+10
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-12-01gen_non-lvalue_tests.py: refactor generatorDylan Baker2-0/+57
Removes use of class and puts templates in the templates directory. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-12-01interpolation-qualifier...: put templates in templates dirDylan Baker5-0/+185
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-12-01gen_uniform_initializer_tests templates: minor cleanups and refactorsDylan Baker8-52/+48
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>
2014-12-01gen_uniform_initializer_tests.py: Use templates folder for templatesDylan Baker8-0/+270
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-12-01gen_outerproduct_tests.py: Move template to templates dirDylan Baker1-0/+123
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-11-24gen_builtin_packing_tests templates: Use xrange instead of rangeDylan Baker4-12/+12
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>
2014-11-24gen_builtin_packing_tests.py: put templates in templates directoryDylan Baker6-0/+394
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>
2014-11-24gen_const_builtin_equal_tests.py: put template in templates dirDylan Baker1-0/+20
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>
2014-11-24gen_texture_query_lod_tests.py: Split template into templates folderDylan Baker1-0/+33
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>
2014-11-24gen_texture_lod_tests.py: Split templatesDylan Baker3-0/+53
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>
2014-11-24gen_shader_bit_encoding_tests.py: split template into separate fileDylan Baker1-0/+87
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>
2014-11-24test generators: add templates folderDylan Baker1-0/+81
Also adds a couple of helper functions to the templates __init__.py Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> acked-by: Matt Turner <mattst88@gmail.com>