BsVulkanDescriptorLayout.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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 descriptor layout object. */
  11. class VulkanDescriptorLayout
  12. {
  13. public:
  14. VulkanDescriptorLayout(VulkanDevice& device, VkDescriptorSetLayoutBinding* bindings, UINT32 numBindings);
  15. ~VulkanDescriptorLayout();
  16. /** Returns a handle to the Vulkan set layout object. */
  17. VkDescriptorSetLayout getHandle() const { return mLayout; }
  18. /** Returns a hash value for the descriptor layout. */
  19. size_t getHash() const { return mHash; }
  20. /** Calculates a has value for the provided descriptor set layout bindings. */
  21. static size_t calculateHash(VkDescriptorSetLayoutBinding* bindings, UINT32 numBindings);
  22. protected:
  23. VulkanDevice& mDevice;
  24. VkDescriptorSetLayout mLayout;
  25. size_t mHash;
  26. };
  27. /** @} */
  28. }