Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify clEnqueueReleaseExternalMemObjectsKHR #1332

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5875,10 +5875,10 @@ include::{generated}/api/protos/clEnqueueReleaseExternalMemObjectsKHR.txt[]
command to complete.

Applications must release the memory objects that are acquired using
{clEnqueueReleaseExternalMemObjectsKHR} before using them through any
commands in the other API.
This is to guarantee that the state of memory objects is up-to-date and they
are accessible to the other API.
{clEnqueueReleaseExternalMemObjectsKHR} before using them through any commands
outside of OpenCL.
Comment on lines +5878 to +5879
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible additional improvements:

  1. Disambiguate "them", because the memory objects do not have any meaning outside of OpenCL. Should this be referring to the external memory handles used to create the memory objects instead? Should it be the memory that those handles represent?
  2. Disambiguate "any commands". Should this be "functions" instead? What is the right term?

This is to guarantee that the state of memory objects is up-to-date and that
they are accessible outside of OpenCL.

The following restrictions shall apply:

Expand Down Expand Up @@ -7619,7 +7619,7 @@ in _mem_objects_ have completed prior to executing subsequent commands in the
other API which reference these objects.

This may be accomplished portably by calling {clWaitForEvents} with the
event object returned by *clEnqueueReleaseGLObjects,* or by calling
event object returned by {clEnqueueReleaseGLObjects}, or by calling
{clFinish}.
As above, some implementations may offer more efficient methods.

Expand Down