diff options
Diffstat (limited to 'indra/newview/llspatialpartition.h')
-rw-r--r-- | indra/newview/llspatialpartition.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 020a010405..b765bd1632 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -87,8 +87,6 @@ public: // return mSkinHash->mHash, or 0 if mSkinHash is null U64 getSkinHash(); - LLVector4a mExtents[2]; - LLPointer<LLVertexBuffer> mVertexBuffer; LLPointer<LLViewerTexture> mTexture; std::vector<LLPointer<LLViewerTexture> > mTextureList; @@ -505,6 +503,23 @@ public: typedef LLDrawInfo** drawinfo_iterator; typedef LLDrawable** drawable_iterator; + // Helper function for taking advantage of _mm_prefetch when iterating over cull results + static inline void increment_iterator(LLCullResult::drawinfo_iterator& i, const LLCullResult::drawinfo_iterator& end) + { + ++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); + } + } + } + void clear(); sg_iterator beginVisibleGroups(); |