r.Android.MaliMidgardIndexingBug
r.Android.MaliMidgardIndexingBug
#Overview
name: r.Android.MaliMidgardIndexingBug
The value of this variable can be defined or overridden in .ini config files. 3
.ini config files referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Android.MaliMidgardIndexingBug is to address a specific issue in the rendering system on Android devices with Mali T8xx GPUs. This setting is used to handle a bug in the OpenGL ES driver where attributes are not handled correctly for indexed instance draws when the difference between two adjacent index values is larger than 16.
This setting variable is primarily used in the Android-specific part of the Unreal Engine’s rendering system. It’s referenced in the Core module, specifically in the Android platform-specific code.
The value of this variable is set through a console variable (CVarMaliMidgardIndexingBug) with a default value of 0 (off). It can be changed at runtime through console commands or configuration files.
The associated variable CVarMaliMidgardIndexingBug directly interacts with r.Android.MaliMidgardIndexingBug. They share the same value and purpose.
Developers must be aware that this variable is specific to Android devices with Mali T8xx GPUs. It should only be enabled when dealing with rendering issues on these specific devices. The variable is marked as ECVF_ReadOnly, which means its value should not be changed during runtime after initial setup.
Best practices when using this variable include:
- Only enable it (set to 1) when encountering specific rendering issues on Mali T8xx GPUs.
- Test thoroughly on affected devices to ensure it resolves the issue without introducing new problems.
- Consider performance implications, as enabling this might affect rendering performance.
Regarding the associated variable CVarMaliMidgardIndexingBug:
The purpose of CVarMaliMidgardIndexingBug is the same as r.Android.MaliMidgardIndexingBug. It’s the actual console variable implementation that controls the behavior described by r.Android.MaliMidgardIndexingBug.
This variable is used in the Android-specific part of the Core module, particularly in the FAndroidMisc class.
The value is set when the console variable is created, with a default of 0. It can be changed through console commands or configuration files.
CVarMaliMidgardIndexingBug is used directly in the FAndroidMisc::Expand16BitIndicesTo32BitOnLoad() function to determine whether 16-bit indices should be expanded to 32-bit on load.
Developers should be aware that this variable directly affects the behavior of index expansion for Android devices. It’s a low-level rendering optimization that should be handled with care.
Best practices include:
- Use the r.Android.MaliMidgardIndexingBug console variable for configuration rather than directly accessing CVarMaliMidgardIndexingBug.
- Be cautious when modifying this variable, as it can have significant impacts on rendering behavior and performance on affected devices.
- Always test changes thoroughly on target devices before deploying to production.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:1040, section: [Android_Mali_T6xx DeviceProfile]
- INI Section:
Android_Mali_T6xx DeviceProfile
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:1045, section: [Android_Mali_T7xx DeviceProfile]
- INI Section:
Android_Mali_T7xx DeviceProfile
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:1050, section: [Android_Mali_T8xx DeviceProfile]
- INI Section:
Android_Mali_T8xx DeviceProfile
- Raw value:
1
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Android/AndroidPlatformMisc.cpp:78
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarMaliMidgardIndexingBug(
TEXT("r.Android.MaliMidgardIndexingBug"),
0,
TEXT("For an indexed instance draw, the OpenGL ES driver does not handle attributes correctly. This issue only happens on Mali T8xx GPU when the difference between two adjacent index values are larger than 16.\n")
TEXT(" 0 = off\n")
TEXT(" 1 = on."),
ECVF_ReadOnly
);
#Associated Variable and Callsites
This variable is associated with another variable named CVarMaliMidgardIndexingBug
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Android/AndroidPlatformMisc.cpp:77
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarMaliMidgardIndexingBug(
TEXT("r.Android.MaliMidgardIndexingBug"),
0,
TEXT("For an indexed instance draw, the OpenGL ES driver does not handle attributes correctly. This issue only happens on Mali T8xx GPU when the difference between two adjacent index values are larger than 16.\n")
TEXT(" 0 = off\n")
TEXT(" 1 = on."),
ECVF_ReadOnly
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Android/AndroidPlatformMisc.cpp:3016
Scope (from outer to inner):
file
function bool FAndroidMisc::Expand16BitIndicesTo32BitOnLoad
Source code excerpt:
bool FAndroidMisc::Expand16BitIndicesTo32BitOnLoad()
{
return (CVarMaliMidgardIndexingBug.GetValueOnAnyThread() > 0);
}
int FAndroidMisc::GetMobilePropagateAlphaSetting()
{
extern int GAndroidPropagateAlpha;
return GAndroidPropagateAlpha;