The open source OpenXR runtime
0
fork

Configure Feed

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

ipc/server: Paranoia

+11 -3
+11 -3
src/xrt/ipc/server/ipc_server_handler.c
··· 716 716 assert(xsc->num_images <= IPC_MAX_SWAPCHAIN_HANDLES); 717 717 assert(xsc->num_images <= max_num_handles); 718 718 719 - *out_id = index; 719 + // Paranoia. 720 + size_t size = xscn->images[0].size; 721 + bool use_dedicated_allocation = xscn->images[0].use_dedicated_allocation; 722 + for (size_t i = 1; i < xsc->num_images; i++) { 723 + assert(size == xscn->images[0].size); 724 + assert(use_dedicated_allocation == xscn->images[0].use_dedicated_allocation); 725 + } 726 + 727 + // Assuming all images allocated in the same swapchain have the same allocation requirements. 720 728 *out_size = xscn->images[0].size; 729 + *out_use_dedicated_allocation = xscn->images[0].use_dedicated_allocation; 730 + *out_id = index; 721 731 *out_num_images = xsc->num_images; 722 - // assuming all images allocated in the same swapchain have the same allocation requirements 723 - *out_use_dedicated_allocation = xscn->images[0].use_dedicated_allocation; 724 732 725 733 // Setup the fds. 726 734 *out_num_handles = xsc->num_images;