Class VulkanModuleSemaphore

java.lang.Object
io.codetoil.curved_spacetime.vulkan.VulkanModuleSemaphore

public class VulkanModuleSemaphore extends Object
A Vulkan semaphore, used to order work between queue submissions on the device.

Semaphores synchronise GPU work against other GPU work; use a VulkanModuleFence when the host needs to wait instead. The handle is created on construction and lives until cleanup().

  • Constructor Details

    • VulkanModuleSemaphore

      public VulkanModuleSemaphore(VulkanModuleLogicalDevice logicalDevice)
      Creates a semaphore on the given device.
      Parameters:
      logicalDevice - the device to create the semaphore on
      Throws:
      AssertionError - if the semaphore cannot be created
  • Method Details

    • cleanup

      public void cleanup()
      Destroys the semaphore.
    • getVkSemaphore

      public long getVkSemaphore()
      Returns the underlying Vulkan handle.
      Returns:
      the VkSemaphore handle