diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-03-17 17:17:14 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-03-17 17:17:14 +0100 |
commit | 93cb6593a642018e3373fb7099e1c0687b367176 (patch) | |
tree | 63d24dc3a9a03e71857ef793929f6000f75cc3db /include/cuda.h | |
parent | 8cbdb596ebf79587a432ed40583630b6cd39ed88 (diff) |
Add overclocking option -oc to workaround a NVIDIA driver bug (forcefully set to p2 state when using cuda)
Diffstat (limited to 'include/cuda.h')
-rw-r--r-- | include/cuda.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/cuda.h b/include/cuda.h index cefdcad..ab07429 100644 --- a/include/cuda.h +++ b/include/cuda.h @@ -1,12 +1,15 @@ #ifndef GSR_CUDA_H #define GSR_CUDA_H +#include "overclock.h" #include <stddef.h> #include <stdbool.h> // To prevent hwcontext_cuda.h from including cuda.h #define CUDA_VERSION 11070 +#define CU_CTX_SCHED_AUTO 0 + #if defined(_WIN64) || defined(__LP64__) typedef unsigned long long CUdeviceptr_v2; #else @@ -68,11 +71,12 @@ typedef struct CUDA_MEMCPY2D_st { } CUDA_MEMCPY2D_v2; typedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D; -#define CU_CTX_SCHED_AUTO 0 - typedef struct CUgraphicsResource_st *CUgraphicsResource; typedef struct { + gsr_overclock overclock; + bool do_overclock; + void *library; CUcontext cu_ctx; @@ -95,7 +99,7 @@ typedef struct { CUresult (*cuGraphicsSubResourceGetMappedArray)(CUarray *pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel); } gsr_cuda; -bool gsr_cuda_load(gsr_cuda *self); +bool gsr_cuda_load(gsr_cuda *self, Display *display, bool overclock); void gsr_cuda_unload(gsr_cuda *self); #endif /* GSR_CUDA_H */ |