From 767295f9ddc90c3a3f71981da1b3f1860ca4d3aa Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Tue, 11 Nov 2025 16:54:50 -0800 Subject: [PATCH 1/4] Disable shader profiling for certain AMD Radeon GPUs Added logic to detect AMD Radeon 8060 GPUs and disable shader profiling to prevent client freezes and instability. Introduced sCanProfile flag in LLGLSLShader and mSkipProfiling in LLFeatureManager to control profiling behavior based on detected hardware. --- indra/llrender/llglslshader.cpp | 3 ++- indra/llrender/llglslshader.h | 1 + indra/newview/llfeaturemanager.cpp | 17 +++++++++++++++++ indra/newview/llfeaturemanager.h | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 9cd5dc8145b..a268ea07bb4 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -57,6 +57,7 @@ S32 LLGLSLShader::sIndexedTextureChannels = 0; U32 LLGLSLShader::sMaxGLTFMaterials = 0; U32 LLGLSLShader::sMaxGLTFNodes = 0; bool LLGLSLShader::sProfileEnabled = false; +bool LLGLSLShader::sCanProfile = true; std::set LLGLSLShader::sInstances; LLGLSLShader::defines_map_t LLGLSLShader::sGlobalDefines; U64 LLGLSLShader::sTotalTimeElapsed = 0; @@ -267,7 +268,7 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime) bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read) { - if (sProfileEnabled || for_runtime) + if ((sProfileEnabled || for_runtime) && sCanProfile) { if (!mProfilePending) { diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 4702a27cc54..272a99aaa58 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -160,6 +160,7 @@ class LLGLSLShader static std::set sInstances; static bool sProfileEnabled; + static bool sCanProfile; LLGLSLShader(); ~LLGLSLShader(); diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 052278f7313..a94cac9f55c 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -406,6 +406,23 @@ F32 logExceptionBenchmark() bool LLFeatureManager::loadGPUClass() { + // This is a hack for certain AMD cards in newer driver versions on certain APUs. + // These GPUs will show inconsistent freezes when attempting to run shader profiles against them. + // This is extremely problematic as it can lead to: + // - Login freezes + // - Inability to start the client + // - Completely random avatars triggering a freeze + // As a result, we filter out these GPUs for shader profiling. + // - Geenz 11/11/2025 + + if (gGLManager.getRawGLString().find("Radeon") != std::string::npos && gGLManager.getRawGLString().find("8060") != std::string::npos) + { + //gGLManager.mDriverVersionMajor = 27; // Example driver version for testing + LL_WARNS("RenderInit") << "Detected AMD Radeon 8060 GPU; disabling shader profiling to prevent freezes." << LL_ENDL; + mSkipProfiling = true; + LLGLSLShader::sCanProfile = false; + } + if (!gSavedSettings.getBOOL("SkipBenchmark")) { F32 class1_gbps = gSavedSettings.getF32("RenderClass1MemoryBandwidth"); diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index 22de6afbaed..d04b89cb60c 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -123,6 +123,7 @@ class LLFeatureManager : public LLFeatureList, public LLSingleton Date: Wed, 12 Nov 2025 11:00:17 -0800 Subject: [PATCH 2/4] Add RDNA3.5 and check the vendor string for a known current family of bad drivers --- indra/newview/llfeaturemanager.cpp | 36 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index a94cac9f55c..d93ee8be281 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -404,9 +404,38 @@ F32 logExceptionBenchmark() } #endif +bool checkRDNA35() +{ + // This checks if we're running on an RDNA3.5 GPU. You're only going to see these on AMD's APUs. + // As of driver version 32, we're seeing stalls in some of our queries. + // This appears to be a driver bug, and appears to be specific RDNA3.5 APUs. + // There's multiples of these guys, so we just use this function to check if that GPU is on the list of known RDNA3.5 APUs. + // - Geenz 11/12/2025 + std::array rdna35GPUs = { + "8060S", + "8050S", + "8040S", + "860M", + "840M", + "890M", + "880M" + }; + + for (const auto& gpu_name : rdna35GPUs) + { + if (gGLManager.getRawGLString().find(gpu_name) != std::string::npos) + { + LL_WARNS("RenderInit") << "Detected AMD RDNA3.5 GPU (" << gpu_name << ")." << LL_ENDL; + return true; + } + } + + return false; +} + bool LLFeatureManager::loadGPUClass() { - // This is a hack for certain AMD cards in newer driver versions on certain APUs. + // This is a hack for certain AMD GPUs in newer driver versions on certain APUs. // These GPUs will show inconsistent freezes when attempting to run shader profiles against them. // This is extremely problematic as it can lead to: // - Login freezes @@ -415,10 +444,9 @@ bool LLFeatureManager::loadGPUClass() // As a result, we filter out these GPUs for shader profiling. // - Geenz 11/11/2025 - if (gGLManager.getRawGLString().find("Radeon") != std::string::npos && gGLManager.getRawGLString().find("8060") != std::string::npos) + if (checkRDNA35() && gGLManager.mDriverVersionVendorString.find("25.") != std::string::npos) { - //gGLManager.mDriverVersionMajor = 27; // Example driver version for testing - LL_WARNS("RenderInit") << "Detected AMD Radeon 8060 GPU; disabling shader profiling to prevent freezes." << LL_ENDL; + LL_WARNS("RenderInit") << "Detected AMD RDNA3.5 GPU on a known bad driver; disabling shader profiling to prevent freezes." << LL_ENDL; mSkipProfiling = true; LLGLSLShader::sCanProfile = false; } From bae1ead0334c2999d6e6e4bc894df69e64185e4e Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 12 Nov 2025 11:51:25 -0800 Subject: [PATCH 3/4] Update llfeaturemanager.cpp --- indra/newview/llfeaturemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index d93ee8be281..ff01d4c9c18 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -407,7 +407,7 @@ F32 logExceptionBenchmark() bool checkRDNA35() { // This checks if we're running on an RDNA3.5 GPU. You're only going to see these on AMD's APUs. - // As of driver version 32, we're seeing stalls in some of our queries. + // As of driver version 25, we're seeing stalls in some of our queries. // This appears to be a driver bug, and appears to be specific RDNA3.5 APUs. // There's multiples of these guys, so we just use this function to check if that GPU is on the list of known RDNA3.5 APUs. // - Geenz 11/12/2025 From 08543a94c6d77006b2942dd899fa92e7c6d2b055 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 12 Nov 2025 11:57:55 -0800 Subject: [PATCH 4/4] Make sure to check that this is a Radeon. --- indra/newview/llfeaturemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ff01d4c9c18..9f3df54b056 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -444,7 +444,7 @@ bool LLFeatureManager::loadGPUClass() // As a result, we filter out these GPUs for shader profiling. // - Geenz 11/11/2025 - if (checkRDNA35() && gGLManager.mDriverVersionVendorString.find("25.") != std::string::npos) + if (gGLManager.getRawGLString().find("Radeon") != std::string::npos && checkRDNA35() && gGLManager.mDriverVersionVendorString.find("25.") != std::string::npos) { LL_WARNS("RenderInit") << "Detected AMD RDNA3.5 GPU on a known bad driver; disabling shader profiling to prevent freezes." << LL_ENDL; mSkipProfiling = true;