summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-12-12 13:46:01 -0800
committerGitHub <noreply@github.com>2024-12-12 15:46:01 -0600
commiteff46262c8324ed4931cdd544a757f0c13f9ec0a (patch)
tree0d5c80a965d93ae44d0184b5dd7493535a2c9d33 /indra/llrender
parent5a629574b775e2a8f3602ee183fd9e1b2fcfac68 (diff)
#2590 Radeon mac optimization pass (#3277)
- Skip updating of reflection probes that are not the default probe when probe coverage is set to "None" - enable RenderAppleUseMultGL and disable occlusion culling on Macs with AMD GPUs - Reduce the number of texture decode threads on Macs with intel cpus. - Move texture deletion to LLImageGL::updateClass and prevent textures from staying resident in vram longer than 3 frames - Disable SSAO by default on Macs with intel CPUs
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llimagegl.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 84c61c790f..5ac3243fd4 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1052,7 +1052,7 @@ U32 type_width_from_pixtype(U32 pixtype)
bool should_stagger_image_set(bool compressed)
{
#if LL_DARWIN
- return false;
+ return !compressed && on_main_thread() && gGLManager.mIsAMD;
#else
// glTexSubImage2D doesn't work with compressed textures on select tested Nvidia GPUs on Windows 10 -Cosmic,2023-03-08
// Setting media textures off-thread seems faster when not using sub_image_lines (Nvidia/Windows 10) -Cosmic,2023-03-31
@@ -1270,37 +1270,37 @@ void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
}
}
+constexpr int DELETE_DELAY = 3; // number of frames to wait before deleting textures
+static std::vector<U32> sFreeList[DELETE_DELAY+1];
+
// static
void LLImageGL::updateClass()
{
sFrameCount++;
+
+ // wait a few frames before actually deleting the textures to avoid
+ // synchronization issues with the GPU
+ U32 idx = (sFrameCount+DELETE_DELAY) % (DELETE_DELAY+1);
+
+ if (!sFreeList[idx].empty())
+ {
+ free_tex_images((GLsizei) sFreeList[idx].size(), sFreeList[idx].data());
+ glDeleteTextures((GLsizei)sFreeList[idx].size(), sFreeList[idx].data());
+ sFreeList[idx].resize(0);
+ }
}
// static
void LLImageGL::deleteTextures(S32 numTextures, const U32 *textures)
{
- // wait a few frames before actually deleting the textures to avoid
- // synchronization issues with the GPU
- static std::vector<U32> sFreeList[4];
-
if (gGLManager.mInited)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- U32 idx = sFrameCount % 4;
-
+ U32 idx = sFrameCount % (DELETE_DELAY+1);
for (S32 i = 0; i < numTextures; ++i)
{
sFreeList[idx].push_back(textures[i]);
}
-
- idx = (sFrameCount + 3) % 4;
-
- if (!sFreeList[idx].empty())
- {
- free_tex_images((GLsizei) sFreeList[idx].size(), sFreeList[idx].data());
- glDeleteTextures((GLsizei)sFreeList[idx].size(), sFreeList[idx].data());
- sFreeList[idx].resize(0);
- }
}
}