aboutsummaryrefslogtreecommitdiff
path: root/include/cuda.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-03 03:47:30 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-08 11:34:36 +0100
commitd0c221a233e0bc07e22cffb06ec3ae77a5f96010 (patch)
tree154ad68ce13a71541bf6667f933194e313237dc1 /include/cuda.h
parent4d8a9e2e1d7d257aeff0497b6550df82f60bc0e8 (diff)
Refactor kms_vaapi and kms_cuda
Also fixes color metadata, color range and hdr on nvidia wayland.
Diffstat (limited to 'include/cuda.h')
-rw-r--r--include/cuda.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/cuda.h b/include/cuda.h
index 41fe15b..fd1f9f9 100644
--- a/include/cuda.h
+++ b/include/cuda.h
@@ -73,7 +73,8 @@ typedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D;
typedef struct CUgraphicsResource_st *CUgraphicsResource;
-typedef struct {
+typedef struct gsr_cuda gsr_cuda;
+struct gsr_cuda {
gsr_overclock overclock;
bool do_overclock;
@@ -88,8 +89,9 @@ typedef struct {
CUresult (*cuCtxPushCurrent_v2)(CUcontext ctx);
CUresult (*cuCtxPopCurrent_v2)(CUcontext *pctx);
CUresult (*cuGetErrorString)(CUresult error, const char **pStr);
- CUresult (*cuMemsetD8_v2)(CUdeviceptr dstDevice, unsigned char uc, size_t N);
CUresult (*cuMemcpy2D_v2)(const CUDA_MEMCPY2D *pCopy);
+ CUresult (*cuMemcpy2DAsync_v2)(const CUDA_MEMCPY2D *pcopy, CUstream hStream);
+ CUresult (*cuStreamSynchronize)(CUstream hStream);
CUresult (*cuGraphicsGLRegisterImage)(CUgraphicsResource *pCudaResource, unsigned int image, unsigned int target, unsigned int flags);
CUresult (*cuGraphicsEGLRegisterImage)(CUgraphicsResource *pCudaResource, void *image, unsigned int flags);
@@ -98,7 +100,7 @@ typedef struct {
CUresult (*cuGraphicsUnmapResources)(unsigned int count, CUgraphicsResource *resources, CUstream hStream);
CUresult (*cuGraphicsUnregisterResource)(CUgraphicsResource resource);
CUresult (*cuGraphicsSubResourceGetMappedArray)(CUarray *pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel);
-} gsr_cuda;
+};
bool gsr_cuda_load(gsr_cuda *self, Display *display, bool overclock);
void gsr_cuda_unload(gsr_cuda *self);