early-access version 2665

This commit is contained in:
pineappleEA
2022-04-09 11:30:20 +02:00
parent f9f5321781
commit 7a13d2c502
41 changed files with 374 additions and 149 deletions

View File

@@ -253,7 +253,7 @@ GraphicsPipeline::GraphicsPipeline(
}
}
if (in_parallel) {
std::lock_guard lock{built_mutex};
std::scoped_lock lock{built_mutex};
built_fence.Create();
// Flush this context to ensure compilation commands and fence are in the GPU pipe.
glFlush();

View File

@@ -258,7 +258,7 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading,
[this, key, env = std::move(env), &state, &callback](Context* ctx) mutable {
ctx->pools.ReleaseContents();
auto pipeline{CreateComputePipeline(ctx->pools, key, env)};
std::lock_guard lock{state.mutex};
std::scoped_lock lock{state.mutex};
if (pipeline) {
compute_cache.emplace(key, std::move(pipeline));
}
@@ -280,7 +280,7 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading,
}
ctx->pools.ReleaseContents();
auto pipeline{CreateGraphicsPipeline(ctx->pools, key, MakeSpan(env_ptrs), false)};
std::lock_guard lock{state.mutex};
std::scoped_lock lock{state.mutex};
if (pipeline) {
graphics_cache.emplace(key, std::move(pipeline));
}