table of contents
CLCREATEEVENTFROMGLS(3clc) | OpenCL Manual | CLCREATEEVENTFROMGLS(3clc) |
NAME¶
clCreateEventFromGLsyncKHR - Creates an event object linked to an OpenGL sync object.
¶
cl_event clCreateEventFromGLsyncKHR(cl_context context, GLsync sync, cl_int *errcode_ret);
PARAMETERS¶
context
sync
DESCRIPTION¶
An event object may be created by linking to an OpenGL sync object. Completion of such an event object is equivalent to waiting for completion of the fence command associated with the linked GL sync object.
NOTES¶
The parameters of an event object linked to a GL sync object will return the following values when queried with clGetEventInfo(3clc):
clCreateEventFromGLsyncKHR performs an implicit clRetainEvent(3clc) on the returned event object. Creating a linked event object also places a reference on the linked GL sync object. When the event object is deleted, the reference will be removed from the GL sync object.
Events returned from clCreateEventFromGLsyncKHR may only be consumed by clEnqueueAcquireGLObjects(3clc). Passing such events to any other CL API will generate a CL_INVALID_EVENT error.
ERRORS¶
Returns a valid OpenCL event object and errcode_ret is set to CL_SUCCESS if the event object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret:
SPECIFICATION¶
OpenCL Specification[1]
SEE ALSO¶
cl_khr_gl_event(3clc), clEnqueueAcquireGLObjects(3clc), clRetainEvent(3clc)
AUTHORS¶
The Khronos Group
COPYRIGHT¶
Copyright © 2007-2011 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to the
condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.
NOTES¶
- 1.
- OpenCL Specification
01/14/2021 | The Khronos Group |