-
Notifications
You must be signed in to change notification settings - Fork 122
publish cl_khr_external_memory_android_hardware_buffer #1367
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
publish cl_khr_external_memory_android_hardware_buffer #1367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a few comments and questions I found while editing this specification.
I ended up completely refactoring the error conditions for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are two minor issues I found while refactoring the error conditions for clCreateImageWithProperties.
api/opencl_runtime_layer.asciidoc
Outdated
** if _properties_ includes an AHardwareBuffer external memory handle and | ||
_size_ is non-zero and greater than the AHardwareBuffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few additional questions about this error code:
- Elsewhere in this PR we say for the AHardwareBuffer case: "If importing as a buffer, the implementation will infer the size of the buffer." What does this mean for the passed-in size? Specifically, what happens if the passed-in size is smaller than the size of the AHardwareBuffer? Does the inferred size replace the passed-in size?
- In the AHardwareBuffer case is a size of zero valid? Note that this is a
CL_INVALID_BUFFER_SIZE
error in general (without AHardwareBuffer), so we would need to explicitly allow this if a size of zero is valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We agree that for the AHardwareBuffer the passed-in size should be always zero and the buffer size inferred, so we should remove the CL_INVALID_BUFFER_SIZE
error for this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I think I have clarified this now - please take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think now it is good. The sample code of the extension should also be changed as the size is still being passed to clCreateBufferWithProperties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I fixed the one example code snip I found. Please take a look - is this the only one? dbe13e7
Merging as discussed in the July 1st teleconference. |
Publish the cl_khr_external_memory_android_hardware_buffer extension (experimental).