[Mesa-dev] [PATCH v2 4/7] main/shaderapi: GL_GEOMETRY_SHADER_INVOCATIONS GetProgramiv support

Paul Berry stereotype441 at gmail.com
Fri Jan 31 14:53:49 PST 2014


On 28 January 2014 11:22, Jordan Justen <jordan.l.justen at intel.com> wrote:

> Signed-off-by: Jordan Justen <jordan.l.justen at intel.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..fb107d5 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)
>

This needs to be:

   if (!has_core_gs || !ctx->Extensions.ARB_gpu_shader5)

so that the query will generate the proper error message on platforms that
don't support 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
>

With that fixed, the patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140131/10375599/attachment.html>


More information about the mesa-dev mailing list