comp: Refactor documentation

This commit is contained in:
Jakob Bornecrantz 2020-03-01 10:31:21 +00:00
parent b308facf90
commit 8c06787d93
21 changed files with 74 additions and 67 deletions

View file

@ -5,7 +5,7 @@
* @brief Glue code to EGL client side glue code.
* @author Drew DeVault <sir@cmpwn.com>
* @author Simon Ser <contact@emersion.fr>
* @ingroup comp
* @ingroup comp_client
*/
#define EGL_EGL_PROTOTYPES 0

View file

@ -2,9 +2,9 @@
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Glue code to OpenGL client side glue code.
* @brief Glue code to OpenGL client side code.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_client
*/
#include "xrt/xrt_gfx_gl.h"

View file

@ -2,9 +2,9 @@
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Glue code to OpenGL Xlib client side glue code.
* @brief Glue code to OpenGL Xlib client side code.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_client
*/
#include <stdio.h>

View file

@ -2,9 +2,9 @@
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Glue code to OpenGL ES client side glue code.
* @brief Glue code to OpenGL ES client side code.
* @author Simon Ser <contact@emersion.fr>
* @ingroup comp
* @ingroup comp_client
*/
#include "xrt/xrt_gfx_gles.h"

View file

@ -2,9 +2,9 @@
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Glue code to vulkan client side glue code.
* @brief Glue code to vulkan client side code.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_client
*/
#include <stdlib.h>

View file

@ -6,7 +6,7 @@
* @author Jakob Bornecrantz <jakob@collabora.com>
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @ingroup comp
* @ingroup comp_main
*
*
* begin_frame and end_frame delimit the application's work on graphics for a

View file

