Add a simple test of varying packing.
util: Initialize Mersenne member variables.

Fixes uninitialized scalar field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glsl-routing: Fix off-by-one error in for loop.

Fixes out-of-bounds read defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
arb_uniform_buffer_object: Remove unsigned comparison against 0.

indices[i] has type GLuint.

Fixes unsigned compared against 0 defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
arb_uniform_buffer: Fix block / field names in dlist test

Both the block name and the names of the individual variables in the
block live at global scope.  Therefore, they can't both have the same
names.  The GLSL 1.40 spec says:

    "Uniform block names and variable names declared within uniform
    blocks are scoped at the program level."

Previously this test failed on NVIDIA's closed-source driver (version
304.64) with the error messages:

0(2) : error C1002: the name "a" is already defined at 0(2)
0(3) : error C1002: the name "b" is already defined at 0(3)

With this change, the test passes.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
piglit-dispatch: Update enumext.spec from the registry

The most notable changes are the removal of GL_TEXTURE_BUFFER_FORMAT
(this was not prototed to core from the ARB extension), and the
addition of a giant pile of new extesions.

Support is added to piglit_get_gl_enum_name for
GL_SHADER_BINARY_FORMATS which was previously missing from our
enumext.spec.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Remove #version from variable indexing shader tests.

shader_runner will insert #version based on GLSL >=.

Testing: same number of passes on Sandy Bridge.

Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Tom Gall <tom.gall@linaro.org>
varying-packing-simple: Fix memory leak.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
ext_framebuffer_multisample: Initialize Test member variables.

Fixes uninitialized scalar field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
arb_texture_buffer_object_rgb32: add support for RGB32 formats to formats test

This adds support to test the rgb32 formats in the GL4.x extension.

Signed-off-by: Dave Airlie <airlied@redhat.com>
glean/pointAtten: test fewer combinations, don't call glFinish

Before:
  PASS: 87750 antialiased combinations tested.
  PASS: 87750 aliased combinations tested.

  real   0m16.731s
  user   0m4.988s
  sys    0m8.632s

After:
  PASS: 17550 antialiased combinations tested.
  PASS: 17550 aliased combinations tested.

  real   0m2.910s
  user   0m0.880s
  sys    0m1.544s

Reviewed-by: Brian Paul <brianp@vmware.com>
quick-driver.tests: add parser tests and pointAtten back
Transform feedback: test buffer size change after binding.

These tests pass on the nVidia binary driver for Linux.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_internalformat_query: Add initial API error test for this extension

This test passes on NVIDIA's closed-source driver (version 304.64 on
GTX 260).  This driver supports GL_ARB_texture_multisample, but it
does not support GL_ARB_internalformat_query2.

This test fails on AMD's closed-source driver (Catalyst 12.6 on HD
3650).  It appears that none of the queries of
GL_ARB_internalformat_query2 enums generate errors even though that
extension is not supported.  This driver supports
GL_ARB_texture_multisample, but it does not support
GL_ARB_internalformat_query2.

There is some debate about whether the {RED,RG,RGB,RGBA}_SNORM formats
should be allowed or not.  The spec seems to indicate that they are
valid, but no implementation other than Mesa actually allows them.
There is a bug open against the OpenGL spec for this issue.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
arb_internalformat_query: Verify glGetInternalformativ doesn't over-run the buffer

This test passes on NVIDIA's closed-source driver (version 304.64 on
GTX 260).

This test fails on AMD's closed-source driver (Catalyst 12.6 on HD
3650).  Queries of GL_NUM_SAMPLE_COUNTS merrily write data even when
bufSize is zero.

v2: Add some comments describing the non-obvious test method.  Use a
fixed sentinal value instead of inverting a previous result.  Require
compat version 3.0.  Based on review comments from Eric Anholt.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
arb_internalformat_query: Verify minimum maximums

This test passes on NVIDIA's closed-source driver (version 304.64 on
GTX260).  This driver supports GL_ARB_texture_multisample.

This test fails on AMD's closed-source driver (Catalyst 12.6 on HD
3650).  Querying GL_SRGB8_ALPHA8 (for all targets) returns {1, 0, 2}.
This is invalid because it is not descending order, and zero is not
positive.  I suspect they intended to return 1 for NUM_SAMPLE_COUNTS,
and {1} for SAMPLES.  This driver supports GL_ARB_texture_multisample.

v2: Delete the ARB_texture_multisample defines.  Recent changes to
enumsext.spec make this unnecessary.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
getteximage-formats: print keyboard usage when not running in auto mode
arb_internalformat_query: move this_test declaration before code

To fix MSVC build.
glean/vertprog1: Initialize VertexProgramTest member variables.

Fixes uninitialized scalar field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glean/texunits: Initialize TexUnitsTest member variables.

Fixes uninitialized scalar field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>