From 317dcdea1ca8d1f540187af47fc23a36ad8232aa Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sat, 30 Aug 2025 01:59:43 +0200 Subject: Performance Optimisations, Bloom effect, Visuals Panel This commit contains performance optimisations in the the pipeline, framebuffer, vertexbuffer, reflection probes, shadows. It also fixes many opengl errors, modifies the opengl debugging, and adds a visuals effects panel. --- indra/newview/llglsandbox.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'indra/newview/llglsandbox.cpp') diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 112008172e..fffc520d9c 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -728,8 +728,7 @@ void LLViewerObjectList::renderObjectBeacons() S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - gGL.flush(); - glLineWidth( (F32)line_width ); + LLRender2D::setLineWidth(line_width); last_line_width = line_width; } @@ -758,8 +757,7 @@ void LLViewerObjectList::renderObjectBeacons() S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - gGL.flush(); - glLineWidth( (F32)line_width ); + LLRender2D::setLineWidth(line_width); last_line_width = line_width; } @@ -772,8 +770,7 @@ void LLViewerObjectList::renderObjectBeacons() gGL.end(); } - gGL.flush(); - glLineWidth(1.f); + LLRender2D::setLineWidth(1.f); for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { @@ -808,7 +805,9 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di { pos_end.mV[i] = pos_agent.mV[i] + (50 * direction.mV[i]); } - glLineWidth((GLfloat)LLPipeline::DebugBeaconLineWidth); + + LLRender2D::setLineWidth((GLfloat)LLPipeline::DebugBeaconLineWidth); + gGL.begin(LLRender::LINES); color.mV[3] *= 0.5f; gGL.color4fv(color.mV); @@ -818,9 +817,7 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di gGL.vertex3fv(pos_end.mV); gGL.end(); - gGL.flush(); - glLineWidth(1.f); - + LLRender2D::setLineWidth(1.f); } //----------------------------------------------------------------------------- @@ -977,7 +974,7 @@ F32 gpu_benchmark() delete[] pixels; return -1.f; } - dest[i].bindTarget(); + dest[i].bindTarget("", 1); dest[i].clear(); dest[i].flush(); @@ -1039,7 +1036,7 @@ F32 gpu_benchmark() // run GPU timer benchmark { ShaderProfileHelper initProfile; - dest[0].bindTarget(); + dest[0].bindTarget("benchmark", 1); gBenchmarkProgram.bind(); for (S32 c = 0; c < samples; ++c) { -- cgit v1.2.3