mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:48:09 +02:00
Apply the new tiering rule for macos: if intel gpu go low, else stick to mid
This commit is contained in:
parent
99f62f61a9
commit
a5e2cacb98
1 changed files with 20 additions and 33 deletions
|
@ -58,21 +58,32 @@ bool filterOnComputer(const platform::json& computer, Profiler::Tier& tier) {
|
||||||
// tier filter on computer MACOS
|
// tier filter on computer MACOS
|
||||||
bool filterOnComputerMACOS(const platform::json& computer, Profiler::Tier& tier) {
|
bool filterOnComputerMACOS(const platform::json& computer, Profiler::Tier& tier) {
|
||||||
|
|
||||||
// it s a macos computer, probably can tell from the model name:
|
// it s a macos computer, probably can tell from the model name but...
|
||||||
if (computer.count(keys::computer::model)) {
|
// The simple rule for mac is
|
||||||
const auto model = computer[keys::computer::model].get<std::string>();
|
// if it s an intel gpu then LOW
|
||||||
if (model.find("MacBookAir") != std::string::npos) {
|
// else go mid
|
||||||
|
auto gpu = platform::getGPU(platform::getMasterGPU());
|
||||||
|
if (gpu.count(keys::gpu::vendor)) {
|
||||||
|
std::string gpuVendor = gpu[keys::gpu::vendor].get<std::string>();
|
||||||
|
std::string gpuModel = gpu[keys::gpu::model].get<std::string>();
|
||||||
|
|
||||||
|
// intel integrated graphics
|
||||||
|
if (gpuVendor.find(keys::gpu::vendor_Intel) != std::string::npos) {
|
||||||
|
// go LOW because Intel GPU
|
||||||
tier = Profiler::Tier::LOW;
|
tier = Profiler::Tier::LOW;
|
||||||
return true;
|
return true;
|
||||||
} else if (model.find("MacBookPro") != std::string::npos) {
|
} else {
|
||||||
|
// else go mid
|
||||||
tier = Profiler::Tier::MID;
|
tier = Profiler::Tier::MID;
|
||||||
return true;
|
return true;
|
||||||
} else if (model.find("MacBook") != std::string::npos) {
|
|
||||||
tier = Profiler::Tier::LOW;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// no gpuinfo ?
|
||||||
|
// Go low in doubt
|
||||||
|
// go LOW because Intel GPU
|
||||||
|
tier = Profiler::Tier::LOW;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool filterOnProcessors(const platform::json& computer, const platform::json& cpu, const platform::json& gpu, Profiler::Tier& tier) {
|
bool filterOnProcessors(const platform::json& computer, const platform::json& cpu, const platform::json& gpu, Profiler::Tier& tier) {
|
||||||
|
@ -133,30 +144,6 @@ bool filterOnProcessors(const platform::json& computer, const platform::json& cp
|
||||||
// YES on macos EXCEPT for macbookair with gpu intel iris or intel HD 6000
|
// YES on macos EXCEPT for macbookair with gpu intel iris or intel HD 6000
|
||||||
bool Profiler::isRenderMethodDeferredCapable() {
|
bool Profiler::isRenderMethodDeferredCapable() {
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
// Deferred works correctly on every supported macos platform at the moment, let s enable it
|
|
||||||
/*
|
|
||||||
auto computer = platform::getComputer();
|
|
||||||
const auto computerModel = (computer.count(keys::computer::model) ? computer[keys::computer::model].get<std::string>() : "");
|
|
||||||
|
|
||||||
auto gpuInfo = platform::getGPU(getMasterGPU());
|
|
||||||
const auto gpuModel = (gpuInfo.count(keys::gpu::model) ? gpuInfo[keys::gpu::model].get<std::string>() : "");
|
|
||||||
|
|
||||||
|
|
||||||
// Macbook air 2018 are a problem
|
|
||||||
if ((computerModel.find("MacBookAir7,2") != std::string::npos) && (gpuModel.find("Intel HD Graphics 6000") != std::string::npos)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We know for fact that the Mac BOok Pro 13 from Mid 2014 INtel Iris is problematic,
|
|
||||||
if ((computerModel.find("MacBookPro11,1") != std::string::npos) && (gpuModel.find("Intel Iris") != std::string::npos)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TO avoid issues for the next few days, we are excluding all of intel chipset...
|
|
||||||
if ((gpuModel.find("Intel ") != std::string::npos)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
#elif defined(Q_OS_ANDROID)
|
#elif defined(Q_OS_ANDROID)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue