diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-01-24 15:06:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-24 15:06:08 -0500 |
| commit | b8f294445b998eadb9b09e2b91eb462b881eaf2e (patch) | |
| tree | 8607e5d2f6c2c2b4b7545a721d6d58e6e557e5c0 /prelude | |
| parent | 394983d61efa2bf99ba96aa68a47df8927a8a634 (diff) | |
Texture Sample available in CUDA (#1176)
* WIP: Trying to figure out how texturing will work with CUDA.
* WIP: Fixes for CUDA layout. Initial CUDA texture test.
* WIP: Outputs something compilable by CUDA for TextureND.Sample
* 2d texture working with CUDA.
* Fix how binding for SamplerState occurs in CUDA.
* Small tidy up of comments.
Diffstat (limited to 'prelude')
| -rw-r--r-- | prelude/slang-cuda-prelude.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/prelude/slang-cuda-prelude.h b/prelude/slang-cuda-prelude.h index f78814486..28e423b31 100644 --- a/prelude/slang-cuda-prelude.h +++ b/prelude/slang-cuda-prelude.h @@ -19,6 +19,17 @@ struct FixedArray T m_data[SIZE]; }; +// Typically defined in cuda.h, but we can't ship/rely on that, so just define here +typedef unsigned long long CUtexObject; +typedef unsigned long long CUsurfObject; + +// On CUDA sampler state is actually bound up with the texture object. We have a SamplerState type, +// backed as a pointer, to simplify code generation, with the downside that such a binding will take up +// uniform space, even though it will have no effect. +// TODO(JS): Consider ways to strip use of variables of this type so have no binding, +struct SamplerStateUnused; +typedef SamplerStateUnused* SamplerState; + // Code generator will generate the specific type template <typename T, int ROWS, int COLS> struct Matrix; |
