[Mesa-dev] [PATCH v3 6/9] main/shaderapi: GL_GEOMETRY_SHADER_INVOCATIONS GetProgramiv support

Jordan Justen jordan.l.justen at intel.com
Wed Feb 5 00:07:27 CET 2014


v3:
 * Add check for ARB_gpu_shader5

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
---
 src/mesa/main/shaderapi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index a8336c9..1b2158f 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -603,6 +603,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;
-- 
1.8.5.3



More information about the mesa-dev mailing list