summaryrefslogtreecommitdiff
path: root/generated_tests
AgeCommit message (Collapse)AuthorFilesLines
2017-11-17generators: fix incorrect generated_tests/spec/glsl-110, etc. dir namesBrian Paul1-2/+7
Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-11-09cl: Fix sinpi expected valuesJan Vesely1-5/+4
account for fp32 rounding. sinpi(n) should return 0 for any integer n Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-09cl: Adjust cospi expected values to account for fp32 roundingJan Vesely1-1/+1
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-09cl: Adjust sincos expected values to account for fp32 roundingJan Vesely1-2/+4
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-09cl: Adjust sin expected values to acount for fp32 roundingJan Vesely1-1/+1
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-09cl: Adjust tanpi epxected results to account for fp32 roundingJan Vesely1-2/+3
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-09cl: Adjust tan expected values to account for fp32 roundingJan Vesely1-2/+2
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-09cl: Adjust cos test expected values to account for fp32 roundingJan Vesely1-2/+6
using libm cosf(3.0f * M_PI / 2.0f) == 0x1.99bc5cp-27 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-10-25cl: Add missing math testsJan Vesely1-3/+280
Basic tests. All new tests, but sincos pass on beignet(SKL) (sin/cos tests fail on beignet) Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
2017-10-25cl: Implement generating 2input 2output functionsJan Vesely1-4/+12
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
2017-10-25cl: Generate aligned vstorea testsJan Vesely1-57/+90
Add type3 vectors and bump required CLC to 1.1. Simplify test to use only 1-2 vstore calls. Zero the output buffer (fixes undefined values in results of some vstore tests). v2: Add canary after the written values v3: Fixup canary Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-10-25cl: Generate aligned vloada testsJan Vesely1-44/+64
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-10-25cl: Fix erfc testJan Vesely1-1/+1
python: >>> math.erfc(1.960/math.sqrt(2.0)).hex() '0x1.9990c58859300p-5' float rtne rounds up to 0x1.9990c6p-5 >>> math.erfc(2.576/math.sqrt(2.0)).hex() '0x1.4784addb5643fp-7' float rtne rounds up to 0x1.4784aep-7 Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
2017-10-25cl: Fix erf testJan Vesely1-1/+1
In python: >>> math.erf(11.1) 1.0 Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
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>