CamilleLaVey
3 weeks ago
committed by
Caio Oliveira
No known key found for this signature in database
GPG Key ID: AAAE6C7FD4186B0C
3 changed files with
13 additions and
0 deletions
-
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
-
src/video_core/renderer_vulkan/vk_pipeline_cache.h
-
src/video_core/renderer_vulkan/vk_rasterizer.cpp
|
|
|
@ -513,6 +513,13 @@ PipelineCache::~PipelineCache() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void PipelineCache::DrainPendingBuilds() { |
|
|
|
if (!device.HasBrokenParallelShaderCompiling()) { |
|
|
|
return; |
|
|
|
} |
|
|
|
workers.WaitForRequests(); |
|
|
|
} |
|
|
|
|
|
|
|
GraphicsPipeline* PipelineCache::CurrentGraphicsPipeline() { |
|
|
|
|
|
|
|
if (!RefreshStages(graphics_key.unique_hashes)) { |
|
|
|
|
|
|
|
@ -115,6 +115,8 @@ public: |
|
|
|
void LoadDiskResources(u64 title_id, std::stop_token stop_loading, |
|
|
|
const VideoCore::DiskResourceLoadCallback& callback); |
|
|
|
|
|
|
|
void DrainPendingBuilds(); |
|
|
|
|
|
|
|
private: |
|
|
|
struct InFlightPipelineBuild { |
|
|
|
std::mutex mutex; |
|
|
|
|
|
|
|
@ -261,6 +261,10 @@ void RasterizerVulkan::PrepareDraw(bool is_indexed, Func&& draw_func) { |
|
|
|
FlushWork(); |
|
|
|
gpu_memory->FlushCaching(); |
|
|
|
|
|
|
|
if (device.HasBrokenParallelShaderCompiling()) { |
|
|
|
pipeline_cache.DrainPendingBuilds(); |
|
|
|
} |
|
|
|
|
|
|
|
GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()}; |
|
|
|
if (!pipeline) { |
|
|
|
return; |
|
|
|
|