mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 11:06:39 +02:00
Merge branch 'vircadia:master' into new_compiler_flags
This commit is contained in:
commit
712a546381
4 changed files with 25 additions and 31 deletions
|
@ -386,6 +386,8 @@ bool startCrashHandler(std::string appPath) {
|
|||
} else {
|
||||
qCDebug(crash_handler) << "Locating own directory by argv[0]";
|
||||
interfaceDir.setPath(QString::fromStdString(appPath));
|
||||
// argv[0] gets us the path including the binary file
|
||||
interfaceDir.cdUp();
|
||||
}
|
||||
|
||||
if (!interfaceDir.exists(CRASHPAD_HANDLER_NAME)) {
|
||||
|
|
|
@ -69,15 +69,15 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
|
|||
bool isDeferredCapable = platform::Profiler::isRenderMethodDeferredCapable();
|
||||
auto masterDisplay = platform::getDisplay(platform::getMasterDisplay());
|
||||
|
||||
// eval recommanded PPI and Scale
|
||||
float recommandedPpiScale = 1.0f;
|
||||
const float RECOMMANDED_PPI[] = { 200.0f, 120.f, 160.f, 250.f};
|
||||
// eval recommended PPI and Scale
|
||||
float recommendedPpiScale = 1.0f;
|
||||
const float RECOMMENDED_PPI[] = { 200.0f, 120.f, 160.f, 250.f};
|
||||
if (!masterDisplay.empty() && masterDisplay.count(platform::keys::display::ppi)) {
|
||||
float ppi = masterDisplay[platform::keys::display::ppi];
|
||||
// only scale if the actual ppi is higher than the recommended ppi
|
||||
if (ppi > RECOMMANDED_PPI[preset]) {
|
||||
if (ppi > RECOMMENDED_PPI[preset]) {
|
||||
// make sure the scale is no less than a quarter
|
||||
recommandedPpiScale = std::max(0.25f, RECOMMANDED_PPI[preset] / (float) ppi);
|
||||
recommendedPpiScale = std::max(0.25f, RECOMMENDED_PPI[preset] / (float) ppi);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
|
|||
RenderScriptingInterface::RenderMethod::DEFERRED :
|
||||
RenderScriptingInterface::RenderMethod::FORWARD ) );
|
||||
|
||||
RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommandedPpiScale);
|
||||
RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
|
||||
|
||||
RenderScriptingInterface::getInstance()->setShadowsEnabled(true);
|
||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
|
||||
|
@ -100,7 +100,7 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
|
|||
RenderScriptingInterface::RenderMethod::DEFERRED :
|
||||
RenderScriptingInterface::RenderMethod::FORWARD));
|
||||
|
||||
RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommandedPpiScale);
|
||||
RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
|
||||
|
||||
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
|
||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
|
||||
|
@ -112,7 +112,7 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
|
|||
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
|
||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::ECO);
|
||||
|
||||
RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommandedPpiScale);
|
||||
RenderScriptingInterface::getInstance()->setViewportResolutionScale(recommendedPpiScale);
|
||||
|
||||
DependencyManager::get<LODManager>()->setWorldDetailQuality(WORLD_DETAIL_LOW);
|
||||
|
||||
|
|
|
@ -151,13 +151,21 @@ void GLBackend::init() {
|
|||
GPUIdent* gpu = GPUIdent::getInstance(vendor, renderer);
|
||||
unsigned int mem;
|
||||
|
||||
// Do not try to get texture memory information on unsupported systems.
|
||||
#if defined(Q_OS_ANDROID) || defined(USE_GLES) || defined(Q_OS_DARWIN)
|
||||
qCDebug(gpugllogging) << "Automatic texture memory not supported in this configuration";
|
||||
_videoCard = Unknown;
|
||||
_dedicatedMemory = gpu->getMemory() * BYTES_PER_MIB;
|
||||
_totalMemory = _dedicatedMemory;
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES) && !defined(Q_OS_DARWIN)
|
||||
if (vendor.contains("NVIDIA") ) {
|
||||
qCDebug(gpugllogging) << "NVIDIA card detected";
|
||||
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
|
||||
|
||||
GL_GET_INTEGER(GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX);
|
||||
GL_GET_INTEGER(GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX);
|
||||
GL_GET_INTEGER(GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX);
|
||||
#endif
|
||||
|
||||
qCDebug(gpugllogging) << "GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX: " << GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX;
|
||||
qCDebug(gpugllogging) << "GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX: " << GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX;
|
||||
|
@ -170,10 +178,10 @@ void GLBackend::init() {
|
|||
|
||||
} else if (vendor.contains("ATI")) {
|
||||
qCDebug(gpugllogging) << "ATI card detected";
|
||||
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
|
||||
GL_GET_INTEGER(TEXTURE_FREE_MEMORY_ATI);
|
||||
#endif
|
||||
|
||||
GL_GET_INTEGER(TEXTURE_FREE_MEMORY_ATI);
|
||||
|
||||
// We are actually getting free memory instead of total memory
|
||||
_totalMemory = TEXTURE_FREE_MEMORY_ATI * BYTES_PER_KIB;
|
||||
_dedicatedMemory = _totalMemory;
|
||||
_videoCard = ATI;
|
||||
|
@ -187,9 +195,10 @@ void GLBackend::init() {
|
|||
} else {
|
||||
qCCritical(gpugllogging) << "Don't know how to get memory for OpenGL vendor " << vendor << "; renderer " << renderer << ", trying fallback";
|
||||
_videoCard = Unknown;
|
||||
_dedicatedMemory = gpu->getMemory();
|
||||
_dedicatedMemory = gpu->getMemory() * BYTES_PER_MIB;
|
||||
_totalMemory = _dedicatedMemory;
|
||||
}
|
||||
#endif
|
||||
|
||||
qCDebug(gpugllogging) << "dedicated: " << _dedicatedMemory;
|
||||
qCDebug(gpugllogging) << "total: " << _totalMemory;
|
||||
|
|
17
prebuild.py
17
prebuild.py
|
@ -58,22 +58,6 @@ class TrackableLogger(logging.Logger):
|
|||
logging.setLoggerClass(TrackableLogger)
|
||||
logger = logging.getLogger('prebuild')
|
||||
|
||||
def headSha():
|
||||
if shutil.which('git') is None:
|
||||
logger.warn("Unable to find git executable, can't caclulate commit ID")
|
||||
return '0xDEADBEEF'
|
||||
repo_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
git = subprocess.Popen(
|
||||
'git rev-parse --short HEAD',
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
shell=True, cwd=repo_dir, universal_newlines=True,
|
||||
)
|
||||
stdout, _ = git.communicate()
|
||||
sha = stdout.split('\n')[0]
|
||||
if not sha:
|
||||
raise RuntimeError("couldn't find git sha for repository {}".format(repo_dir))
|
||||
return sha
|
||||
|
||||
@contextmanager
|
||||
def timer(name):
|
||||
''' Print the elapsed time a context's execution takes to execute '''
|
||||
|
@ -120,7 +104,6 @@ def main():
|
|||
if args.ci_build:
|
||||
logging.basicConfig(datefmt='%H:%M:%S', format='%(asctime)s %(guid)s %(message)s', level=logging.INFO)
|
||||
|
||||
logger.info('sha=%s' % headSha())
|
||||
logger.info('start')
|
||||
|
||||
# OS dependent information
|
||||
|
|
Loading…
Reference in a new issue