The open source OpenXR runtime
0
fork

Configure Feed

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

c/render: Comments

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2378>

+22 -13
+22 -13
src/xrt/compositor/render/render_interface.h
··· 67 67 /*! 68 68 * Maximum number of times that the layer squasher shader can run per 69 69 * @ref render_compute. Since you run the layer squasher shader once per view 70 - * this is essentially the same as number of views. But if you you where to do 71 - * two or more different compositions it's not the maximum number of views per 70 + * this is essentially the same as number of views. But if you were to do 71 + * two or more different compositions it is not the maximum number of views per 72 72 * composition (which is this number divided by number of composition). 73 73 */ 74 74 #define RENDER_MAX_LAYER_RUNS_SIZE (XRT_MAX_VIEWS) 75 75 #define RENDER_MAX_LAYER_RUNS_COUNT (r->view_count) 76 76 77 - //! How large in pixels the distortion image is. 77 + //! Distortion image dimension in pixels 78 78 #define RENDER_DISTORTION_IMAGE_DIMENSIONS (128) 79 79 80 80 //! How many distortion images we have, one for each channel (3 rgb) and per view. 81 81 #define RENDER_DISTORTION_IMAGES_SIZE (3 * XRT_MAX_VIEWS) 82 82 #define RENDER_DISTORTION_IMAGES_COUNT (3 * r->view_count) 83 83 84 - //! Which binding does the layer projection and quad shader has it's UBO on. 84 + //! The binding that the layer projection and quad shader have their UBO on. 85 85 #define RENDER_BINDING_LAYER_SHARED_UBO 0 86 86 87 - //! Which binding does the shared layer fragment shader has it's source on. 87 + //! The binding that the shared layer fragment shader has its source on. 88 88 #define RENDER_BINDING_LAYER_SHARED_SRC 1 89 89 90 90 ··· 268 268 struct render_sub_alloc 269 269 { 270 270 /*! 271 - * The buffer this is allocated from, it's the callers responsibility 271 + * The buffer this is allocated from, it is the caller's responsibility 272 272 * to keep it alive for as long as the sub-allocation is used. 273 273 */ 274 274 VkBuffer buffer; ··· 281 281 }; 282 282 283 283 /*! 284 - * A per frame tracker of sub-allocation out of a buffer, used to reduce the 284 + * A per-frame tracker of sub-allocation out of a buffer, used to reduce the 285 285 * number of UBO objects we need to create. This code is designed with one 286 286 * constraint in mind, that the lifetime of a sub-allocation is only for one 287 287 * frame and is discarded at the end of it, but also alive for the entire frame. 288 - * This removes the need to free indivudial sub-allocation, or even track them 288 + * This removes the need to free individual sub-allocation, or even track them 289 289 * beyond filling the UBO data and descriptor sets. 290 290 * 291 291 * @see render_sub_alloc ··· 293 293 struct render_sub_alloc_tracker 294 294 { 295 295 /*! 296 - * The buffer to allocate from, it's the callers responsibility to keep 296 + * The buffer to allocate from, it is the caller's responsibility to keep 297 297 * it alive for as long as the sub-allocations are in used. 298 298 */ 299 299 VkBuffer buffer; ··· 451 451 uint32_t index_offsets[XRT_MAX_VIEWS]; 452 452 uint32_t index_count_total; 453 453 454 - //! Info ubos, only supports two views currently. 454 + //! Info UBOs. 455 455 struct render_buffer ubos[XRT_MAX_VIEWS]; 456 456 } mesh; 457 457 ··· 579 579 580 580 /*! 581 581 * Creates or recreates the compute distortion textures if necessary. 582 + * 583 + * @public @memberof render_resources 582 584 */ 583 585 bool 584 586 render_distortion_images_ensure(struct render_resources *r, ··· 588 590 589 591 /*! 590 592 * Free distortion images. 593 + * 594 + * @see render_distortion_images_ensure 595 + * @public @memberof render_resources 591 596 */ 592 597 void 593 598 render_distortion_images_close(struct render_resources *r); ··· 653 658 654 659 /*! 655 660 * Ensure that the scratch images are created and have the given extent. 661 + * 662 + * @public @memberof render_scratch_images 656 663 */ 657 664 bool 658 665 render_scratch_images_ensure(struct render_resources *r, struct render_scratch_images *rsi, VkExtent2D extent); 659 666 660 667 /*! 661 668 * Close all resources on the given @ref render_scratch_images. 669 + * 670 + * @public @memberof render_scratch_images 662 671 */ 663 672 void 664 673 render_scratch_images_close(struct render_resources *r, struct render_scratch_images *rsi); ··· 737 746 }; 738 747 739 748 /*! 740 - * Creates all resources held by the render pass, does not free the struct itself. 749 + * Creates all resources held by the render pass. 741 750 * 742 751 * @public @memberof render_gfx_render_pass 743 752 */ ··· 766 775 /*! 767 776 * Each rendering (@ref render_gfx) render to one or more targets 768 777 * (@ref render_gfx_target_resources), the target points to one render pass and 769 - * it's pipelines (@ref render_gfx_render_pass). It is up to the code using 778 + * its pipelines (@ref render_gfx_render_pass). It is up to the code using 770 779 * these to do reuse of render passes and ensure they match. 771 780 * 772 781 * @see comp_render_gfx ··· 969 978 970 979 /*! 971 980 * Allocate needed resources for one mesh shader dispatch, will also update the 972 - * descriptor set, ubo will be filled out with the given @p data argument. 981 + * descriptor set, UBO will be filled out with the given @p data argument. 973 982 * 974 983 * Uses the @ref render_sub_alloc_tracker of the @ref render_gfx and the 975 984 * descriptor pool of @ref render_resources, both of which will be reset once