mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 16:16:05 +00:00
VideoBackends:Metal: Cache pipelines
Metal pipelines hold less stuff than Dolphin pipelines, so duplicates will appear
This commit is contained in:
parent
e32213d031
commit
5742ccf8de
11 changed files with 555 additions and 231 deletions
19
Source/Core/VideoBackends/Metal/MTLShader.mm
Normal file
19
Source/Core/VideoBackends/Metal/MTLShader.mm
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
#include "VideoBackends/Metal/MTLShader.h"
|
||||
|
||||
#include "VideoBackends/Metal/MTLObjectCache.h"
|
||||
|
||||
Metal::Shader::Shader(ShaderStage stage, std::string msl, MRCOwned<id<MTLFunction>> shader)
|
||||
: AbstractShader(stage), m_msl(std::move(msl)), m_shader(std::move(shader))
|
||||
{
|
||||
}
|
||||
|
||||
Metal::Shader::~Shader()
|
||||
{
|
||||
g_object_cache->ShaderDestroyed(this);
|
||||
}
|
||||
|
||||
AbstractShader::BinaryData Metal::Shader::GetBinary() const
|
||||
{
|
||||
return BinaryData(m_msl.begin(), m_msl.end());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue