summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.h
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-05-02 18:47:21 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-05-02 18:47:21 -0500
commite09475713b7abe6fcb916f4a770081a1696b57ab (patch)
tree23ff7f10a9f710e237600df5bbc40b180ed71010 /indra/llrender/llglslshader.h
parent2994833e7cc53670bd3303cb88054d7acee875cf (diff)
DRTVWR-559 Optimization pass, make it so profileAvatar can read back GPU timer without a frame stall.
Diffstat (limited to 'indra/llrender/llglslshader.h')
-rw-r--r--indra/llrender/llglslshader.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 9d187c972c..3e7dae6669 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -168,8 +168,16 @@ public:
void unload();
void clearStats();
void dumpStats();
- void placeProfileQuery();
- void readProfileQuery();
+
+ // place query objects for profiling if profiling is enabled
+ // if for_runtime is true, will place timer query only whether or not profiling is enabled
+ void placeProfileQuery(bool for_runtime = false);
+
+ // Readback query objects if profiling is enabled
+ // If for_runtime is true, will readback timer query iff query is available
+ // Will return false if a query is pending (try again later)
+ // If force_read is true, will force an immediate readback (severe performance penalty)
+ bool readProfileQuery(bool for_runtime = false, bool force_read = false);
BOOL createShader(std::vector<LLStaticHashedString>* attributes,
std::vector<LLStaticHashedString>* uniforms,
@@ -292,6 +300,7 @@ public:
defines_map_t mDefines;
//statistics for profiling shader performance
+ bool mProfilePending = false;
U32 mTimerQuery;
U32 mSamplesQuery;
U32 mPrimitivesQuery;
@@ -308,6 +317,9 @@ public:
// this pointer should be set to whichever shader represents this shader's rigged variant
LLGLSLShader* mRiggedVariant = nullptr;
+ // hacky flag used for optimization in LLDrawPoolAlpha
+ bool mCanBindFast = false;
+
#ifdef LL_PROFILER_ENABLE_RENDER_DOC
void setLabel(const char* label);
#endif