fp-indirections: limit to 1024 indirections

The test takes ages (somewhere in the order of an hour) on llvmpipe, because
the driver announces support for one million indirections (some drivers
actually say billions even). It never gets compiled even, that hour is fully
spent on string concatenation when constructing the shader in the test itself,
which seems rather silly.
Thus, follow fp-indirections2, which limits it to 1024 indirections. If you've
got that many indirections the hw is pretty much guaranteed to not have a limit
on that anyway.

v2: use MIN2

Reviewed-by: Brian Paul <brianp@vmware.com>
framework/programs/run.py: fix help message generation

In commit 78628572 the argument parser for piglit run and piglit-run.py
were split into two parsers to allow piglit.conf to be loaded before any
additional parsing was done. This had the unintended side effect of
breaking the -h/--help option since the first very limited parser took
that option.

This commit fixes that by having the first parser not generate a help
message. This means that when it parses the command line for arguments
it knows it skips help, and passes it on to the main parser. The main
parser has been augmented with a dummy version of the config file option
so that option will show up in the help message.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: vs-out-fs-in-double.shader_test fix

Set 'flat' interpolation qualifier for double precision input
variable as defined by the GL_ARB_gpu_shader_fp64 spec:

  "This extension does not support interpolation of double-precision
  values; doubles used as fragment shader inputs must be qualified
  as "flat"."

Also modified vertex output side, as the test uses GLSL 1.50 where
interpolation qualifier must match between stages.

(This test still fails on Nvidia binary driver (319.32) which would
additionally require GLSL >= 4.00 and GL_NV_gpu_shader5 for it to
work.)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
glsl-1.50-geometry-primitive-id-restart: Add workaround for Intel SandyBrige

Intel SandyBridge is not handling GL_TRIANGLE_STRIP_ADJACENCY with
repeating vertex indices correctly, so there is a GPU hang when
running:

bin/glsl-1.50-geometry-primitive-id-restart \
GL_TRIANGLE_STRIP_ADJACENCY ffs

This patch provides a workaround for this issue as it seems to be a HW
bug in SandyBrigde. More information:

http://lists.freedesktop.org/archives/mesa-dev/2014-July/064221.html

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
arb_copy_image: Skip if sample count is not supported

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
all.py: Correctly added 'invalid formats' test in oes_compressed_paletted_texture

The group oes_compressed_paletted_texture is defined twice in all.py.
Test 'invalid formats' isn't added in test list because this group is overridden.

Signed-off-by: Pavel Popov <pavel.e.popov@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
sso: Fixed mistakenly disabled float entry points in ProgramUniform

Looks like these 2 cases were mistakenly disabled:
PIGLIT: {"subtest": {"float scalar and vectors" : "skip"}}
PIGLIT: {"subtest": {"square float matrices" : "skip"}}

Signed-off-by: Pavel Popov <pavel.e.popov@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
nv_conditional_render: reinstate width/height for mipmap generation

The test relies on level 1 being used from the texture when rendering to
the window.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gen_builtin_uniform_tests: Make VS & FS optional

Compute shader tests will not need a VS or FS.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
gen_builtin_uniform_tests: Allow test to have init sequence

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
gen_builtin_uniform_tests: Support Compute shaders

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
arb_gpu_shader_fp64: cleanup glsl-uniform-initializer-2 test

remove couple of extra uniform updates, add a bit of documentation

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
core.py: don't overwrite user's PIGLIT_SOURCE_DIR env var

When creating an Options object, use the environment's PIGLIT_SOURCE_DIR
value when available.

Fixes spec/ARB_ES3_compatibility/oes_compressed_etc2_texture-miptree test
failures in Cywin.

Also, remove the MESA_DEBUG=silent setting.  Piglit shouldn't care if
debug output is on/off (we stopped looking for Mesa error messages a
long time ago).

v2: simplify code with dict get() method and default value.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
asmparsertest: add new SWZ test to exercise Mesa bug/assertion

The Mesa program optimizer was failing some assertions because of
the SWZ 0, 1 terms.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
fs-discard-exit-2: use default window size

To fix Windows run.
fs-texelFetchOffset-2D: use default window size
fp-indirections2: limit max_samples to 256

So that llvmpipe can run in a reasonable amount of time.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
fp-indirections2: use default window size
fbo-missing-attachment-clear: probe correct buffer size

The piglit_probe_rect_depth() was invalid because it was using the
piglit window size rather than the FBO size.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
cl: Add atomic_max tests

v2: Properly test signed/unsigned values

Signed-off-by: Aaron Watry <awatry@gmail.com>