logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glDispatchCompute - launch one or more compute work groups

Associated Gets

glGet() with argument GL_MAX_COMPUTE_WORK_GROUP_COUNT

C Specification

voidglDispatchCompute(GLuintnum_groups_x,GLuintnum_groups_y,GLuintnum_groups_z);

Description

glDispatchCompute launches one or more compute work groups. Each work group is processed by the active
       program object for the compute shader stage. While the individual shader invocations within a work group
       are executed as a unit, work groups are executed completely independently and in unspecified order.
       num_groups_x, num_groups_y and num_groups_z specify the number of local work groups that will be
       dispatched in the X, Y and Z dimensions, respectively.

Errors

GL_INVALID_OPERATION is generated if there is no active program for the compute shader stage.

       GL_INVALID_VALUE is generated if any of num_groups_x, num_groups_y, or num_groups_z is greater than or
       equal to the maximum work-group count for the corresponding dimension.

Name

       glDispatchCompute - launch one or more compute work groups

Parameters

num_groups_x
           The number of work groups to be launched in the X dimension.

       num_groups_y
           The number of work groups to be launched in the Y dimension.

       num_groups_z
           The number of work groups to be launched in the Z dimension.

See Also

glDispatchComputeIndirect().

Version Support

       ┌───────────────────┬───────────────────────────────────────────────────────────────────────┐
       │                   │                OpenGLVersion                                         │
       ├───────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │ Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │ /                 │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Feature           │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Name              │     │     │     │     │     │     │     │     │     │     │     │     │
       ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glDispatchCompute │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  ✔  │  ✔  │  ✔  │
       └───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

See Also