summaryrefslogtreecommitdiff
path: root/prelude
diff options
context:
space:
mode:
Diffstat (limited to 'prelude')
-rw-r--r--prelude/slang-cuda-prelude.h11
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;