Add general purpose vulkan render cache

Takes in a general `vk::Format` rather than PICA-types
This commit is contained in:
Wunkolo 2023-08-20 00:26:27 -07:00
parent d4b75deaf8
commit 4b193c8d6b
2 changed files with 15 additions and 6 deletions

View file

@ -83,8 +83,9 @@ class RendererVK final : public Renderer {
std::vector<vk::UniqueImage> screenTexture = {};
vk::UniqueDeviceMemory framebufferMemory = {};
std::map<u32, vk::UniqueRenderPass> renderPassCache;
std::map<u64, vk::UniqueRenderPass> renderPassCache;
vk::RenderPass getRenderPass(vk::Format colorFormat, std::optional<vk::Format> depthFormat);
vk::RenderPass getRenderPass(PICA::ColorFmt colorFormat, std::optional<PICA::DepthFmt> depthFormat);
// Recreate the swapchain, possibly re-using the old one in the case of a resize