Add test to verify glTexSubImage2D() with depth formats

This test verifies the bug fix in i965 drivers in mesa commit 984a02b.
Reproduces another bug in the driver with GL_DEPTH_COMPONENT16
internal format.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
attribs: add support for the SNORM equation 2.3

Reviewed-by: Brian Paul <brianp@vmware.com>
draw-vertices-2101010: add support for the SNORM equation 2.3

Reviewed-by: Brian Paul <brianp@vmware.com>
oes_compressed_etc2_texture-miptree: fix the R11 test

Clearing a buffer with masked channels results in not clearing anything
in those channels, so there is always random garbage. No wonder that
the test was always failing. Apparently, i965 ignores the colormask,
otherwise it wouldn't have been unnoticed.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
egl-create-context-valid-flag-debug-gles: Add missing break.

Fixes Coverity "Missing break in switch" defect.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
arb_shader_atomic_counters-unique-id: Fix memory leak.

Fixes Coverity "Resource leak" defect.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glsl-1.10/fragdepth: add new, simple test of gl_FragDepth

v2: incorporate fixes suggested by Anuj Phogat.
tex-miplevel-selection: use GL_CLAMP_TO_EDGE instead of GL_REPEAT

GL_REPEAT is not legal for the rectangle targets, and because the test uses
sampler objects the default GL_REPEAT value will be used even for rectangle
target because unlike texture objects they can't be initialized to the legal
CLAMP_TO_EDGE value. According to the spec the texture actually should be
treated as incomplete in this case which mesa does not do (and I don't know if
anyone bothers enough to fix this) but some drivers (like llvmpipe) might
not treat unnormalized coords correctly in this case.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
arb_gpu_shader_fp64: add preprocessor define tests

v2: import tests in tests/all.py

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add vs input and fs output tests

Both of these tests are expected to fail as double cannot
be used as vs input or fs output.

v2: make sure we only fail because of wrong type

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Dave Airlie <airlied@redhat.com>
exectest.py: Remove {'result': 'skip'} from get_command_result()

Since 1012d68c an exception in Popen is no longer sent to
interpret_result(), instead it returns early, making this dead code.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add message to out when is_skip() is True

This adds a note so that one knows why a specific test skipped.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: rename get_command_result to __run_command

This is shorter (and shorter is always better in a python), and it marks
the method as private (leading __) since it's only for use in a Test
method, not in it's children.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add and update some docstrings

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: Fix formatting problems

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: rename GleanTest.globalParams to GLOBAL_PARAMS

This replaces the camel case name with an all caps constant name.

this patch generated by:
find . -name '*py' | xargs sed -i -e 's!globalParams!GLOBAL_PARAMS!g'

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: replace glean_executable with class variable

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: add docstring

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Change the order of environment variable loading

This patch changes piglit such that it loads first from the global
environment, then it loads global test options (some of which are passed
as command line arguments, like -p/--platform), and finally any test
specific variables.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
util/wfl: Replace strcmp() with streq()

Because `strcmp(...) == 0` is crufty.

I generated this patch with the coccinelle patch below:

  @@
  expression E;
  @@

  -strcmp(env, E) == 0
  +streq(env, E)

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>