summaryrefslogtreecommitdiff
path: root/generated_tests
AgeCommit message (Collapse)AuthorFilesLines
2017-10-11cl: Add basic remainder(float, float) builtin testsAaron Watry1-0/+13
Tested with libclc on a Radeon HD 7850. Hex output values were generated via remainderf(float, float). No implications as to the quality of the inputs is intended. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-10-11cl: Fix cospi return valueJan Vesely1-1/+1
cos(pi * 2k) = 1 Fixes cos test on beignet Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
2017-09-20cl: Add failing case to exp testTom Stellard1-2/+2
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-09-08cl: Add generator for shuffle2 builtinsJan Vesely2-0/+148
v2: fixup python style(six.iteritems, itertools.product, enumerate, ...) Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-09-08cl: Add generator for shuffle builtinsJan Vesely2-0/+142
v2: "The size of each element in the mask must match the size of each element in the result." v3: fixup python style (six. iteritems, enumerate, itertools.product, ...) Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-08-24cl: Replace handwritten vload tests with a generatorJan Vesely2-0/+226
v2: simplify mark local storage volatile v3: python style Passes on beignet(IVB), clover(carrizo, iceland), and intel CPU Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-08-24cl: Add private and local versions of vstore testsJan Vesely1-27/+116
v2: mark temporary storage as volatile v3: python style vstore_half requires workaround using short as local/private type Tests pass on beignet(IVB), and intel CPU Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-02-24builtin_functions: Add more 64-bit integersJason Ekstrand1-2/+22
Seriously, 100000000000 is not the only 64-bit integer. We should test a few more of them. These new integers trigger a bug in the GLSL IR int64 lowering code. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-02-23generated_tests: Fix require_extensions for constant_array_sizeDylan Baker1-2/+2
The extension requires a GL_ prefix, which the template didn't have. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Tested-by: Jason Ekstrand <jason@jlekstrand.net>
2017-02-23generated_tests: fix tessellation -> tesselation typoDylan Baker1-7/+7
This typo causes some tests to be skipped that shouldn't. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2017-02-07arb_gpu_shader_int64: add testing of unsigned div/modIlia Mirkin1-4/+4
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-07arb_gpu_shader_int64: allow shift tests to be generatedIlia Mirkin1-5/+19
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-02gen_conversion: generate tests for 64-bit integersNicolai Hähnle2-40/+264
This adds 264 execution tests (all in the same directory, so will run quite quickly with --process-isolation false) and 192 compiler tests. Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2017-02-02gen_conversion: refactor templates to allow multiple extensionsNicolai Hähnle4-8/+20
This will be needed for the interaction of GL_ARB_gpu_shader_fp64 with GL_ARB_gpu_shader_int64. Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2017-02-02gen_conversion: rename _gen_from/to_double and _double_typeNicolai Hähnle1-22/+22
Use generic names to reflect the upcoming dual use for 64-bit int types. Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2017-02-02gen_conversion: explicitly enumerate conversion target typesNicolai Hähnle1-8/+13
Currently only 'd' for double, but will be extended for 64-bit integer types. Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2017-02-02Rename gen_conversion_fp64 to gen_conversionNicolai Hähnle21-22/+22
We will extend it with int64 types. Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2017-01-10generated_tests: new compiler tests for INTEL_conservative_rasterizationLionel Landwerlin2-0/+177
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
2016-11-11generated_tests: new compiler tests for NV_image_formatsLionel Landwerlin2-0/+296
This tests that the compiler accepts the new layout formats introduced by NV_image_formats and also it's correct interaction with the EXT_texture_norm16 specification. v2: Only disallow normalized formats when EXT_texture_norm16 is not available (Ilia) v3: Shuffle the declaration as suggested to cover permutations of NV_image_formats & EXT_texture_norm16 properly (Ilia) Reorder imports (Dylan) Add docstring description of the test (Dylan) Other nits (Dylan) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-11-11gen_extensions_defined.py: add NV_image_formatsLionel Landwerlin1-0/+1
This extensions is written against OpenGL ES 3.1 and 3.10 of the OpenGL ES Shading Language specification. v2: Fix missing 'GL_' prefix (Ilia) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-07Add test generator for EXT_shader_framebuffer_fetch.Francisco Jerez2-0/+803
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-08-17cl: Add vstore test generatorJan Vesely2-0/+133
The tests try to use target mem type aligned access. Generated tests pass (except vstore-half which skips) on intel(cpu), beignet, nvidia CUDA v2: Move code to main function, update copyright Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-08-05Generators/cl_store: Move makedirs into mainDylan Baker1-1/+2
Executing code in the global scope that isn't in main isn't a particularly good idea, but for our testing we call the main() function, so moving this into main fixes the test, and it also improves the code quality a bit. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05Generators/genclbuiltins: Use open as context manager to ensure files are closedDylan Baker1-41/+39
Currently there are a good number of files that aren't closed because the call to the close function is in the wrong loop level. While moving it in one level would solve the problem, using a context manager is better style and ensures that the file is closed. This error was spotted by py.test. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05Generators: gen_shader_image_load_store_tests: remove duplicate testsDylan Baker2-18/+1
This generator produces preprocessor defines tests, which are duplicated by the gen_extensions_defined generator. It makes sense to me to let the defines generator own this functionality (it's very minor anyway). This also changes the version required in extensions defined to 130, per the spec "OpenGL 3.0 and GLSL 1.30 are required." Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-03generators: use main function in gen_shader_image_load_store_testsDylan Baker1-535/+541
This is a) good practice, b) fixes potential issues on windows, and c) makes testing easier. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-07-21GL_OES_texture_storage_multisample_2d_array requires ES 3.1Ilia Mirkin1-1/+1
This starts to fail with my upcoming patch to only expose extensions based on shader version. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-07-21generators/gen_vs_in_fp64: Different VBO values per vertexAndres Gomez2-35/+49
Before, in every drawing we were having the same VBO values per vertex to be compared against the values in the uniforms. Now, we also have different values per vertex so we can be sure that it is truly its own data. Signed-off-by: Andres Gomez <agomez@igalia.com> Acked-by: Juan A. Suarez <jasuarez@igalia.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2016-07-06generators: Add extensions requirements to gen_constant_array_size_testsDylan Baker1-1/+5
This fixes int64 failures. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-07-05OES_shader_io_blocks: Add preprocessor define test for EXT versionIan Romanick1-0/+1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-07-05OES_geometry_shader: Add preprocessor define test for EXT versionsIan Romanick1-0/+2
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-07-05builtin_function: try and use casts for 64-bits instead of dtype setting.Dave Airlie1-10/+10
The dtype setting only works with numpy 1.9 and above, which doesn't seem to be in most distros yet. Reported-by: Jose Fonseca <jfonseca@vmware.com> Tested-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-07-02arb_gpu_shader_int64: add test generation to standard testing templateDave Airlie2-3/+158
Rather than forking this code further, I've just added support to the standard generator for the 64-bit tests. This relies on the shader_runner int64 support. Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-07-02generators/gen_vs_in_fp64: Adds u/byte and u/short testsAndres Gomez1-0/+31
Added more test cases combinations by including u/byte and u/short GL types in the VBO so the stride is smaller than a word. Signed-off-by: Andres Gomez <agomez@igalia.com> Acked-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-07-02generators/gen_vs_in_fp64: Adds support to specify the GL type in the VBOAndres Gomez2-82/+249
Signed-off-by: Andres Gomez <agomez@igalia.com> Acked-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-07-02util: Add u/byte, u/short and half support to [vertex data]Andres Gomez2-5/+5
This allows to set data of u/byte, u/short and half types for attributes with the shader runner. For example: 0/byte/int attname1/ushort/uint attname3/half/float The syntax has been extended so the recommended way has replaced the old COUNT field in the [vertex data] header line with the corresponding GLSL type for the old TYPE field. In any case, the extended syntax is backward compatible so it is still possible to specify a vec3 attribute like: attname/float/3 In addition to the now recommended format: attname/float/vec3 Due to this, the arb_vertex_attrib_64bit input tests generator has been also adapted to the new syntax. Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2016-07-01arb_gpu_shader_fp64: emit GS output for every vertexAndres Gomez1-1/+1
Because EmitVertex() will invalidate all previous output writes, we need to set the value of the output variables for every vertex Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-06-27gen_tes_input_tests.py: fix a typo errorSamuel Pitoiset1-1/+1
Probably a wrong copy-paste. Trivial. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-06-17generators/gen_extensions_defined.py: fix ARB_gpu_shader5Dylan Baker1-1/+1
This fixes the version requirement to be accurate, which prevents the generator from producing bogus tests. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-06-17generators/gen_extensions_defined.py: fix ARB_fragment_layer_viewportDylan Baker1-1/+1
This stops the generator from creating bogus tests. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-06-17generators/gen_extensions_defined: fix AMD_vertex_shader_layerDylan Baker1-1/+1
While this actually depends on 3.0 or ext_texture_array, this sets the GLSL version requirement to 1.30, which is the GLSL version that corresponds to GL 3.0. This stops the generator from creating bogus tests. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-06-17generators/gen_extensions_defined.py: fix ES_3_1_compatiblityDylan Baker1-1/+1
This spec actually wants 4.4, plus the other two ES compat extensions. Mesa chooses to ignore this, so set it to 4.3 (which allows most mesa drivers to test it.) At the very least though this should be bumped to 3.2, since this extension is never valid in a GL < 3.2 context. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-06-14arb_gpu_shader_fp64: fix GS tests generatorSamuel Pitoiset1-1/+1
In order to emit a color for each vertex, we need to move fs_color inside the loop because EmitVertex() will invalidate all previous output writes, and there is an interpolated varying in the fragment shader. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-13generators/gen_vs_in_fp64: Use modules.typesDylan Baker3-107/+48
This removes a significant amount of string parsing from both the module and the templates, and simplifies some statements. The result is that the generator is roughly 50% faster. This string parsing comes from the rows and cols functions, which are present in both the generator and the templates. Each of these functions gets called roughly 40 million times. 40 million. The cols function in particular accounts for nearly 20 seconds of runtime (and the rows about 5). The replacements account for about 1 second of runtime each, in total. When you consider that the runtime is about 70 seconds before this patch, and about 35 after, that's another big win, probably enough that it's not worth optimizing it further (if that's even really possible). The remaining significant time sinks are the collections.deque (which is called from within mako and is part of the python stdlib, thus we can't optimize it) and the regular.shader_test.mako. While I can spot some micro optimizations that might get us a few tenths of a second here and there, I don't see anything that's going to win even a couple of seconds except for maybe writing the list file from within the generator. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-13generators/modules: Add GLSL types representationsDylan Baker1-0/+195
This adds a new module with glsl type representations. The immediate plan it to use these in the gen_vs_in_fp64 generator to reduce runtime by removing the need for the cols and rows functions, which are expensive. These may be applicable to other generators, but those will have to wait. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-09generators/gen_vs_in_fp64: reimplement require_execution templateDylan Baker10-264/+163
This cuts the runtime for this generator by 3/4 on my system. That's 4 minutes to 1 minute. That's pretty impressive, and for both my system and for our CI system this is a nice improvement. The generated files are the same, minus whitespace changes (diff -NaurBw notes no differences). While I think the new template is more readable than the original code, and it is definitely faster, it does introduce more code duplication that could be cleaned up in a follow on patch. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-09generators/gen_vs_in_fp64: Rewrite the columns test generatorDylan Baker5-59/+139
This rewrites the columns generator to use a single template rather than the inherited template. The net result is that these tests are generated in 1/3 of the time. These are the minority tests from this generator. I measure that they take about .3 seconds to generate (with this patch). So while this is saving us a little bit of time, it's not going to make a big difference. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-09generators/gen_vs_in_fp64: use more generators/iterators save more runtimeDylan Baker1-17/+16
Saves a little bit more runtime. It's not an extreme amount, but more importantly is should save quite a bit of memory, which may help users with memory-constraints. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-09generators/gen_vs_in_fp64: don't store the filenames print them immediatelyDylan Baker1-27/+6
Don't build a list of filenames and print them after all of the tests have run, act more like the other generators and print each name as the test is generated. This both matches the behavior of the other generators and also lowers runtime a bit Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2016-06-09generators/gen_vs_in_fp64: don't list-ize generators for no reason.Dylan Baker1-10/+10
This removes some overhead, and for me cuts the run time of this generators from 4:16 to 4:03. It's not a lot, but it's something. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>