1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glDispatchCompute">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glDispatchCompute
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glDispatchCompute
</refname>
17 <refpurpose>launch one or more compute work groups
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glDispatchCompute
</function></funcdef>
23 <paramdef>GLuint
<parameter>num_groups_x
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>num_groups_y
</parameter></paramdef>
25 <paramdef>GLuint
<parameter>num_groups_z
</parameter></paramdef>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>num_groups_x
</parameter></term>
35 The number of work groups to be launched in the X dimension.
40 <term><parameter>num_groups_y
</parameter></term>
43 The number of work groups to be launched in the Y dimension.
48 <term><parameter>num_groups_z
</parameter></term>
51 The number of work groups to be launched in the Z dimension.
57 <refsect1 id=
"description"><title>Description
</title>
59 <function>glDispatchCompute
</function> launches one or more compute
60 work groups. Each work group is processed by the active program object for the compute
61 shader stage. While the individual shader invocations within a work group are
62 executed as a unit, work groups are executed completely independently and in
63 unspecified order.
<parameter>num_groups_x
</parameter>,
<parameter>num_groups_y
</parameter>
64 and
<parameter>num_groups_z
</parameter> specify the number of local
65 work groups that will be dispatched in the X, Y and Z dimensions, respectively.
68 <refsect1 id=
"errors"><title>Errors
</title>
70 <constant>GL_INVALID_OPERATION
</constant> is generated if there is no active program
71 for the compute shader stage.
74 <constant>GL_INVALID_VALUE
</constant> is generated if any of
<parameter>num_groups_x
</parameter>,
75 <parameter>num_groups_y
</parameter>, or
<parameter>num_groups_z
</parameter> is greater than or
76 equal to the maximum work-group count for the corresponding dimension.
79 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
81 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_COMPUTE_WORK_GROUP_COUNT
</constant>
84 <refsect1 id=
"seealso"><title>See Also
</title>
86 <citerefentry><refentrytitle>glDispatchComputeIndirect
</refentrytitle></citerefentry>.
89 <refsect1 id=
"Copyright"><title>Copyright
</title>
91 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
92 This material may be distributed subject to the terms and conditions set forth in
93 the Open Publication License, v
1.0,
8 June
1999.
94 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.