PipelineCache.h 824 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (C) 2009-2021, 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. {
  9. // Forward
  10. class ConfigSet;
  11. /// @addtogroup vulkan
  12. /// @{
  13. /// On disk pipeline cache.
  14. class PipelineCache
  15. {
  16. public:
  17. VkPipelineCache m_cacheHandle = VK_NULL_HANDLE;
  18. ANKI_USE_RESULT Error init(VkDevice dev, VkPhysicalDevice pdev, CString cacheDir, const ConfigSet& cfg,
  19. GrAllocator<U8> alloc);
  20. void destroy(VkDevice dev, VkPhysicalDevice pdev, GrAllocator<U8> alloc);
  21. private:
  22. String m_dumpFilename;
  23. PtrSize m_dumpSize = 0;
  24. ANKI_USE_RESULT Error destroyInternal(VkDevice dev, VkPhysicalDevice pdev, GrAllocator<U8> alloc);
  25. };
  26. /// @}
  27. } // end namespace anki