mesa: Implement glGet*(GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED).
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 21 May 2016 03:59:33 +0000 (20:59 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 23 May 2016 23:44:22 +0000 (16:44 -0700)
commit1c1873b93b9aa30c8e9275000f813bce69ed99e4
tree9438185c715d7b38efab1894ee85148c2ea34806
parent70048eb1e3bc155b2b6f3554e6a03fb239082f2d
mesa: Implement glGet*(GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED).

Technically, this was introduced with GL 4.4.  However, I believe it
was intended to be retroactive.  As far as I know, AMD has never
supported primitive restart with patches, while NVidia and Intel do.
This necessitated the need for a query which would allow applications
to figure out whether this was usable or not.

I decided to expose it everywhere ARB_tessellation_shader is exposed.
(It's also in both OES and EXT_tessellation_shader.)

Enable this for i965 and Gallium drivers which expose the capability.

v2: Fix a bug in the state_tracker code (caught by Ilia Mirkin).

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=10364
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mapi/glapi/gen/ARB_tessellation_shader.xml
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/main/context.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_extensions.c