From 5491a05796863c89051bf9569e1d6597ed13f4a2 Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 20 Jan 2023 14:40:09 +0100 Subject: [PATCH] OpenXR - Enable level 5 CPU/GPU performance on Quest 2 --- Common/VR/VRFramebuffer.cpp | 4 ++-- ext/openxr/openxr.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Common/VR/VRFramebuffer.cpp b/Common/VR/VRFramebuffer.cpp index 792dd5a8799e..a7b85f9f738f 100644 --- a/Common/VR/VRFramebuffer.cpp +++ b/Common/VR/VRFramebuffer.cpp @@ -476,8 +476,8 @@ void ovrApp_HandleSessionStateChanges(ovrApp* app, XrSessionState state) { #ifdef ANDROID if (app->SessionActive && VR_GetPlatformFlag(VR_PLATFORM_PERFORMANCE_EXT)) { - XrPerfSettingsLevelEXT cpuPerfLevel = XR_PERF_SETTINGS_LEVEL_BOOST_EXT; - XrPerfSettingsLevelEXT gpuPerfLevel = XR_PERF_SETTINGS_LEVEL_BOOST_EXT; + XrPerfSettingsLevelEXT cpuPerfLevel = XR_PERF_SETTINGS_LEVEL_PERFORMANCE_MAX_EXT; + XrPerfSettingsLevelEXT gpuPerfLevel = XR_PERF_SETTINGS_LEVEL_PERFORMANCE_MAX_EXT; PFN_xrPerfSettingsSetPerformanceLevelEXT pfnPerfSettingsSetPerformanceLevelEXT = NULL; OXR(xrGetInstanceProcAddr( diff --git a/ext/openxr/openxr.h b/ext/openxr/openxr.h index 88772f7f4e6a..2e4dec9fe142 100644 --- a/ext/openxr/openxr.h +++ b/ext/openxr/openxr.h @@ -1651,6 +1651,7 @@ typedef enum XrPerfSettingsLevelEXT { XR_PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT = 25, XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT = 50, XR_PERF_SETTINGS_LEVEL_BOOST_EXT = 75, + XR_PERF_SETTINGS_LEVEL_PERFORMANCE_MAX_EXT = 100, XR_PERF_SETTINGS_LEVEL_MAX_ENUM_EXT = 0x7FFFFFFF } XrPerfSettingsLevelEXT;