diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-08-26 14:38:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-26 11:38:24 -0700 |
| commit | 2dc1f89fb069decb93dbe950fed9665453303550 (patch) | |
| tree | e80b20d002952b4531a563c4790a1aa506f5df16 /docs | |
| parent | b8702dfb6d0e41515fa0f9f899d86b7935dfc3fd (diff) | |
Added more Atomic support for int64 types on RWByteAddressBuffer (#1515)
* Support for more 64 bit atomics on ByteAddressBuffer.
* min max 64bit test.
* Disable CUDA version of min max 64 bit test - as produces the wrong output.
* Update target-compatibility.md with added 64 bit atomics.
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/target-compatibility.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/target-compatibility.md b/docs/target-compatibility.md index b6954aabe..182aada09 100644 --- a/docs/target-compatibility.md +++ b/docs/target-compatibility.md @@ -182,7 +182,7 @@ For CPU targets there is the IFeedbackTexture interface that requires an impleme ## RWByteAddressBuffer Atomic -Currently feature allows atomic float additions on RWByteAddressBuffer. A future update will broader types supported. There are methods on RWByteAddressBuffer... +The additional supported methods on RWByteAddressBuffer are... ``` void RWByteAddressBuffer::InterlockedAddF32(uint byteAddress, float valueToAdd, out float originalValue); @@ -192,6 +192,13 @@ void RWByteAddressBuffer::InterlockedAddI64(uint byteAddress, int64_t valueToAdd void RWByteAddressBuffer::InterlockedAddI64(uint byteAddress, int64_t valueToAdd); void RWByteAddressBuffer::InterlockedCompareExchangeU64(uint byteAddress, uint64_t compareValue, uint64_t value, out uint64_t outOriginalValue); + +uint64_t RWByteAddressBuffer::InterlockedMaxU64(uint byteAddress, uint64_t value); +uint64_t RWByteAddressBuffer::InterlockedMinU64(uint byteAddress, uint64_t value); + +uint64_t RWByteAddressBuffer::InterlockedAndU64(uint byteAddress, uint64_t value); +uint64_t RWByteAddressBuffer::InterlockedOrU64(uint byteAddress, uint64_t value); +uint64_t RWByteAddressBuffer::InterlockedXorU64(uint byteAddress, uint64_t value); ``` On HLSL based targets this functionality is achieved using [NVAPI](https://developer.nvidia.com/nvapi). For this to work it is necessary to have NVAPI available on your system. The 'prelude' functionality in the Slang API allows for text to be inserted before any Slang code generated code is output. If the input source uses an NVAPI feature - like the methods above - it will output code that *assumes* that `nvHLSLExtns.h` is included. The following code from `render-test-main.cpp` sets up a suitable prelude for HLSL that includes `nvHLSLExtns.h` with an absolute path. |
