texwrap: minor assorted changes

Always draw a (mode, filter) test pattern at the same window position,
regardless of border mode, supported, etc.  This makes it a little
easier to do visual inspections.

In non-auto mode, print names of wrap modes to help identify the
test patterns.  Ideally, we'd print this in the window instead of
the terminal but piglit doesn't have a text-drawing feature.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
polygon-offset: limit line width to 12 pixels

12 is somewhat arbitrary, but it avoids total failure if the max
line width is something large (like 255 in llvmpipe).
framework: fix duplicated TEST_BIN_DIR for cygwin

The GLSLParserTest and ShaderTest subclasses of the PiglitTest class
were prepending the TEST_BIN_DIR variable onto the executable name
(such as "glslparsertest" and "shader_runner").  But the PiglitTest
class itself also does that so we were prepending TEST_BIN_DIR twice.

With unix paths, os.path.join("/abs/path1", "/abs/path2") returns
"/abs/path2".

But with cygwin, os.path.join("C:\\abspath1", "C:\\abspath2") returns
"C:\\abspath1/C:\\abspath2" which clearly causes trouble.

The solution is to only prepend the TEST_BIN_DIR path in the PiglitTest
class.

This issue was only encountered when the PIGLIT_BUILD_DIR env var was set,
which I just recently tried for the first time.

v2: don't change GleanTest, it's a subclass of Test, not PiglitTest.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
glsl-1.30: test modf

The generated tests don't test this due to its unusual output nature, and
we had no other tests that I could find for it. So plug that hole.

I just handcoded up this batch of tests in the same style as generated ones.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
framework: move get_config() to core

Move framework.programs.run._get_config() to framework.core.get_config() so
that it can be used elsewhere.

v2: set a default value for the get_config argument and fix function
    call in integration_tests.py (Dylan Baker)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
piglit-print-commands: make sure piglit.conf is read

Some test profiles require configuration values from piglit.conf before
they can enumerate the tests.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reveiwed-by: Dylan Baker <baker.dylan.c@gmail.com>
glean/texCombine: Remove unused variables.

Fix clang unused-private-field warnings.

In file included from ttexcombine.cpp:75:
ttexcombine.h:133:28: warning: private field 'p_glActiveTextureARB' is not used [-Wunused-private-field]
        PFNGLACTIVETEXTUREARBPROC p_glActiveTextureARB;
                                  ^
ttexcombine.h:134:30: warning: private field 'p_glMultiTexCoord2fARB' is not used [-Wunused-private-field]
        PFNGLMULTITEXCOORD2FARBPROC p_glMultiTexCoord2fARB;
                                    ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glsl-1.10/glsl-1.20: Rename tests to make case-insensitive filesystems work

MacOS, and likely Windows, doesn't like the fact that we have 2 files
each with the following names when the filesystem is case insensitive:
glsl-1.10/compiler/literals/invalid-float-suffix-f.vert
glsl-1.10/compiler/literals/valid-float-exponent-E.vert
glsl-1.20/compiler/literals/valid-float-suffix-F.vert

Symptoms...
1) Working tree only contains 1 file for each name.
2)  Unable to pull/rebase/push any commits because git thinks there's outstanding changes

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Brian Paul <brianp@vwmware.com>
lineloop: add test for checking behavior with many immediate mode verts

line loops are difficult to handle because when trying to accumulate vertex
data in a buffer the loop must be closed at the end - this is problematic if
using any kind of fixed size buffer. With immediate mode api (presumably
display lists have similar problems) this exposes a bug in mesa when the
buffer gets full and data is wrapped around (each buffer forms its own
incorrect line loop) (actually it seems to expose two bugs, one in vbo,
one in draw). See https://bugs.freedesktop.org/show_bug.cgi?id=81174.
This only tests line loops, not the primitive-from-hell, GL_POLYGON, which
should have the same problem but only with fill mode line...

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
shader_runner: wrap strtod() to parse "inf" with MSVC

MSVC's strtod() function does not parse "inf" or "-inf" so add a
wrapper function to do that.  Several generated shader tests use
inf uniforms.
tex-miplevel-selection: stop after 100 failures

rather than continuing.  As it was, if something is majorly broken in
the driver, this test could report nearly 60,000 failure messages.
The results.json file is pretty huge in this case.
vertex-attrib-pointer-type-size-match: use a VAO for core profiles

With core profile contexts, all vertex arrays must be in a vertex array object.
This fixes the test with Mesa.

v2: test for core profile instead of gl version

Reviewed-by: Matt Turner <mattst88@gmail.com>
arb_uniform_buffer_object/maxblocks: use larger window, set viewport

Commit 42d2fdf changed the test to use the default window size.  But
even before that, the window was too small for common values of
GL_MAX_VERTEX/FRAGMENT/COMBINED_UNIFORM_BLOCKS so we skipped some
testing.

Now use a larger window and call glViewport() so that if we resize
the window we don't blow up.

Finally, print a warning if the window is too small in the future.

Reviewed-by: Matthew McClure <mcclurem@vmware.com>
lineloop: fix #include

Trivial.
shader_runner: allow specifying the current ubo array index

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
shader_runner: add support for probing rects

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
arb_gpu_shader5: Add initial tests for dynamically uniform UBO indexing

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
arb_gpu_shader5: Add meaner d/u ubo array tests using two arrays

This ensures that the block index of the base of the array is correctly
taken into account, along with just being a little more stressful.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Add a test case for all of the modes of BPTC texture compression

This creates a compressed texture with a block for each of 8 modes of
BPTC compression. The texture is then both rendered and read back via
glGetTexImage and compared with the expected values.