GPUDevice: Fix initial pipeline cache not being created

This commit is contained in:
Stenzek 2024-09-03 22:45:42 +10:00
parent e619fc9020
commit 9938b0d389
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -515,8 +515,9 @@ std::string GPUDevice::GetShaderCacheBaseName(std::string_view type) const
bool GPUDevice::OpenPipelineCache(const std::string& filename)
{
if (FileSystem::GetPathFileSize(filename.c_str()) <= 0)
return false;
// Let it create if it does not exist.
if (!FileSystem::FileExists(filename.c_str()))
return true;
Error error;
CompressHelpers::OptionalByteBuffer data =