nouveau/headers: add nvtypes.h
authorKarol Herbst <kherbst@redhat.com>
Tue, 31 May 2022 16:55:03 +0000 (18:55 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:53 +0000 (21:31 +0000)
Nvidia does provide an nvtypes.h file within their open-gpu-kernel-modules,
but that one is painful to port over to userspace.

Just provide the defines we will need instead.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/nvidia-headers/nvtypes.h [new file with mode: 0644]

diff --git a/src/nouveau/nvidia-headers/nvtypes.h b/src/nouveau/nvidia-headers/nvtypes.h
new file mode 100644 (file)
index 0000000..0ef6401
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _nvtypes_h_
+#define _nvtypes_h_
+
+#include <stdbool.h>
+#include <stdint.h>
+
+typedef bool NvBool;
+
+typedef uint8_t NvU8;
+typedef uint16_t NvU16;
+typedef uint32_t NvU32;
+typedef uint64_t NvU64;
+
+typedef int8_t NvS8;
+typedef int16_t NvS16;
+typedef int32_t NvS32;
+typedef int64_t NvS64;
+
+#endif