Disable shader profiles on RDNA3.5 to prevent freezes on startup. (#4992) (FS:TJ- Cherry-pick to fix FIRE-36163)
* 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. * Add RDNA3.5 and check the vendor string for a known current family of bad drivers * Update llfeaturemanager.cpp * Make sure to check that this is a Radeon.master
parent
bfb8ffbdaa
commit
4f00a13f5e
|
|
@ -57,6 +57,7 @@ S32 LLGLSLShader::sIndexedTextureChannels = 0;
|
||||||
U32 LLGLSLShader::sMaxGLTFMaterials = 0;
|
U32 LLGLSLShader::sMaxGLTFMaterials = 0;
|
||||||
U32 LLGLSLShader::sMaxGLTFNodes = 0;
|
U32 LLGLSLShader::sMaxGLTFNodes = 0;
|
||||||
bool LLGLSLShader::sProfileEnabled = false;
|
bool LLGLSLShader::sProfileEnabled = false;
|
||||||
|
bool LLGLSLShader::sCanProfile = true;
|
||||||
std::set<LLGLSLShader*> LLGLSLShader::sInstances;
|
std::set<LLGLSLShader*> LLGLSLShader::sInstances;
|
||||||
LLGLSLShader::defines_map_t LLGLSLShader::sGlobalDefines;
|
LLGLSLShader::defines_map_t LLGLSLShader::sGlobalDefines;
|
||||||
U64 LLGLSLShader::sTotalTimeElapsed = 0;
|
U64 LLGLSLShader::sTotalTimeElapsed = 0;
|
||||||
|
|
@ -267,7 +268,7 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime)
|
||||||
|
|
||||||
bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
|
bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
|
||||||
{
|
{
|
||||||
if (sProfileEnabled || for_runtime)
|
if ((sProfileEnabled || for_runtime) && sCanProfile)
|
||||||
{
|
{
|
||||||
if (!mProfilePending)
|
if (!mProfilePending)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ public:
|
||||||
|
|
||||||
static std::set<LLGLSLShader*> sInstances;
|
static std::set<LLGLSLShader*> sInstances;
|
||||||
static bool sProfileEnabled;
|
static bool sProfileEnabled;
|
||||||
|
static bool sCanProfile;
|
||||||
|
|
||||||
LLGLSLShader();
|
LLGLSLShader();
|
||||||
~LLGLSLShader();
|
~LLGLSLShader();
|
||||||
|
|
|
||||||
|
|
@ -409,8 +409,53 @@ F32 logExceptionBenchmark()
|
||||||
}
|
}
|
||||||
#endif
|
#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 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
|
||||||
|
std::array<std::string, 7> 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()
|
bool LLFeatureManager::loadGPUClass()
|
||||||
{
|
{
|
||||||
|
// 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
|
||||||
|
// - 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 && 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;
|
||||||
|
LLGLSLShader::sCanProfile = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gSavedSettings.getBOOL("SkipBenchmark"))
|
if (!gSavedSettings.getBOOL("SkipBenchmark"))
|
||||||
{
|
{
|
||||||
F32 class1_gbps = gSavedSettings.getF32("RenderClass1MemoryBandwidth");
|
F32 class1_gbps = gSavedSettings.getF32("RenderClass1MemoryBandwidth");
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ public:
|
||||||
S32 getVersion() const { return mTableVersion; }
|
S32 getVersion() const { return mTableVersion; }
|
||||||
void setSafe(const bool safe) { mSafe = safe; }
|
void setSafe(const bool safe) { mSafe = safe; }
|
||||||
bool isSafe() const { return mSafe; }
|
bool isSafe() const { return mSafe; }
|
||||||
|
bool skipProfiling() const { return mSkipProfiling; }
|
||||||
|
|
||||||
LLFeatureList *findMask(const std::string& name);
|
LLFeatureList *findMask(const std::string& name);
|
||||||
bool maskFeatures(const std::string& name);
|
bool maskFeatures(const std::string& name);
|
||||||
|
|
@ -170,6 +171,7 @@ protected:
|
||||||
F32 mExpectedGLVersion; //expected GL version according to gpu table
|
F32 mExpectedGLVersion; //expected GL version according to gpu table
|
||||||
std::string mGPUString;
|
std::string mGPUString;
|
||||||
bool mGPUSupported;
|
bool mGPUSupported;
|
||||||
|
bool mSkipProfiling = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline
|
inline
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue