mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Fix render-texture cache lookups
`[32bit loc | 32bit attributes]` Use `std::map::lower_bound(loc << 32)` to find the first address that matches the key in O(logn) time, finer grained searchs can happen after the fact in O(n) time. Fixes render-texture cache lookups
This commit is contained in:
parent
be5ebeefed
commit
d781802eb0
2 changed files with 14 additions and 18 deletions
|
@ -76,9 +76,6 @@ class RendererVK final : public Renderer {
|
|||
// Hash(loc, size, format) -> Texture
|
||||
std::map<u64, Texture> textureCache;
|
||||
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue