main/shaderapi: GL_GEOMETRY_SHADER_INVOCATIONS GetProgramiv support
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 25 Jan 2014 20:37:40 +0000 (12:37 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 20 Feb 2014 18:33:09 +0000 (10:33 -0800)
v3:
 * Add check for ARB_gpu_shader5

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/shaderapi.c

index 8b962af6677102dd6f139f9200adec221a54ab93..bf138149087ac8a83f943d393a3f28b494081682 100644 (file)
@@ -606,6 +606,12 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
       if (check_gs_query(ctx, shProg))
          *params = shProg->Geom.VerticesOut;
       return;
+   case GL_GEOMETRY_SHADER_INVOCATIONS:
+      if (!has_core_gs || !ctx->Extensions.ARB_gpu_shader5)
+         break;
+      if (check_gs_query(ctx, shProg))
+         *params = shProg->Geom.Invocations;
+      return;
    case GL_GEOMETRY_INPUT_TYPE:
       if (!has_core_gs)
          break;