Monado OpenXR Runtime
render_shaders_interface.h
Go to the documentation of this file.
1// Copyright 2019-2023, Collabora, Ltd.
2// Copyright 2025, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Shader loading interface.
7 * @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
8 * @author Jakob Bornecrantz <jakob@collabora.com>
9 * @ingroup comp_render
10 */
11
12#pragma once
13
14#include "vk/vk_helpers.h"
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
22/*!
23 * Holds all shaders.
24 */
26{
27 VkShaderModule blit_comp;
28 VkShaderModule clear_comp;
29 VkShaderModule layer_comp;
30 VkShaderModule distortion_comp;
31
32 VkShaderModule mesh_vert;
33 VkShaderModule mesh_frag;
34
35
36 /*
37 * New layer renderer.
38 */
39
40 VkShaderModule layer_cylinder_vert;
41 VkShaderModule layer_cylinder_frag;
42
43 VkShaderModule layer_equirect2_vert;
44 VkShaderModule layer_equirect2_frag;
45
46 VkShaderModule layer_projection_vert;
47 VkShaderModule layer_quad_vert;
48 VkShaderModule layer_shared_frag;
49};
50
51/*!
52 * Loads all of the shaders that the compositor uses.
53 */
54bool
55render_shaders_load(struct render_shaders *s, struct vk_bundle *vk);
56
57/*!
58 * Unload and cleanup shaders.
59 */
60void
61render_shaders_fini(struct render_shaders *s, struct vk_bundle *vk);
62
63
64#ifdef __cplusplus
65}
66#endif
void render_shaders_fini(struct render_shaders *s, struct vk_bundle *vk)
Unload and cleanup shaders.
Definition: render_shaders.c:130
bool render_shaders_load(struct render_shaders *s, struct vk_bundle *vk)
Loads all of the shaders that the compositor uses.
Definition: render_shaders.c:103
Holds all shaders.
Definition: render_shaders_interface.h:26
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition: vk_helpers.h:78
Common Vulkan code header.