The open source OpenXR runtime
0
fork

Configure Feed

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

xrt: Add image transition inteface

+31
+31
src/xrt/include/xrt/xrt_compositor.h
··· 379 379 }; 380 380 381 381 /*! 382 + * The direction of a transition. 383 + */ 384 + enum xrt_barrier_direction 385 + { 386 + XRT_BARRIER_TO_APP = 1, 387 + XRT_BARRIER_TO_COMP = 2, 388 + }; 389 + 390 + /*! 382 391 * @interface xrt_swapchain 383 392 * 384 393 * Common swapchain interface/base. ··· 435 444 xrt_result_t (*wait_image)(struct xrt_swapchain *xsc, uint64_t timeout_ns, uint32_t index); 436 445 437 446 /*! 447 + * Do any barrier transitions to and from the application. 448 + * 449 + * @param xsc Self pointer 450 + * @param direction Direction of the barrier transition. 451 + * @param index Image index to barrier transition. 452 + */ 453 + xrt_result_t (*barrier_image)(struct xrt_swapchain *xsc, enum xrt_barrier_direction direction, uint32_t index); 454 + 455 + /*! 438 456 * See xrReleaseSwapchainImage, state tracker needs to track index. 439 457 */ 440 458 xrt_result_t (*release_image)(struct xrt_swapchain *xsc, uint32_t index); ··· 497 515 xrt_swapchain_wait_image(struct xrt_swapchain *xsc, uint64_t timeout_ns, uint32_t index) 498 516 { 499 517 return xsc->wait_image(xsc, timeout_ns, index); 518 + } 519 + 520 + /*! 521 + * @copydoc xrt_swapchain::barrier_image 522 + * 523 + * Helper for calling through the function pointer. 524 + * 525 + * @public @memberof xrt_swapchain 526 + */ 527 + static inline xrt_result_t 528 + xrt_swapchain_barrier_image(struct xrt_swapchain *xsc, enum xrt_barrier_direction direction, uint32_t index) 529 + { 530 + return xsc->barrier_image(xsc, direction, index); 500 531 } 501 532 502 533 /*!