}
if (state->is_version(430, 0) || state->ARB_compute_shader_enable) {
+ add_const_ivec3("gl_MaxComputeWorkGroupCount",
+ state->Const.MaxComputeWorkGroupCount[0],
+ state->Const.MaxComputeWorkGroupCount[1],
+ state->Const.MaxComputeWorkGroupCount[2]);
add_const_ivec3("gl_MaxComputeWorkGroupSize",
state->Const.MaxComputeWorkGroupSize[0],
state->Const.MaxComputeWorkGroupSize[1],
this->Const.MaxAtomicBufferBindings = ctx->Const.MaxAtomicBufferBindings;
/* Compute shader constants */
+ for (unsigned i = 0; i < Elements(this->Const.MaxComputeWorkGroupCount); i++)
+ this->Const.MaxComputeWorkGroupCount[i] = ctx->Const.MaxComputeWorkGroupCount[i];
for (unsigned i = 0; i < Elements(this->Const.MaxComputeWorkGroupSize); i++)
this->Const.MaxComputeWorkGroupSize[i] = ctx->Const.MaxComputeWorkGroupSize[i];
unsigned MaxAtomicBufferBindings;
/* ARB_compute_shader */
+ unsigned MaxComputeWorkGroupCount[3];
unsigned MaxComputeWorkGroupSize[3];
} Const;
*/
ctx->Const.GLSLVersion = glsl_version;
ctx->Extensions.ARB_ES3_compatibility = true;
+ ctx->Const.MaxComputeWorkGroupCount[0] = 65535;
+ ctx->Const.MaxComputeWorkGroupCount[1] = 65535;
+ ctx->Const.MaxComputeWorkGroupCount[2] = 65535;
ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
ctx->Const.MaxComputeWorkGroupSize[2] = 64;
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 32;
ctx->Const.MaxDrawBuffers = 1;
+ ctx->Const.MaxComputeWorkGroupCount[0] = 65535;
+ ctx->Const.MaxComputeWorkGroupCount[1] = 65535;
+ ctx->Const.MaxComputeWorkGroupCount[2] = 65535;
ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
ctx->Const.MaxComputeWorkGroupSize[2] = 64;
ctx->Const.MaxVertexAttribBindings = MAX_VERTEX_GENERIC_ATTRIBS;
/* GL_ARB_compute_shader */
+ ctx->Const.MaxComputeWorkGroupCount[0] = 65535;
+ ctx->Const.MaxComputeWorkGroupCount[1] = 65535;
+ ctx->Const.MaxComputeWorkGroupCount[2] = 65535;
ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
ctx->Const.MaxComputeWorkGroupSize[2] = 64;
v->value_int = ctx->ImageUnits[index].Format;
return TYPE_INT;
+ case GL_MAX_COMPUTE_WORK_GROUP_COUNT:
+ if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_compute_shader)
+ goto invalid_enum;
+ if (index >= 3)
+ goto invalid_value;
+ v->value_int = ctx->Const.MaxComputeWorkGroupCount[index];
+ return TYPE_INT;
+
case GL_MAX_COMPUTE_WORK_GROUP_SIZE:
if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_compute_shader)
goto invalid_enum;
GLuint MaxCombinedImageUniforms;
/** GL_ARB_compute_shader */
+ GLuint MaxComputeWorkGroupCount[3]; /* Array of x, y, z dimensions */
GLuint MaxComputeWorkGroupSize[3]; /* Array of x, y, z dimensions */
GLuint MaxComputeWorkGroupInvocations;
};