egl-util: stop running if piglit_automatic is true

this allows to write tests that use egl-util and piglit framework

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Install vpfpgeneric tests

Currently piglit does not install vpfpgeneric test files (*.vpfp) files,
meaning that out of tree builds do not have these tests. This patch
addresses that issue.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Revert "igt: timeout tests by default after 20 minutes"

This reverts commit 5db759ffc3c20c83d5d0fd663cd171dc1425fae9.

Acked-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Kenneth Gruanke <kenneth@whitecape.org>
Signed-off-by: Dylan Baker <baker.dylan.c@mgmail.com>
Revert "framework: Add support for a test timeout"

This reverts commit ab2eb660925e3680e868c5f469a4ef32e6dd9a59.

This patch has a bad interaction with the locking in the json writing
library, running concurrently with this patch enabled can cause json
corruption that cannot easily be untangled, and even when it is is the
result is of low trustworthiness.

v2: - Add message explaining why this patch is to be reverted
    - fix framework/status.py docstring that was mangled after the
      revert

Acked-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Kenneth Gruanke <kenneth@whitecape.org>
Signed-off-by: Dylan Baker <baker.dylan.c@mgmail.com>
.gitignore: ignore 'main' results files

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
.gitignore: ignore piglit-summary-html.py output

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
egl_util : support for es1 and es2 tests

egl_util was hardcoded to use PIGLIT_DISPATCH_GL, now code makes
decision based on config attribs set by the test.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
arb_gpu_shader5/invocation-id-basic: move under execution dir

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
pack_depth_stencil: Create textures with GL_DEPTH_STENCIL base format

Depending on the GL version and extensions supported, this should either
work (not generate a GL error) or generate a variety of GL errors.

This test passes on NVIDIA (304.64 on GTX 260).  This driver exposes
OpenGL 3.3 and GL_ARB_texture_storage.

This test fails on current Mesa on drivers that support depth textures.
the glTexImage3D(GL_TEXTURE_3D) tests generate GL_INVALID_ENUM instead
of GL_INVALID_OPERATION.  The glTexStorage3D(GL_TEXTURE_3D) test
doesn't generate an error, but it should generate GL_INVALID_OPERATION.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
pack_depth_stencil: Port depth-stencil-texture test to OpenGL ES 2.0.

Mesa fails the same subset of tests here as on desktop.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
pack_depth_stencil: Port depth-stencil-texture test to OpenGL ES 1.1.

On Mesa, all of the GL_DEPTH_STENCIL/GL_DEPTH_STENCIL fail because
GL_INVALID_ENUM instead of GL_INVALID_VALUE.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
GLX_OML_sync_control: Sanity check values returned by glXGetMscRateOML

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lauri Kasanen <cand@gmx.com>
minmax: Detect cases where errors are generated or values not written

Any minmax test should fail if the query either generates an error or
doesn't write a value to the destination.  To facilitate this, the
storage location is initialized to a value that is unlikely to be
generated by the GL (0xDEADBEEF) instead of 9999.

This caused some additional failures arb_viewport_array-minmax to be
flagged while the extension was being developed.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
arb_viewport_array: Move error detection closer to the causes

This made it a bit easier to notice which cases were actually failing.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jon Ashburn <jon@lunarg.com>
Cc: Courtney Goeltzenleuchter <courtney@LunarG.com>
arb_viewport_array: Fix uses of gl_ViewportIndex in the fragment shader

There were two problem here.  First, it is illegal in GLSL to redecalre
a built-in variable.  Section 3.7 (Identifiers) of the GLSL 4.40 spec
says:

    "However, as noted in the specification, there are some cases where
    previously declared variables can be redeclared, and predeclared
    "gl_" names are allowed to be redeclared in a shader only for these
    specific purposes. More generally, it is a compile-time error to
    redeclare a variable, including those starting "gl_"."

There is no mention in the spec of any cases where gl_ViewportIndex can
be redeclared.

Second, gl_ViewportIndex does not exist in the fragment shader without
GL_ARB_fragment_layer_viewport or GLSL 4.3.  Mesa does not yet support
either.

Instead, manually pass the viewport index from the geometry shader to
the fragment shader.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jon Ashburn <jon@lunarg.com>
Cc: Courtney Goeltzenleuchter <courtney@LunarG.com>
arb-fragment-coord-conventions: Move the GL requirement from piglit_init to the config section

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
arb_viewport_array: Clear with many scissor rectangles set

Set the scissor rectangle for all of the possible viewports to different
values, and verify that only the scissor rectangle for viewport 0
affects the clear.

v2: Fix bugs in all.py and tweak syntax of float constants.  Both
suggested by Eric.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
arb_gpu_shader5/invocation-id-basic: use signed int

gl_InvocationID is defined as an int.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
arb_gpu_shader5/invocation-id-basic: range check gl_InvocationID

Make sure that gl_InvocationID is 0 .. 3.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl-1.50: invalid GS input layout qualifiers

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>