mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-19 22:09:03 -04:00
nv-filters: Remove CUDA RT functions
We don't use CUDA RT functions anymore. So this commit removes their loading from the CUDA RT DLL. This also fixes a crash when loading different versions of CUDA RT when the SDK is updated [1]. [1] https://github.com/obsproject/obs-studio/issues/11813 Signed-off-by: pkv <pkv@obsproject.com>
This commit is contained in:
@@ -1189,14 +1189,6 @@ bool load_nvidia_vfx(void)
|
||||
LOAD_SYM(NvCVImage_FromD3DColorSpace);
|
||||
#undef LOAD_SYM
|
||||
|
||||
#define LOAD_SYM(sym) LOAD_SYM_FROM_LIB(sym, nv_cudart, "cudart64_110.dll")
|
||||
LOAD_SYM(cudaMalloc);
|
||||
LOAD_SYM(cudaStreamSynchronize);
|
||||
LOAD_SYM(cudaFree);
|
||||
LOAD_SYM(cudaMemcpy);
|
||||
LOAD_SYM(cudaMemsetAsync);
|
||||
#undef LOAD_SYM
|
||||
|
||||
#define LOAD_SYM(sym) LOAD_SYM_FROM_LIB2(sym, nv_videofx, "NVVideoEffects.dll")
|
||||
LOAD_SYM(NvVFX_SetStateObjectHandleArray);
|
||||
LOAD_SYM(NvVFX_AllocateState);
|
||||
|
||||
@@ -670,15 +670,6 @@ static inline void release_nv_vfx()
|
||||
FreeLibrary(nv_cvimage);
|
||||
nv_cvimage = NULL;
|
||||
}
|
||||
cudaMalloc = NULL;
|
||||
cudaStreamSynchronize = NULL;
|
||||
cudaFree = NULL;
|
||||
cudaMemcpy = NULL;
|
||||
cudaMemsetAsync = NULL;
|
||||
if (nv_cudart) {
|
||||
FreeLibrary(nv_cudart);
|
||||
nv_cudart = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void nvvfx_get_sdk_path(char *buffer, const size_t len)
|
||||
@@ -702,9 +693,8 @@ static inline bool load_nv_vfx_libs()
|
||||
|
||||
nv_videofx = LoadLibrary(L"NVVideoEffects.dll");
|
||||
nv_cvimage = LoadLibrary(L"NVCVImage.dll");
|
||||
nv_cudart = LoadLibrary(L"cudart64_110.dll");
|
||||
SetDllDirectoryA(NULL);
|
||||
return !!nv_videofx && !!nv_cvimage && !!nv_cudart;
|
||||
return !!nv_videofx && !!nv_cvimage;
|
||||
}
|
||||
|
||||
static unsigned int get_lib_version(void)
|
||||
|
||||
Reference in New Issue
Block a user