diff options
author | Kenneth Graunke <[email protected]> | 2016-05-20 20:59:33 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-05-23 16:44:22 -0700 |
commit | 1c1873b93b9aa30c8e9275000f813bce69ed99e4 (patch) | |
tree | 9438185c715d7b38efab1894ee85148c2ea34806 /src/mesa/state_tracker | |
parent | 70048eb1e3bc155b2b6f3554e6a03fb239082f2d (diff) |
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 <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index ea60e41acdc..ef061e9d756 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -314,6 +314,8 @@ void st_init_limits(struct pipe_screen *screen, } c->LowerTessLevel = true; + c->PrimitiveRestartForPatches = + screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES); c->MaxCombinedTextureImageUnits = _min(c->Program[MESA_SHADER_VERTEX].MaxTextureImageUnits + |