Просмотр исходного кода

Merge pull request #11646 from FernandoS27/stop-ignoring-your-mental-health

Query Cache: Fix memory leak.
Fernando S 2 лет назад
Родитель
Сommit
a0d56c855c
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      src/video_core/query_cache/bank_base.h
  2. 1 0
      src/video_core/renderer_vulkan/vk_query_cache.cpp

+ 1 - 0
src/video_core/query_cache/bank_base.h

@@ -82,6 +82,7 @@ public:
             size_t new_index = bank_indices.front();
             size_t new_index = bank_indices.front();
             bank_indices.pop_front();
             bank_indices.pop_front();
             bank_pool[new_index].Reset();
             bank_pool[new_index].Reset();
+            bank_indices.push_back(new_index);
             return new_index;
             return new_index;
         }
         }
         size_t new_index = bank_pool.size();
         size_t new_index = bank_pool.size();

+ 1 - 0
src/video_core/renderer_vulkan/vk_query_cache.cpp

@@ -506,6 +506,7 @@ private:
             SetAccumulationValue(query->value);
             SetAccumulationValue(query->value);
             Free(index);
             Free(index);
         });
         });
+        rasterizer->SyncOperation(std::move(func));
     }
     }
 
 
     template <bool is_resolve>
     template <bool is_resolve>