From e8eac9f3a82b2dcacadf7239e21613a6646f5535 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 44e91ce2f..025c29fed 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 =