summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp3
-rw-r--r--indra/llrender/llglslshader.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 5a0281eeb5..39bd9cbfed 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -57,6 +57,7 @@ S32 LLGLSLShader::sIndexedTextureChannels = 0;
U32 LLGLSLShader::sMaxGLTFMaterials = 0;
U32 LLGLSLShader::sMaxGLTFNodes = 0;
bool LLGLSLShader::sProfileEnabled = false;
+bool LLGLSLShader::sCanProfile = true;
std::set<LLGLSLShader*> LLGLSLShader::sInstances;
LLGLSLShader::defines_map_t LLGLSLShader::sGlobalDefines;
U64 LLGLSLShader::sTotalTimeElapsed = 0;
@@ -273,7 +274,7 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime)
bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
{
- if (sProfileEnabled || for_runtime)
+ if ((sProfileEnabled || for_runtime) && sCanProfile)
{
if (!mProfilePending)
{
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 4702a27cc5..272a99aaa5 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -160,6 +160,7 @@ public:
static std::set<LLGLSLShader*> sInstances;
static bool sProfileEnabled;
+ static bool sCanProfile;
LLGLSLShader();
~LLGLSLShader();