mesa: Fix geometry shader program queries.
authorPaul Berry <stereotype441@gmail.com>
Wed, 16 Oct 2013 18:01:42 +0000 (11:01 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 25 Oct 2013 05:01:22 +0000 (22:01 -0700)
commit156b31c5be921bca7b7a96f1838c96c17ec3a602
tree519d165e4ea8486810091a423a60d32fb71e4b67
parenta49830b8f549c93cf92298048ffe00f931e0525d
mesa: Fix geometry shader program queries.

The queries GEOMETRY_VERTICES_OUT, GEOMETRY_INPUT_TYPE, and
GEOMETRY_OUTPUT_TYPE (defined by GL 3.2) differ from the corresponding
queries in ARB_geometry_shader4 in the following ways:

- They use different enum values

- They can only be queried; they cannot be set.

- Attempting to query them yields INVALID_OPERATION if the program is
  not linked, or lacks a geometry shader.

This patch switches us over from the ARB_geometry_shader4 behaviour to
the GL 3.2 behaviour.

Fixes piglit test query-gs-prim-types.

v2: Improve comment above has_core_gs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/shaderapi.c