mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-20 16:37:03 +00:00
choose the closest matching sampler border color
This commit is contained in:
parent
0c216e40e0
commit
24e1bba31c
3 changed files with 63 additions and 18 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <Metal/Metal.hpp>
|
||||
|
||||
#include "HW/Latte/Core/LatteConst.h"
|
||||
#include "HW/Latte/ISA/LatteReg.h"
|
||||
|
||||
class MetalSamplerCache
|
||||
|
|
@ -10,12 +11,12 @@ public:
|
|||
MetalSamplerCache(class MetalRenderer* metalRenderer) : m_mtlr{metalRenderer} {}
|
||||
~MetalSamplerCache();
|
||||
|
||||
MTL::SamplerState* GetSamplerState(const LatteContextRegister& lcr, uint32 samplerIndex);
|
||||
MTL::SamplerState* GetSamplerState(const LatteContextRegister& lcr, LatteConst::ShaderType shaderType, uint32 stageSamplerIndex);
|
||||
|
||||
private:
|
||||
class MetalRenderer* m_mtlr;
|
||||
|
||||
std::map<uint64, MTL::SamplerState*> m_samplerCache;
|
||||
|
||||
uint64 CalculateSamplerHash(const LatteContextRegister& lcr, uint32 samplerIndex);
|
||||
uint64 CalculateSamplerHash(const LatteContextRegister& lcr, LatteConst::ShaderType shaderType, uint32 stageSamplerIndex, uint32 samplerIndex);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue