add an option to choose buffer cache type

This commit is contained in:
Samuliak 2024-11-03 12:43:35 +01:00
parent 03d4e86b61
commit b38ca6a58a
No known key found for this signature in database
8 changed files with 75 additions and 36 deletions

View file

@ -2,6 +2,8 @@
#include "Cafe/HW/Latte/Renderer/Metal/MetalBufferAllocator.h"
#include "GameProfile/GameProfile.h"
/*
struct MetalRestridedBufferRange
{
@ -118,7 +120,7 @@ public:
// Getters
bool UseHostMemoryForCache() const
{
return m_useHostMemoryForCache;
return (m_bufferCacheType == BufferCacheType::Host);
}
MPTR GetImportedMemBaseAddress() const
@ -137,6 +139,6 @@ private:
//MetalVertexBufferCache m_vertexBufferCache;
MTL::Buffer* m_bufferCache = nullptr;
bool m_useHostMemoryForCache = false;
BufferCacheType m_bufferCacheType;
MPTR m_importedMemBaseAddress;
};