arb_vertex_type_2_10_10_10_rev/array_types: test vertex arrays

A new test to exercise GL_(UNSIGNED_)INT_2_10_10_10_REV, 4/GL_BGRA,
and normalized/unnormalized array combinations.

Reviewed-by: Brian Paul <brianp@vmware.com>
max-texture-size: Really test GL_PROXY_TEXTURE_RECTANGLE

Fix a typo so that GL_PROXY_TEXTURE_RECTANGLE test actually tests that.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
arb_gpu_shader_fp64: add initial generated tests (v5)

This creates a bunch of built-in tests for GLSL 4.00,
corresponding to the builtin uniform and constant array size tests.

I copied the test generators into new files, as I wasn't really sure how
to separate the float and double generation, maybe some sort of force double
mode to generate the correct code, would need advice of original author.

v2: fix dmat issue

v3: emit glsl-4.00 and ARB_gpu_shader_fp64 tests,
    use a double precision value
    fix double precision emitting bugs
    fix generated constant test to work.

v4: fix emitting extensions names so piglit can skip instead of fail

v5: generate tests into a lowercase subdir.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add packDouble2x32 and unpackDouble2x32 tests

Simple tests to make sure the packing is correct, along with constant
tests.

also check corner case with writemasks we ran into while developing

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add a truncate DBL_MAX test

This just tests that trunc doesn't go via a float conversion
like I was doing when I wrote it originally.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add frexp/ldexp tests (v2)

These are special cases the generator can't handle,
ported from the float equivalents with DBL special cases.

v2: add const ldexp test.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add double modf test.

This tests modf with doubles.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add fma tests

Add constant and non-constant fma double test.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add a double vertex output, fs input test

This is to verify we pass 64-bit values from shader stage to shader stage,
correctly.

This just passes vs->fs.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: test intra-shader stage doubles.

This passes vs->gs->fs.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
all.tests: add arb_gpu_shader_fp64 dir

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
self-tests: Test that installed piglit script sets sys.path correctly

The piglit script today requires that CMAKE_INSTALL_LIBDIR be "lib".  If
CMAKE_INSTALL_LIBDIR is anything else, such as "lib64" or "lib32", the
installed script dies on an import exception because it fails to find
Piglit's framework module.

On 64-bit Chrome OS, Gentoo, and Fedora systems, "lib64" is the default
value of CMAKE_INSTALL_LIBDIR.

This patch adds the test
    self-tests/test-installed-piglit-script-imports-correct-framework-module
which detects this problem. It tests the following combinations of CMake
configuration options:

    CMAKE_INSTALL_LIBDIR in ["lib64", "lib32", "lib"]
    PIGLIT_INSTALL_VERSION in [None, "1234"]

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
piglit(script): Fix module search path

See the bug description in the previous commit, with subject
"self-tests: Test that installed piglit script sets sys.path correctly".

Test: self-tests/test-installed-piglit-script-imports-correct-framework-module --force .
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests/igt.py: check all tests for subtests

All the tests should now be able to respond to --list-subtests, so there
is no need to distinguish between single and multi-tests.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
util: add piglit_array_texture() function

For creating 1D/2D array textures.  Each slice of the array is a
solid color (red, green, blue, white, etc.)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
shader_runner: add support for rgbw 1D/2DArray texture setup

And remove the previous glEnable(GL_TEXTURE_2D_ARRAY) call.  It's
never legal.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
ext_texture_array: add simple 1D/2D array rendering tests

Check that we're sampling from the expected array slices.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
util: don't minify height for 1D textures in piglit_depth_texture()

This was never hit since no callers create 1D mipmapped depth textures.
But fix it anyway.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
shader_runner: fix 1D array depth texture setup

The second parameter should be the number of 1D slices, not the 3rd.
As it was, piglit_depth_texture() was only initializing the first
slice's data and not the other slices.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Replace [vertex/fragment shader file] sections in shader_test files.

This replaces sections like:

[fragment shader file]
glsl-color.frag

with [fragment shader] and the contents of that file.

The majority of shader_test files include all their shaders in a single
file, which is nice: you can read and understand them all at a glance,
without having to open multiple files.  You also don't need to worry
about extra data files that live in some path.

In roughly 60% of these cases, the shader file being included was a
a single line (such as gl_FragColor = gl_Color), so just importing it
into the shader_test doesn't even add much extra data.  The other 40%
were shadow tests where it added a bit more, but it's still not
horrible.

This commit was autogenerated by a python script, with extra 'git rm's
for the unnecessary .vert/.frag files after the conversion.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>