Skip to content
Snippets Groups Projects
Commit c6fbb069 authored by Milan Jaros's avatar Milan Jaros
Browse files

fix timing

parent 4fab6d33
No related branches found
No related tags found
No related merge requests found
Pipeline #26245 failed
...@@ -170,7 +170,9 @@ calc_period(const struct render_timing *rt) ...@@ -170,7 +170,9 @@ calc_period(const struct render_timing *rt)
// Error checking. // Error checking.
uint64_t base_period_ns = min_period(rt); uint64_t base_period_ns = min_period(rt);
if (base_period_ns == 0) { if (base_period_ns == 0) {
#ifndef _WIN32
assert(false && "Have not yet received and samples from timing driver."); assert(false && "Have not yet received and samples from timing driver.");
#endif
base_period_ns = U_TIME_1MS_IN_NS * 16; // Sure base_period_ns = U_TIME_1MS_IN_NS * 16; // Sure
} }
......
...@@ -521,6 +521,11 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn, ...@@ -521,6 +521,11 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
return XRT_ERROR_THREADING_INIT_FAILURE; return XRT_ERROR_THREADING_INIT_FAILURE;
} }
ret = os_mutex_init(&msc->list_and_timing_lock);
if (ret < 0) {
return XRT_ERROR_THREADING_INIT_FAILURE;
}
os_thread_helper_start(&msc->oth, thread_func, msc); os_thread_helper_start(&msc->oth, thread_func, msc);
*out_xsysc = &msc->base; *out_xsysc = &msc->base;
......
...@@ -100,7 +100,7 @@ gui_sdl2_init(struct sdl2_program *p) ...@@ -100,7 +100,7 @@ gui_sdl2_init(struct sdl2_program *p)
SDL_GL_SetSwapInterval(1); // Enable vsync SDL_GL_SetSwapInterval(1); // Enable vsync
// Setup OpenGL bindings. // Setup OpenGL bindings.
bool err = gladLoadGL((GLADloadfunc)SDL_GL_GetProcAddress) == 0; bool err = gladLoadGL() == 0;
if (err) { if (err) {
return -1; return -1;
} }
......
...@@ -120,7 +120,7 @@ sdl2_window_init(struct sdl2_program *p) ...@@ -120,7 +120,7 @@ sdl2_window_init(struct sdl2_program *p)
SDL_GL_SetSwapInterval(1); // Enable vsync SDL_GL_SetSwapInterval(1); // Enable vsync
// Setup OpenGL bindings. // Setup OpenGL bindings.
bool err = gladLoadGL((GLADloadfunc)SDL_GL_GetProcAddress) == 0; bool err = gladLoadGL() == 0;
if (err) { if (err) {
U_LOG_E("Failed to load GL functions!"); U_LOG_E("Failed to load GL functions!");
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment