diff options
author | Runitai Linden <davep@lindenlab.com> | 2021-10-13 11:02:00 -0500 |
---|---|---|
committer | Runitai Linden <davep@lindenlab.com> | 2021-10-13 11:02:00 -0500 |
commit | 4dedd706ae07c4a1aeedfe9ca0c03b7c905d0b57 (patch) | |
tree | 8fe70e77c79575544f5c1c8fd674443fa98caed2 /indra/newview | |
parent | a1e6cbe4a802f92182163171e6743e7f63d89ace (diff) |
SL-16189 Optimize bindBumpMap
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lldrawpoolbump.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 7e2dfbfda1..f316d121ab 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -694,7 +694,7 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsi break; case BE_BRIGHTNESS: case BE_DARKNESS: - bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code ); + bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code ); break; default: @@ -710,12 +710,12 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsi { if (channel == -2) { - gGL.getTexUnit(1)->bind(bump); - gGL.getTexUnit(0)->bind(bump); + gGL.getTexUnit(1)->bindFast(bump); + gGL.getTexUnit(0)->bindFast(bump); } else { - gGL.getTexUnit(channel)->bind(bump); + gGL.getTexUnit(channel)->bindFast(bump); } return TRUE; diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h index 476b1d41b7..bab160c34d 100644 --- a/indra/newview/lldrawpoolbump.h +++ b/indra/newview/lldrawpoolbump.h @@ -32,6 +32,8 @@ #include "lltextureentry.h" #include "lluuid.h" +#include <unordered_map> + class LLImageRaw; class LLSpatialGroup; class LLDrawInfo; @@ -161,7 +163,7 @@ private: static void onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump ); private: - typedef std::map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t; + typedef std::unordered_map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t; bump_image_map_t mBrightnessEntries; bump_image_map_t mDarknessEntries; }; |