IMAGEATOMICAND(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

πŸ’– IMAGEATOMICAND β€” the imageAtomicAnd tea, served fresh πŸ’–

okay bestie, pull up a chair because we're talking about imageAtomicAnd from the OpenGL Shading Language family, manual section 3G. she's an atomic queen and she's here to AND your values together without any race-condition drama. no cap. πŸŽ€


🌸 NAME 🌸

imageAtomicAnd β€” atomically compute the logical AND of a value with an existing value in memory, store that value and return the original value.

periodt. that's the whole vibe. πŸ’…


✨ DECLARATION ✨

here's the full roster of glow-ups β€” every single signature, no skips, no cuts, because we don't gatekeep:

uint imageAtomicAnd(gimage1D image, int P, uint data);

uint imageAtomicAnd(gimage2D image, ivec2 P, uint data);

uint imageAtomicAnd(gimage3D image, ivec3 P, uint data);

uint imageAtomicAnd(gimage2DRect image, ivec2 P, uint data);

uint imageAtomicAnd(gimageCube image, ivec3 P, uint data);

uint imageAtomicAnd(gbufferImage image, int P, uint data);

uint imageAtomicAnd(gimage1DArray image, ivec2 P, uint data);

uint imageAtomicAnd(gimage2DArray image, ivec3 P, uint data);

uint imageAtomicAnd(gimageCubeArray image, ivec3 P, uint data);

uint imageAtomicAnd(gimage2DMS image, ivec2 P, int sample, uint data);

uint imageAtomicAnd(gimage2DMSArray image, ivec3 P, int sample,
                    uint data);

int imageAtomicAnd(gimage1D image, int P, int data);

int imageAtomicAnd(gimage2D image, ivec2 P, int data);

int imageAtomicAnd(gimage3D image, ivec3 P, int data);

int imageAtomicAnd(gimage2DRect image, ivec2 P, int data);

int imageAtomicAnd(gimageCube image, ivec3 P, int data);

int imageAtomicAnd(gbufferImage image, int P, int data);

int imageAtomicAnd(gimage1DArray image, ivec2 P, int data);

int imageAtomicAnd(gimage2DArray image, ivec3 P, int data);

int imageAtomicAnd(gimageCubeArray image, ivec3 P, int data);

int imageAtomicAnd(gimage2DMS image, ivec2 P, int sample, int data);

int imageAtomicAnd(gimage2DMSArray image, ivec3 P, int sample,
                   int data);

the way she has a uint version AND an int version?? versatile icon behavior, honestly. πŸ‘‘


πŸ¦‹ PARAMETERS πŸ¦‹

  • image β€” the image unit you're storing data into. like, where the magic happens. ✨
  • P β€” the coordinate at which to store the data. this is the spot, the location, the address of the whole situation. πŸ“
  • sample β€” when she shows up, she specifies the sample within the image to store into. present only in the multisample forms, iykyk.
  • data β€” the data to logically AND into the image. she's the guest of honor. 🫢

πŸ’œ DESCRIPTION πŸ’œ

so here's what's going down, bestie:

imageAtomicAnd atomically computes a new value by logically ANDing 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.

like β€” she does the AND, she writes the result, and she hands you back what was there before. atomic means no other thread can sneak in mid-operation and mess with your math. it's giving main character energy with impeccable boundaries. πŸ’…βœ¨


⭐ VERSION SUPPORT ⭐

the original page has this as a big fancy table, but tables are not the vibe here so we're laying it out as a list. same facts, cuter delivery:

Function name: imageAtomicAnd

the columns are OpenGL Shading Language Version:

  • 1.10 β€” - (nope, not yet babe)
  • 1.20 β€” -
  • 1.30 β€” -
  • 1.40 β€” -
  • 1.50 β€” -
  • 3.30 β€” -
  • 4.00 β€” -
  • 4.10 β€” -
  • 4.20 β€” βœ” (she's HERE πŸ’–)
  • 4.30 β€” βœ”
  • 4.40 β€” βœ”
  • 4.50 β€” βœ”

so from 4.20 onward she's fully supported, and before that it's just dashes. glow-up era started at 4.20 and she never looked back. 🌈


🌸 SEE ALSO 🌸

go give these girlies some love too, they're all in the same friend group:

imageLoad(), imageStore(), imageAtomicAdd(), imageAtomicMin(), imageAtomicMax(), imageAtomicOr(), imageAtomicXor(), imageAtomicExchange(), 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


quick reminder bestie: everything above is the real spec, verbatim where it counts β€” I just wrapped it in glitter. don't come for me, come for the texels. πŸ’–

and that's the whole page, fr fr. this came from the [FIXME: source] build, dated 01/03/2018, sitting in manual section IMAGEATOMICAND(3G). go forth and AND atomically, queen. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from