diff options
author | Geenz Linden <geenz@lindenlab.com> | 2022-10-06 15:18:17 -0400 |
---|---|---|
committer | Geenz Linden <geenz@lindenlab.com> | 2022-10-06 15:18:17 -0400 |
commit | db92f9564992b9910b21f3de57a584ccfa199e75 (patch) | |
tree | 04dc727d9b536761042f1d968b36bb07d220f13b | |
parent | be1cdc1aaa67eca71fee8cbbc16b4c85bcbdb258 (diff) |
Switch away from std::string
API expects const char* anyways.
-rw-r--r-- | indra/llrender/llglslshader.cpp | 6 | ||||
-rw-r--r-- | indra/llrender/llglslshader.h | 2 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 6 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.h | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpool.h | 4 |
5 files changed, 11 insertions, 9 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index f424a01541..27de7070ff 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -505,7 +505,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, } #ifdef LL_PROFILER_ENABLE_TRACY_OPENGL - setLabel(mName); + setLabel(mName.c_str()); #endif return success; @@ -1792,8 +1792,8 @@ void LLShaderUniforms::apply(LLGLSLShader* shader) } #ifdef LL_PROFILER_ENABLE_TRACY_OPENGL -void LLGLSLShader::setLabel(std::string label) { - LL_LABEL_OBJECT_GL(GL_PROGRAM, mProgramObject, label.length(), label.c_str()); +void LLGLSLShader::setLabel(const char* label) { + LL_LABEL_OBJECT_GL(GL_PROGRAM, mProgramObject, strlen(label), label); } #endif diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 01eca7ebfe..fd69f43f87 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -295,7 +295,7 @@ public: LLGLSLShader* mRiggedVariant = nullptr; #ifdef LL_PROFILER_ENABLE_TRACY_OPENGL - void setLabel(std::string label); + void setLabel(const char* label); #endif private: diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 4ce04c17f6..33dcd6c563 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -574,9 +574,11 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of } } -void LLVertexBuffer::setLabel(std::string label) { - LL_LABEL_OBJECT_GL(GL_BUFFER, mGLBuffer, label.length(), label.c_str()); +#ifdef LL_PROFILER_ENABLE_TRACY_OPENGL +void LLVertexBuffer::setLabel(const char* label) { + LL_LABEL_OBJECT_GL(GL_BUFFER, mGLBuffer, strlen(label), label); } +#endif void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const { diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index a7e5fddf8c..d6f681e4ca 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -301,7 +301,7 @@ public: void validateRange(U32 start, U32 end, U32 count, U32 offset) const; #ifdef LL_PROFILER_ENABLE_TRACY_OPENGL - void setLabel(std::string label); + void setLabel(const char* label); #endif diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index e664208154..e8fde70ed0 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -199,7 +199,7 @@ public: }; #ifdef LL_PROFILER_ENABLE_TRACY_OPENGL - static std::string lookupPassName(U32 pass) + static inline const char* lookupPassName(U32 pass) { switch (pass) { @@ -331,7 +331,7 @@ public: } } #else - static std::string lookupPass(U32 pass) { return ""; } + static inline const char* lookupPass(U32 pass) { return ""; } #endif LLRenderPass(const U32 type); |