summaryrefslogtreecommitdiffstats
path: root/docs/target-compatibility.md
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-08-24 15:23:40 -0400
committerGitHub <noreply@github.com>2020-08-24 15:23:40 -0400
commit4804753d4a2ec389cc6ecd759f7ea712848fddf0 (patch)
tree0ac88b3da2aae7842cb8f71f55b79412716e8a60 /docs/target-compatibility.md
parent67ca54997d445e15891965b8d77561b9d10bb18c (diff)
RWByteAddressBuffer::InterlockedCompareExchangeU64 (#1513)
* First pass at incorporating nvapi into test harness. * D3d12 Atomic Float Add via NVAPI working * Dx12 atomic float appears to work. * Atomic float add on Dx12. * Added atomic64 feature addition to vk. Fix correct output for atomic-float-byte-address.slang * Disable atomic float failing tests. * Upgraded VK headers. * Detect atomic float availability on VK. * Try to get test working for in64 atomic. * Made HLSL prelude controlled via the render-test requirements. * Added -enable-nvapi to premake. * Fix D3D12Renderer when NVAPI is not available. * Small improvements to VKRenderer. * Improve atomic documentation in target-compatibility.md. * Fixed NVAPI working on D3D12. * Test for specific NVAPI features. * Remove requiredFeatures from Renderer::Desc as was ignored. Tried to document more around nvapiExtnSlot. * Readded requiredFeatures to Renderer::Desc * Improve comments in the tests. * Rename Fp32 -> F32 Added cas-int64-byte-address-buffer.slang test Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'docs/target-compatibility.md')
-rw-r--r--docs/target-compatibility.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/target-compatibility.md b/docs/target-compatibility.md
index f5b402af3..b6954aabe 100644
--- a/docs/target-compatibility.md
+++ b/docs/target-compatibility.md
@@ -185,11 +185,13 @@ For CPU targets there is the IFeedbackTexture interface that requires an impleme
Currently feature allows atomic float additions on RWByteAddressBuffer. A future update will broader types supported. There are methods on RWByteAddressBuffer...
```
-void RWByteAddressBuffer::InterlockedAddFp32(uint byteAddress, float valueToAdd, out float originalValue);
-void RWByteAddressBuffer::InterlockedAddFp32(uint byteAddress, float valueToAdd);
+void RWByteAddressBuffer::InterlockedAddF32(uint byteAddress, float valueToAdd, out float originalValue);
+void RWByteAddressBuffer::InterlockedAddF32(uint byteAddress, float valueToAdd);
void RWByteAddressBuffer::InterlockedAddI64(uint byteAddress, int64_t valueToAdd, out int64_t originalValue);
void RWByteAddressBuffer::InterlockedAddI64(uint byteAddress, int64_t valueToAdd);
+
+void RWByteAddressBuffer::InterlockedCompareExchangeU64(uint byteAddress, uint64_t compareValue, uint64_t value, out uint64_t outOriginalValue);
```
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.