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

Spec clarification for valid pFd return values in vkGetSemaphoreFdKHR #2452

Open
MatusT opened this issue Oct 27, 2024 · 0 comments
Open

Spec clarification for valid pFd return values in vkGetSemaphoreFdKHR #2452

MatusT opened this issue Oct 27, 2024 · 0 comments

Comments

@MatusT
Copy link

MatusT commented Oct 27, 2024

In the spec of VkImportSemaphoreFdInfoKHR it is stated:

  • If handleType is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, the special value -1 for fd is treated like a valid sync file descriptor referring to an object that has already signaled
  • It is consistent with the option for implementations to return a -1 file descriptor when exporting a VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT from a VkSemaphore which is signaled

But vkGetSemaphoreFdKHR does not contain information about pFd's value -1 being valid option. Or really any other information about valid values beside being integer.

This has led to a bug in Chromium expecting pFd value to be always >= 0 when the result is VK_SUCCESS which has caused issues on Huawei devices whose driver returns -1 for already signaled semaphore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants