The open source OpenXR runtime
0
fork

Configure Feed

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

u/pacing: Account for present slop in assert

+7 -2
+7 -2
src/xrt/auxiliary/util/u_pacing_compositor.c
··· 30 30 31 31 #define NUM_FRAMES 16 32 32 33 + #define PRESENT_SLOP_NS (U_TIME_HALF_MS_IN_NS) 34 + 33 35 34 36 /* 35 37 * ··· 414 416 415 417 uint64_t wake_up_time_ns = f->wake_up_time_ns; 416 418 uint64_t desired_present_time_ns = f->desired_present_time_ns; 417 - uint64_t present_slop_ns = U_TIME_HALF_MS_IN_NS; 419 + uint64_t present_slop_ns = PRESENT_SLOP_NS; 418 420 uint64_t predicted_display_time_ns = f->predicted_display_time_ns; 419 421 uint64_t predicted_display_period_ns = pc->frame_period_ns; 420 422 uint64_t min_display_period_ns = pc->frame_period_ns; ··· 483 485 } 484 486 return; 485 487 } 488 + 486 489 assert(f->state == STATE_SUBMITTED); 487 - assert(f->desired_present_time_ns == desired_present_time_ns); 490 + uint64_t unslopped_desired_present_time_ns = desired_present_time_ns + PRESENT_SLOP_NS; 491 + assert(f->desired_present_time_ns == desired_present_time_ns || 492 + f->desired_present_time_ns == unslopped_desired_present_time_ns); 488 493 489 494 f->when_infoed_ns = when_ns; 490 495 f->actual_present_time_ns = actual_present_time_ns;