Shaders dumped to logs/shader_dump directory if 'ShyotlDumpRawShaders' is true, or a shader throws an error of some sort.

This commit is contained in:
Shyotl
2011-10-22 01:55:08 -05:00
parent 405182025d
commit b3423de80a
2 changed files with 37 additions and 0 deletions

View File

@@ -32,6 +32,7 @@
#include "llviewerprecompiledheaders.h"
#include <boost/filesystem.hpp> //First, because glh_linear #defines equivalent.. which boost uses internally
#include "llfeaturemanager.h"
#include "llviewershadermgr.h"
@@ -351,6 +352,11 @@ void LLViewerShaderMgr::setShaders()
return;
}
{
const std::string dumpdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"shader_dump")+gDirUtilp->getDirDelimiter();
boost::filesystem::remove_all(dumpdir);
}
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
static const LLCachedControl<bool> no_texture_indexing("ShyotlUseLegacyTextureBatching",false);
static const LLCachedControl<bool> use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching.