From 9938b0d38935c193577d05365bfc519b3e2be2aa Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 3 Sep 2024 22:45:42 +1000 Subject: [PATCH] GPUDevice: Fix initial pipeline cache not being created --- src/util/gpu_device.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/gpu_device.cpp b/src/util/gpu_device.cpp index f6ce84431..86e49ebba 100644 --- a/src/util/gpu_device.cpp +++ b/src/util/gpu_device.cpp @@ -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 =