diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2019-07-12 15:54:17 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2019-08-06 17:40:34 -0400 |
commit | 8b6bfed3d254f2652f7f416384e2f2ffc27dc8ba (patch) | |
tree | a26fa6231c91a87596f1b6d0848311be36650ffe /src/gallium/docs | |
parent | 1d8a71af5732ff3df4ae75639a1fd4076e44d30c (diff) |
tgsi: add ATOMICINC_WRAP/ATOMICDEC_WRAP opcode
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/docs')
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 59410cfd663..17ad097e85e 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -2834,6 +2834,36 @@ These atomic operations may only be used with 32-bit integer image formats. resource[offset] = (dst_x > src_x ? dst_x : src_x) +.. opcode:: ATOMINC_WRAP - Atomic increment + wrap around + + Syntax: ``ATOMINC_WRAP dst, resource, offset, src`` + + Example: ``ATOMINC_WRAP TEMP[0], BUFFER[0], TEMP[1], TEMP[2]`` + + The following operation is performed atomically: + +.. math:: + + dst_x = resource[offset] + 1 + + resource[offset] = dst_x < src_x ? dst_x : 0 + + +.. opcode:: ATOMDEC_WRAP - Atomic decrement + wrap around + + Syntax: ``ATOMDEC_WRAP dst, resource, offset, src`` + + Example: ``ATOMDEC_WRAP TEMP[0], BUFFER[0], TEMP[1], TEMP[2]`` + + The following operation is performed atomically: + +.. math:: + + dst_x = resource[offset] + + resource[offset] = (dst_x > 0 && dst_x < src_x) ? dst_x - 1 : 0 + + .. _interlaneopcodes: Inter-lane opcodes |