mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Implement a renderpass cache.
Technically we can generate every possible render-pass up-front based on the possible combinations of ColorFmt and DepthFmt, but we should only allocate what the game asks for. Save that pattern for pipelines.
This commit is contained in:
parent
bf8bb5d459
commit
37902cd9d6
2 changed files with 65 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
#include <map>
|
||||
#include <optional>
|
||||
|
||||
#include "renderer.hpp"
|
||||
#include "vk_api.hpp"
|
||||
|
||||
|
@ -49,6 +52,10 @@ class RendererVK final : public Renderer {
|
|||
std::vector<vk::UniqueImage> topScreenImages = {};
|
||||
std::vector<vk::UniqueImage> bottomScreenImages = {};
|
||||
|
||||
std::map<u32, vk::UniqueRenderPass> renderPassCache;
|
||||
|
||||
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
|
||||
vk::Result recreateSwapchain(vk::SurfaceKHR surface, vk::Extent2D swapchainExtent);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue