imageAtomicCompSwap - atomically compares supplied data with that in memory and conditionally stores it
Contents
Copyright
Copyright © 2011-2014 Khronos Group
[FIXME: source] 11/18/2024 IMAGEATOMICCOMPSWAP(3G)
Declaration
uintimageAtomicCompSwap(gimage1Dimage,intP,uintcompare,uintdata);uintimageAtomicCompSwap(gimage2Dimage,ivec2P,uintcompare,uintdata);uintimageAtomicCompSwap(gimage3Dimage,ivec3P,uintcompare,uintdata);uintimageAtomicCompSwap(gimage2DRectimage,ivec2P,uintcompare,uintdata);uintimageAtomicCompSwap(gimageCubeimage,ivec3P,uintcompare,uintdata);uintimageAtomicCompSwap(gbufferImageimage,intP,uintcompare,uintdata);uintimageAtomicCompSwap(gimage1DArrayimage,ivec2P,uintcompare,uintdata);uintimageAtomicCompSwap(gimage2DArrayimage,ivec3P,uintcompare,uintdata);uintimageAtomicCompSwap(gimageCubeArrayimage,ivec3P,uintcompare,uintdata);uintimageAtomicCompSwap(gimage2DMSimage,ivec2P,intsample,uintcompare,uintdata);uintimageAtomicCompSwap(gimage2DMSArrayimage,ivec3P,intsample,uintcompare,uintdata);intimageAtomicCompSwap(gimage1Dimage,intP,intcompare,intdata);intimageAtomicCompSwap(gimage2Dimage,ivec2P,intcompare,intdata);intimageAtomicCompSwap(gimage3Dimage,ivec3P,intcompare,intdata);intimageAtomicCompSwap(gimage2DRectimage,ivec2P,intcompare,intdata);intimageAtomicCompSwap(gimageCubeimage,ivec3P,intcompare,intdata);intimageAtomicCompSwap(gbufferImageimage,intP,intcompare,intdata);intimageAtomicCompSwap(gimage1DArrayimage,ivec2P,intcompare,intdata);intimageAtomicCompSwap(gimage2DArrayimage,ivec3P,intcompare,intdata);intimageAtomicCompSwap(gimageCubeArrayimage,ivec3P,intcompare,intdata);intimageAtomicCompSwap(gimage2DMSimage,ivec2P,intsample,intcompare,intdata);intimageAtomicCompSwap(gimage2DMSArrayimage,ivec3P,intsample,intcompare,intdata);
Description
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.
Name
imageAtomicCompSwap - atomically compares supplied data with that in memory and conditionally stores it
to memory
Parameters
image
Specify the image unit into which to compare and conditionally store data.
P
Specify the coordinate at which to compare and conditionally store the data.
sample
When present, specifies the sample within the image to compare and conditionally store into.
compare
Specifies the value to compare with the content of the image.
data
Specifies the value to store in the image if compare is equal to the existing image content.
See Also
imageLoad(), imageStore(), imageAtomicAdd(), imageAtomicMin(), imageAtomicMax(), imageAtomicXor(),
imageAtomicOr(), imageAtomicAnd(), imageAtomicCompSwap()
Version Support
┌─────────────────────┬───────────────────────────────────────────────────────────────────────────────────┐
│ │ OpenGLShadingLanguageVersion │
├─────────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
│ Function │ 1.10 │ 1.20 │ 1.30 │ 1.40 │ 1.50 │ 3.30 │ 4.00 │ 4.10 │ 4.20 │ 4.30 │ 4.40 │ 4.50 │
│ Name │ │ │ │ │ │ │ │ │ │ │ │ │
├─────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
│ imageAtomicCompSwap │ - │ - │ - │ - │ - │ - │ - │ - │ ✔ │ ✔ │ ✔ │ ✔ │
└─────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
