The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add environment variable 'XRT_COMP_FRAME_LAG_LOG_AS_LEVEL' which still defaults to 'U_LOGGING_WARN' to supress a frame drop message if desired.

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

authored by

MagicCraftMaster and committed by
Marge Bot
03299fd9 175e2315

+4 -1
+4 -1
src/xrt/compositor/main/comp_renderer.c
··· 29 29 #include "util/u_sink.h" 30 30 #include "util/u_var.h" 31 31 #include "util/u_frame_times_widget.h" 32 + #include "util/u_debug.h" 32 33 33 34 #include "util/comp_render.h" 34 35 #include "util/comp_high_level_render.h" ··· 50 51 #include <assert.h> 51 52 #include <math.h> 52 53 54 + DEBUG_GET_ONCE_LOG_OPTION(comp_frame_lag_level, "XRT_COMP_FRAME_LAG_LOG_AS_LEVEL", U_LOGGING_WARN) 55 + #define LOG_FRAME_LAG(...) U_LOG_IFL(debug_get_log_option_comp_frame_lag_level(), u_log_get_global_level(), __VA_ARGS__) 53 56 54 57 /* 55 58 * ··· 805 808 desired_present_time_ns + U_TIME_1MS_IN_NS < after_ns) { 806 809 uint64_t diff_ns = after_ns - desired_present_time_ns; 807 810 double diff_ms_f = time_ns_to_ms_f(diff_ns); 808 - COMP_WARN(c, "Compositor probably missed frame by %.2fms", diff_ms_f); 811 + LOG_FRAME_LAG("Compositor probably missed frame by %.2fms", diff_ms_f); 809 812 } 810 813 } 811 814