06f7a5964ab5b33164dc678867a847e222807e65
[clinton/guile-figl.git] / upstream-man-pages / man4 / glDispatchCompute.xml
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">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2012</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glDispatchCompute</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glDispatchCompute</refname>
17 <refpurpose>launch one or more compute work groups</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
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>
26 </funcprototype>
27 </funcsynopsis>
28 </refsynopsisdiv>
29 <refsect1 id="parameters"><title>Parameters</title>
30 <variablelist>
31 <varlistentry>
32 <term><parameter>num_groups_x</parameter></term>
33 <listitem>
34 <para>
35 The number of work groups to be launched in the X dimension.
36 </para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>num_groups_y</parameter></term>
41 <listitem>
42 <para>
43 The number of work groups to be launched in the Y dimension.
44 </para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term><parameter>num_groups_z</parameter></term>
49 <listitem>
50 <para>
51 The number of work groups to be launched in the Z dimension.
52 </para>
53 </listitem>
54 </varlistentry>
55 </variablelist>
56 </refsect1>
57 <refsect1 id="description"><title>Description</title>
58 <para>
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.
66 </para>
67 </refsect1>
68 <refsect1 id="errors"><title>Errors</title>
69 <para>
70 <constant>GL_INVALID_OPERATION</constant> is generated if there is no active program
71 for the compute shader stage.
72 </para>
73 <para>
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.
77 </para>
78 </refsect1>
79 <refsect1 id="associatedgets"><title>Associated Gets</title>
80 <para>
81 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_COMPUTE_WORK_GROUP_COUNT</constant>
82 </para>
83 </refsect1>
84 <refsect1 id="seealso"><title>See Also</title>
85 <para>
86 <citerefentry><refentrytitle>glDispatchComputeIndirect</refentrytitle></citerefentry>.
87 </para>
88 </refsect1>
89 <refsect1 id="Copyright"><title>Copyright</title>
90 <para>
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>.
95 </para>
96 </refsect1>
97 </refentry>