shader_runner: enable VAO for gl >= 31 before glDrawArrays

This fixes attributeless rendering on nvidia's binary driver
and Mesa (as of 1afe3359258a9e89b62c8638761f52d78f6d1cbc).

For example:
 * tests/spec/glsl-1.50/execution/geometry/point-size-out.shader_test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77162
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
Add test to verify the values of gl_VertexID captured by transform feedback

Test currently fails on Intel's open source linux drivers but passes on
NVIDIA's proprietary linux drivers.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
ext_framebuffer_multisample: Add testing for fast clear color path

Test currently fails on i965's fast clear color path.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Fix piglit-print-commands.py

Signed-off-by: Shuang He <shuang.he@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78719
reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
arb_occlusion_query: restore window size specification

Commit ef4f461346d01a66 mistakenly removed the window size from this
test, causing it to fail.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
arb_texture_compression/internal-format-query: use piglit_get_gl_enum_name()
gen_equal_tests: Update generator to match in-tree tests.

Ian removed the GL >= 2.0 requirement in commit
38017752bca481d312de69cba5e334fd8c732a14.

Matt removed the #version 120 lines in commit
67174fbcf797b4a129250db1a3c001974e7522ad.

Matt dropped ortho/clear in commit:
2e5614458e566fb4353e92fc0b6407c12ee45c87

Now running gen_equal_tests.py produces equivalent results to the
committed tests.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
gen_equal_tests: Move to generated_tests directory.

Rename to gen_const_builtin_equal_tests.py to better match the name of
the tests it generates.  This patch doesn't modify the contents.

v2: - print name of test for CMake tracking (Dylan)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
gen_const_builtin_equal_tests: Make it possible to autogenerate tests.

This changes the (unused) generator to output to

   generated_tests/spec/glsl-1.20/execution/built-in-functions

rather than the current directory.  Also, make sure the destination
directory exists.

Since the tests won't live in tests/shaders, they can't refer to
glsl-mvp.vert by name.  Just use gl_Position = gl_Vertex, since it's
a non-orthographic projection anyway.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Auto-generate glsl-const-builtin-{equal, notEqual}-XX shader tests.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
summary_tests.py: Add tests for subtest handling

These tests are meant to show that subtest handling actually works.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Treat subtests as groups, again

With this patch tests with subtests are treated as groups, their status
is thrown away, and they inherit the 'worst' status from their children
just like a group.

This reverts commit de4b13de226e140313c3571e59a57438626da183.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/exectest.py: Only record one instance of subtests

Since subtests are better handled in the summary module there is no need
to record these multiple times. This significantly reduces the size of
the results file, (from 45M to 10M)

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gen_const_builtin_equal_tests.py: Use mako

This uses mako to render tests. It's faster than the previous method,
and is much easier to understand.

v2: - set write mode to 'w' instead of 'w+'. w+ is a development
      artifact and should have been set to 'w' before submission

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
gen_const_builtin_equal_tests.py: Wrap main in a function

This creates main() function and puts things in it. This is good python
style.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
gen_const_builtin_equal_tests.py: use enumerate instead of a flag

This combines the two loops into a single loop using enumerate. This
should be a little faster since we loop over the data only once, and
since it uses enumerate instead of math.

v2: - explicitly name enumerate's start parameter to make it clearer

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
gen_const_builtin_equal_tests.py: cleanup a few pylint errors

v2: - fix one additional pylint warning for long lines
    - reformat the TEST_VECTORS list to have better whitespace between
      the groups.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
egl/utils: Prepare egl_util_run to be called from piglit subtests.

For future EGL tests, I want to be able to use Chad's new piglit EGL
subtest infrastructure, and use the EGL utilities convenience functions
to set up a window, surface, and context.

Currently, egl_util_run calls piglit_report_result() after calling
test.draw.  This means no other subtests get run.  Add a new field in
egl_test to specify whether piglit_report_result() should be called, and
another field to store the result returned from test.draw.

Make sure that egl_util_run() tears down the window, surface, and
context.  Previously it was relying on cleanup being done when the
process died, which won't work if we want to run a second subtest in the
same thread.

TODO:

There's still some work that could be done here to ensure the
initialization steps in egl_util_run aren't done twice (e.g. calling
XOpenDisplay, eglInitialize, etc.)  However, the tests pass in their
current state, so there's no reason they shouldn't be merged.

Thanks a bunch to Chad Versace and Rob Bradford, who helped me debug
this code!

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Rob Bradford <rob@linux.intel.com>
EGL_CHROMIUM_sync_control: Add initial tests.

Test the EGL_CHROMIUM_sync_control extension, which is similar to
the GLX_OML_sync_control extension:

http://www.opengl.org/registry/specs/OML/glx_sync_control.txt

The extension only defines one new function,
EGL_CHROMIUM_get_sync_values, which is equivalent to the
glXGetSyncValuesOML function.

It's difficult to test the Media Stream Counter (MSC) without the
equivalent function to get the MSC rate (glXGetMscRateOML).  The test at
least makes sure MSC and SBC increment after two SwapBuffers() calls.
UST is system-dependent, so it may behave differently on Windows, Linux,
and Apple.  The test just makes sure it increments monotonically.

The test uses Chad's new subtest infrastructure and the EGL convenience
functions from egl-util.c.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Rob Bradford <rob@linux.intel.com>
arb_draw_instanced: use default window size, set viewport

Reviewed-by: Matt Turner <mattst88@gmail.com>