summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender2dutils.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/llrender2dutils.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/llrender2dutils.cpp')
-rw-r--r--indra/llrender/llrender2dutils.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index e488082c7e..20ad0275bd 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -446,15 +446,13 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
ui_translation.mV[VX] + width * ui_scale.mV[VX],
ui_translation.mV[VY]);
- LLGLSUIDefault gls_ui;
-
gGL.getTexUnit(0)->bind(image, true);
gGL.color4fv(color.mV);
constexpr S32 NUM_VERTICES = 9 * 2 * 3; // 9 quads, 2 triangles per quad, 3 vertices per triangle
static thread_local LLVector2 uv[NUM_VERTICES];
- static thread_local LLVector3 pos[NUM_VERTICES];
+ static thread_local LLVector4a pos[NUM_VERTICES];
S32 index = 0;
@@ -719,8 +717,6 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
return;
}
- LLGLSUIDefault gls_ui;
-
if(image != NULL)
{
gGL.getTexUnit(0)->bind(image, true);
@@ -735,8 +731,8 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
if (degrees == 0.f)
{
constexpr S32 NUM_VERTICES = 2 * 3;
- static thread_local LLVector2 uv[NUM_VERTICES];
- static thread_local LLVector3 pos[NUM_VERTICES];
+ static thread_local LLVector2 uv[NUM_VERTICES +1];
+ static thread_local LLVector4a pos[NUM_VERTICES +1];
gGL.begin(LLRender::TRIANGLES);
{