BsVulkanQueue.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsVulkanPrerequisites.h"
  5. namespace BansheeEngine
  6. {
  7. /** @addtogroup Vulkan
  8. * @{
  9. */
  10. /** Wrapper for the Vulkan device queue. */
  11. class VulkanQueue
  12. {
  13. public:
  14. VulkanQueue(VkQueue queue);
  15. /** Returns the internal handle to the Vulkan queue object. */
  16. VkQueue getHandle() const { return mQueue; }
  17. /**
  18. * Notifies the queue that a command buffer was submitted.
  19. *
  20. * @param[in] cmdBuffer Command buffer that was submitted.
  21. * @param[in] fenceCounter Fence counter of the command buffer at time of submission. This counter gets
  22. * incremented whenever a command buffer is done executing on the device. This allow
  23. * us to know when the queue is done with a command buffer.
  24. */
  25. void notifySubmit(const VulkanCommandBuffer& cmdBuffer, UINT32 fenceCounter);
  26. protected:
  27. VkQueue mQueue;
  28. VkSemaphore mSemaphoresTemp[BS_MAX_COMMAND_BUFFERS];
  29. UINT32 mFenceCounter;
  30. UINT32 mLastCommandBufferId;
  31. };
  32. /** @} */
  33. }