logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

imageAtomicCompSwap - atomically compares supplied data with that in memory and conditionally stores it

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                                            │
       ├─────────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │ Name                │      │      │      │      │      │      │      │      │      │      │      │      │
       ├─────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ imageAtomicCompSwap │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │
       └─────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also