IMAGEATOMICCOMPSWAP(3G) | [FIXME: manual] | IMAGEATOMICCOMPSWAP(3G) |
imageAtomicCompSwap - atomically compares supplied data with that in memory and conditionally stores it to memory
uint imageAtomicCompSwap(gimage1D image, int P, uint compare, uint data);
uint imageAtomicCompSwap(gimage2D image, ivec2 P, uint compare, uint data);
uint imageAtomicCompSwap(gimage3D image, ivec3 P, uint compare, uint data);
uint imageAtomicCompSwap(gimage2DRect image, ivec2 P, uint compare, uint data);
uint imageAtomicCompSwap(gimageCube image, ivec3 P, uint compare, uint data);
uint imageAtomicCompSwap(gbufferImage image, int P, uint compare, uint data);
uint imageAtomicCompSwap(gimage1DArray image, ivec2 P, uint compare, uint data);
uint imageAtomicCompSwap(gimage2DArray image, ivec3 P, uint compare, uint data);
uint imageAtomicCompSwap(gimageCubeArray image, ivec3 P, uint compare, uint data);
uint imageAtomicCompSwap(gimage2DMS image, ivec2 P, int sample, uint compare, uint data);
uint imageAtomicCompSwap(gimage2DMSArray image, ivec3 P, int sample, uint compare, uint data);
int imageAtomicCompSwap(gimage1D image, int P, int compare, int data);
int imageAtomicCompSwap(gimage2D image, ivec2 P, int compare, int data);
int imageAtomicCompSwap(gimage3D image, ivec3 P, int compare, int data);
int imageAtomicCompSwap(gimage2DRect image, ivec2 P, int compare, int data);
int imageAtomicCompSwap(gimageCube image, ivec3 P, int compare, int data);
int imageAtomicCompSwap(gbufferImage image, int P, int compare, int data);
int imageAtomicCompSwap(gimage1DArray image, ivec2 P, int compare, int data);
int imageAtomicCompSwap(gimage2DArray image, ivec3 P, int compare, int data);
int imageAtomicCompSwap(gimageCubeArray image, ivec3 P, int compare, int data);
int imageAtomicCompSwap(gimage2DMS image, ivec2 P, int sample, int compare, int data);
int imageAtomicCompSwap(gimage2DMSArray image, ivec3 P, int sample, int compare, int data);
image
P
sample
compare
data
imageAtomicCompSwap atomically compares the value of compare with that of the texel at coordinate P and sample (for multisampled forms) in the image bound to uint image. If the values are equal, data is stored into the texel, otherwise it is discarded. It returns the original value of the texel regardless of the result of the comparison operation.
OpenGL Shading Language Version | ||||||||||||
Function Name | 1.10 | 1.20 | 1.30 | 1.40 | 1.50 | 3.30 | 4.00 | 4.10 | 4.20 | 4.30 | 4.40 | 4.50 |
imageAtomicCompSwap | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ |
imageLoad(), imageStore(), imageAtomicAdd(), imageAtomicMin(), imageAtomicMax(), imageAtomicXor(), imageAtomicOr(), imageAtomicAnd(), imageAtomicCompSwap()
Copyright © 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
Copyright © 2011-2014 Khronos Group
01/03/2018 | [FIXME: source] |