mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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:
@ -44,17 +44,6 @@ OGLShader::~OGLShader()
|
||||
glDeleteProgram(m_gl_compute_program_id);
|
||||
}
|
||||
|
||||
bool OGLShader::HasBinary() const
|
||||
{
|
||||
// NOTE: GL shaders do not have binaries, programs do.
|
||||
return false;
|
||||
}
|
||||
|
||||
AbstractShader::BinaryData OGLShader::GetBinary() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::unique_ptr<OGLShader> OGLShader::CreateFromSource(ShaderStage stage, const char* source,
|
||||
size_t length)
|
||||
{
|
||||
|
@ -24,8 +24,6 @@ public:
|
||||
GLenum GetGLShaderType() const { return m_type; }
|
||||
GLuint GetGLShaderID() const { return m_gl_id; }
|
||||
GLuint GetGLComputeProgramID() const { return m_gl_compute_program_id; }
|
||||
bool HasBinary() const override;
|
||||
BinaryData GetBinary() const override;
|
||||
|
||||
static std::unique_ptr<OGLShader> CreateFromSource(ShaderStage stage, const char* source,
|
||||
size_t length);
|
||||
|
@ -828,7 +828,9 @@ std::unique_ptr<AbstractShader> Renderer::CreateShaderFromBinary(ShaderStage sta
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractPipeline> Renderer::CreatePipeline(const AbstractPipelineConfig& config)
|
||||
std::unique_ptr<AbstractPipeline> Renderer::CreatePipeline(const AbstractPipelineConfig& config,
|
||||
const void* cache_data,
|
||||
size_t cache_data_length)
|
||||
{
|
||||
return OGLPipeline::Create(config);
|
||||
}
|
||||
|
@ -102,7 +102,9 @@ public:
|
||||
size_t length) override;
|
||||
std::unique_ptr<NativeVertexFormat>
|
||||
CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
|
||||
std::unique_ptr<AbstractPipeline> CreatePipeline(const AbstractPipelineConfig& config) override;
|
||||
std::unique_ptr<AbstractPipeline> CreatePipeline(const AbstractPipelineConfig& config,
|
||||
const void* cache_data = nullptr,
|
||||
size_t cache_data_length = 0) override;
|
||||
std::unique_ptr<AbstractFramebuffer>
|
||||
CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment) override;
|
||||
|
||||
|
@ -90,6 +90,8 @@ void VideoBackend::InitBackendInfo()
|
||||
g_Config.backend_info.bSupportsCopyToVram = true;
|
||||
g_Config.backend_info.bSupportsLargePoints = true;
|
||||
g_Config.backend_info.bSupportsPartialDepthCopies = true;
|
||||
g_Config.backend_info.bSupportsShaderBinaries = false;
|
||||
g_Config.backend_info.bSupportsPipelineCacheData = false;
|
||||
|
||||
// TODO: There is a bug here, if texel buffers or SSBOs/atomics are not supported the graphics
|
||||
// options will show the option when it is not supported. The only way around this would be
|
||||
|
Reference in New Issue
Block a user