PipelineCache.h 728 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2009-2023, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Gr/Vulkan/Common.h>
  7. namespace anki {
  8. /// @addtogroup vulkan
  9. /// @{
  10. /// On disk pipeline cache.
  11. class PipelineCache
  12. {
  13. public:
  14. VkPipelineCache m_cacheHandle = VK_NULL_HANDLE;
  15. Error init(VkDevice dev, VkPhysicalDevice pdev, CString cacheDir, HeapMemoryPool& pool);
  16. void destroy(VkDevice dev, VkPhysicalDevice pdev, HeapMemoryPool& pool);
  17. private:
  18. String m_dumpFilename;
  19. PtrSize m_dumpSize = 0;
  20. Error destroyInternal(VkDevice dev, VkPhysicalDevice pdev, HeapMemoryPool& pool);
  21. };
  22. /// @}
  23. } // end namespace anki