The open source OpenXR runtime
0
fork

Configure Feed

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

u/ft: Rename min_margin_ns to margin_ns

+8 -8
+8 -8
src/xrt/auxiliary/util/u_timing_frame.c
··· 116 116 uint64_t adjust_non_miss_ns; 117 117 118 118 /*! 119 - * The target amount of GPU margin we want. 119 + * Exrta time between end of draw time and when the present happens. 120 120 */ 121 - uint64_t min_margin_ns; 121 + uint64_t margin_ns; 122 122 123 123 /*! 124 124 * Frame store. ··· 155 155 static uint64_t 156 156 calc_total_app_time(struct display_timing *dt) 157 157 { 158 - return dt->app_time_ns + dt->min_margin_ns; 158 + return dt->app_time_ns + dt->margin_ns; 159 159 } 160 160 161 161 static uint64_t ··· 328 328 return; 329 329 } 330 330 331 - // We want the GPU work to stop at min_margin_ns. 331 + // We want the GPU work to stop at margin_ns. 332 332 if (is_within_of_each_other( // 333 333 f->present_margin_ns, // 334 - dt->min_margin_ns, // 334 + dt->margin_ns, // 335 335 dt->adjust_non_miss_ns)) { 336 336 // Nothing to do, the GPU ended it's work +-adjust_non_miss_ns 337 - // of min_margin_ns before the present started. 337 + // of margin_ns before the present started. 338 338 return; 339 339 } 340 340 341 341 // We didn't miss the frame but we were outside the range adjust the app time. 342 - if (f->present_margin_ns > dt->min_margin_ns) { 342 + if (f->present_margin_ns > dt->margin_ns) { 343 343 // Approach the present time. 344 344 dt->app_time_ns -= dt->adjust_non_miss_ns; 345 345 } else { ··· 611 611 // When not missing frames but adjusting app time at these increments 612 612 dt->adjust_non_miss_ns = get_percent_of_time(estimated_frame_period_ns, 2); 613 613 // Extra margin that is added to app time. 614 - dt->min_margin_ns = get_percent_of_time(estimated_frame_period_ns, 8); 614 + dt->margin_ns = get_percent_of_time(estimated_frame_period_ns, 8); 615 615 616 616 *out_uft = &dt->base; 617 617