Add quirk to prevent discarding frames

This commit is contained in:
Patrick Nicolas
2026-05-10 19:11:17 +02:00
committed by xytovl
parent 1685bbde2c
commit 50a0f1a0ed
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -167,6 +167,7 @@ const hmd_traits_t hmd_traits = [] {
traits.permissions[feature::eye_gaze] = "com.picovr.permission.EYE_TRACKING";
traits.permissions[feature::face_tracking] = "com.picovr.permission.FACE_TRACKING";
traits.view_locate = false;
traits.discard_frame = false;
const auto pico_model = get_property("pxr.vendorhw.product.model");
spdlog::info(" pxr.vendorhw.product.model = \"{}\":", pico_model.value_or("<unset>"));
+1
View File
@@ -51,6 +51,7 @@ extern const struct hmd_traits_t
bool bind_simple_controller = true;
bool hand_interaction_grip_surface = true;
bool pico_face_tracker = false;
bool discard_frame = true; // can do xrBeginFrame twice to discard the first one
XrViewConfigurationView override_view(XrViewConfigurationView) const;
} hmd_traits;
+2 -1
View File
@@ -934,7 +934,8 @@ void scenes::stream::render(const XrFrameState & frame_state)
}
// Allow the headset to time warp if we are redisplaying a frame
if (std::ranges::any_of(current_blit_handles, [](const auto & h) { return h and h->feedback.times_displayed < 2; }) or
if ((not hmd_traits.discard_frame) or
std::ranges::any_of(current_blit_handles, [](const auto & h) { return h and h->feedback.times_displayed < 2; }) or
is_gui_interactable())
{
XrExtent2Di extents[view_count];