Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
We will extend it with int64 types.
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
|
|
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>
|
|
Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Generator which create test combinations of different vertex inputs
types, including a double derived type. Note that this generator
creates a big amount of test: ~6000.
v2:
- Include tests with interleaved u/int derived types.
- Values are never repeated in a shader variable to avoid identical
array members or columns in the same matrix (Alejandro).
Also, removed one redundant test.
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
|
|
The multiplication precision tests were attempting to multiply
0.0 * -0.1 and expecting to get +0.0 (0x00000000), and failing
if they received -0.0 (0x80000000). This seems fairly bogus.
According to the ARB_shader_precision specification:
"In general, correct signedness of 0 is not required."
To avoid this problem, remove the sign bit from both the results
and expected values when the value is equal to (+/-) 0.0.
v2: Use xs.dtype.type(0.0) (suggested by Dylan Baker).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
|
|
Also, removed 5 redundant tests replaced by
the generator.
Reviewed-by: Antia Puentes <apuentes@igalia.com>
Acked-by: Dylan Baker <baker.dylan.c@gmail.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
|
|
This puts the templates in a directory structure that makes them robust
to both changes in python version and mako version.
This fixes errors caused by downgrading mako, which isn't that common,
unless you're running the unit tests with use the oldest supported mako,
and may conflict with the compiled templates from the system mako.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Generator for error checking on "flat" keyword.
This generator adds, additionally, checks for variables inside structs
and interface blocks, which weren't explicitly mentioned in the GLSL
specs and, partially, in the GLSL ES specs.
For a discussion about this check
https://lists.freedesktop.org/archives/mesa-dev/2016-March/109117.html
and Khronos bug #15671.
Also, removed 8 redundant tests replaced by the generator.
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
|
|
Vertex shader inputs and fragment shader outputs can only be
single-precision values.
From GL_ARB_gpu_shader_fp64 spec:
"Modify Section 4.3.4, Inputs, p. 31
(modify third paragraph of the section, p. 31) ... Vertex shader inputs
can only be single-precision floating-point scalars, vectors, or
matrices, or signed and unsigned integers and integer vectors. Vertex
shader inputs can also form arrays of these types, but not structures."
"Modify Section 4.3.6, Outputs, p. 33
(modify third paragraph of the section, p. 33) They can only be float,
double, single- or double-precision floating-point vectors or matrices,
signed or unsigned integers or integer vectors, or arrays or structures
of any these.
(modify last paragraph, p. 33) ... Fragment outputs can only be float,
single-precision floating-point vectors, signed or unsigned integers or
integer vectors, or arrays of these. ..."
Contributed by Andres Gomez.
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
|
|
This ports the final bash generator from shell to python. Other than
white space changes, the generated files are exactly the same as the
previous shell files.
This is currently not hooked up in Cmake.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
There are only whitespace differences between the python generator and
the bash generator.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
This replaces a large number of handrolled tests (and adds many new
ones) for testing that preprocessor defines are exposed correctly
(either exposed if the extension is enabled, or not if it's disabled)
across all shader stages. It tests for support in legacy (non
core/compat) mode and in profile mode, unless the extension itself
requires GLSL >= 140. It also covers all stages (fs, vs, gs, tcs, tes,
and cs), and both GLES and GL.
It drives all of this from a simple, easily extended list in the
generator, and replaces over 1000 lines of code with about 300,
including the template files, and generates over 1500 tests currently.
These are GLSL parser tests and don't take more than a few seconds to
run.
The only known issue is that an extension can not currently be tested in
both GLES and OpenGL.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
update mako templates to support vectors of tolerances
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
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 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>
|
|
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 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Fix build errors with Python < 2.7.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
|
|
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>
|
|
Fix build errors with Python < 2.7.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Removes use of class and puts templates in the templates directory.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
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>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner <mattst88@gmail.com>
|
|
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>
|