diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-02-02 04:38:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 04:38:13 +0100 |
commit | 8a33f8bd303221fdcbdebe2579e3fbefa03b385e (patch) | |
tree | 47c1df67181d5f6752b9f532c5c4284510d4aff1 /src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | |
parent | Merge pull request #9703 from ameerj/txq-ms (diff) | |
parent | gl_compute_pipeline: Force context flush when loading shader cache (diff) | |
download | yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.tar yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.tar.gz yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.tar.bz2 yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.tar.lz yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.tar.xz yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.tar.zst yuzu-8a33f8bd303221fdcbdebe2579e3fbefa03b385e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index c115dabe1..29491e762 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp @@ -176,7 +176,7 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c std::array<std::string, 5> sources, std::array<std::vector<u32>, 5> sources_spirv, const std::array<const Shader::Info*, 5>& infos, - const GraphicsPipelineKey& key_) + const GraphicsPipelineKey& key_, bool force_context_flush) : texture_cache{texture_cache_}, buffer_cache{buffer_cache_}, program_manager{program_manager_}, state_tracker{state_tracker_}, key{key_} { if (shader_notify) { @@ -231,7 +231,8 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c const bool in_parallel = thread_worker != nullptr; const auto backend = device.GetShaderBackend(); auto func{[this, sources = std::move(sources), sources_spirv = std::move(sources_spirv), - shader_notify, backend, in_parallel](ShaderContext::Context*) mutable { + shader_notify, backend, in_parallel, + force_context_flush](ShaderContext::Context*) mutable { for (size_t stage = 0; stage < 5; ++stage) { switch (backend) { case Settings::ShaderBackend::GLSL: @@ -251,7 +252,7 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c break; } } - if (in_parallel) { + if (force_context_flush || in_parallel) { std::scoped_lock lock{built_mutex}; built_fence.Create(); // Flush this context to ensure compilation commands and fence are in the GPU pipe. |