VideoBackends:Metal: Bring back unified memory config

Turns out it was helpful.  (Most improvement in ubershaders.)  This time with much better auto mode.
This commit is contained in:
TellowKrinkle
2022-07-23 17:27:24 -05:00
parent 93ce7bf344
commit c08de82e90
11 changed files with 201 additions and 16 deletions

View File

@ -216,6 +216,27 @@ void Metal::Util::PopulateBackendInfoFeatures(VideoConfig* config, id<MTLDevice>
config->backend_info.AAModes.push_back(i);
}
switch (config->iManuallyUploadBuffers)
{
case TriState::Off:
g_features.manual_buffer_upload = false;
break;
case TriState::On:
g_features.manual_buffer_upload = true;
break;
case TriState::Auto:
#if TARGET_OS_OSX
g_features.manual_buffer_upload = false;
if (@available(macOS 10.15, *))
if (![device hasUnifiedMemory])
g_features.manual_buffer_upload = true;
#else
// All iOS devices have unified memory
g_features.manual_buffer_upload = false;
#endif
break;
}
g_features.subgroup_ops = false;
if (@available(macOS 10.15, iOS 13, *))
{