Switch away from std::string

API expects const char* anyways.
master
Geenz Linden 2022-10-06 15:18:17 -04:00
parent be1cdc1aaa
commit db92f95649
5 changed files with 11 additions and 9 deletions

View File

@ -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

View File

@ -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:

View File

@ -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
{

View File

@ -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

View File

@ -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);