The open source OpenXR runtime
0
fork

Configure Feed

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

u/pacing: Allow more then two frames to be alive at the same time

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
04b9602d f4b75b35

+4 -2
+4 -2
src/xrt/auxiliary/util/u_pacing_app.c
··· 35 35 * 36 36 */ 37 37 38 + #define FRAME_COUNT (8) 39 + 38 40 enum u_pa_state 39 41 { 40 42 U_PA_READY, ··· 72 74 { 73 75 struct u_pacing_app base; 74 76 75 - struct u_pa_frame frames[2]; 77 + struct u_pa_frame frames[FRAME_COUNT]; 76 78 uint32_t current_frame; 77 79 uint32_t next_frame; 78 80 ··· 115 117 } 116 118 117 119 #define DEBUG_PRINT_FRAME_ID() UPA_LOG_T("%" PRIi64, frame_id) 118 - #define GET_INDEX_FROM_ID(RT, ID) ((uint64_t)(ID) % ARRAY_SIZE((RT)->frames)) 120 + #define GET_INDEX_FROM_ID(RT, ID) ((uint64_t)(ID) % FRAME_COUNT) 119 121 120 122 #define IIR_ALPHA_LT 0.8 121 123 #define IIR_ALPHA_GT 0.8