Clarify status of cl_khr_gl_sharing

Submitted by Chuanbo Weng on Jan. 23, 2017, 11:39 a.m.


Message ID
State New
Headers show
Series "Clarify status of cl_khr_gl_sharing" ( rev: 2 ) in Beignet

Not browsing as part of any series.

Commit Message

Chuanbo Weng Jan. 23, 2017, 11:39 a.m.
Hi Rebecca,
	cl_khr_gl_sharing is partially supported (the most commonly used part). I have just sent out a patchset that show how to use 
cl_khr_gl_sharing on Beignet. The patchset also detect GL and EGL version and turn cl_khr_gl_sharing ON if version >= 13.0.0.
	So the first hunk of your patch is not necessary now. And you can write a new version of docs/Beignet.mdwn. (If you don't
plan to, I can write a patch for docs/Beignet.mdwn for you). Thanks!

-----Original Message-----
From: Beignet [] On Behalf Of Rebecca N. Palmer

Sent: Monday, January 23, 2017 6:59 AM
To:;; Bruno Pagani <>
Subject: [Beignet] [PATCH] Clarify status of cl_khr_gl_sharing

Signed-off-by: Rebecca N. Palmer <>

> -The release notes say cl_khr_gl_sharing is now supported, but docs/Beignet.mdwn still says it isn't.

It exists but is off by default, probably because it isn't finished:
clEnqueueAcquireGLObjects / clEnqueueReleaseGLObjects are no-ops, and clGetGLObjectInfo / clGetGLTextureInfo are missing entirely.

Beignet mailing list

Patch hide | download patch | download mbox

diff --git a/CMakeLists.txt b/CMakeLists.txt index 59abc45..7c01488 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,7 +195,7 @@  ELSE(XFIXES_FOUND)
-OPTION(ENABLE_GL_SHARING "cl_khr_gl_sharing" OFF)
+OPTION(ENABLE_GL_SHARING "Enable (incomplete) cl_khr_gl_sharing" OFF)
   pkg_check_modules(OPENGL REQUIRED gl) diff --git a/docs/Beignet.mdwn b/docs/Beignet.mdwn index 5c62b4c..3577d57 100644
--- a/docs/Beignet.mdwn
+++ b/docs/Beignet.mdwn
@@ -222,10 +222,8 @@  Known Issues
   This loses some precision but gains performance.
 * cl\_khr\_gl\_sharing.
-  This extension highly depends on mesa support. It seems that mesa would not provide
-  such type of extensions, we may have to hack with mesa source code to support this
-  extension. This feature used to work with a previous mesa git version. But now, it's
-  simply broken.
+  This extension is disabled by default, as it is only partially implemented.
+  It can be enabled by passing -DENABLE_GL_SHARING=ON to cmake.
 Project repository