diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-22 21:33:10 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-23 02:43:21 +0300 |
| commit | 7d338433d41418ae251919d665c3dab2652b0c26 (patch) | |
| tree | 511161f845498c13652ded96b7101aa318dc842e /indra/llrender | |
| parent | 84f50b9deccf239e59a7d6391ae4cb5d77aa4d54 (diff) | |
Revert #2674 property lines optimizations
QA found no difference performance wise, I see a decrease in performance.
Diffstat (limited to 'indra/llrender')
| -rw-r--r-- | indra/llrender/llrender.cpp | 63 | ||||
| -rw-r--r-- | indra/llrender/llrender.h | 13 |
2 files changed, 15 insertions, 61 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 1a3a499b20..57be8570af 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1774,64 +1774,25 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) return; } - LLVector4a vert(x, y, z); - transform(vert); - mVerticesp[mCount] = vert; - - mCount++; - mVerticesp[mCount] = mVerticesp[mCount-1]; - mColorsp[mCount] = mColorsp[mCount-1]; - mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; -} - -void LLRender::transform(LLVector3& vert) -{ - if (!mUIOffset.empty()) + if (mUIOffset.empty()) { - vert += LLVector3(mUIOffset.back().getF32ptr()); - vert *= LLVector3(mUIScale.back().getF32ptr()); + mVerticesp[mCount].set(x,y,z); } -} - -void LLRender::transform(LLVector4a& vert) -{ - if (!mUIOffset.empty()) + else { + LLVector4a vert(x, y, z); vert.add(mUIOffset.back()); vert.mul(mUIScale.back()); + mVerticesp[mCount] = vert; } -} - -void LLRender::untransform(LLVector3& vert) -{ - if (!mUIOffset.empty()) - { - vert /= LLVector3(mUIScale.back().getF32ptr()); - vert -= LLVector3(mUIOffset.back().getF32ptr()); - } -} - -void LLRender::batchTransform(LLVector4a* verts, U32 vert_count) -{ - if (!mUIOffset.empty()) - { - const LLVector4a& offset = mUIOffset.back(); - const LLVector4a& scale = mUIScale.back(); - - for (U32 i = 0; i < vert_count; ++i) - { - verts[i].add(offset); - verts[i].mul(scale); - } - } -} -void LLRender::vertexBatchPreTransformed(const std::vector<LLVector4a>& verts) -{ - vertexBatchPreTransformed(verts.data(), narrow(verts.size())); + mCount++; + mVerticesp[mCount] = mVerticesp[mCount-1]; + mColorsp[mCount] = mColorsp[mCount-1]; + mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; } -void LLRender::vertexBatchPreTransformed(const LLVector4a* verts, S32 vert_count) +void LLRender::vertexBatchPreTransformed(LLVector4a* verts, S32 vert_count) { if (mCount + vert_count > 4094) { @@ -1852,7 +1813,7 @@ void LLRender::vertexBatchPreTransformed(const LLVector4a* verts, S32 vert_count mVerticesp[mCount] = mVerticesp[mCount-1]; } -void LLRender::vertexBatchPreTransformed(const LLVector4a* verts, const LLVector2* uvs, S32 vert_count) +void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, S32 vert_count) { if (mCount + vert_count > 4094) { @@ -1876,7 +1837,7 @@ void LLRender::vertexBatchPreTransformed(const LLVector4a* verts, const LLVector } } -void LLRender::vertexBatchPreTransformed(const LLVector4a* verts, const LLVector2* uvs, const LLColor4U* colors, S32 vert_count) +void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, LLColor4U* colors, S32 vert_count) { if (mCount + vert_count > 4094) { diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index be8539433c..0801c12fb4 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -450,16 +450,9 @@ public: void diffuseColor4ubv(const U8* c); void diffuseColor4ub(U8 r, U8 g, U8 b, U8 a); - void transform(LLVector3& vert); - void transform(LLVector4a& vert); - void untransform(LLVector3& vert); - - void batchTransform(LLVector4a* verts, U32 vert_count); - - void vertexBatchPreTransformed(const std::vector<LLVector4a>& verts); - void vertexBatchPreTransformed(const LLVector4a* verts, S32 vert_count); - void vertexBatchPreTransformed(const LLVector4a* verts, const LLVector2* uvs, S32 vert_count); - void vertexBatchPreTransformed(const LLVector4a* verts, const LLVector2* uvs, const LLColor4U*, S32 vert_count); + void vertexBatchPreTransformed(LLVector4a* verts, S32 vert_count); + void vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, S32 vert_count); + void vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, LLColor4U*, S32 vert_count); void setColorMask(bool writeColor, bool writeAlpha); void setColorMask(bool writeColorR, bool writeColorG, bool writeColorB, bool writeAlpha); |
