Skip to content

Commit 9d4d33d

Browse files
committed
JavaCL: tweaked apple header
1 parent f62aae4 commit 9d4d33d

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

OpenCL4Java/src/main/headers/1.2/CL/cl_apple.h

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/* Context GL sharing
23
*
34
* Please check for the "cl_APPLE_gl_sharing" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
@@ -20,5 +21,40 @@
2021
*
2122
* NOTE: Make sure that appropriate cl_gl.h header file is included separately
2223
*/
23-
#define CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE 0x10000000 /* Introduced in Mac OS /* Error code returned by clGetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided */
24-
#define CL_INVALID_GL_CONTEXT_APPLE -1000 /* Introduced in Mac OS
24+
#define CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE 0x10000000 /* Introduced in Mac OS X 10.6 */
25+
26+
/* Apple extension for retrieving OpenGL context information for a CL context
27+
* created via the above method.
28+
*
29+
* Provides a query mechanism to retrieve OpenGL context specific information
30+
* from an OpenCL context to help identify device specific mappings and usage.
31+
*
32+
* For example, one possible usage would be to allow the client to map a CGL
33+
* virtual screen index to an appropriate CL device id to insure that the
34+
* rendering device and the compute device are the same, thus guaranteeing
35+
* any shared OpenGL memory that is attached o a CL memory object remains
36+
* resident on the active device.
37+
*/
38+
cl_int clGetGLContextInfoAPPLE ( cl_context /* context */,
39+
void * /* platform_gl_ctx */,
40+
cl_gl_platform_info /* param_name */,
41+
size_t /* param_value_size */,
42+
void * /* param_value */,
43+
size_t * /* param_value_size_ret */) ;
44+
45+
/* The list of supported param_name values and the information returned in param_value by
46+
* clGetContextInfo are listed below:
47+
48+
* Returns a cl_device_id for the CL device associated with the virtual screen for
49+
* the given CGL context. Return type: cl_device_id
50+
*/
51+
#define CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE 0x10000002 /* Introduced in Mac OS X 10.6 */
52+
53+
/* Returns an array of cl_device_ids for the CL device(s) corresponding to
54+
* the virtual screen(s) for the given CGL context. Return type: cl_device_id[]
55+
*/
56+
#define CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE 0x10000003 /* Introduced in Mac OS X 10.6 */
57+
58+
/* Error code returned by clGetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided */
59+
#define CL_INVALID_GL_CONTEXT_APPLE -1000 /* Introduced in Mac OS X 10.6 */
60+

0 commit comments

Comments
 (0)