mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
20 lines
455 B
Plaintext
20 lines
455 B
Plaintext
|
|
||
|
#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());
|
||
|
}
|