glean: Fix fbo errors case

If the framebuffer has no attachments at all, the first incomplete
status generated is FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT.

Adjust the tests for FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER and
FRAMEBUFFER_INCOMPLETE_READ_BUFFER to avoid tripping over this, by
adding a depth renderbuffer attachment.

This extra attachment is chosen to avoid imposing additional
requirements -- multiple color attachments are not required, nor
are depth textures.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76579
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
ARB_explicit_uniform_location: test inactive uniform interaction

Test has a shader with only one uniform which is not used. Test checks
that there is no error when glUniform1f is called to update its value.

Test passes on GTX 660 running the Nvidia proprietary driver for Linux,
version 319.32.

v2: remove test for glGetUniformLocation, this test tests only
    glUniform call interaction

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
dlist-multidrawarrays: test that glMultiDrawArrays works in a display list

v2: Also test GL_COMPILE_AND_EXECUTE mode.

Reviewed-by: Eric Anholt <eric@anholt.net>
getteximage-targets: use MAX2() macro instead of hand-rolled max()

Fixes MSVC build.
Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=76849
framework/log.py: ensure any previous output is cleared

If the new summary line is shorter than the previous one, clear the
remaining characters.

v2: remove unused variable and use str.format (Dylan Baker)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: print a summary line after a run has finished

v2: split output writing into a private method (Dylan Baker)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Remove extra newline from the end of run message

The extra newline is no longer necessary as the final summary line
includes one.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
windows: add instructions for installing mako

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
primitive-restart-draw-mode: fix failures caused by precision issues

Instead of offsetting the vertex position for the second half of the screen,
setup both halves as separate viewports.

Reviewed-by: Brian Paul <brianp@vmware.com>
ext_timer_query/time-elapsed: Prevent infinite loop.

When testing with llvmpipe, somehow the draw() function is returning
constant elapsed time of 0.000222 approximately, regardless how big
iters is.

This is probably a bug in llvmpipe, but it seems a good idea to fix the
test to prevent integer overflow and the consequent infinite loop in the
test regardless.

Reviewed-by: Brian Paul <brianp@vmware.com>
Revert "shader_runner: always enable VAO for gl >= 31"

This reverts commit b28cdc887aefb1e766719e1f74d457f77bdf9a18.

b28cdc88 causes many tests to crash on AMD and NVIDIA binary
drivers.

One known example is tests/shaders/glsl-fs-any.shader_test

Reported-by: "Fu, Ping" <Ping.Fu@amd.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Replace end_config with 'end config' in glsl parser tests

The example glsl parser test doesn't list end_config as acceptable, and
there are only 5 tests using end_config, so it makes sense to just fix
those tests rather than generating slower more complicated regex for
handling end_config.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
shader_tests_tests.py: Adds some tests for the shader_test module

This adds some additional tests for ShaderTest behavior. Some of these
tests fail because of dumb implementation details.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/shader_test.py: Remove standalone capability

Shader_test has a bizarre capability to be run as a standalone script as
well as be used as a module. This was probably useful when developing
the original shader_test implementation, but at this point it's unused
code just waiting to bit-rot adding needless complexity

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/shader_test.py: simplify ShaderTest

This patch almost completely reworks ShaderTest. It was originally much
more complicated than was necessary, this code should be much easier to
work with, and removes some quirks. One of those was that ShaderTest
inherited from PlainExecTest, but used ExecTest's __init__ method, which
has implications for changing either of those classes.

v2: - remove shader_test_tests. This only had an initializer test, and
      that no longer applies since ShaderTest is now a function
v3: - Don't remove shader_test_tests
    - Keep ShaderTest as a class rather than function
    - make looping over test files more efficient
    - make errors more specific
    - make tests more precise

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Adds some tests for glsl_parser_tests.py

These tests model future behavior rather than current behavior, some of
them pass, others fail.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
glsl_parser_test.py: Remove standalone functionality.

This removes the standalone run functionality from glsl_parser_test.
Like shader_test this was probably useful for testing while in
development, but at this point it's just dead code.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
glsl_parser_test.py: Simplify GLSLParserTest

This vastly simplifies the way that GLSLParserTest works. This
simplification has a couple of advantages. First, we call
PlainExecTest's __init__ rather than ExecTest's __init__, which is good
OO practice; second we reduce the number of regex's used, which yields
enhanced performance. In tests this reduced GLSLParserTest
initialization time by about 40%

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: Move Test from core to exectest

Since Test is exclusively used as a parent for ExecTest, the two classes
should be in the same module.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: move testBinDir to exectest

This is mostly consumed by Test's children, so putting it in the same
module makes sense. This should reduce the number of imports from core
as well, since most consumers of testBinDir also make use of ExecTest or
PlainExecTest.

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