mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-06 15:00:43 +09:00
Add overclocking option -oc to workaround a NVIDIA driver bug (forcefully set to p2 state when using cuda)
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user