mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
cuda: Load 2D memset function symbols
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
This commit is contained in:
parent
7983ecff1c
commit
1b6f66a840
3 changed files with 128 additions and 0 deletions
|
@ -399,6 +399,51 @@ CUresult CUDAAPI CuWaitExternalSemaphoresAsync (const CUexternalSemaphore *extSe
|
|||
unsigned int numExtSems,
|
||||
CUstream stream);
|
||||
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuMemsetD2D8 (CUdeviceptr dstDevice,
|
||||
size_t dstPitch,
|
||||
unsigned char uc,
|
||||
size_t Width,
|
||||
size_t Height);
|
||||
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuMemsetD2D8Async (CUdeviceptr dstDevice,
|
||||
size_t dstPitch,
|
||||
unsigned char uc,
|
||||
size_t Width,
|
||||
size_t Height,
|
||||
CUstream hStream);
|
||||
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuMemsetD2D16 (CUdeviceptr dstDevice,
|
||||
size_t dstPitch,
|
||||
unsigned short us,
|
||||
size_t Width,
|
||||
size_t Height);
|
||||
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuMemsetD2D16Async (CUdeviceptr dstDevice,
|
||||
size_t dstPitch,
|
||||
unsigned short us,
|
||||
size_t Width,
|
||||
size_t Height,
|
||||
CUstream hStream);
|
||||
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuMemsetD2D32 (CUdeviceptr dstDevice,
|
||||
size_t dstPitch,
|
||||
unsigned int ui,
|
||||
size_t Width,
|
||||
size_t Height);
|
||||
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuMemsetD2D32Async (CUdeviceptr dstDevice,
|
||||
size_t dstPitch,
|
||||
unsigned int ui,
|
||||
size_t Width,
|
||||
size_t Height,
|
||||
CUstream hStream);
|
||||
|
||||
/* cudaGL.h */
|
||||
GST_CUDA_API
|
||||
CUresult CUDAAPI CuGraphicsGLRegisterImage (CUgraphicsResource * pCudaResource,
|
||||
|
|
|
@ -252,6 +252,22 @@ typedef struct _GstNvCodecCudaVTable
|
|||
(const CUexternalSemaphore *extSemArray,
|
||||
const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *paramsArray,
|
||||
unsigned int numExtSems, CUstream stream);
|
||||
|
||||
CUresult (CUDAAPI * CuMemsetD2D8) (CUdeviceptr dstDevice, size_t dstPitch,
|
||||
unsigned char uc, size_t Width, size_t Height);
|
||||
CUresult (CUDAAPI * CuMemsetD2D8Async) (CUdeviceptr dstDevice,
|
||||
size_t dstPitch, unsigned char uc, size_t Width, size_t Height,
|
||||
CUstream hStream);
|
||||
CUresult (CUDAAPI * CuMemsetD2D16) (CUdeviceptr dstDevice, size_t dstPitch,
|
||||
unsigned short us, size_t Width, size_t Height);
|
||||
CUresult (CUDAAPI * CuMemsetD2D16Async) (CUdeviceptr dstDevice,
|
||||
size_t dstPitch, unsigned short us, size_t Width, size_t Height,
|
||||
CUstream hStream);
|
||||
CUresult (CUDAAPI * CuMemsetD2D32) (CUdeviceptr dstDevice, size_t dstPitch,
|
||||
unsigned int ui, size_t Width, size_t Height);
|
||||
CUresult (CUDAAPI * CuMemsetD2D32Async) (CUdeviceptr dstDevice,
|
||||
size_t dstPitch, unsigned int ui, size_t Width, size_t Height,
|
||||
CUstream hStream);
|
||||
} GstNvCodecCudaVTable;
|
||||
/* *INDENT-ON* */
|
||||
|
||||
|
@ -383,6 +399,13 @@ gst_cuda_load_library_once_func (void)
|
|||
LOAD_SYMBOL (cuMemFree, CuMemFree);
|
||||
LOAD_SYMBOL (cuMemFreeHost, CuMemFreeHost);
|
||||
|
||||
LOAD_SYMBOL (cuMemsetD2D8, CuMemsetD2D8);
|
||||
LOAD_SYMBOL (cuMemsetD2D8Async, CuMemsetD2D8Async);
|
||||
LOAD_SYMBOL (cuMemsetD2D16, CuMemsetD2D16);
|
||||
LOAD_SYMBOL (cuMemsetD2D16Async, CuMemsetD2D16Async);
|
||||
LOAD_SYMBOL (cuMemsetD2D32, CuMemsetD2D32);
|
||||
LOAD_SYMBOL (cuMemsetD2D32Async, CuMemsetD2D32Async);
|
||||
|
||||
LOAD_SYMBOL (cuStreamCreate, CuStreamCreate);
|
||||
LOAD_SYMBOL (cuStreamDestroy, CuStreamDestroy);
|
||||
LOAD_SYMBOL (cuStreamSynchronize, CuStreamSynchronize);
|
||||
|
@ -1234,6 +1257,63 @@ CuWaitExternalSemaphoresAsync (const CUexternalSemaphore * extSemArray,
|
|||
paramsArray, numExtSems, stream);
|
||||
}
|
||||
|
||||
CUresult CUDAAPI
|
||||
CuMemsetD2D8 (CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc,
|
||||
size_t Width, size_t Height)
|
||||
{
|
||||
g_assert (gst_cuda_vtable.CuMemsetD2D8);
|
||||
|
||||
return gst_cuda_vtable.CuMemsetD2D8 (dstDevice, dstPitch, uc, Width, Height);
|
||||
}
|
||||
|
||||
CUresult CUDAAPI
|
||||
CuMemsetD2D8Async (CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc,
|
||||
size_t Width, size_t Height, CUstream hStream)
|
||||
{
|
||||
g_assert (gst_cuda_vtable.CuMemsetD2D8Async);
|
||||
|
||||
return gst_cuda_vtable.CuMemsetD2D8Async (dstDevice,
|
||||
dstPitch, uc, Width, Height, hStream);
|
||||
}
|
||||
|
||||
CUresult CUDAAPI
|
||||
CuMemsetD2D16 (CUdeviceptr dstDevice, size_t dstPitch, unsigned short us,
|
||||
size_t Width, size_t Height)
|
||||
{
|
||||
g_assert (gst_cuda_vtable.CuMemsetD2D16);
|
||||
|
||||
return gst_cuda_vtable.CuMemsetD2D16 (dstDevice, dstPitch, us, Width, Height);
|
||||
}
|
||||
|
||||
CUresult CUDAAPI
|
||||
CuMemsetD2D16Async (CUdeviceptr dstDevice, size_t dstPitch, unsigned short us,
|
||||
size_t Width, size_t Height, CUstream hStream)
|
||||
{
|
||||
g_assert (gst_cuda_vtable.CuMemsetD2D16Async);
|
||||
|
||||
return gst_cuda_vtable.CuMemsetD2D16Async (dstDevice,
|
||||
dstPitch, us, Width, Height, hStream);
|
||||
}
|
||||
|
||||
CUresult CUDAAPI
|
||||
CuMemsetD2D32 (CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui,
|
||||
size_t Width, size_t Height)
|
||||
{
|
||||
g_assert (gst_cuda_vtable.CuMemsetD2D32);
|
||||
|
||||
return gst_cuda_vtable.CuMemsetD2D32 (dstDevice, dstPitch, ui, Width, Height);
|
||||
}
|
||||
|
||||
CUresult CUDAAPI
|
||||
CuMemsetD2D32Async (CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui,
|
||||
size_t Width, size_t Height, CUstream hStream)
|
||||
{
|
||||
g_assert (gst_cuda_vtable.CuMemsetD2D32Async);
|
||||
|
||||
return gst_cuda_vtable.CuMemsetD2D32Async (dstDevice,
|
||||
dstPitch, ui, Width, Height, hStream);
|
||||
}
|
||||
|
||||
/* cudaGL.h */
|
||||
CUresult CUDAAPI
|
||||
CuGraphicsGLRegisterImage (CUgraphicsResource * pCudaResource,
|
||||
|
|
|
@ -495,6 +495,9 @@ typedef struct
|
|||
#define cuMemcpyHtoD cuMemcpyHtoD_v2
|
||||
#define cuMemcpyHtoDAsync cuMemcpyHtoDAsync_v2
|
||||
#define cuMemFree cuMemFree_v2
|
||||
#define cuMemsetD2D8 cuMemsetD2D8_v2
|
||||
#define cuMemsetD2D16 cuMemsetD2D16_v2
|
||||
#define cuMemsetD2D32 cuMemsetD2D32_v2
|
||||
|
||||
#define cuEventDestroy cuEventDestroy_v2
|
||||
|
||||
|
|
Loading…
Reference in a new issue