arb_tessellation_shader: Add GL minmax test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
built-in-constants: Support tessellation shaders

Note: If the file requests testing only with GL_TESS_CONTROL_SHADER or
GL_TESS_EVALUATION_SHADER, then the vertex, geometry & fragment shaders
will not test the constants.

The reason for this is that NVidia will complain if
is used with these stages.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_tessellation_shader: Add GLSL minimum-maximums test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_tessellation_shader: Fix TS GL API minmax build

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_tessellation_shader: Add nop tessellation drawing test

This test will add no extra tessellated triangles. It basically passes
verticies through the tessellation stages and draws two triangles.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
tests: tesselate => tessellate (only comments were changed)

Changes genertated with
find tests -name '*.c*' | xargs sed -i -e 's@tesselate@tessellate@g'

'git grep -i tessela' now only returns results in registry XML files.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
arb_compute_shader glsl min/max: Update gl_MaxComputeUniformComponents

The http://www.opengl.org/registry/specs/ARB/compute_shader.txt spec
has an inconsistency:
 * gl_MaxComputeUniformComponents is spec'd as 1024
 * MAX_COMPUTE_UNIFORM_COMPONENTS is spec'd as 512

In Khronos bug 12370 this has been resolved in that the GLSL version
should be lowered to 512.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
glsl: test a switch statement where default is last

This test is copy paste of fs-default_notlast.shader_test with
the cases rearranged.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
ext_framebuffer_multisample: Add NORETURN attribute to print_usage_and_exit.

Silence clang sometimes-uninitialized warnings.

clip-and-scissor-blit.cpp:362:13: warning: variable 'src_samples' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        } else if (strcmp(argv[2], "normal") == 0) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clip-and-scissor-blit.cpp:369:26: note: uninitialized use occurs here
        src_fbo.setup(FboConfig(src_samples, src_size[0], src_size[1]));
                                ^~~~~~~~~~~
clip-and-scissor-blit.cpp:362:9: note: remove the 'if' if its condition is always true
        } else if (strcmp(argv[2], "normal") == 0) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clip-and-scissor-blit.cpp:352:17: note: initialize the variable 'src_samples' to silence this warning
        int src_samples;
                       ^
                        = 0
clip-and-scissor-blit.cpp:362:13: warning: variable 'dst_samples' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        } else if (strcmp(argv[2], "normal") == 0) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clip-and-scissor-blit.cpp:370:26: note: uninitialized use occurs here
        dst_fbo.setup(FboConfig(dst_samples, dst_size[0], dst_size[1]));
                                ^~~~~~~~~~~
clip-and-scissor-blit.cpp:362:9: note: remove the 'if' if its condition is always true
        } else if (strcmp(argv[2], "normal") == 0) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clip-and-scissor-blit.cpp:353:17: note: initialize the variable 'dst_samples' to silence this warning
        int dst_samples;
                       ^
                        = 0

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
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>