logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

imageAtomicAdd - atomically add a value to an existing value in memory and return the original value

Declaration

uintimageAtomicAdd(gimage1Dimage,intP,uintdata);uintimageAtomicAdd(gimage2Dimage,ivec2P,uintdata);uintimageAtomicAdd(gimage3Dimage,ivec3P,uintdata);uintimageAtomicAdd(gimage2DRectimage,ivec2P,uintdata);uintimageAtomicAdd(gimageCubeimage,ivec3P,uintdata);uintimageAtomicAdd(gbufferImageimage,intP,uintdata);uintimageAtomicAdd(gimage1DArrayimage,ivec2P,uintdata);uintimageAtomicAdd(gimage2DArrayimage,ivec3P,uintdata);uintimageAtomicAdd(gimageCubeArrayimage,ivec3P,uintdata);uintimageAtomicAdd(gimage2DMSimage,ivec2P,intsample,uintdata);uintimageAtomicAdd(gimage2DMSArrayimage,ivec3P,intsample,uintdata);intimageAtomicAdd(gimage1Dimage,intP,intdata);intimageAtomicAdd(gimage2Dimage,ivec2P,intdata);intimageAtomicAdd(gimage3Dimage,ivec3P,intdata);intimageAtomicAdd(gimage2DRectimage,ivec2P,intdata);intimageAtomicAdd(gimageCubeimage,ivec3P,intdata);intimageAtomicAdd(gbufferImageimage,intP,intdata);intimageAtomicAdd(gimage1DArrayimage,ivec2P,intdata);intimageAtomicAdd(gimage2DArrayimage,ivec3P,intdata);intimageAtomicAdd(gimageCubeArrayimage,ivec3P,intdata);intimageAtomicAdd(gimage2DMSimage,ivec2P,intsample,intdata);intimageAtomicAdd(gimage2DMSArrayimage,ivec3P,intsample,intdata);

Description

imageAtomicAdd atomically computes a new value by adding the value of data to the contents of the texel
       at coordinate P and sample in the image bound to uint image, stores that value into the image and returns
       the original value.

Name

       imageAtomicAdd - atomically add a value to an existing value in memory and return the original value

Parameters

image
           Specify the image unit into which to add data.

       P
           Specify the coordinate at which to add the data.

       sample
           When present, specifies the sample within the image to add into.

       data
           Specifies the data to add into the image.

See Also

imageLoad(), imageStore(), imageAtomicMin(), imageAtomicMax(), imageAtomicAnd(), imageAtomicOr(),
       imageAtomicXor(), imageAtomicExchange(), imageAtomicCompSwap()

Version Support

       ┌────────────────┬───────────────────────────────────────────────────────────────────────────────────┐
       │                │        OpenGLShadingLanguageVersion                                            │
       ├────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │ Name           │      │      │      │      │      │      │      │      │      │      │      │      │
       ├────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ imageAtomicAdd │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │
       └────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also