From 7bd9d21e19b923096ba2b5ea3cbc8be3e13d7aa0 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 19 Jan 2023 09:13:45 -0600 Subject: Optimizations, decruft, and intel compatibility pass (#53) SL-18869, SL-18772 Overhaul VBO management, restore occlusion culling, intel compatibility pass, etc --- indra/newview/llviewerjointmesh.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'indra/newview/llviewerjointmesh.cpp') diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index f3b0e82b3a..be2a1da968 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -1,4 +1,4 @@ -/** + /** * @file llviewerjointmesh.cpp * @brief Implementation of LLViewerJointMesh class * @@ -62,10 +62,6 @@ extern PFNGLWEIGHTFVARBPROC glWeightfvARB; extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB; #endif -static const U32 sRenderMask = LLVertexBuffer::MAP_VERTEX | - LLVertexBuffer::MAP_NORMAL | - LLVertexBuffer::MAP_TEXCOORD0; - //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // LLViewerJointMesh @@ -287,8 +283,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.getTexUnit(diffuse_channel)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT)); } - U32 mask = sRenderMask; - U32 start = mMesh->mFaceVertexOffset; U32 end = start + mMesh->mFaceVertexCount - 1; U32 count = mMesh->mFaceIndexCount; @@ -304,14 +298,9 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) { uploadJointMatrices(); } - mask = mask | LLVertexBuffer::MAP_WEIGHT; - if (mFace->getPool()->getShaderLevel() > 1) - { - mask = mask | LLVertexBuffer::MAP_CLOTHWEIGHT; - } } - buff->setBuffer(mask); + buff->setBuffer(); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); } else @@ -319,7 +308,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.pushMatrix(); LLMatrix4 jointToWorld = getWorldMatrix(); gGL.multMatrix((GLfloat*)jointToWorld.mMatrix); - buff->setBuffer(mask); + buff->setBuffer(); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); gGL.popMatrix(); } @@ -506,7 +495,7 @@ void LLViewerJointMesh::updateGeometry(LLFace *mFace, LLPolyMesh *mMesh) } } - buffer->flush(); + buffer->unmapBuffer(); } void LLViewerJointMesh::updateJointGeometry() -- cgit v1.2.3 From 334d71e9107ae3c4d35b181f2ed6e5c9ff1de519 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 1 May 2023 17:05:09 -0500 Subject: SL-19656 Rewrite avatar and attachment render metrics to not interfere with render pipe and be representative of actual render cost instead of driver synchronization time. * SL-19656 Rewrite avatar and attachment render metrics to not interfere with render pipe and be representative of actual render cost instead of driver synchronization time. * SL-19656 Remove now dead code (trackAttachments et al). * SL-19656 Fix for crash on GL <= 3.2 --- indra/newview/llviewerjointmesh.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llviewerjointmesh.cpp') diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 00e1179896..5ce8f4023d 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -227,16 +227,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) return 0; } - // render time capture - // This path does not appear to have attachments. Prove this then remove. - std::unique_ptr ratPtr{}; - auto vobj = mFace->getViewerObject(); - if( vobj && vobj->isAttachment() ) - { - trackAttachments( vobj, mFace->isState(LLFace::RIGGED), &ratPtr ); - LL_WARNS("trackAttachments") << "Attachment render time is captuted." << LL_ENDL; - } - U32 triangle_count = 0; S32 diffuse_channel = LLDrawPoolAvatar::sDiffuseChannel; -- cgit v1.2.3 From ee0b330b2d6a3433e3bac6ab21cf6cc3e580c605 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Tue, 16 May 2023 20:31:29 -0500 Subject: DRTVWR-559 Decruft deprecated OpenGL flags. --- indra/newview/llviewerjointmesh.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerjointmesh.cpp') diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 5ce8f4023d..5d46c695b7 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -39,7 +39,6 @@ #include "lldrawpoolbump.h" #include "lldynamictexture.h" #include "llface.h" -#include "llgldbg.h" #include "llglheaders.h" #include "llviewertexlayer.h" #include "llviewercamera.h" -- cgit v1.2.3