diff options
author | Zhigang Gong <zhigang.gong@gmail.com> | 2013-08-26 22:45:48 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-09-06 16:24:57 +0800 |
commit | 4a6106b0b6bc13b76855cfa9b1f4d33248ed97c7 (patch) | |
tree | 806d6c058b4776af8c6cc099d97dae73dd2e8fe8 /CMake | |
parent | 9a2fd56bc0982499449f2ea84d7e0d5a3d49ad82 (diff) | |
download | beignet-4a6106b0b6bc13b76855cfa9b1f4d33248ed97c7.tar.gz |
CL: Enalbe gl sharing with new egl extension.
The previous implementation is only for 2d/3d texture sharing and
is implemented in a hacky fashinon. We need to replace it with a
clean and complete one. We introduce a new egl extension to export
low level layout information of a buffer object/texture/render buffer
from the mesa dri driver to the cl driver layer. As the extension is
not accpepted by mesa, we have to implement this new extension in
beignet internally.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: He Junyan <junyan.he@inbox.com>
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindEGL.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CMake/FindEGL.cmake b/CMake/FindEGL.cmake index 69d4852f..6caed56b 100644 --- a/CMake/FindEGL.cmake +++ b/CMake/FindEGL.cmake @@ -33,4 +33,18 @@ ELSE(EGL_INCLUDE_PATH) SET(EGL_FOUND 0 CACHE STRING "Set to 1 if EGL is found, 0 otherwise") ENDIF(EGL_INCLUDE_PATH) +# Find mesa source code. +FIND_PATH(MESA_SOURCE_PREFIX src/mesa/main/texobj.c + $ENV{MESA_SOURCE_DIR} + ${MAKE_CURRENT_SOURCE_DIR}/../mesa + ~/mesa + DOC "The mesa source directory which is needed for cl_khr_gl_sharing.") + +IF(MESA_SOURCE_PREFIX) +SET(MESA_SOURCE_INCLUDES "-I${MESA_SOURCE_PREFIX}/src/mesa -I${MESA_SOURCE_PREFIX}/include -I${MESA_SOURCE_PREFIX}/src/mapi -I${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/i965/ -I${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/common/") +SET(MESA_SOURCE_FOUND 1 CACHE STRING "Set to 1 if mesa source code is found, 0 otherwise") +ELSE(MESA_SOURCE_PREFIX) +SET(MESA_SOURCE_FOUND 0 CACHE STRING "Set to 1 if mesa source code is found, 0 otherwise") +ENDIF(MESA_SOURCE_PREFIX) + MARK_AS_ADVANCED(EGL_FOUND) |