summaryrefslogtreecommitdiffstats
path: root/docs/cuda-target.md
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-01-27 15:04:29 -0500
committerGitHub <noreply@github.com>2020-01-27 15:04:29 -0500
commita9e1beeb003644f4034b9485ad00e273ad52c9f1 (patch)
treeb93ef4d3e3c972798f6a76a4bdd0d6d4c369924c /docs/cuda-target.md
parentd98a2b75c9b4a31de0ebfb1084a68b5be5ede17d (diff)
CUDA implement StructuredBuffer/ByteAddressBuffer as pointer/count as is on CPU. (#1182)
Allow bounds check to zero index. Update docs.
Diffstat (limited to 'docs/cuda-target.md')
-rw-r--r--docs/cuda-target.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/cuda-target.md b/docs/cuda-target.md
index 41fc98790..01803c145 100644
--- a/docs/cuda-target.md
+++ b/docs/cuda-target.md
@@ -69,7 +69,7 @@ struct UniformState
{
CUtexObject tex; // This is the combination of a texture and a sampler(!)
SamplerState sampler; // This variable exists within the layout, but it's value is not used.
- int32_t* outputBuffer; // Currently Structured buffers are converted to pointers - this will likely change in the future (for bounds checking and other reasons)
+ RWStructuredBuffer<int32_t> outputBuffer; // This is implemented as a template in the CUDA prelude. It's just a pointer, and a size
Thing* thing3; // Constant buffers map to pointers
};
@@ -81,6 +81,20 @@ With CUDA - the caller specifies how threading is broken up, so `[numthreads]` i
The UniformState and UniformEntryPointParams struct typically vary by shader. UniformState holds 'normal' bindings, whereas UniformEntryPointParams hold the uniform entry point parameters. Where specific bindings or parameters are located can be determined by reflection. The structures for the example above would be something like the following...
+`StructuredBuffer<T>`,`RWStructuredBuffer<T>` become
+
+```
+ T* data;
+ size_t count;
+```
+
+`ByteAddressBuffer`, `RWByteAddressBuffer` become
+
+```
+ uint32_t* data;
+ size_t sizeInBytes;
+```
+
## Unsized arrays
WIP: Not implemented yet.