This CL refactors the implementation of VkSemaphore objects
in the following way:
- Add the ability to support several external handle types
concurrently. Before this CL, each platform could support
a single handle type (e.g. on Linux,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT only).
The changes here will allow future CLs to support more than
one type per platform (e.g. the Linux implementation may
support OPAQUE_FD_BIT as well as SYNC_FD_BIT at the same
time).
- Better implementation of temporary imports. In particular,
the following sequence now works properly:
1) Create exportable semaphore A.
2) Export A to an external handle/descriptor.
3) Signal A.
4) Temporarily import _another_ handle into A.
5) A.wait() // waits on the temporary payload, then discard it.
Before the CL, A would end up, incorrectly, unsignalled. Because
the export operation created an External instance that held
the payload modified in 3), which was then discarded after
the wait() in 5).
- Improved and consistent handling of errors during import/export
operations, through the use of templates.
+ Add a technical note in VkSemaphore.h explaining how everything
works, since there are several subtle points in the spec.
Bug: b/140421736
Change-Id: I9b6935db3238fec7af8e0c81666e2f5c72075756
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39880Tested-by:
David Turner <digit@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Kokoro-Presubmit: David Turner <digit@google.com>
Reviewed-by:
Chris Forbes <chrisforbes@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| Debug | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| Version.h | Loading commit data... | |
| VkBuffer.cpp | Loading commit data... | |
| VkBuffer.hpp | Loading commit data... | |
| VkBufferView.cpp | Loading commit data... | |
| VkBufferView.hpp | Loading commit data... | |
| VkCommandBuffer.cpp | Loading commit data... | |
| VkCommandBuffer.hpp | Loading commit data... | |
| VkCommandPool.cpp | Loading commit data... | |
| VkCommandPool.hpp | Loading commit data... | |
| VkConfig.h | Loading commit data... | |
| VkDescriptorPool.cpp | Loading commit data... | |
| VkDescriptorPool.hpp | Loading commit data... | |
| VkDescriptorSet.hpp | Loading commit data... | |
| VkDescriptorSetLayout.cpp | Loading commit data... | |
| VkDescriptorSetLayout.hpp | Loading commit data... | |
| VkDescriptorUpdateTemplate.cpp | Loading commit data... | |
| VkDescriptorUpdateTemplate.hpp | Loading commit data... | |
| VkDestroy.h | Loading commit data... | |
| VkDevice.cpp | Loading commit data... | |
| VkDevice.hpp | Loading commit data... | |
| VkDeviceMemory.cpp | Loading commit data... | |
| VkDeviceMemory.hpp | Loading commit data... | |
| VkDeviceMemoryExternalAndroid.hpp | Loading commit data... | |
| VkDeviceMemoryExternalLinux.hpp | Loading commit data... | |
| VkEvent.hpp | Loading commit data... | |
| VkFence.hpp | Loading commit data... | |
| VkFormat.cpp | Loading commit data... | |
| VkFormat.h | Loading commit data... | |
| VkFramebuffer.cpp | Loading commit data... | |
| VkFramebuffer.hpp | Loading commit data... | |
| VkGetProcAddress.cpp | Loading commit data... | |
| VkGetProcAddress.h | Loading commit data... | |
| VkImage.cpp | Loading commit data... | |
| VkImage.hpp | Loading commit data... | |
| VkImageView.cpp | Loading commit data... | |
| VkImageView.hpp | Loading commit data... | |
| VkInstance.cpp | Loading commit data... | |
| VkInstance.hpp | Loading commit data... | |
| VkMemory.cpp | Loading commit data... | |
| VkMemory.h | Loading commit data... | |
| VkObject.hpp | Loading commit data... | |
| VkPhysicalDevice.cpp | Loading commit data... | |
| VkPhysicalDevice.hpp | Loading commit data... | |
| VkPipeline.cpp | Loading commit data... | |
| VkPipeline.hpp | Loading commit data... | |
| VkPipelineCache.cpp | Loading commit data... | |
| VkPipelineCache.hpp | Loading commit data... | |
| VkPipelineLayout.cpp | Loading commit data... | |
| VkPipelineLayout.hpp | Loading commit data... | |
| VkPromotedExtensions.cpp | Loading commit data... | |
| VkQueryPool.cpp | Loading commit data... | |
| VkQueryPool.hpp | Loading commit data... | |
| VkQueue.cpp | Loading commit data... | |
| VkQueue.hpp | Loading commit data... | |
| VkRenderPass.cpp | Loading commit data... | |
| VkRenderPass.hpp | Loading commit data... | |
| VkSampler.cpp | Loading commit data... | |
| VkSampler.hpp | Loading commit data... | |
| VkSemaphore.cpp | Loading commit data... | |
| VkSemaphore.hpp | Loading commit data... | |
| VkSemaphoreExternalFuchsia.hpp | Loading commit data... | |
| VkSemaphoreExternalLinux.hpp | Loading commit data... | |
| VkShaderModule.cpp | Loading commit data... | |
| VkShaderModule.hpp | Loading commit data... | |
| VkStringify.cpp | Loading commit data... | |
| VkStringify.hpp | Loading commit data... | |
| Vulkan.rc | Loading commit data... | |
| VulkanPlatform.h | Loading commit data... | |
| android_vk_swiftshader.lds | Loading commit data... | |
| libVulkan.cpp | Loading commit data... | |
| main.cpp | Loading commit data... | |
| resource.h | Loading commit data... | |
| vk_swiftshader.def | Loading commit data... | |
| vk_swiftshader.exports | Loading commit data... | |
| vk_swiftshader.lds | Loading commit data... | |
| vk_swiftshader_icd.json | Loading commit data... | |
| vk_swiftshader_icd.json.tmpl | Loading commit data... | |
| vulkan.gni | Loading commit data... | |
| write_icd_json.py | Loading commit data... |