mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Add cached sampler creation
Using the sampler cache we can maintain a pool of reusable samplers. The `sampler2D` utility function can help make some trivial samplers.
This commit is contained in:
parent
7a86595a1b
commit
0258640da9
2 changed files with 72 additions and 6 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "vk_api.hpp"
|
||||
#include "vk_descriptor_heap.hpp"
|
||||
#include "vk_descriptor_update_batch.hpp"
|
||||
#include "vk_sampler_cache.hpp"
|
||||
|
||||
class GPU;
|
||||
|
||||
|
@ -78,6 +79,7 @@ class RendererVK final : public Renderer {
|
|||
static u32 colorBufferHash(u32 loc, u32 size, PICA::ColorFmt format);
|
||||
static u32 depthBufferHash(u32 loc, u32 size, PICA::DepthFmt format);
|
||||
|
||||
Texture* findColorRenderTexture(u32 addr);
|
||||
Texture& getColorRenderTexture(u32 addr, PICA::ColorFmt format, u32 width, u32 height);
|
||||
Texture& getDepthRenderTexture(u32 addr, PICA::DepthFmt format, u32 width, u32 height);
|
||||
|
||||
|
@ -93,6 +95,7 @@ class RendererVK final : public Renderer {
|
|||
vk::RenderPass getRenderPass(PICA::ColorFmt colorFormat, std::optional<PICA::DepthFmt> depthFormat);
|
||||
|
||||
std::unique_ptr<Vulkan::DescriptorUpdateBatch> descriptorUpdateBatch;
|
||||
std::unique_ptr<Vulkan::SamplerCache> samplerCache;
|
||||
|
||||
// Display pipeline data
|
||||
std::unique_ptr<Vulkan::DescriptorHeap> displayDescriptorHeap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue