Vulkan: Reload pipeline cache when relevant host config changes

This commit is contained in:
Stenzek
2017-06-24 19:58:14 +10:00
parent a8343cc19a
commit b380f292b4
5 changed files with 67 additions and 28 deletions

View File

@ -154,13 +154,16 @@ public:
// Recompile shared shaders, call when stereo mode changes.
void RecompileSharedShaders();
// Reload pipeline cache. This will destroy all pipelines.
void ReloadShaderAndPipelineCaches();
// Shared shader accessors
VkShaderModule GetScreenQuadVertexShader() const { return m_screen_quad_vertex_shader; }
VkShaderModule GetPassthroughVertexShader() const { return m_passthrough_vertex_shader; }
VkShaderModule GetScreenQuadGeometryShader() const { return m_screen_quad_geometry_shader; }
VkShaderModule GetPassthroughGeometryShader() const { return m_passthrough_geometry_shader; }
// Gets the filename of the specified type of cache object (e.g. vertex shader, pipeline).
std::string GetDiskCacheFileName(const char* type);
std::string GetDiskCacheFileName(const char* type, bool include_gameid, bool include_host_config);
private:
bool CreatePipelineCache();