summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-08-29 15:06:24 -0500
committerGitHub <noreply@github.com>2024-08-29 15:06:24 -0500
commitb0fefd62adbf51f32434ba077e9f52d8a9241d15 (patch)
tree03876bb19ccf8bc10e4e55583d47c4eeccb92093 /indra/newview
parent11afd7f86afd19fde8b577f57736d6d27542484e (diff)
#2428 Fix for crash when applying PBR material to a single face (take 2) (#2463)
Also fix for some objects randomly disappearing until they're selected again.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llface.cpp5
-rw-r--r--indra/newview/llvovolume.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 9e504402c8..581328b3cb 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -573,7 +573,6 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
if (LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial())
{
vertex_buffer = mVertexBufferGLTF.get();
- vertex_buffer->unmapBuffer();
}
}
// Draw the selection marker using the correctly chosen vertex buffer
@@ -1220,7 +1219,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
mVertexBufferGLTF = new LLVertexBuffer(mVertexBuffer->getTypeMask());
}
- // Clone the existing vertex buffer into the temporary one
+ // Clone the existing vertex buffer into the temporary one
+ // TODO: factor out the need for mVertexBufferGLTF and make selection highlight shader work with the existing vertex buffer
mVertexBuffer->clone(*mVertexBufferGLTF);
// Recursive call the same function with the argument rebuild_for_gltf set to true
@@ -1228,6 +1228,7 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
getGeometryVolume(volume, face_index, mat_vert_in, mat_norm_in, index_offset, force_rebuild, no_debug_assert, true);
mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
+ mVertexBufferGLTF->unmapBuffer();
}
else if (!tep->isSelected() && mVertexBufferGLTF.notNull())
{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index dcaf85b894..669ccb0924 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5765,9 +5765,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
continue;
}
- if (facep->hasGeometry() &&
- (rigged || // <-- HACK FIXME -- getPixelArea might be incorrect for rigged objects
- facep->getPixelArea() > FORCE_CULL_AREA)) // <-- don't render tiny faces
+ if (facep->hasGeometry())
{
cur_total += facep->getGeomCount();