time-elapsed: Spend time in the FS rather than do a lot of draws.

The time-elapsed test needs to consume a lot of GPU time so that it
can validate GPU time queries against elapsed wall-clock time.
Previously we did this by painting the window thousands of times.
That sometimes caused false failures due to the CPU time consumed in
preparing the draw calls.

This patch changes the test so that it consumes time by using a slow
fragment shader rather than by painting the window over and over.
glslparsertest: Use integers for GL and GLSL versions

I haven't observed any failures with this yet.  Since we just did the
same thing with shader_runner, it seems like a good idea.

v2: Fix two off-by-10x errors pointed out by Chad.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glslparsertest: Add support for GLSL ES 3.0 via GL_ARB_ES3_compatibility

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl-es-3.00: Verify that no statment is allowed before the first case in a switch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl-es-3.00: Verify that .length() returns a signed integer

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl-es-3.00: Verify that .length() returns a constant expression

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl-1.40: Add a new UBO test for a potential bug in the i965 driver.
glsl-1.40: Add a test for a path in i965 where I had an XXX comment.
egl_khr_create_context: Fix build error with old eglext.h

This patch defines EGL_OPENGL_ES3_BIT_KHR, for the case when eglext.h is
too old.

Reported-by: Ken Phillis Jr <kphillisjr@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
egl: Fix typo in previous commit
framework: add returncode parameter to ExecTest.interpretResult

The intel-gpu-tools testrunner needs this to figure out the
testresult (since 'skip' is indicated by a returncode of 77
in i-g-t).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
igt: new testinfrastructure to support drm/i915 kernel tests

Piglit as a testrunner is _so_ much better than automake's make check.

Based upon a quick patch from Kenneth Graunke.

v2: Add copyright header.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
framework: unicode() wrap format string

Otherwise python2 blows up when the program output contains a non-ascii
character. The resulting exception caused a bunch of spurious fails in
the igt testscases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
igt: auto-enumerate subtests

This works together with the new subtest infrastructure in
intel-gpu-tools.

v2: An empty string crept into the subtest list, resulting in a
testcase failure. Filter it out.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
invalidate: test GL_MAP_INVALIDATE_* flags between draw calls in a loop
glx-swap-events: initialize GL dispatch

Fixes a crash.
Fix the test requirements for the cube_map_array tests.

Reviewed-by: Dave Airlie <airlied@redhat.com>
fs-texelFetchOffset-2D: don't assume undefined values to be solid black

core GL specifies out-of-bound texel fetches return undefined results,
except in a robust context with ARB_robust_buffer_access_behavior supported
(which is core in 4.3), in which case texel fetch will return 0 (OpenGL 4.3
compatibility profile, page 387, subsection 11.1.3.2 Texel Fetches).
Since the test requires neither robust context nor that extension it cannot
assume any specific result value. In any case even returning zero is not what
the test expected, since it wanted [0,0,0,1] instead.
(With this change softpipe passes the test, as it clamps the coords.)

v2: fix black->undefined, formatting, comments

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
depthfunc: add back window height specification

This fixes a failure caused by removing the width and height specification.
cmake: Require waffle>=1.2.2 if using waffle

Working OpenGL ES3 support was introduced in waffle-1.2.2.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>