cl: Add a test for the phatk kernel used for bitcoin mining
arb_shading_language_420pack: Add line continuation test.
arb_shading_language_420pack: Add UTF-8 test.
arb_shading_language_420pack: Add vec.length() test.
arb_shading_language_420pack: Add mat.length() test.
arb_shading_language_420pack: Add negative scalar.length test.
arb_shading_language_420pack: Add scalar swizzle test.
arb_shading_language_420pack: Add test for implicit conversion of return types.
arb_shading_language_420pack: Test non-const expr initializer of const var.
arb_shading_language_420pack: Test that global const vars cannot be non-const expressions.
arb_shading_language_420pack: Add to all.tests.
glsl-1.10: Test that returning void from a void function is illegal.
shader_runner: Use piglit_height for framebuffer height.

It used to be piglit_width which works, too, as the framebuffer is hardcoded
to 250x250 pixels.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
shader_runner: Allow new drawing modes.

Add primitives with adjacency and (for extreme future-proofness) patches to
recognized drawing modes.

v2: removed ifdefs as suggested by Eric Anholt.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
util: Draw rectangles using triangle strips instead of quads.

This is useful for core profile OpenGL contexts and geometry shaders.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
shader_runner: Draw instanced rectangles using triangle strips instead of quads.

This is useful for core profile OpenGL contexts and geometry shaders.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
arb_geometry_shader4: Test valid input primitives.

Test that glProgramParameter() triggers the required errors.

The geometry shader input primitive type is limited to a subset
of OpenGL primitive types.

From the ARB_geometry_shader4 spec (section Errors):
"The error INVALID_VALUE is generated by ProgramParameteriARB if <pname> is
GEOMETRY_INPUT_TYPE_ARB and <value> is not one of POINTS, LINES,
LINES_ADJACENCY_ARB, TRIANGLES or TRIANGLES_ADJACENCY_ARB."

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
arb_geometry_shader4: Test valid output primitives.

Test that glProgramParameter() triggers the required errors.

The geometry shader output primitive type is limited to a subset
of OpenGL primitive types.

From the ARB_geometry_shader4 spec (section Errors):
"The error INVALID_VALUE is generated by ProgramParameteriARB if <pname> is
GEOMETRY_OUTPUT_TYPE_ARB and <value> is not one of POINTS, LINE_STRIP or
TRIANGLE_STRIP."

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
arb_geometry_shader4: Test valid vertices out count.

Test that glProgramParameter() triggers the required errors.

The value of GEOMETRY_VERTICES_OUT is limited by the implementation
dependend constants MAX_GEOMETRY_OUTPUT_VERTICES and
MAX_VERTEX_VARYING_COMPONENTS.

From the ARB_geometry_shader4 spec (section Errors):
"The error INVALID_VALUE is generated by ProgramParameteriARB if <pname> is
GEOMETRY_VERTICES_OUT_ARB and <value> is negative.

The error INVALID_VALUE is generated by ProgramParameteriARB if <pname> is
GEOMETRY_VERTICES_OUT_ARB and <value> exceeds
MAX_GEOMETRY_OUTPUT_VERTICES_ARB.

The error INVALID_VALUE is generated by ProgramParameteriARB if <pname> is
set to GEOMETRY_VERTICES_OUT_ARB and the product of <value> and the sum of
all components of all active varying variables exceeds
MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB."

And from section Geometry Shader outputs:
"[...]the product of the total number of vertices and the sum of all
components of all active varying variables may not exceed the value of
MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB.  LinkProgram will fail if it
determines that the total component limit would be violated."

v2: Don't count gl_Position against MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS.

v3: Only check for linking error if (GEOMETRY_VERTICES_OUT * (sum of components
of all out varyings)) > MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, add "max" command
line argument
arb_geometry_shader4: Test valid drawing modes.

Test that glDrawArrays() triggers the required errors.

The geometry shader input type limits the valid primitive types of glBegin()
(including implicit glBegin()).

From the ARB_geometry_shader4 spec (section Errors):
"The error INVALID_OPERATION is generated if Begin, or any command that
implicitly calls Begin, is called when a geometry shader is active and:

    * the input primitive type of the current geometry shader is
      POINTS and <mode> is not POINTS,

    * the input primitive type of the current geometry shader is
      LINES and <mode> is not LINES, LINE_STRIP, or LINE_LOOP,

    * the input primitive type of the current geometry shader is
      TRIANGLES and <mode> is not TRIANGLES, TRIANGLE_STRIP or
      TRIANGLE_FAN,

    * the input primitive type of the current geometry shader is
      LINES_ADJACENCY_ARB and <mode> is not LINES_ADJACENCY_ARB or
      LINE_STRIP_ADJACENCY_ARB, or

    * the input primitive type of the current geometry shader is
      TRIANGLES_ADJACENCY_ARB and <mode> is not
      TRIANGLES_ADJACENCY_ARB or TRIANGLE_STRIP_ADJACENCY_ARB."

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Paul Berry <stereotype441@gmail.com>