v2: Improve error message.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
*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)");
+ 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;
}