The open source OpenXR runtime

Add environment variable 'XRT_APP_FRAME_LAG_LOG_AS_LEVEL' which now defaults to 'U_LOGGING_DEBUG' to supress two frame drop messages.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2528>

authored by

MagicCraftMaster and committed by
Marge Bot
175e2315 3032f473

+7 -3
+7 -3
src/xrt/compositor/multi/comp_multi_compositor.c
··· 9 9 * @ingroup comp_multi 10 10 */ 11 11 12 + #include "util/u_logging.h" 12 13 #include "xrt/xrt_session.h" 13 14 14 15 #include "os/os_time.h" ··· 39 40 #include "android/android_custom_surface.h" 40 41 #include "android/android_globals.h" 41 42 #endif 43 + 44 + DEBUG_GET_ONCE_LOG_OPTION(app_frame_lag_level, "XRT_APP_FRAME_LAG_LOG_AS_LEVEL", U_LOGGING_DEBUG) 45 + #define LOG_FRAME_LAG(...) U_LOG_IFL(debug_get_log_option_app_frame_lag_level(), u_log_get_global_level(), __VA_ARGS__) 42 46 43 47 /* 44 48 * ··· 188 192 189 193 // This frame is for the next frame, drop the old one no matter what. 190 194 if (time_is_within_half_ms(mc->progress.data.display_time_ns, mc->slot_next_frame_display)) { 191 - U_LOG_W("%.3fms: Dropping old missed frame in favour for completed new frame", 192 - time_ns_to_ms_f(now_ns)); 195 + LOG_FRAME_LAG("%.3fms: Dropping old missed frame in favour for completed new frame", 196 + time_ns_to_ms_f(now_ns)); 193 197 break; 194 198 } 195 199 ··· 924 928 late = true; 925 929 } 926 930 927 - U_LOG_W("Frame %s by %.2fms!", late ? "late" : "early", time_ns_to_ms_f(diff_ns)); 931 + LOG_FRAME_LAG("Frame %s by %.2fms!", late ? "late" : "early", time_ns_to_ms_f(diff_ns)); 928 932 } 929 933 930 934 void