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

Fix errors in test_vulkan #2183

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ahesham-arm
Copy link
Contributor

This fixes three problems in test_vulkan:

  1. One negative test is violating the OpenCL specification. A call to clEnqueue{Wait,Signal}SemaphoresKHR with an invalid semaphore should return CL_INVALID_SEMAPHORE_KHR and not CL_INVALID_VALUE.

CL_INVALID_SEMAPHORE_KHR if any of the semaphore objects specified by sema_objects is not valid.

  1. When populating the list of supported external memory handle types for Vulkan, the types are unconditionally added to the list, without checking if the device supports it or not, this fix is namely for VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD.

  2. If a device does not support an optional extension (that is required for a test), the test should skip, not throw an exception and fail. A test failure should be reserved for the cases where a device claims support for an extension but then fails to execute the test correctly.

Add `CL_INVALID_SEMAPHORE_KHR` to the error string helper function.

Signed-off-by: Ahmed Hesham <[email protected]>
Calling `clEnqueue{Wait,Signal}SemaphoresKHR` with an invalid
semaphore should return `CL_INVALID_SEMAPHORE_KHR` and not
`CL_INVALID_VALUE`.

Signed-off-by: Ahmed Hesham <[email protected]>
Check that the device supports the
`VK_KHR_EXTERNAL_MEMORY_CAPABILITIES` extension before adding an entry
for `VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD` to the list of
supported Vulkan external memory handle types.

Signed-off-by: Ahmed Hesham <[email protected]>
If the device does not support the required extension, skip the test,
instead of throwing an exception and failing.

Signed-off-by: Ahmed Hesham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants