Etterna 0.75.1
Loading...
Searching...
No Matches
PipelineCache.h
1#ifndef RENDERER_VK_PIPELINE_CACHE_H
2#define RENDERER_VK_PIPELINE_CACHE_H
3
4#include <cstdint>
5#include <string>
6#include <map>
7#include <utility>
8#include <vulkan/vulkan_raii.hpp>
9#include "RageUtil/Graphics/Display/PipelineHandle.h"
10
12{
13 vk::raii::PipelineLayout PipelineLayout = nullptr;
14 vk::raii::Pipeline GraphicsPipeline = nullptr;
15 std::string VertexShaderPath;
16 std::string FragmentShaderPath;
17};
18
19
21{
22 constexpr static std::string_view CacheName = "Cache/pipelineCache.bin";
23
24 void Init(vk::raii::Device& device);
25 void WriteToDisk();
26 void ReloadPipelines(vk::raii::Device& device);
27 DisplayAdapter::PipelineHandle CreateGraphicsPipeline(
28 vk::raii::Device& device,
29 const std::string& vertexShaderPath,
30 const std::string& fragmentShaderPath,
31 bool reload = false);
32
33 std::vector<PipelineInfo> m_Pipelines;
34 std::map<std::pair<std::string, std::string>, intptr_t> m_PipelineLookup;
35
36 vk::DescriptorSetLayout m_DescriptorSetLayout = nullptr;
37 vk::DescriptorSetLayout m_TextureLayout = nullptr;
38 vk::Format m_DepthFormat = {};
39 vk::Format m_ImageFormat = {};
40 vk::raii::PipelineCache m_DriverCache = nullptr;
41};
42
43#endif
Definition PipelineHandle.h:7
Definition PipelineCache.h:21
Definition PipelineCache.h:12