summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-09-18 17:11:03 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-09-19 09:58:17 +0300
commit6d842ac0af814a088c56f437dc885e4ce58b61a8 (patch)
treed6945e6f1ef777864c14c7f2947d97ce924991d0 /indra/llrender/llrender.cpp
parentb0597e927a04e622b2434e6fc8327bb5af48ab0f (diff)
Expose LLVector4a in LLRender
Avoid using a bunch of allocators. Make sure we use LLVector4a's SSE logic instead of LLVector3's. Some minor optimizations.
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index f432b09107..c8a9fb4893 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1298,7 +1298,7 @@ void LLRender::pushUIMatrix()
{
if (mUIOffset.empty())
{
- mUIOffset.push_back(LLVector3(0,0,0));
+ mUIOffset.emplace_back(0.f,0.f,0.f);
}
else
{
@@ -1307,7 +1307,7 @@ void LLRender::pushUIMatrix()
if (mUIScale.empty())
{
- mUIScale.push_back(LLVector3(1,1,1));
+ mUIScale.emplace_back(1.f,1.f,1.f);
}
else
{
@@ -1718,7 +1718,7 @@ LLVertexBuffer* LLRender::genBuffer(U32 attribute_mask, S32 count)
vb->setBuffer();
- vb->setPositionData((LLVector4a*)mVerticesp.get());
+ vb->setPositionData(mVerticesp.get());
if (attribute_mask & LLVertexBuffer::MAP_TEXCOORD0)
{
@@ -1774,12 +1774,12 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
if (mUIOffset.empty())
{
- mVerticesp[mCount] = LLVector3(x,y,z);
+ mVerticesp[mCount].set(x,y,z);
}
else
{
LLVector3 vert = (LLVector3(x,y,z)+mUIOffset.back()).scaledVec(mUIScale.back());
- mVerticesp[mCount] = vert;
+ mVerticesp[mCount].set(vert.mV[VX], vert.mV[VY], vert.mV[VZ]);
}
mCount++;
@@ -1788,7 +1788,7 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
}
-void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
+void LLRender::vertexBatchPreTransformed(LLVector4a* verts, S32 vert_count)
{
if (mCount + vert_count > 4094)
{
@@ -1809,7 +1809,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
mVerticesp[mCount] = mVerticesp[mCount-1];
}
-void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 vert_count)
+void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, S32 vert_count)
{
if (mCount + vert_count > 4094)
{
@@ -1833,7 +1833,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v
}
}
-void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLColor4U* colors, S32 vert_count)
+void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, LLColor4U* colors, S32 vert_count)
{
if (mCount + vert_count > 4094)
{