diff options
author | Martijn Berger <mberger@denc.com> | 2014-07-25 15:33:19 +0400 |
---|---|---|
committer | Martijn Berger <mberger@denc.com> | 2014-07-25 15:33:19 +0400 |
commit | bae2b3a688a2c2ee3eb8457c62af3a10bae76131 (patch) | |
tree | 2c333d1dab366bd64b8f4beba3b5ebbed755ed35 /intern/cycles/util | |
parent | d0f0d8220523858eddfd30f186327d716761e5b5 (diff) |
Switch to Cuda 4.0 style api for kernel invocation. This is a small clean-up that has no functional changes but makes code a bit more readable.
Differential revision: https://developer.blender.org/D659
Reviewed by: Sergey Sharybin, Thomas Dinges
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_cuda.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_cuda.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp index 9404f45d9a6..50690434f03 100644 --- a/intern/cycles/util/util_cuda.cpp +++ b/intern/cycles/util/util_cuda.cpp @@ -149,6 +149,7 @@ tcuGLCtxCreate *cuGLCtxCreate; tcuGraphicsGLRegisterBuffer *cuGraphicsGLRegisterBuffer; tcuGraphicsGLRegisterImage *cuGraphicsGLRegisterImage; tcuCtxSetCurrent *cuCtxSetCurrent; +tcuLaunchKernel *cuLaunchKernel; CCL_NAMESPACE_BEGIN @@ -386,6 +387,7 @@ bool cuLibraryInit() /* cuda 4.0 */ CUDA_LIBRARY_FIND(cuCtxSetCurrent); + CUDA_LIBRARY_FIND(cuLaunchKernel); if(cuHavePrecompiledKernels()) result = true; diff --git a/intern/cycles/util/util_cuda.h b/intern/cycles/util/util_cuda.h index b5e9c7188cd..a633fb21eca 100644 --- a/intern/cycles/util/util_cuda.h +++ b/intern/cycles/util/util_cuda.h @@ -509,6 +509,7 @@ typedef CUresult CUDAAPI tcuGLCtxCreate(CUcontext *pCtx, unsigned int Flags, CUd typedef CUresult CUDAAPI tcuGraphicsGLRegisterBuffer(CUgraphicsResource *pCudaResource, GLuint buffer, unsigned int Flags); typedef CUresult CUDAAPI tcuGraphicsGLRegisterImage(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags); typedef CUresult CUDAAPI tcuCtxSetCurrent(CUcontext ctx); +typedef CUresult CUDAAPI tcuLaunchKernel(CUfunction f, unsigned gridDimX, unsigned gridDimY, unsigned gridDimZ, unsigned blockDimX, unsigned blockDimY, unsigned blockDimZ, unsigned sharedMemBytes, CUstream hStream, void* kernelParams, void* extra); /* function declarations */ @@ -629,6 +630,7 @@ extern tcuGLCtxCreate *cuGLCtxCreate; extern tcuGraphicsGLRegisterBuffer *cuGraphicsGLRegisterBuffer; extern tcuGraphicsGLRegisterImage *cuGraphicsGLRegisterImage; extern tcuCtxSetCurrent *cuCtxSetCurrent; +extern tcuLaunchKernel *cuLaunchKernel; #endif /* __UTIL_CUDA_H__ */ |