-
Notifications
You must be signed in to change notification settings - Fork 199
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
Import Vulkan resources via named NT handle #1895
Conversation
47d3da4
to
6456d44
Compare
98383f3
to
4e1af10
Compare
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.
Do we need a new function parameter? Why not add a new enum to VulkanExternalMemoryHandleType?
@@ -550,7 +550,7 @@ clExternalMemory::clExternalMemory(const clExternalMemory &externalMemory) | |||
clExternalMemory::clExternalMemory( | |||
const VulkanDeviceMemory *deviceMemory, | |||
VulkanExternalMemoryHandleType externalMemoryHandleType, uint64_t size, | |||
cl_context context, cl_device_id deviceId) | |||
cl_context context, cl_device_id deviceId, cl_bool useNameForImport) |
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.
Why not add new enum?
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, looks like when I was writing this there was no CL_*_HANDLE_OPAQUE_WIN32_NAME_KHR, but since it is there now, will remove the added param and add those enums in VulkanExternalMemoryHandleType and VulkanExternalSemaphoreHandleType to use those instead.
* Associate an optional name with the vk resource when handle type is NT * Use the name when available for importing the resource in OpenCL * Refactor ctor/dtor for WindowsSecurityAttributes class
Minor change to support importing a named resource either directly using the associated name or via NT handle.
4e1af10
to
b715dcc
Compare
* Remove the unnecessary usage of useNameForImport * Add new enum to VulkanExternalMemoryHandleType and VulkanExternalSemaphoreHandleType
b715dcc
to
442b9d3
Compare
LGTM |
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.
lgtm
Add coverage to import Vulkan resources (memory and semaphore) in Windows via named NT handles.
If no name is given during resource creation, then use NT handles for import.
If a name is given, have an option to either use that name or get the NT handle and use that for import.
Resolves KhronosGroup/OpenCL-Docs#943