···155155 * New layer renderer.
156156 */
157157158158+ VkShaderModule layer_cylinder_vert;
159159+ VkShaderModule layer_cylinder_frag;
160160+161161+ VkShaderModule layer_equirect2_vert;
162162+ VkShaderModule layer_equirect2_frag;
163163+158164 VkShaderModule layer_projection_vert;
159165 VkShaderModule layer_quad_vert;
160166 VkShaderModule layer_shared_frag;
···721727722728 struct
723729 {
730730+ VkPipeline cylinder_premultiplied_alpha;
731731+ VkPipeline cylinder_unpremultiplied_alpha;
732732+733733+ VkPipeline equirect2_premultiplied_alpha;
734734+ VkPipeline equirect2_unpremultiplied_alpha;
735735+724736 VkPipeline proj_premultiplied_alpha;
725737 VkPipeline proj_unpremultiplied_alpha;
738738+726739 VkPipeline quad_premultiplied_alpha;
727740 VkPipeline quad_unpremultiplied_alpha;
728741 } layer;
···873886};
874887875888/*!
889889+ * UBO data that is sent to the layer cylinder shader.
890890+ */
891891+struct render_gfx_layer_cylinder_data
892892+{
893893+ struct xrt_normalized_rect post_transform;
894894+ struct xrt_matrix_4x4 mvp;
895895+ float radius;
896896+ float central_angle;
897897+ float aspect_ratio;
898898+ float _pad;
899899+};
900900+901901+/*!
902902+ * UBO data that is sent to the layer equirect2 shader.
903903+ */
904904+struct render_gfx_layer_equirect2_data
905905+{
906906+ struct xrt_normalized_rect post_transform;
907907+ struct xrt_matrix_4x4 mv_inverse;
908908+909909+ //! See @ref render_calc_uv_to_tangent_lengths_rect.
910910+ struct xrt_normalized_rect to_tangent;
911911+912912+ float radius;
913913+ float central_horizontal_angle;
914914+ float upper_vertical_angle;
915915+ float lower_vertical_angle;
916916+};
917917+918918+/*!
876919 * UBO data that is sent to the layer projection shader.
877920 */
878921struct render_gfx_layer_projection_data
···952995render_gfx_mesh_draw(struct render_gfx *rr, uint32_t mesh_index, VkDescriptorSet descriptor_set, bool do_timewarp);
953996954997/*!
998998+ * Allocate and write a UBO and descriptor_set to be used for cylinder layer
999999+ * rendering, the content of @p data need to be valid at the time of the call.
10001000+ *
10011001+ * @public @memberof render_gfx
10021002+ */
10031003+XRT_CHECK_RESULT VkResult
10041004+render_gfx_layer_cylinder_alloc_and_write(struct render_gfx *rr,
10051005+ const struct render_gfx_layer_cylinder_data *data,
10061006+ VkSampler src_sampler,
10071007+ VkImageView src_image_view,
10081008+ VkDescriptorSet *out_descriptor_set);
10091009+10101010+/*!
10111011+ * Allocate and write a UBO and descriptor_set to be used for equirect2 layer
10121012+ * rendering, the content of @p data need to be valid at the time of the call.
10131013+ *
10141014+ * @public @memberof render_gfx
10151015+ */
10161016+XRT_CHECK_RESULT VkResult
10171017+render_gfx_layer_equirect2_alloc_and_write(struct render_gfx *rr,
10181018+ const struct render_gfx_layer_equirect2_data *data,
10191019+ VkSampler src_sampler,
10201020+ VkImageView src_image_view,
10211021+ VkDescriptorSet *out_descriptor_set);
10221022+10231023+/*!
9551024 * Allocate and write a UBO and descriptor_set to be used for projection layer
9561025 * rendering, the content of @p data need to be valid at the time of the call.
9571026 *
···9761045 VkSampler src_sampler,
9771046 VkImageView src_image_view,
9781047 VkDescriptorSet *out_descriptor_set);
10481048+10491049+/*!
10501050+ * Dispatch a cylinder layer shader into the current target and view,
10511051+ * allocate @p descriptor_set and ubo with
10521052+ * @ref render_gfx_layer_cylinder_alloc_and_write.
10531053+ *
10541054+ * @public @memberof render_gfx
10551055+ */
10561056+void
10571057+render_gfx_layer_cylinder(struct render_gfx *rr, bool premultiplied_alpha, VkDescriptorSet descriptor_set);
10581058+10591059+/*!
10601060+ * Dispatch a equirect2 layer shader into the current target and view,
10611061+ * allocate @p descriptor_set and ubo with
10621062+ * @ref render_gfx_layer_equirect2_alloc_and_write.
10631063+ *
10641064+ * @public @memberof render_gfx
10651065+ */
10661066+void
10671067+render_gfx_layer_equirect2(struct render_gfx *rr, bool premultiplied_alpha, VkDescriptorSet descriptor_set);
97910689801069/*!
9811070 * Dispatch a projection layer shader into the current target and view,