diff --git a/modules/core/include/opencv2/core/cuda/common.hpp b/modules/core/include/opencv2/core/cuda/common.hpp index b36b3d17b5..348bdf1823 100644 --- a/modules/core/include/opencv2/core/cuda/common.hpp +++ b/modules/core/include/opencv2/core/cuda/common.hpp @@ -98,6 +98,12 @@ namespace cv { namespace cuda return (total + grain - 1) / grain; } +#if (CUDART_VERSION >= 12000) + template inline void bindTexture(const textureReference* tex, const PtrStepSz& img) { CV_Error(cv::Error::GpuNotSupported, "Function removed in CUDA SDK 12"); } + template inline void createTextureObjectPitch2D(cudaTextureObject_t* tex, PtrStepSz& img, const cudaTextureDesc& texDesc) { + CV_Error(cv::Error::GpuNotSupported, "Function removed in CUDA SDK 12"); } +#else + //TODO: remove from OpenCV 5.x template inline void bindTexture(const textureReference* tex, const PtrStepSz& img) { cudaChannelFormatDesc desc = cudaCreateChannelDesc(); @@ -118,6 +124,7 @@ namespace cv { namespace cuda cudaSafeCall( cudaCreateTextureObject(tex, &resDesc, &texDesc, NULL) ); } } +#endif }} //! @endcond