Age | Commit message (Collapse) | Author | Files | Lines |
|
This test module provides a function that enumerates the test generators
(it assumes that all files ending in .py are generators unless they're
black listed), and generates a nose job for each of them.
This allows us to ensure that the generators work in an automated
fashion, and with a simple patch will allow us to test them with various
versions of python (2.7 and 3.3+), which we claim to support with the
generators.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
|
|
update mako templates to support vectors of tolerances
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
tesselation constants.
These are defined by the ARB_shader_image_load_store extension, but
according to the section where the interactions with
ARB_tessellation_shader are described:
"If OpenGL 4.0 and ARB_tessellation_shader are not supported, references to
tessellation control and evaluation shaders should be removed."
What AFAICT implies that we cannot rely on them being defined based on
the ARB_shader_image_load_store extension alone.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
|
|
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
|
|
v2: fixed by Marek
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
The purpose of these tests is not to exercise the compiler's
optimization of writes from the TCS -- we'll explore that in
other tests.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
for every GLSL variable type, generate two tests. One passes a varying of said
type as a scalar from the vertex to the tessellation control shader and one
that passes a two-element array.
Fill the varying in the vertex shader from a uniform and compare
it against the uniform in the tessellation control shader.
Draw 4 patches, tessellate each into a quad that fills a quarter of the
screen.
Also test core profile built-in varyings.
|
|
For every GLSL variable type, generate four tests. One passes a per-vertex
and one a per-patch varying of said type as a scalar from the tessellation
control to the tessellation evaluation shader. The two other tests do the same
for a two-element array of that type.
The varying gets filled in the tessellation control shader from a uniform and
compared against the same uniform in the tessellation evaluation shader.
Every test draws 4 patches, each of which gets tessellated into a quad that
fills a quarter of the screen.
Also test core profile built-in varyings in gl_PerVertex.
|
|
The motivation for this is that (as noted by curro)
ARB_shader_image_load_store doesn't support images with an internal
format of GL_RGBA.
See 'Table X.2' in
https://www.opengl.org/registry/specs/ARB/shader_image_load_store.txt
Therefore, in order to use image load/store in shader runner tests, we
must override the default internal format when creating the image.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
|
|
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>
|
|
This reduces the number of calls to make_{fs,vs} by using more loops.
This means less code and makes some things easier to read and
understand.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
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>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
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>
|
|
Pass on Intel CPU, and Turks GPU
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
Move sign and mix out of math
All tests pass on Turks
All tests except step pass on Intel CPU, it fails in NaN cases.
v2: Remove min/max NaN tests.
OpenCL 1.1 changed the wording, making the results undefined
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
That's just 'mix' at this moment
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
Before, we were drawing the whole window every time, while we only
probed a single pixel. Instead, draw 4x4 rectangles across the
window, and probe the whole rectangle. 4x4 is chosen to at least get
several subspans rendering at the same time, in case drivers have bugs
in that area.
For what the effect looks like on generated shader_test code, before
we had generated tests that looked like:
[...]
draw rect -1 -1 2 2
probe rgb 2 0 0.0 1.0 0.0 1.0
[...]
draw rect -1 -1 2 2
probe rgb 3 0 0.0 1.0 0.0 1.0
and now we have:
[...]
draw rect ortho 8 0 4 4
[...]
draw rect ortho 12 0 4 4
probe rect rgba (8, 0, 4, 4) (0.0, 1.0, 0.0, 1.0)
probe rect rgba (12, 0, 4, 4) (1.0, 1.0, 1.0, 1.0)
Piglit (-t glsl-1.10/execution/built-in-functions/fs-op) runtime effects:
i965: -2.84009% +/- 2.67378% (n=26)
simulated VC4: -99.082% +/- 0.61943% (n=4). (yes, from 15 minutes to 9 seconds)
v2: Use probe rect instead of probe all rgba for the all-the-same-color case,
to avoid spurious failures on windows.
v3: Rebase on CS changes (avoids any generated code difference on CS).
Drop the rest of the read-all-the-screen bits, since I dropped the
window sizing patch to these tests due to issues with Linux window
managers clamping size (not just Windows!).
v4: Reword comment about default window size (Review feedback by Ken).
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v2)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
|
|
I'm going to change our drawing code a bunch, and this structures
things to make the functional changes more obvious.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
contexts.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
Whitespace errors for atanpi
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
Otherwise there is a chance you'll get the contents from the last
test which are green, and if this test fails to renderer you'll pass.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
Fixes failures on OCL-1.1 implementations that provide cl_khr_fp64
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
copied from atan2
tested on clover and intel ocl-sdk
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
copied from asin
tested on clover and intel ocl
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
copied from acos.
tested on clover and intel ocl
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
|
|
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>
|
|
This reverts commit ff8898df3c78324b2d8945c855a9d2e0034f5525.
This broke cl tests, and it's a very trivial self contained patch, so
we'll just revert it.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
reported-by: Michel Dänzer <michel@daenzer.net>
|
|
Again, this doesn't change the output of any of the generators, but it
helps to eliminate surprising behavior when switching from python2 to
python3
v2: - add this patch
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
This coverts all of the generators to use python3 style division. None
of these generators are currently affected by this change (generally the
author of the generator has taken pains to ensure that python2 division
does the right thing by explicitly converting between int and float),
but it should reduce surprise to future modifiers, which is good.
v2: - add this patch
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
These tests either already used parans around print (even though it
wasn't necessary), or don't include print statements. I think it's worth
while to have this because it helps to remove surprise for people
modifying the generators, then they don't have to dig in and understand
how python2 and python3's division is different.
v2: - add this patch
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Uses six.moves.range
Generates the same results before and after.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This allows gen_cl_int_builtins, gen_cl_math_builtins, and
gen_cl_relational_tests to generate tests with python3 and
python2, and to produce the same output
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
in python2 without future division the division operator is retarded:
1/2 = 0
1/2.0 = 0.5
In python3 or python2 with future division there are two division
operators: / and //, and they behave sanely:
1/2 = 0.5
1//2 = 0
1/2.0 = 0.5
1//2.0 = 0.0
This is obviously necessary for porting to python3 to get the same
behavior between the python2 and the python3 generators.
This generator produces teh same result before and after this change.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
mixing tabs and spaces are not allowed in python3, piglit uses spaces
only, no tabs
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
It really doesn't make sense to have static tests in the generated tests
directory, this patch adds them to the tests directory and adds the
appropriate code to cl.py for this change
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
Python3 doesn't have long types (ints will now grow until you run out of
memory). Use bit shifting instead.
This produces the same output before and after
Thanks to Jason Ekstrand for help with this.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This means that they only generate tests if they are called as the main
script, but not if they are imported as modules. This is important for
testing purposes.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
Doing any sort of testing of these generators is impossible (even just
opening the interpreter and importing them) because they use dashes in
their names, and python doesn't allow modules to have dashes in their
names.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
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>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This requires removing some tabs.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
The python3 version has slightly better precision than the python2
version.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This requires fixing range and removing tabs, because mixed tabs spaces
raises a runtime error in python3
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This produces a bit more precision in python3 than in python2
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
The python3 version has a very slight increase in precision.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|