mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-19 03:27:00 +02:00
[vk] DrainPendingBuild
This commit is contained in:
parent
8eb2bb443b
commit
ee0af33a9a
3 changed files with 13 additions and 0 deletions
|
|
@ -578,6 +578,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)) {
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,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;
|
||||||
|
|
|
||||||
|
|
@ -264,6 +264,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…
Add table
Add a link
Reference in a new issue