b3839189fa7208c6be6b6832f988f8aea60ed98e
[clinton/guile-figl.git] / upstream-man-pages / manglsl / memoryBarrier.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="memoryBarrier">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>memoryBarrier</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>memoryBarrier</refname>
17 <refpurpose>controls the ordering of memory transactions issued by a single shader invocation</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>uint <function>memoryBarrier</function></funcdef>
23 <paramdef>void</paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="description"><title>Description</title>
28 <para>
29 <function>memoryBarrier</function> waits on the completion of all memory accesses resulting from the use of
30 image variables or atomic counters and then returns with no other effect. When this function returns, the
31 results of any memory stores performed using coherent variables performed prior to the call will be visible
32 to any future coherent memory access to the same addresses from other shader invocations. In particular,
33 the values written this way in one shader stage are guaranteed to be visible to coherent memory accesses
34 performed by shader invocations in subsequent stages when those invocations were triggered by the
35 execution of the original shader invocation (e.g., fragment shader invocations for a primitive resulting
36 from a particular geometry shader invocation).
37 </para>
38 </refsect1>
39 <refsect1 id="versions"><title>Version Support</title>
40 <informaltable frame="topbot">
41 #VARTABLECOLS#
42 <thead>
43 #FUNCTABLEHEADER#
44 <row>
45 <entry>memoryBarrier</entry>#newin40#
46 </row>
47 </thead>
48 </tgroup>
49 </informaltable>
50 </refsect1>
51 <refsect1 id="seealso"><title>See Also</title>
52 <para>
53 <citerefentry><refentrytitle>imageLoad</refentrytitle></citerefentry>,
54 <citerefentry><refentrytitle>imageStore</refentrytitle></citerefentry>,
55 <citerefentry><refentrytitle>imageAtomicAdd</refentrytitle></citerefentry>,
56 <citerefentry><refentrytitle>imageAtomicMin</refentrytitle></citerefentry>,
57 <citerefentry><refentrytitle>imageAtomicMax</refentrytitle></citerefentry>,
58 <citerefentry><refentrytitle>imageAtomicXor</refentrytitle></citerefentry>,
59 <citerefentry><refentrytitle>imageAtomicOr</refentrytitle></citerefentry>,
60 <citerefentry><refentrytitle>imageAtomicAnd</refentrytitle></citerefentry>,
61 <citerefentry><refentrytitle>imageAtomicExchange</refentrytitle></citerefentry>,
62 <citerefentry><refentrytitle>imageAtomicCompSwap</refentrytitle></citerefentry>,
63 <citerefentry><refentrytitle>memoryBarrier</refentrytitle></citerefentry>
64 </para>
65 </refsect1>
66 <refsect1 id="Copyright"><title>Copyright</title>
67 <para>
68 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
69 This material may be distributed subject to the terms and conditions set forth in
70 the Open Publication License, v 1.0, 8 June 1999.
71 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
72 </para>
73 </refsect1>
74 </refentry>