From 734663d5f6d07e6f374acf675f6737aa30828719 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Tue, 11 Jun 2024 19:58:40 -0300 Subject: [PATCH] Dump debug shader output if shader was cached Fix by user bishopnator https://forums.ogre3d.org/viewtopic.php?t=97263 --- OgreMain/src/OgreHlms.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OgreMain/src/OgreHlms.cpp b/OgreMain/src/OgreHlms.cpp index c209413f298..c544f79c202 100644 --- a/OgreMain/src/OgreHlms.cpp +++ b/OgreMain/src/OgreHlms.cpp @@ -2148,6 +2148,12 @@ namespace Ogre codeCache.shaders[i] = compileShaderCode( source[i], "", finalHash, static_cast( i ) ); + + if( mDebugOutput ) + { + debugDumpFile.write( source[i].c_str(), + static_cast( source[i].size() ) ); + } } }