Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="imageAtomicCompSwap">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2011</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>imageAtomicCompSwap</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>imageAtomicCompSwap</refname>\r | |
17 | <refpurpose>atomically compares supplied data with that in memory and conditionally stores it to memory</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>Declaration</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
23 | <paramdef>gimage1D <parameter>image</parameter></paramdef>\r | |
24 | <paramdef>int <parameter>P</parameter></paramdef>\r | |
25 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
26 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
27 | </funcprototype>\r | |
28 | <funcprototype>\r | |
29 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
30 | <paramdef>gimage2D <parameter>image</parameter></paramdef>\r | |
31 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
32 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
33 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
34 | </funcprototype>\r | |
35 | <funcprototype>\r | |
36 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
37 | <paramdef>gimage3D <parameter>image</parameter></paramdef>\r | |
38 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
39 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
40 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
41 | </funcprototype>\r | |
42 | <funcprototype>\r | |
43 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
44 | <paramdef>gimage2DRect <parameter>image</parameter></paramdef>\r | |
45 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
46 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
47 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
48 | </funcprototype>\r | |
49 | <funcprototype>\r | |
50 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
51 | <paramdef>gimageCube <parameter>image</parameter></paramdef>\r | |
52 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
53 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
54 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
55 | </funcprototype>\r | |
56 | <funcprototype>\r | |
57 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
58 | <paramdef>gbufferImage <parameter>image</parameter></paramdef>\r | |
59 | <paramdef>int <parameter>P</parameter></paramdef>\r | |
60 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
61 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
62 | </funcprototype>\r | |
63 | <funcprototype>\r | |
64 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
65 | <paramdef>gimage1DArray <parameter>image</parameter></paramdef>\r | |
66 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
67 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
68 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
69 | </funcprototype>\r | |
70 | <funcprototype>\r | |
71 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
72 | <paramdef>gimage2DArray <parameter>image</parameter></paramdef>\r | |
73 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
74 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
75 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
76 | </funcprototype>\r | |
77 | <funcprototype>\r | |
78 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
79 | <paramdef>gimageCubeArray <parameter>image</parameter></paramdef>\r | |
80 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
81 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
82 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
83 | </funcprototype>\r | |
84 | <funcprototype>\r | |
85 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
86 | <paramdef>gimage2DMS <parameter>image</parameter></paramdef>\r | |
87 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
88 | <paramdef>int <parameter>sample</parameter></paramdef>\r | |
89 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
90 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
91 | </funcprototype>\r | |
92 | <funcprototype>\r | |
93 | <funcdef>uint <function>imageAtomicCompSwap</function></funcdef>\r | |
94 | <paramdef>gimage2DMSArray <parameter>image</parameter></paramdef>\r | |
95 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
96 | <paramdef>int <parameter>sample</parameter></paramdef>\r | |
97 | <paramdef>uint <parameter>compare</parameter></paramdef>\r | |
98 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
99 | </funcprototype>\r | |
100 | <funcprototype>\r | |
101 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
102 | <paramdef>gimage1D <parameter>image</parameter></paramdef>\r | |
103 | <paramdef>int <parameter>P</parameter></paramdef>\r | |
104 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
105 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
106 | </funcprototype>\r | |
107 | <funcprototype>\r | |
108 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
109 | <paramdef>gimage2D <parameter>image</parameter></paramdef>\r | |
110 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
111 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
112 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
113 | </funcprototype>\r | |
114 | <funcprototype>\r | |
115 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
116 | <paramdef>gimage3D <parameter>image</parameter></paramdef>\r | |
117 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
118 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
119 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
120 | </funcprototype>\r | |
121 | <funcprototype>\r | |
122 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
123 | <paramdef>gimage2DRect <parameter>image</parameter></paramdef>\r | |
124 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
125 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
126 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
127 | </funcprototype>\r | |
128 | <funcprototype>\r | |
129 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
130 | <paramdef>gimageCube <parameter>image</parameter></paramdef>\r | |
131 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
132 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
133 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
134 | </funcprototype>\r | |
135 | <funcprototype>\r | |
136 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
137 | <paramdef>gbufferImage <parameter>image</parameter></paramdef>\r | |
138 | <paramdef>int <parameter>P</parameter></paramdef>\r | |
139 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
140 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
141 | </funcprototype>\r | |
142 | <funcprototype>\r | |
143 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
144 | <paramdef>gimage1DArray <parameter>image</parameter></paramdef>\r | |
145 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
146 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
147 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
148 | </funcprototype>\r | |
149 | <funcprototype>\r | |
150 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
151 | <paramdef>gimage2DArray <parameter>image</parameter></paramdef>\r | |
152 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
153 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
154 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
155 | </funcprototype>\r | |
156 | <funcprototype>\r | |
157 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
158 | <paramdef>gimageCubeArray <parameter>image</parameter></paramdef>\r | |
159 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
160 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
161 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
162 | </funcprototype>\r | |
163 | <funcprototype>\r | |
164 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
165 | <paramdef>gimage2DMS <parameter>image</parameter></paramdef>\r | |
166 | <paramdef>ivec2 <parameter>P</parameter></paramdef>\r | |
167 | <paramdef>int <parameter>sample</parameter></paramdef>\r | |
168 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
169 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
170 | </funcprototype>\r | |
171 | <funcprototype>\r | |
172 | <funcdef>int <function>imageAtomicCompSwap</function></funcdef>\r | |
173 | <paramdef>gimage2DMSArray <parameter>image</parameter></paramdef>\r | |
174 | <paramdef>ivec3 <parameter>P</parameter></paramdef>\r | |
175 | <paramdef>int <parameter>sample</parameter></paramdef>\r | |
176 | <paramdef>int <parameter>compare</parameter></paramdef>\r | |
177 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
178 | </funcprototype>\r | |
179 | </funcsynopsis>\r | |
180 | </refsynopsisdiv>\r | |
181 | <refsect1 id="parameters"><title>Parameters</title>\r | |
182 | <variablelist>\r | |
183 | <varlistentry>\r | |
184 | <term><parameter>image</parameter></term>\r | |
185 | <listitem>\r | |
186 | <para>\r | |
187 | Specify the image unit into which to compare and conditionally store <parameter>data</parameter>.\r | |
188 | </para>\r | |
189 | </listitem>\r | |
190 | </varlistentry>\r | |
191 | <varlistentry>\r | |
192 | <term><parameter>P</parameter></term>\r | |
193 | <listitem>\r | |
194 | <para>\r | |
195 | Specify the coordinate at which to compare and conditionally store the data.\r | |
196 | </para>\r | |
197 | </listitem>\r | |
198 | </varlistentry>\r | |
199 | <varlistentry>\r | |
200 | <term><parameter>sample</parameter></term>\r | |
201 | <listitem>\r | |
202 | <para>\r | |
203 | When present, specifies the sample within the image to compare and conditionally store into.\r | |
204 | </para>\r | |
205 | </listitem>\r | |
206 | </varlistentry>\r | |
207 | <varlistentry>\r | |
208 | <term><parameter>compare</parameter></term>\r | |
209 | <listitem>\r | |
210 | <para>\r | |
211 | Specifies the value to compare with the content of the image.\r | |
212 | </para>\r | |
213 | </listitem>\r | |
214 | </varlistentry>\r | |
215 | <varlistentry>\r | |
216 | <term><parameter>data</parameter></term>\r | |
217 | <listitem>\r | |
218 | <para>\r | |
219 | Specifies the value to store in the image if <parameter>compare</parameter> is equal to the existing image content.\r | |
220 | </para>\r | |
221 | </listitem>\r | |
222 | </varlistentry>\r | |
223 | </variablelist>\r | |
224 | </refsect1>\r | |
225 | <refsect1 id="description"><title>Description</title>\r | |
226 | <para>\r | |
227 | <function>imageAtomicCompSwap</function> atomically compares the value of <parameter>compare</parameter>\r | |
228 | with that of the texel at coordinate <parameter>P</parameter> and <parameter>sample</parameter> (for multisampled forms) in the\r | |
229 | image bound to uint <parameter>image</parameter>. If the values are equal, <parameter>data</parameter> is\r | |
230 | stored into the texel, otherwise it is discarded. It returns the original value of the texel regardless of\r | |
231 | the result of the comparison operation.\r | |
232 | </para>\r | |
233 | </refsect1>\r | |
234 | <refsect1 id="versions"><title>Version Support</title>\r | |
235 | <informaltable frame="topbot">\r | |
236 | #VARTABLECOLS#\r | |
237 | <thead>\r | |
238 | #FUNCTABLEHEADER#\r | |
239 | <row>\r | |
240 | <entry>imageAtomicCompSwap</entry>#newin42#\r | |
241 | </row>\r | |
242 | </thead>\r | |
243 | </tgroup>\r | |
244 | </informaltable>\r | |
245 | </refsect1>\r | |
246 | <refsect1 id="seealso"><title>See Also</title>\r | |
247 | <para>\r | |
248 | <citerefentry><refentrytitle>imageLoad</refentrytitle></citerefentry>,\r | |
249 | <citerefentry><refentrytitle>imageStore</refentrytitle></citerefentry>,\r | |
250 | <citerefentry><refentrytitle>imageAtomicAdd</refentrytitle></citerefentry>,\r | |
251 | <citerefentry><refentrytitle>imageAtomicMin</refentrytitle></citerefentry>,\r | |
252 | <citerefentry><refentrytitle>imageAtomicMax</refentrytitle></citerefentry>,\r | |
253 | <citerefentry><refentrytitle>imageAtomicXor</refentrytitle></citerefentry>,\r | |
254 | <citerefentry><refentrytitle>imageAtomicOr</refentrytitle></citerefentry>,\r | |
255 | <citerefentry><refentrytitle>imageAtomicAnd</refentrytitle></citerefentry>,\r | |
256 | <citerefentry><refentrytitle>imageAtomicCompSwap</refentrytitle></citerefentry>\r | |
257 | </para>\r | |
258 | </refsect1>\r | |
259 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
260 | <para>\r | |
261 | Copyright <trademark class="copyright"></trademark> 2011-2012 Khronos Group. \r | |
262 | This material may be distributed subject to the terms and conditions set forth in \r | |
263 | the Open Publication License, v 1.0, 8 June 1999.\r | |
264 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
265 | </para>\r | |
266 | </refsect1>\r | |
267 | </refentry>\r |