summaryrefslogtreecommitdiff
path: root/debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-07-29 21:18:06 -0400
committerMahmoud <[email protected]>2019-07-29 21:18:06 -0400
commit5875fda72d4402413bc5c04ee5ec15085ff2b90a (patch)
treec920268d899df331e1a5e451a35133eaff7ca341 /debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h
parentc05dc90da35fc2bd9dd42da9626bf3a60e2c9e8d (diff)
parent21d937256fbca004c926531cfef1adefcedeef91 (diff)
Merge branch 'dev' of https://github.com/mkhairy/gpgpu-sim-private into dev-purdue-integration-trace
Diffstat (limited to 'debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h')
-rw-r--r--debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h b/debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h
new file mode 100644
index 0000000..6b711c2
--- /dev/null
+++ b/debug_tools/WatchYourStep/ptxjitplus/inc/dynlink/cuda_drvapi_dynlink_gl.h
@@ -0,0 +1,58 @@
+/**
+ * Copyright 1993-2013 NVIDIA Corporation. All rights reserved.
+ *
+ * Please refer to the NVIDIA end user license agreement (EULA) associated
+ * with this source code for terms and conditions that govern your use of
+ * this software. Any use, reproduction, disclosure, or distribution of
+ * this software and related documentation outside the terms of the EULA
+ * is strictly prohibited.
+ *
+ */
+
+#ifndef __cuda_drvapi_dynlink_cuda_gl_h__
+#define __cuda_drvapi_dynlink_cuda_gl_h__
+
+#ifdef CUDA_INIT_OPENGL
+
+#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
+# define WINDOWS_LEAN_AND_MEAN
+# define NOMINMAX
+# include <windows.h>
+#endif
+
+// includes, system
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+// includes, GL
+#include <GL/glew.h>
+
+#if defined (__APPLE__) || defined(MACOSX)
+#include <GLUT/glut.h>
+#else
+#include <GL/freeglut.h>
+#endif
+
+/************************************
+ **
+ ** OpenGL Graphics/Interop
+ **
+ ***********************************/
+
+// OpenGL/CUDA interop (CUDA 2.0+)
+typedef CUresult CUDAAPI tcuGLCtxCreate(CUcontext *pCtx, unsigned int Flags, CUdevice device);
+typedef CUresult CUDAAPI tcuGraphicsGLRegisterBuffer(CUgraphicsResource *pCudaResource, GLuint buffer, unsigned int Flags);
+typedef CUresult CUDAAPI tcuGraphicsGLRegisterImage(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags);
+
+#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
+#include <GL/wglext.h>
+// WIN32
+typedef CUresult CUDAAPI tcuWGLGetDevice(CUdevice *pDevice, HGPUNV hGpu);
+#endif
+
+#endif // CUDA_INIT_OPENGL
+
+#endif // __cuda_drvapi_dynlink_cuda_gl_h__
+