From 3b44bbc6bc8cf26136c5bf6db05a84907f74e089 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 4 Jan 2025 17:40:43 +0100 Subject: [PATCH] MaterialSystem: remove the need for a dummy STBSP file As of commit 5e0c24ad8437a02c1c62325d1d0e5f39e6684f90, the dummy file is no longer necessary. --- src/materialsystem/cmaterialsystem.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/materialsystem/cmaterialsystem.cpp b/src/materialsystem/cmaterialsystem.cpp index e6f15c6a..62d142f6 100644 --- a/src/materialsystem/cmaterialsystem.cpp +++ b/src/materialsystem/cmaterialsystem.cpp @@ -114,22 +114,13 @@ static void StreamDB_Init(const char* const pszLevelName) v_StreamDB_Init(targetStreamDB); - // If the requested STBSP file doesn't exist, load the dummy file to enable - // GPU driven texture streaming. - if (s_streamDataBase->fileHandle == FS_ASYNC_FILE_INVALID) - { - targetStreamDB = STBSP_GPU_DRIVEN_FILE; - v_StreamDB_Init(targetStreamDB); + // If the requested STBSP file doesn't exist, then enable the GPU driven + // texture streaming system. + const bool gpuDriven = s_streamDataBase->fileHandle == FS_ASYNC_FILE_INVALID; + gpu_driven_tex_stream->SetValue(gpuDriven); - gpu_driven_tex_stream->SetValue(true); - } - else - gpu_driven_tex_stream->SetValue(false); - - if (s_streamDataBase->fileHandle != FS_ASYNC_FILE_INVALID) + if (!gpuDriven) Msg(eDLL_T::MS, "StreamDB_Init: Loaded STBSP file '%s.stbsp'\n", targetStreamDB); - else - Error(eDLL_T::MS, 0, "StreamDB_Init: STBSP file '%s.stbsp' not found; texture streaming unavailable\n", pszLevelName, STBSP_GPU_DRIVEN_FILE); } static ConVar stream_overlay_memory("stream_overlay_memory", "524288", FCVAR_DEVELOPMENTONLY, "Total string memory to allocate for the texture streaming debug overlay.");