diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index f424a01541608f9af9b02adb34adf17753bc35d9..27de7070ff298ea1b322ca7d8d19854e819857d8 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 01eca7ebfe43569ea4495e93f9a0c8ca5ce23cd6..fd69f43f873b83346a5014b30dc13adaa6be6118 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -295,7 +295,7 @@ class LLGLSLShader 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 4ce04c17f66acbe5e9dd0e4da05af3941851575f..33dcd6c563b6914e0573ec1b417e6336c26bd848 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 a7e5fddf8ca228e414bd354d4183debae4e48c3a..d6f681e4cad421f5ed889ce84a1f646885b529d2 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -301,7 +301,7 @@ class LLVertexBuffer : public LLRefCount 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 e6642081542eb6ac9df79d31757eabd1a43ca24f..e8fde70ed0d99730cbeec530c603bf479538c2db 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -199,7 +199,7 @@ class LLRenderPass : public LLDrawPool }; #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 @@ class LLRenderPass : public LLDrawPool } } #else - static std::string lookupPass(U32 pass) { return ""; } + static inline const char* lookupPass(U32 pass) { return ""; } #endif LLRenderPass(const U32 type);