Skip to content
Permalink
Browse files

Merge branch 'CLGL-Interop'

  • Loading branch information
Sonicadvance1 committed Feb 25, 2013
2 parents dc98ce5 + 0bd218e commit 0554ce927e0deebc21e12c30561c2edbabc8a74a
@@ -1,7 +1,10 @@
set(SRCS clrun/clrun.c
clrun/dynamiclib.c
clrun/gencl.c
clrun/genclgl.c)
clrun/genclgl.c
clrun/genclext.c
clrun/genclglext.c
)

add_library(clrun STATIC ${SRCS})
target_link_libraries(clrun ${CMAKE_DL_LIBS})
@@ -10,6 +10,11 @@ compile: genclrun gencl.c genclgl.c
genclrun: ../include/CL/cl.h ../include/CL/cl_gl.h
./generateClRun.pl ../include/CL/cl.h > gencl.c
./generateClRun.pl ../include/CL/cl_gl.h > genclgl.c
./generateClRun.pl ../include/CL/cl_ext.h > genclext.c
./generateClRun.pl ../include/CL/cl_gl_ext.h > genclglext.c
./generateClRun.pl ../include/CL/cl_d3d10.h > gencld3d10.c
./generateClRun.pl ../include/CL/cl_d3d11.h > gencld3d11.c
./generateClRun.pl ../include/CL/cl_dx9_media_sharing.h > gencldx9.c


clean:

Large diffs are not rendered by default.

@@ -0,0 +1,28 @@
// Automatically generated by generateClRun.pl
#include "dynamiclib.h"
#include "../include/CL/cl_ext.h"


static cl_int (*clIcdGetPlatformIDsKHR_ptr)(cl_uint, cl_platform_id *, cl_uint *) = NULL;
cl_int CL_API_CALL clIcdGetPlatformIDsKHR (cl_uint num_entries,cl_platform_id * platforms,cl_uint * num_platforms) {
if(!clIcdGetPlatformIDsKHR_ptr) clIcdGetPlatformIDsKHR_ptr = getFunction("clIcdGetPlatformIDsKHR");
return (*clIcdGetPlatformIDsKHR_ptr)(num_entries, platforms, num_platforms);
}
static cl_int (* clReleaseDeviceEXT_ptr)(cl_device_id) = NULL;
cl_int CL_API_CALL clReleaseDeviceEXT (cl_device_id device) {
if(! clReleaseDeviceEXT_ptr) clReleaseDeviceEXT_ptr = getFunction(" clReleaseDeviceEXT");
return (* clReleaseDeviceEXT_ptr)(device);
}

static cl_int (* clRetainDeviceEXT_ptr)(cl_device_id) = NULL;
cl_int CL_API_CALL clRetainDeviceEXT (cl_device_id device) {
if(! clRetainDeviceEXT_ptr) clRetainDeviceEXT_ptr = getFunction(" clRetainDeviceEXT");
return (* clRetainDeviceEXT_ptr)(device);
}

static cl_int (* clCreateSubDevicesEXT_ptr)(cl_device_id, const cl_device_partition_property_ext *, cl_uint, cl_device_id *, cl_uint *) = NULL;
cl_int CL_API_CALL clCreateSubDevicesEXT (cl_device_id in_device,const cl_device_partition_property_ext * properties,cl_uint num_entries,cl_device_id * out_devices,cl_uint * num_devices) {
if(! clCreateSubDevicesEXT_ptr) clCreateSubDevicesEXT_ptr = getFunction(" clCreateSubDevicesEXT");
return (* clCreateSubDevicesEXT_ptr)(in_device, properties, num_entries, out_devices, num_devices);
}

@@ -3,55 +3,61 @@
#include "../include/CL/cl_gl.h"


