'\" t .\" Title: clCreateEventFromGLsyncKHR .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLCREATEEVENTFROMGLS" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" clCreateEventFromGLsyncKHR \- Creates an event object linked to an OpenGL sync object\&. .SH "" .HP \w'cl_event\ clCreateEventFromGLsyncKHR('u .BI "cl_event clCreateEventFromGLsyncKHR(cl_context\ " "context" ", GLsync\ " "sync" ", cl_int\ *" "errcode_ret" ");" .SH "PARAMETERS" .PP \fI context \fR .RS 4 A valid OpenCL context created from an OpenGL context or share group, using the \fBcl_khr_gl_sharing\fR(3clc) extension\&. .RE .PP \fI sync \fR .RS 4 The name of a sync object in the GL share group associated with \fIcontext\fR\&. .RE .SH "DESCRIPTION" .PP 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\&. .SH "NOTES" .PP The parameters of an event object linked to a GL sync object will return the following values when queried with \fBclGetEventInfo\fR(3clc): .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The \fBCL_EVENT_COMMAND_QUEUE\fR of a linked event is NULL, because the event is not associated with any OpenCL command queue\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The \fBCL_EVENT_COMMAND_TYPE\fR of a linked event is \fBCL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR\fR, indicating that the event is associated with a GL sync object, rather than an OpenCL command\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The \fBCL_EVENT_COMMAND_EXECUTION_STATUS\fR of a linked event is either \fBCL_SUBMITTED\fR, indicating that the fence command associated with the sync object has not yet completed, or \fBCL_COMPLETE\fR, indicating that the fence command has completed\&. .RE .PP \fBclCreateEventFromGLsyncKHR\fR performs an implicit \fBclRetainEvent\fR(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\&. .PP Events returned from \fBclCreateEventFromGLsyncKHR\fR may only be consumed by \fBclEnqueueAcquireGLObjects\fR(3clc)\&. Passing such events to any other CL API will generate a \fBCL_INVALID_EVENT\fR error\&. .SH "ERRORS" .PP Returns a valid OpenCL event object and \fIerrcode_ret\fR 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 \fIerrcode_ret\fR: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_CONTEXT if \fIcontext\fR is not a valid context or was not created from a GL context\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_GL_OBJECT if \fIsync\fR is not the name of a sync object in the GL share group associated with \fIcontext\fR\&. .RE .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBcl_khr_gl_event\fR(3clc), \fBclEnqueueAcquireGLObjects\fR(3clc), \fBclRetainEvent\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 62, section 9.8.4 - Additions to Chapter 5 .RE