gl_shader_cache: Check previous pipeline before checking hash map

Port optimization from Vulkan.
This commit is contained in:
ReinUsesLisp 2021-06-20 02:23:50 -03:00 committed by ameerj
parent 218dedca1f
commit f5db8c7440
5 changed files with 43 additions and 31 deletions

View file

@ -146,12 +146,11 @@ private:
BufferCache& buffer_cache;
TextureCache& texture_cache;
VideoCore::ShaderNotify& shader_notify;
bool use_asynchronous_shaders{};
GraphicsPipelineCacheKey graphics_key{};
GraphicsPipeline* current_pipeline{};
bool use_asynchronous_shaders{};
std::unordered_map<ComputePipelineCacheKey, std::unique_ptr<ComputePipeline>> compute_cache;
std::unordered_map<GraphicsPipelineCacheKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;