Initial support for title switching + better Wii U menu compatibility (#907)

This commit is contained in:
Exzap 2023-07-21 13:54:07 +02:00 committed by GitHub
parent bfbeeae6f6
commit 2200cc0ddf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 2549 additions and 746 deletions

View file

@ -451,3 +451,9 @@ void RendererShaderVk::ShaderCacheLoading_end()
// keep g_spirvCache open since we will write to it while the game is running
s_isLoadingShadersVk = false;
}
void RendererShaderVk::ShaderCacheLoading_Close()
{
delete s_spirvCache;
s_spirvCache = nullptr;
}

View file

@ -22,7 +22,8 @@ class RendererShaderVk : public RendererShader
public:
static void ShaderCacheLoading_begin(uint64 cacheTitleId);
static void ShaderCacheLoading_end();
static void ShaderCacheLoading_end();
static void ShaderCacheLoading_Close();
RendererShaderVk(ShaderType type, uint64 baseHash, uint64 auxHash, bool isGameShader, bool isGfxPackShader, const std::string& glslCode);
virtual ~RendererShaderVk();

View file

@ -117,6 +117,15 @@ void VulkanPipelineStableCache::EndLoading()
// keep cache file open for writing of new pipelines
}
void VulkanPipelineStableCache::Close()
{
if(s_cache)
{
delete s_cache;
s_cache = nullptr;
}
}
struct CachedPipeline
{
struct ShaderHash

View file

@ -41,6 +41,7 @@ public:
bool UpdateLoading(uint32& pipelinesLoadedTotal, uint32& pipelinesMissingShaders);
void EndLoading();
void LoadPipelineFromCache(std::span<uint8> fileData);
void Close(); // called on title exit
bool HasPipelineCached(uint64 baseHash, uint64 pipelineStateHash);
void AddCurrentStateToCache(uint64 baseHash, uint64 pipelineStateHash);