AbstractPipeline: Support returning "cache data"

"Cache data" can be used to assist a driver with creating pipelines by
using previously-compiled shader ISA.
This commit is contained in:
Stenzek
2019-04-15 21:55:26 +10:00
parent 2863183532
commit 61a656570e
29 changed files with 68 additions and 51 deletions

View File

@ -25,9 +25,11 @@ public:
virtual ~AbstractShader() = default;
ShaderStage GetStage() const { return m_stage; }
// Shader binaries represent the input source code in a lower-level form. e.g. SPIR-V or DXBC.
// The shader source code is not required to create a shader object from the binary.
using BinaryData = std::vector<u8>;
virtual bool HasBinary() const = 0;
virtual BinaryData GetBinary() const = 0;
virtual BinaryData GetBinary() const { return {}; }
protected:
ShaderStage m_stage;