arb_texture_buffer_object-formats: Initialize variable.

Fixes "Assigned value is garbage or undefined" bugs reported by Clang
Static Analyzer.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
ati_envmap_bumpmap-bump: Use more compatible sizeof operand type.

Fixes "Allocator sizeof operand mismatch" bug reported by Clang Static
Analyzer.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
gl-3.2-depth-tex-sampling: Check piglit_check_gl_error return value.

Fixes "Unchecked return value" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
gl-3.3-vertex-attrib-pointer-type-size-match: Fix typos.

Use correct inputs for the negative tests.

Fixes "Out-of-bounds read" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
hiz: Explicitly use sizeof(float) in malloc.

Silences "Allocation size mismatch" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
s3tc-errors: Check all return values of piglit_check_gl_error.

Fixes "Dead assignment" bug reported by Clang Static Analyzer.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_viewport_array: fix fail in viewport_indices

add missing && pass to correctly propogate fails.

Signed-off-by: Dave Airlie <airlied@redhat.com>
array-texture: fail if any of the subtests fail rather than the last

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
layered-rendering/gl-layer: clear textures before render

The render will only cover a single layer, and the code expects the
other layers to be 0'd out, so do a big clear first.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
max-samplers: Specify a RGBA color rather than RGB.

The RGB channels continue to uniquely identify textures; the alpha
channel is always 1.0.

This isn't terribly useful in and of itself, but will allow me to use
the unique color for the border color in the next patch.

v2: Update the type as well (caught by Marek).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
max-samplers: Add a mode that samples the border color.

Intel hardware has an awkward limit where the index into the sampler
state table is represented by a 4-bit value, so the only possible
indices are 0-15.  (The surface state table has no such restriction.)
However, it's possible to support more than 16 textures on Haswell via
a bit of trickery.

The existing test covers basic sampling, but doesn't do much with
sampler state (wrap modes, filter modes, border color, and such).
An implementation that got the surface information correct but which
used the wrong sampler state (say, by dropping bit 5) would pass.

This patch additionally programs each texture's unique color as the
border color, sets the wrap modes to CLAMP_TO_BORDER, and provides a
"border" command line argument which makes the test sample outside the
texture.  This mode ensures that the right sampler state is used.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
arb_texture_view: Don't claim core profile support for rendering tests

These aren't core-profile-clean. They don't bother to set up a VAO,
and rendering_levels tests some fixed-function behavior.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Jon Ashburn <jon@lunarg.com>
arb_texture_view: Fill 2D array texture properly

The depth only varies by miplevel for volume textures -- all miplevels
have the same number of layers for an array texture.

Previously we would fail to fill all but the first layers, and then
sample from whatever junk was in that memory. This might have worked by
accident on some hardware.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Jon Ashburn <jon@lunarg.com>
framework: Add a helper class for interpreting gtest results

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
glapi: Rename ARB_compute_shader "LOCAL" -> "WORK_GROUP".

The piglit glapi files, which are derived from files published on
www.opengl.org, contained nonstandard names for two enums:
COMPUTE_LOCAL_WORK_SIZE and MAX_COMPUTE_LOCAL_INVOCATIONS.

The ARB_compute_shader spec, the OpenGL specs, and the OpenGL wiki all
agree that these should be called COMPUTE_WORK_GROUP_SIZE and
MAX_COMPUTE_WORK_GROUP_INVOCATIONS.  So rename them in piglit to be
consistent.
util: Add ARB_compute_shader support to piglit_get_gl_enum_name().
Add minmax test for ARB_compute_shader.
Test compilation rules related to compute shader layout qualifiers.
Test that compute shader work group sizes are properly bounds checked.
Test ARB_compute_shader built-in constant gl_WorkGroupSize.