diff --git a/src/xrt/compositor/main/comp_compositor.h b/src/xrt/compositor/main/comp_compositor.h index 1f83cc766..7299e2cd7 100644 --- a/src/xrt/compositor/main/comp_compositor.h +++ b/src/xrt/compositor/main/comp_compositor.h @@ -87,10 +87,12 @@ struct comp_swapchain struct comp_layer_quad { struct comp_swapchain *sc; - enum xrt_layer_eye_visibility visibility; + uint32_t image_index; - struct xrt_rect rect; uint32_t array_index; + + enum xrt_layer_eye_visibility visibility; + struct xrt_rect rect; struct xrt_pose pose; struct xrt_vec2 size; }; diff --git a/src/xrt/ipc/ipc_client_compositor.c b/src/xrt/ipc/ipc_client_compositor.c index fec293770..6c4f6a21b 100644 --- a/src/xrt/ipc/ipc_client_compositor.c +++ b/src/xrt/ipc/ipc_client_compositor.c @@ -368,10 +368,6 @@ ipc_compositor_layer_stereo_projection( struct ipc_client_swapchain *l = ipc_client_swapchain(l_sc); struct ipc_client_swapchain *r = ipc_client_swapchain(r_sc); - stereo->timestamp = timestamp; - stereo->xdev_id = 0; //! @todo Real id. - stereo->name = name; - stereo->layer_flags = layer_flags; stereo->l.swapchain_id = l->id; stereo->l.image_index = l_image_index; stereo->l.rect = *l_rect; @@ -385,8 +381,11 @@ ipc_compositor_layer_stereo_projection( stereo->r.fov = *r_fov; stereo->r.pose = *r_pose; + layer->xdev_id = 0; //! @todo Real id. + layer->name = name; + layer->timestamp = timestamp; + layer->layer_flags = layer_flags; layer->flip_y = flip_y; - layer->type = XRT_LAYER_STEREO_PROJECTION; // Increment the number of layers. @@ -418,10 +417,6 @@ ipc_compositor_layer_quad(struct xrt_compositor *xc, struct ipc_layer_quad *quad = &layer->quad; struct ipc_client_swapchain *ics = ipc_client_swapchain(sc); - quad->timestamp = timestamp; - quad->xdev_id = 0; //! @todo Real id. - quad->name = name; - quad->layer_flags = layer_flags; quad->swapchain_id = ics->id; quad->image_index = image_index; quad->rect = *rect; @@ -429,6 +424,10 @@ ipc_compositor_layer_quad(struct xrt_compositor *xc, quad->pose = *pose; quad->size = *size; + layer->xdev_id = 0; //! @todo Real id. + layer->name = name; + layer->timestamp = timestamp; + layer->layer_flags = layer_flags; layer->flip_y = flip_y; layer->type = XRT_LAYER_QUAD; diff --git a/src/xrt/ipc/ipc_protocol.h b/src/xrt/ipc/ipc_protocol.h index 951b64aa6..8eac6441f 100644 --- a/src/xrt/ipc/ipc_protocol.h +++ b/src/xrt/ipc/ipc_protocol.h @@ -75,18 +75,13 @@ struct ipc_shared_device struct ipc_layer_stereo_projection { - uint64_t timestamp; - - uint32_t xdev_id; - enum xrt_input_name name; - enum xrt_layer_composition_flags layer_flags; - struct { uint32_t swapchain_id; uint32_t image_index; - struct xrt_rect rect; uint32_t array_index; + + struct xrt_rect rect; struct xrt_fov fov; struct xrt_pose pose; } l, r; @@ -94,22 +89,23 @@ struct ipc_layer_stereo_projection struct ipc_layer_quad { - uint64_t timestamp; - - uint32_t xdev_id; - enum xrt_input_name name; - enum xrt_layer_composition_flags layer_flags; - uint32_t swapchain_id; + uint32_t image_index; - struct xrt_rect rect; uint32_t array_index; + + struct xrt_rect rect; struct xrt_pose pose; struct xrt_vec2 size; }; struct ipc_layer_entry { + uint64_t timestamp; + uint32_t xdev_id; + enum xrt_input_name name; + + enum xrt_layer_composition_flags layer_flags; enum xrt_layer_type type; bool flip_y; diff --git a/src/xrt/ipc/ipc_server.h b/src/xrt/ipc/ipc_server.h index d2a9ff0bc..6e95ed2ed 100644 --- a/src/xrt/ipc/ipc_server.h +++ b/src/xrt/ipc/ipc_server.h @@ -88,11 +88,14 @@ struct ipc_swapchain_data struct ipc_quad_render_state { uint32_t swapchain_index; + uint32_t image_index; uint32_t array_index; + enum xrt_layer_eye_visibility visibility; struct xrt_pose pose; struct xrt_vec2 size; + struct xrt_rect rect; }; struct ipc_stereo_projection_render_state @@ -107,6 +110,7 @@ struct ipc_stereo_projection_render_state struct ipc_layer_render_state { + enum xrt_layer_composition_flags flags; enum xrt_layer_type type; bool flip_y;