Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/multimedia/QtAV/files/patch-src_codec_video_SurfaceInteropCUDA.cpp
16149 views
1
--- src/codec/video/SurfaceInteropCUDA.cpp.orig 2020-08-26 17:34:29 UTC
2
+++ src/codec/video/SurfaceInteropCUDA.cpp
3
@@ -132,7 +132,7 @@ bool HostInteropResource::map(int picIndex, const CUVI
4
if (!ensureResource(pitch, H)) //copy height is coded height
5
return false;
6
// the same thread (context) as cuMemAllocHost, so no ccontext switch is needed
7
- CUDA_ENSURE(cuMemcpyDtoH(host_mem.data, devptr, pitch*H*3/2), NULL);
8
+ CUDA_ENSURE(cuMemcpyDtoH(host_mem.data, devptr, pitch*H*3/2), false);
9
host_mem.index = picIndex;
10
}
11
// map to texture
12
@@ -173,7 +173,7 @@ bool HostInteropResource::ensureResource(int pitch, in
13
if (!share_ctx) // cuMemFreeHost will be called in dtor which is not the current thread.
14
CUDA_WARN(cuCtxPushCurrent(ctx));
15
// NV12
16
- CUDA_ENSURE(cuMemAllocHost((void**)&host_mem.data, pitch*height*3/2), NULL);
17
+ CUDA_ENSURE(cuMemAllocHost((void**)&host_mem.data, pitch*height*3/2), false);
18
if (!share_ctx)
19
CUDA_WARN(cuCtxPopCurrent(NULL)); //can be null or &ctx
20
return true;
21
22