Implement KHR ICD extension
authorSimon Richter <Simon.Richter@hogyros.de>
Wed, 3 Apr 2013 18:32:45 +0000 (20:32 +0200)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Thu, 18 Apr 2013 03:21:01 +0000 (11:21 +0800)
commit0118a372252180fb6b8c597dd0874fb31b477435
treefac60e7178e2948bf4d8c2aff8e906ff18b9cc8e
parentcb618258d42fbde26bcb5f4437e2ccec1db4003f
Implement KHR ICD extension

This adds a pointer to the dispatch table at the beginning of every object
of type

 - cl_command_queue
 - cl_context
 - cl_device_id
 - cl_event
 - cl_kernel
 - cl_mem
 - cl_platform_id
 - cl_program
 - cl_sampler

as required by the ICD specification. The layout of the dispatch table
comes from the OpenCL ICD loader by Brice Videau <brice.videau@imag.fr> and
Vincent Danjean <Vincent.Danjean@ens-lyon.org>.

To avoid dispatch table entries being overwritten with the ICD loader's
implementations of the CL functions (as would be the proper behaviour for
the ELF loader), the -Bsymbolic option is given to the linker.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
25 files changed:
CMake/FindOCLIcd.cmake [new file with mode: 0644]
CMakeLists.txt
src/CMakeLists.txt
src/cl_api.c
src/cl_command_queue.c
src/cl_command_queue.h
src/cl_context.c
src/cl_context.h
src/cl_device_id.c
src/cl_device_id.h
src/cl_event.h
src/cl_extensions.c
src/cl_extensions.h
src/cl_kernel.c
src/cl_kernel.h
src/cl_khr_icd.c [new file with mode: 0644]
src/cl_khr_icd.h [new file with mode: 0644]
src/cl_mem.c
src/cl_mem.h
src/cl_platform_id.c
src/cl_platform_id.h
src/cl_program.c
src/cl_program.h
src/cl_sampler.c
src/cl_sampler.h