The open source OpenXR runtime
0
fork

Configure Feed

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

c/main: Make sure to close sync handles on layer_commit

+16 -2
+16 -2
src/xrt/compositor/main/comp_compositor.c
··· 60 60 #include <stdlib.h> 61 61 #include <string.h> 62 62 63 + #ifdef XRT_GRAPHICS_SYNC_HANDLE_IS_FD 64 + #include <unistd.h> 65 + #endif 66 + 67 + 63 68 #define WINDOW_TITLE "Monado" 64 69 65 70 static double ··· 465 470 { 466 471 struct comp_compositor *c = comp_compositor(xc); 467 472 468 - assert(!xrt_graphics_sync_handle_is_valid(sync_handle)); 473 + COMP_SPEW(c, "LAYER_COMMIT at %8.3fms", ts_ms()); 474 + 475 + #ifdef XRT_GRAPHICS_SYNC_HANDLE_IS_FD 476 + // Need to consume this handle. 477 + if (xrt_graphics_sync_handle_is_valid(sync_handle)) { 478 + close(sync_handle); 479 + sync_handle = XRT_GRAPHICS_SYNC_HANDLE_INVALID; 480 + } 481 + #else 482 + #error "Not yet implemented for this platform" 483 + #endif 469 484 470 - COMP_SPEW(c, "LAYER_COMMIT at %8.3fms", ts_ms()); 471 485 472 486 // Always zero for now. 473 487 uint32_t slot_id = 0;