@ -5,7 +5,7 @@
* @brief Main compositor written using Vulkan header.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#pragma once
@ -30,7 +30,7 @@ extern "C" {
/*!
* A single swapchain image, holds the needed state for tracking image usage.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_swapchain_image
{
@ -50,7 +50,7 @@ struct comp_swapchain_image
*
* Not used by the window backend that uses the vk_swapchain to render to.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_swapchain
{
@ -64,7 +64,7 @@ struct comp_swapchain
/*!
* Main compositor struct tying everything in the compositor together.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_compositor
{
@ -139,7 +139,7 @@ struct comp_compositor
/*!
* Convinence function to convert a xrt_swapchain to a comp_swapchain.
*
* @ingroup comp
* @ingroup comp_main
*/
XRT_MAYBE_UNUSED static struct comp_swapchain *
comp_swapchain(struct xrt_swapchain *xsc)
@ -150,7 +150,7 @@ comp_swapchain(struct xrt_swapchain *xsc)
/*!
* Convinence function to convert a xrt_compositor to a comp_compositor.
*
* @ingroup comp
* @ingroup comp_main
*/
XRT_MAYBE_UNUSED static struct comp_compositor *
comp_compositor(struct xrt_compositor *xc)
@ -161,7 +161,7 @@ comp_compositor(struct xrt_compositor *xc)
/*!
* A compositor function that is implemented in the swapchain code.
*
* @ingroup comp
* @ingroup comp_main
*/
struct xrt_swapchain *
comp_swapchain_create(struct xrt_compositor *xc,
@ -179,7 +179,7 @@ comp_swapchain_create(struct xrt_compositor *xc,
* Free and destroy any initialized fields on the given image, safe to pass in
* images that has one or all fields set to NULL.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_swapchain_image_cleanup(struct vk_bundle *vk,
@ -189,7 +189,7 @@ comp_swapchain_image_cleanup(struct vk_bundle *vk,
/*!
* Printer helper.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_compositor_print(struct comp_compositor *c,
@ -200,7 +200,7 @@ comp_compositor_print(struct comp_compositor *c,
/*!
* Spew level logging.
*
* @ingroup comp
* @ingroup comp_main
*/
#define COMP_SPEW(c, ...) \
do { \
@ -212,7 +212,7 @@ comp_compositor_print(struct comp_compositor *c,
/*!
* Debug level logging.
*
* @ingroup comp
* @ingroup comp_main
*/
#define COMP_DEBUG(c, ...) \
do { \
@ -224,7 +224,7 @@ comp_compositor_print(struct comp_compositor *c,
/*!
* Mode printing.
*
* @ingroup comp
* @ingroup comp_main
*/
#define COMP_PRINT_MODE(c, ...) \
do { \
@ -236,7 +236,7 @@ comp_compositor_print(struct comp_compositor *c,
/*!
* Error level logging.
*
* @ingroup comp
* @ingroup comp_main
*/
#define COMP_ERROR(c, ...) \
do { \

View file

@ -5,7 +5,7 @@
* @brief Distortion shader code.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#include <stdio.h>

View file

@ -5,7 +5,7 @@
* @brief Distortion shader code header.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#pragma once
@ -29,7 +29,7 @@ extern "C" {
/*!
* Helper buffer for a single uniform buffer.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_uniform_buffer
{
@ -47,7 +47,7 @@ struct comp_uniform_buffer
/*!
* Helper struct that encapsulate a distortion rendering code.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_distortion
{
@ -116,7 +116,7 @@ struct comp_distortion
/*!
* Init a distortion, pass in the distortion so it can be embedded in a struct.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_distortion_init(struct comp_distortion *d,
@ -131,7 +131,7 @@ comp_distortion_init(struct comp_distortion *d,
/*!
* Free and destroy all fields, does not free the destortion itself.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_distortion_destroy(struct comp_distortion *d);
@ -139,7 +139,7 @@ comp_distortion_destroy(struct comp_distortion *d);
/*!
* Update the descriptor set to a new image.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_distortion_update_descriptor_set(struct comp_distortion *d,
@ -150,7 +150,7 @@ comp_distortion_update_descriptor_set(struct comp_distortion *d,
/*!
* Submit draw commands to the given command_buffer.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_distortion_draw_quad(struct comp_distortion *d,

View file

@ -2,7 +2,7 @@
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Main compositor written using Vulkan header.
* @brief Documentation for the compositor.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @ingroup comp
@ -15,11 +15,18 @@
* @defgroup comp Compositor
* @ingroup xrt
*
* @brief Main compositing code.
* @brief All of the compositor code.
*/
/*!
* @defgroup comp_client Compositor client glue code
* @defgroup comp_main Main compositor code
* @ingroup comp
*
* @brief Main compositor code.
*/
/*!
* @defgroup comp_client Compositor client code
* @ingroup comp
*
* @brief Glue code between client program to the main compositor.
@ -29,19 +36,19 @@
* @dir compositor
* @ingroup xrt
*
* @brief The compositor for Monado.
* @brief All of the compositor code.
*/
/*!
* @dir compositor/client
* @ingroup comp
*
* @brief Smaller pieces of auxiliary utilities code.
* @brief Compositor client code.
*/
/*!
* @dir compositor/main
* @ingroup comp
*
* @brief Main chunk of compositor code.
* @brief Main compositor code.
*/

View file

@ -5,7 +5,7 @@
* @brief Compositor rendering code.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#include <string.h>
@ -28,7 +28,7 @@
/*!
* Holds associated vulkan objects and state to render with a distortion.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_renderer
{

View file

@ -5,7 +5,7 @@
* @brief Compositor rendering code header.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#pragma once
@ -24,7 +24,7 @@ struct comp_swapchain_image;
/*!
* Called by the main compositor code to create the renderer.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_renderer *
comp_renderer_create(struct comp_compositor *c);
@ -32,7 +32,7 @@ comp_renderer_create(struct comp_compositor *c);
/*!
* Render a distorted stereo frame.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_renderer_frame(struct comp_renderer *r,
@ -44,7 +44,7 @@ comp_renderer_frame(struct comp_renderer *r,
/*!
* Clean up and free the renderer.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_renderer_destroy(struct comp_renderer *r);

View file

@ -4,7 +4,7 @@
* @file
* @brief Settings struct for compositor.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#include "util/u_debug.h"

View file

@ -5,7 +5,7 @@
* @brief Settings struct for compositor header.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#pragma once
@ -32,7 +32,7 @@ XRT_MAYBE_UNUSED static const char *NV_DIRECT_WHITELIST[] = {
/*!
* Window type to use.
*
* @ingroup comp
* @ingroup comp_main
*/
enum window_type
{
@ -48,7 +48,7 @@ enum window_type
/*!
* Settings for the compositor.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_settings
{
@ -104,7 +104,7 @@ struct comp_settings
/*!
* Initialize the settings struct with either defaults or loaded setting.
*
* @ingroup comp
* @ingroup comp_main
*/
void
comp_settings_init(struct comp_settings *s, struct xrt_device *xdev);

View file

@ -4,7 +4,7 @@
* @file
* @brief Swapchain code for the main compositor.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#include <stdio.h>

View file

@ -5,7 +5,7 @@
* @brief Vulkan swapchain code.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp_client
* @ingroup comp_main
*/

View file

@ -5,7 +5,7 @@
* @brief Vulkan swapchain code header.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp_client
* @ingroup comp_main
*/
#pragma once
@ -26,14 +26,14 @@ extern "C" {
/*!
* Callback when a @ref vk_swapchain changes size.
*
* @ingroup comp
* @ingroup comp_main
*/
typedef void (*vk_swapchain_cb)(uint32_t width, uint32_t height, void *priv);
/*!
* A pair of VkImage and VkImageView.
*
* @ingroup comp
* @ingroup comp_main
*/
struct vk_swapchain_buffer
{
@ -44,7 +44,7 @@ struct vk_swapchain_buffer
/*!
* Wraps and manage VkSwapchainKHR and VkSurfaceKHR, used by @ref comp code.
*
* @ingroup comp
* @ingroup comp_main
*/
struct vk_swapchain
{
@ -76,7 +76,7 @@ struct vk_swapchain
/*!
* Wraps and manage VkSwapchainKHR and VkSurfaceKHR, used by @ref comp code.
*
* @ingroup comp
* @ingroup comp_main
*/
void
vk_swapchain_init(struct vk_swapchain *sc,
@ -87,7 +87,7 @@ vk_swapchain_init(struct vk_swapchain *sc,
/*!
* Initialize the given @ref vk_swapchain, does not allocate.
*
* @ingroup comp
* @ingroup comp_main
*/
void
vk_swapchain_create(struct vk_swapchain *sc,
@ -100,7 +100,7 @@ vk_swapchain_create(struct vk_swapchain *sc,
/*!
* Acquire a image index from the given @ref vk_swapchain for rendering.
*
* @ingroup comp
* @ingroup comp_main
*/
VkResult
vk_swapchain_acquire_next_image(struct vk_swapchain *sc,
@ -110,7 +110,7 @@ vk_swapchain_acquire_next_image(struct vk_swapchain *sc,
/*!
* Make the given @ref vk_swapchain present the next acquired image.
*
* @ingroup comp
* @ingroup comp_main
*/
VkResult
vk_swapchain_present(struct vk_swapchain *sc,
@ -122,7 +122,7 @@ vk_swapchain_present(struct vk_swapchain *sc,
* Free all managed resources on the given @ref vk_swapchain,
* does not free the struct itself.
*
* @ingroup comp
* @ingroup comp_main
*/
void
vk_swapchain_cleanup(struct vk_swapchain *sc);

View file

@ -5,7 +5,7 @@
* @brief Compositor window header.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#pragma once
@ -27,7 +27,7 @@ extern "C" {
/*!
* A output device or a window, often directly connected to the device.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_window
{
@ -60,7 +60,7 @@ struct comp_window
/*!
* Create a xcb window.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_window *
comp_window_xcb_create(struct comp_compositor *c);
@ -70,7 +70,7 @@ comp_window_xcb_create(struct comp_compositor *c);
/*!
* Create a wayland window.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_window *
comp_window_wayland_create(struct comp_compositor *c);
@ -80,7 +80,7 @@ comp_window_wayland_create(struct comp_compositor *c);
/*!
* Create a direct surface to a HMD.
*
* @ingroup comp
* @ingroup comp_main
*/
struct comp_window *
comp_window_direct_create(struct comp_compositor *c);

View file

@ -5,7 +5,7 @@
* @brief Direct mode window code.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT

View file

@ -5,7 +5,7 @@
* @brief Wayland window code.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#ifdef VK_USE_PLATFORM_WAYLAND_KHR

View file

@ -5,7 +5,7 @@
* @brief XCB window code.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup comp
* @ingroup comp_main
*/
#ifdef VK_USE_PLATFORM_XCB_KHR