[Mesa-dev] [PATCH 26/30] main/cs: Implement query for COMPUTE_WORK_GROUP_SIZE.
Paul Berry
stereotype441 at gmail.com
Mon Feb 3 14:37:26 PST 2014
On 1 February 2014 22:28, Jordan Justen <jljusten at gmail.com> wrote:
> On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry <stereotype441 at gmail.com>
> wrote:
> > ---
> > src/mesa/main/shaderapi.c | 18 ++++++++++++++++++
> > 1 file changed, 18 insertions(+)
> >
> > diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
> > index 053f27b..680d449 100644
> > --- a/src/mesa/main/shaderapi.c
> > +++ b/src/mesa/main/shaderapi.c
> > @@ -663,6 +663,24 @@ get_programiv(struct gl_context *ctx, GLuint
> program, GLenum pname, GLint *param
> >
> > *params = shProg->NumAtomicBuffers;
> > return;
> > + case GL_COMPUTE_WORK_GROUP_SIZE: {
> > + int i;
> > + if (!_mesa_is_desktop_gl(ctx) ||
> !ctx->Extensions.ARB_compute_shader)
> > + break;
> > + if (!shProg->LinkStatus) {
> > + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramiv(program
> not "
> > + "linked successfully)");
>
> Nit, but dropping " successfully" sounds better to me. It seems more
> likely that they tried to get the value before linking than that they
> ignored a link error.
>
Sure, I can go along with that. I've changed it to just
"glGetProgramiv(program not linked)".
>
> 24-26 Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
>
> > + return;
> > + }
> > + if (shProg->_LinkedShaders[MESA_SHADER_COMPUTE] == NULL) {
> > + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramiv(no
> compute "
> > + "shaders)");
> > + return;
> > + }
> > + for (i = 0; i < 3; i++)
> > + params[i] = shProg->Comp.LocalSize[i];
> > + return;
> > + }
> > default:
> > break;
> > }
> > --
> > 1.8.5.2
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140203/76f5b994/attachment.html>
More information about the mesa-dev
mailing list