| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <Metal/Metal.h> |
| 7 |
|
| 8 |
#include "VideoBackends/Metal/MRCHelpers.h" |
| 9 |
|
| 10 |
#include "VideoCommon/AbstractPipeline.h" |
| 11 |
#include "VideoCommon/AbstractShader.h" |
| 12 |
|
| 13 |
namespace Metal |
| 14 |
{ |
| 15 |
class Shader : public AbstractShader |
| 16 |
{ |
| 17 |
public: |
| 18 |
explicit Shader(ShaderStage stage, std::string msl, MRCOwned<id<MTLFunction>> shader); |
| 19 |
~Shader(); |
| 20 |
|
| 21 |
id<MTLFunction> GetShader() const { return m_shader; } |
| 22 |
const std::string& GetMSL() const { return m_msl; } |
| 23 |
BinaryData GetBinary() const override; |
| 24 |
|
| 25 |
private: |
| 26 |
std::string m_msl; |
| 27 |
MRCOwned<id<MTLFunction>> m_shader; |
| 28 |
}; |
| 29 |
} |