cl-program-tester: Add NORETURN attribute to exit_report_result.

Fix clang sometimes-uninitialized warning.

program-tester.c:1523:12: warning: variable 'main_argument_type' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        } else if(regex_match(main_argument, "\\.bin$")) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program-tester.c:1542:9: note: uninitialized use occurs here
        switch(main_argument_type) {
               ^~~~~~~~~~~~~~~~~~
program-tester.c:1523:9: note: remove the 'if' if its condition is always true
        } else if(regex_match(main_argument, "\\.bin$")) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program-tester.c:1455:2: note: variable 'main_argument_type' is declared here
        enum main_argument_type_t {
        ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
results.py: Print warning when overwriting subtest results

v2: don't mix tabs and spaces
    use 'in' instead of 'has_key'

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
gl-3.2: Verify gl_VertexID when used with glMultiDrawElementsBaseVertex

OpenGL expects the gl_VertexID to inlcude the basevertex value, but
DirectX does not.  As a result, some hardware implements this
incorrectly for OpenGL.

Passes on AMD R9 270X (Pitcairn) with Catalyst 14.6 beta 1.0-jul11.

NOTE: This test currently fails on the i965 driver.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80247
arb_draw_indirect: Verify gl_VertexID when used with indirect rendering

When rendering with glDrawArraysIndirect, the value of gl_VertexID
observed in the shader should start with the value of 'first' and
increment from there.

When rendering with glDrawElementsIndirect, the value of gl_VertexID
observed in the shader should be the value retrieved from the index
buffer plus the value of basevertex.

Passes on AMD R9 270X (Pitcairn) with Catalyst 14.6 beta 1.0-jul11.

NOTE: This test currently fails on the i965 driver.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80247
exectest.py: remove unneeded setting of result

The result defaults to 'fail' already, so this is just resetting the
result to the same value again.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
built-in-constants.c: Fail test if file cannot be opened

built-in-constants relies on a file being passed to it describing the
tests to run. If this file does not exist the program will segfault.
This patch adds the appropriate check after calling
piglit_load_text_file to check for a NULL value and fail if it is.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
tests/all.py: fix built-in-constants arb_tessalation

built-in-constants is a takes a file as an argument, in all cases except
the arb_tesselation these use os.path.join to create an absoulte path,
but this test provides a relative one. This results in a test failure if
piglit is not run from the root of the piglit source directory.

This will expose the bug fixed in the previous patch.

v2: - fix commit message written late at night

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
cl: Add atan2 tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Add asin tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Add fabs tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Add tan tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Add fmod tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
arb_gpu_shader_fp64: 420pack uniform initializer tests for double

v2: add GL_ARB_shading_language_420pack to require (Matt)
    actually use that 420pack (Matt, Chris)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
cl: Add copysign tests

v2: Fix -NaN test
v3: Rebase

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
glsl-1.20: new test for a GLSL scoping bug in Mesa

Mesa thinks Name is a type in "gl_Position = Name".

Reviewed-by: Brian Paul <brianp@vmware.com>
opencv: Add 'individual' option to piglit.conf

This replaces the individual parameter in add_opencv_tests()
quick_cl: Add oclconform tests
Remove all_cl profile

The test list that was provided by the all_cl can now be replicated with the
quick_cl profile by adding the 'individual' option to the opencv
section.
gl-4.4: Test GL_MAX_VERTEX_ATTRIB_STRIDE

V3: add positive version of each test
V2: changed to -> too

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Adds test gl-1.0-polygon-line-aa

This tests correct rendering of polygons using antialised GL_LINE mode for one
face and GL_FILL for the other one. On some Intel hardware at least this used
to require special handling that has caused regressions in the past.

The test checks that the GL_FILL face of the polygon renders properly.

Reviewed-by: Brian Paul <brianp@vmware.com>