diff options
| author | Dave Parks <davep@lindenlab.com> | 2023-01-09 15:18:57 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2023-01-09 15:18:57 -0600 |
| commit | a710bf9067bd4c4217b9febc0ad277a1636ec882 (patch) | |
| tree | df6b4105f0e7d518f8fecfe3ab654f17abd1ac7c /indra/newview/pipeline.cpp | |
| parent | b3fc82ff1da0c869f0b1dd841647a120a1ae56af (diff) | |
SL-18869 Optimizations -- Use _mm_prefetch to cut down on cache misses when iterating over render batches.
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 10c271cddc..9851d4bc6a 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2863,6 +2863,8 @@ void LLPipeline::clearRebuildDrawables() void LLPipeline::rebuildPriorityGroups() { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; + LL_PROFILE_GPU_ZONE("rebuildPriorityGroups"); + LLTimer update_timer; assertInitialized(); @@ -7412,18 +7414,7 @@ void LLPipeline::renderShadowSimple(U32 type) { LLDrawInfo& params = **i; - ++i; - - if (i != end) - { - _mm_prefetch((char*) (*i)->mVertexBuffer.get(), _MM_HINT_NTA); - - auto* ni = i + 1; - if (ni != end) - { - _mm_prefetch((char*)*ni, _MM_HINT_NTA); - } - } + LLCullResult::increment_iterator(i, end); LLVertexBuffer* vb = params.mVertexBuffer; if (vb != last_vb) @@ -7448,11 +7439,16 @@ void LLPipeline::renderAlphaObjects(U32 mask, bool texture, bool batch_texture, U32 type = LLRenderPass::PASS_ALPHA; LLVOAvatar* lastAvatar = nullptr; U64 lastMeshId = 0; - for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) + auto* begin = gPipeline.beginRenderMap(type); + auto* end = gPipeline.endRenderMap(type); + + for (LLCullResult::drawinfo_iterator i = begin; i != end; ) { LLDrawInfo* pparams = *i; if (pparams) { + LLCullResult::increment_iterator(i, end); + if (rigged) { if (pparams->mAvatar != nullptr) |
