SuggestedDriverVersion
SuggestedDriverVersion
#Overview
name: SuggestedDriverVersion
The value of this variable can be defined or overridden in .ini config files. 6
.ini config files referencing this setting variable.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of SuggestedDriverVersion is to specify a recommended graphics driver version for optimal performance and compatibility with the Unreal Engine.
This setting variable is primarily used in the Unreal Engine’s core subsystem, specifically in the Generic Platform Driver module. It’s part of the engine’s hardware compatibility and driver management system.
The value of this variable is typically set in the Hardware.ini configuration file, as indicated by the comment in the code. It can be parsed from a string that either contains “DriverVersion=…” or just the version number itself.
SuggestedDriverVersion interacts with other variables and structures in the FGPUDriverInfo and FDriverConfigEntryConstraints classes. It’s used in conjunction with various constraints to determine if a particular driver entry applies to the current system.
Developers must be aware that:
- This variable is part of a larger system for managing GPU driver compatibility.
- It’s used to provide recommendations to users when their current driver version might be problematic.
- The value should be carefully set based on thorough testing and known compatibility issues.
Best practices when using this variable include:
- Regularly updating the suggested driver versions based on the latest compatibility testing results.
- Ensuring that the suggested version is actually available for users to download.
- Considering different versions for different GPU manufacturers and models.
- Using it in conjunction with other constraints to provide more specific recommendations.
- Thoroughly testing the game with the suggested driver version to ensure it actually resolves any known issues.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseHardware.ini:37, section: [GPU_NVIDIA Windows]
- INI Section:
GPU_NVIDIA Windows
- Raw value:
"536.40"
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseHardware.ini:49, section: [GPU_NVIDIA Linux]
- INI Section:
GPU_NVIDIA Linux
- Raw value:
"535.86"
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseHardware.ini:57, section: [GPU_AMD Windows]
- INI Section:
GPU_AMD Windows
- Raw value:
"24.3.1"
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseHardware.ini:71, section: [GPU_AMD Linux]
- INI Section:
GPU_AMD Linux
- Raw value:
"23.3.1"
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseHardware.ini:81, section: [GPU_Intel Windows]
- INI Section:
GPU_Intel Windows
- Raw value:
"101.5333"
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseHardware.ini:94, section: [GPU_Intel Linux]
- INI Section:
GPU_Intel Linux
- Raw value:
"30.0.101.1340"
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformDriver.h:443
Scope: file
Source code excerpt:
};
// This corresponds to one SuggestedDriverVersion entry in the Hardware.ini configuration file. One entry includes:
// * The suggested driver version.
// * A set of optional constraints (see FDriverConfigEntryConstraints).
struct FSuggestedDriverEntry : public FDriverConfigEntryConstraints {
FSuggestedDriverEntry() = default;
FSuggestedDriverEntry(const TCHAR* Entry)
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformDriver.h:454
Scope (from outer to inner):
file
function FSuggestedDriverEntry
Source code excerpt:
// For backwards compatibility, accept either "DriverVersion=..." or
// just the version string without the structured format.
FParse::Value(Entry, TEXT("DriverVersion="), SuggestedDriverVersion);
if (SuggestedDriverVersion.IsEmpty() && !HasConstraints() && !FString(Entry).Contains(TEXT("=")))
{
SuggestedDriverVersion = Entry;
}
}
// Checks whether this entry applies to the given driver info, and also returns the number
// of constraints that have been satisfied in OutNumSatisfiedConstraints.
bool AppliesToDriver(const FGPUDriverInfo& Info, uint32& OutNumSatisfiedConstraints)
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformDriver.h:470
Scope (from outer to inner):
file
function bool IsValid
Source code excerpt:
bool IsValid()
{
return !SuggestedDriverVersion.IsEmpty();
}
FString SuggestedDriverVersion;
};
class FGPUDriverHelper
{
public:
FGPUDriverHelper(const FGPUDriverInfo& InDriverInfo)
#Loc: <Workspace>/Engine/Source/Runtime/Core/Tests/GenericPlatform/GenericPlatformDriverTest.cpp:168
Scope: file
Source code excerpt:
CHECK(*Entry.RHINameConstraint == TEXT("D3D11"));
CHECK(Entry.AdapterNameRegexConstraint);
CHECK(Entry.SuggestedDriverVersion == TEXT("512.15"));
}
{
FSuggestedDriverEntry Entry(TEXT("(DriverVersion=\"101.56\")"));
CHECK(Entry.IsValid());
CHECK(Entry.SuggestedDriverVersion == TEXT("101.56"));
}
{
FSuggestedDriverEntry Entry(TEXT("111.56"));
CHECK(Entry.IsValid());
CHECK(Entry.SuggestedDriverVersion == TEXT("111.56"));
}
{
FSuggestedDriverEntry Entry(TEXT("BadString=111.56"));
CHECK(!Entry.IsValid());
}
}
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DynamicRHI.cpp:185
Scope (from outer to inner):
file
function void RHIDetectAndWarnOfBadDrivers
Source code excerpt:
if (!DenyListEntry->AppliesToLatestDrivers())
{
Args.Add(TEXT("RecommendedVer"), FText::Format(NSLOCTEXT("MessageDialog", "SuggestedDriverOrLatest", "{0} or latest driver available"), FText::FromString(SuggestedDriver->SuggestedDriverVersion)));
}
else
{
Args.Add(TEXT("RecommendedVer"), FText::FromString(SuggestedDriver->SuggestedDriverVersion));
}
}
else
{
ensureMsgf(!DenyListEntry->AppliesToLatestDrivers(), TEXT("Latest drivers are denylisted but no recommended driver driver has been provided"));
Args.Add(TEXT("RecommendedVer"), NSLOCTEXT("MessageDialog", "LatestDriver", "latest driver available"));