static cl_mem (CL_API_CALL *clCreateFromGLBuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, int *) = NULL;
static cl_mem (*clCreateFromGLBuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, int *) = NULL;
cl_mem CL_API_CALL clCreateFromGLBuffer (cl_context context,cl_mem_flags flags,cl_GLuint bufobj,int * errcode_ret) {
if(!clCreateFromGLBuffer_ptr) clCreateFromGLBuffer_ptr = getFunction("clCreateFromGLBuffer");
return (*clCreateFromGLBuffer_ptr)(context, flags, bufobj, errcode_ret );
return (*clCreateFromGLBuffer_ptr)(context, flags, bufobj, errcode_ret);
}

static cl_mem (CL_API_CALL *clCreateFromGLTexture2D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
cl_mem CL_API_CALL clCreateFromGLTexture2D (cl_context context,cl_mem_flags flags,cl_GLenum target,cl_GLint miplevel,cl_GLuint texture,cl_int * errcode_ret) {
if(!clCreateFromGLTexture2D_ptr) clCreateFromGLTexture2D_ptr = getFunction("clCreateFromGLTexture2D");
return (*clCreateFromGLTexture2D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
static cl_mem (*clCreateFromGLTexture_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
cl_mem CL_API_CALL clCreateFromGLTexture (cl_context context,cl_mem_flags flags,cl_GLenum target,cl_GLint miplevel,cl_GLuint texture,cl_int * errcode_ret) {
if(!clCreateFromGLTexture_ptr) clCreateFromGLTexture_ptr = getFunction("clCreateFromGLTexture");
return (*clCreateFromGLTexture_ptr)(context, flags, target, miplevel, texture, errcode_ret);
}

static cl_mem (CL_API_CALL *clCreateFromGLTexture3D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
cl_mem CL_API_CALL clCreateFromGLTexture3D (cl_context context,cl_mem_flags flags,cl_GLenum target,cl_GLint miplevel,cl_GLuint texture,cl_int * errcode_ret) {
if(!clCreateFromGLTexture3D_ptr) clCreateFromGLTexture3D_ptr = getFunction("clCreateFromGLTexture3D");
return (*clCreateFromGLTexture3D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
}

static cl_mem (CL_API_CALL *clCreateFromGLRenderbuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, cl_int *) = NULL;
static cl_mem (*clCreateFromGLRenderbuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, cl_int *) = NULL;
cl_mem CL_API_CALL clCreateFromGLRenderbuffer (cl_context context,cl_mem_flags flags,cl_GLuint renderbuffer,cl_int * errcode_ret) {
if(!clCreateFromGLRenderbuffer_ptr) clCreateFromGLRenderbuffer_ptr = getFunction("clCreateFromGLRenderbuffer");
return (*clCreateFromGLRenderbuffer_ptr)(context, flags, renderbuffer, errcode_ret);
}

static cl_int (CL_API_CALL *clGetGLObjectInfo_ptr)(cl_mem, cl_gl_object_type *, cl_GLuint *) = NULL;
static cl_int (*clGetGLObjectInfo_ptr)(cl_mem, cl_gl_object_type *, cl_GLuint *) = NULL;
cl_int CL_API_CALL clGetGLObjectInfo (cl_mem memobj,cl_gl_object_type * gl_object_type,cl_GLuint * gl_object_name) {
if(!clGetGLObjectInfo_ptr) clGetGLObjectInfo_ptr = getFunction("clGetGLObjectInfo");
return (*clGetGLObjectInfo_ptr)(memobj, gl_object_type, gl_object_name);
}

static cl_int (CL_API_CALL *clGetGLTextureInfo_ptr)(cl_mem, cl_gl_texture_info, size_t, void *, size_t *) = NULL;
static cl_int (*clGetGLTextureInfo_ptr)(cl_mem, cl_gl_texture_info, size_t, void *, size_t *) = NULL;
cl_int CL_API_CALL clGetGLTextureInfo (cl_mem memobj,cl_gl_texture_info param_name,size_t param_value_size,void * param_value,size_t * param_value_size_ret) {
if(!clGetGLTextureInfo_ptr) clGetGLTextureInfo_ptr = getFunction("clGetGLTextureInfo");
return (*clGetGLTextureInfo_ptr)(memobj, param_name, param_value_size, param_value, param_value_size_ret);
}

static cl_int (CL_API_CALL *clEnqueueAcquireGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
static cl_int (*clEnqueueAcquireGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
cl_int CL_API_CALL clEnqueueAcquireGLObjects (cl_command_queue command_queue,cl_uint num_objects,const cl_mem * mem_objects,cl_uint num_events_in_wait_list,const cl_event * event_wait_list,cl_event * event) {
if(!clEnqueueAcquireGLObjects_ptr) clEnqueueAcquireGLObjects_ptr = getFunction("clEnqueueAcquireGLObjects");
return (*clEnqueueAcquireGLObjects_ptr)(command_queue, num_objects, mem_objects, num_events_in_wait_list, event_wait_list, event);
}

static cl_int (CL_API_CALL *clEnqueueReleaseGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
static cl_int (*clEnqueueReleaseGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
cl_int CL_API_CALL clEnqueueReleaseGLObjects (cl_command_queue command_queue,cl_uint num_objects,const cl_mem * mem_objects,cl_uint num_events_in_wait_list,const cl_event * event_wait_list,cl_event * event) {
if(!clEnqueueReleaseGLObjects_ptr) clEnqueueReleaseGLObjects_ptr = getFunction("clEnqueueReleaseGLObjects");
return (*clEnqueueReleaseGLObjects_ptr)(command_queue, num_objects, mem_objects, num_events_in_wait_list, event_wait_list, event);
}

static cl_int (CL_API_CALL *clGetGLContextInfoKHR_ptr)(const cl_context_properties *, cl_gl_context_info, size_t, void *, size_t *) = NULL;
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem (*clCreateFromGLTexture2D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL clCreateFromGLTexture2D (cl_context context,cl_mem_flags flags,cl_GLenum target,cl_GLint miplevel,cl_GLuint texture,cl_int * errcode_ret) {
if(!clCreateFromGLTexture2D_ptr) clCreateFromGLTexture2D_ptr = getFunction("clCreateFromGLTexture2D");
return (*clCreateFromGLTexture2D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
}

static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem (*clCreateFromGLTexture3D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL clCreateFromGLTexture3D (cl_context context,cl_mem_flags flags,cl_GLenum target,cl_GLint miplevel,cl_GLuint texture,cl_int * errcode_ret) {
if(!clCreateFromGLTexture3D_ptr) clCreateFromGLTexture3D_ptr = getFunction("clCreateFromGLTexture3D");
return (*clCreateFromGLTexture3D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
}

static cl_int (*clGetGLContextInfoKHR_ptr)(const cl_context_properties *, cl_gl_context_info, size_t, void *, size_t *) = NULL;
cl_int CL_API_CALL clGetGLContextInfoKHR (const cl_context_properties * properties,cl_gl_context_info param_name,size_t param_value_size,void * param_value,size_t * param_value_size_ret) {
if(!clGetGLContextInfoKHR_ptr) clGetGLContextInfoKHR_ptr = getFunction("clGetGLContextInfoKHR");
return (*clGetGLContextInfoKHR_ptr)(properties, param_name, param_value_size, param_value, param_value_size_ret);
@@ -0,0 +1,11 @@
// Automatically generated by generateClRun.pl
#include "dynamiclib.h"
#include "../include/CL/cl_gl_ext.h"


static cl_event (*clCreateEventFromGLsyncKHR_ptr)(cl_context, cl_GLsync, cl_int *) = NULL;
cl_event CL_API_CALL clCreateEventFromGLsyncKHR (cl_context context,cl_GLsync cl_GLsync,cl_int * errcode_ret) {
if(!clCreateEventFromGLsyncKHR_ptr) clCreateEventFromGLsyncKHR_ptr = getFunction("clCreateEventFromGLsyncKHR");
return (*clCreateEventFromGLsyncKHR_ptr)(context, cl_GLsync, errcode_ret);
}

No changes.

0 comments on commit 0554ce9

Please sign in to comment.
You can’t perform that action at this time.