Test GL_ARB_clear_texture using 3D textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a 3D texture. Two sub-regions are cleared, one using a NULL data
parameter and one providing a colour. Both regions have a depth
greater than 1. All of the images of the texture are then rendered to
the window and probed for the correct results.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using cube map textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a cube map texture. Each face of the cube map is cleared to a separate
colour and then one pixel of each face is rendered using points. The
colours are then probed to check whether the clear worked. This is
important to test because glClearTexSubImage has some unusual
semantics in that the zoffset parameter is used to select the cube
face.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using a range of base formats

This adds a test for glClearTexSubImage when clearing a sub-region of
a 2D texture using a range of formats that are supported in basic GL.
A utility function is added to test a format combination so that
further tests can be added with other formats that need an extension.

For each format a texture is created and two sub-regions are cleared.
One region is set to all zeroes using NULL as the clear value and the
other is set to a known value. The texture is then retrieved with
glGetTexImage and compared against the expected values.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using depth-stencil textures

This adds a test for glClearTexSubImage when clearing a sub-region of
a depth-stencil texture. This is important to test because it hits a
separate code path in Mesa.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using a range of sized formats

This adds a test for glClearTexSubImage when clearing a sub-region of
a texture using a range of sized internal formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using a range of float formats

This adds a test for glClearTexSubImage when clearing a sub-region of
a texture using a range of float formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
Test GL_ARB_clear_texture using 1- and 2- component textures

This adds a test for glClearTexSubImage when clearing a sub-region of
textures using an internal format of GL_RED and GL_RG.

Reviewed-by: Brian Paul <brianp@vmware.com>
shader_runner: Add 'atomic counters' command

This command initializes the specified number of atomic counters all
containing an initial value of 0.

For example, 'atomic counters 2' creates an zeroed 8 byte buffer
for 2 atomic counters.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
shader_runner: Add 'probe atomic counter' command

This command allows a test to probe the value of an atomic counter.

For example 'probe atomic counter 0 == 512' will read the atomic
counter at offset 0, and compare for equality with 512.

Since atomic counters are 32-bit unsigned integers, the probed counter
is located at a multiple of 4 offset within the atomic counters
buffer.

'probe atomic counter 1 > 512' will read the atomic counter at offset
4, and ensure the value is greater than 512.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_compute_shader: Add simple compute shader with atomic counters

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
shader_runner: Allow tests to require an OpenGL CORE profile

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
gl-3.1: attributeless-vertexid; C => shader_test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
arb_gpu_shader5: test transform feedback with multiple streams

ARB_gpu_shader5 requires a minimum of 4 vertex streams. This
allows a geometry shader to output vertices independently to
up to 4 streams.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
arb_shader_atomic_counters: fix gs support check

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_shader_atomic_counters: recursion checks require a second paste macro

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
ARB_explicit_uniform_location: change compiler test requirements

This is a leftover from commit 238768a changes.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80118
Reviewed-by: Matt Turner <mattst88@gmail.com>
arb_fragment_layer_viewport: add an initial batch of tests

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>