Browse Source

[vk] DrainPendingBuild

eds-true-adreno-fixes
CamilleLaVey 3 weeks ago
committed by Caio Oliveira
parent
commit
094b2a3274
No known key found for this signature in database GPG Key ID: AAAE6C7FD4186B0C
  1. 7
      src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
  2. 2
      src/video_core/renderer_vulkan/vk_pipeline_cache.h
  3. 4
      src/video_core/renderer_vulkan/vk_rasterizer.cpp

7
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp

@ -513,6 +513,13 @@ PipelineCache::~PipelineCache() {
} }
} }
void PipelineCache::DrainPendingBuilds() {
if (!device.HasBrokenParallelShaderCompiling()) {
return;
}
workers.WaitForRequests();
}
GraphicsPipeline* PipelineCache::CurrentGraphicsPipeline() { GraphicsPipeline* PipelineCache::CurrentGraphicsPipeline() {
if (!RefreshStages(graphics_key.unique_hashes)) { if (!RefreshStages(graphics_key.unique_hashes)) {

2
src/video_core/renderer_vulkan/vk_pipeline_cache.h

@ -115,6 +115,8 @@ public:
void LoadDiskResources(u64 title_id, std::stop_token stop_loading, void LoadDiskResources(u64 title_id, std::stop_token stop_loading,
const VideoCore::DiskResourceLoadCallback& callback); const VideoCore::DiskResourceLoadCallback& callback);
void DrainPendingBuilds();
private: private:
struct InFlightPipelineBuild { struct InFlightPipelineBuild {
std::mutex mutex; std::mutex mutex;

4
src/video_core/renderer_vulkan/vk_rasterizer.cpp

@ -261,6 +261,10 @@ void RasterizerVulkan::PrepareDraw(bool is_indexed, Func&& draw_func) {
FlushWork(); FlushWork();
gpu_memory->FlushCaching(); gpu_memory->FlushCaching();
if (device.HasBrokenParallelShaderCompiling()) {
pipeline_cache.DrainPendingBuilds();
}
GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()}; GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()};
if (!pipeline) { if (!pipeline) {
return; return;

Loading…
Cancel
Save