Monado OpenXR Runtime
Loading...
Searching...
No Matches
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_projection_frag;
48
49 VkShaderModule layer_quad_vert;
50 VkShaderModule layer_quad_frag;
51};
52
53/*!
54 * Loads all of the shaders that the compositor uses.
55 */
56bool
57render_shaders_load(struct render_shaders *s, struct vk_bundle *vk);
58
59/*!
60 * Unload and cleanup shaders.
61 */
62void
63render_shaders_fini(struct render_shaders *s, struct vk_bundle *vk);
64
65
66#ifdef __cplusplus
67}
68#endif
void render_shaders_fini(struct render_shaders *s, struct vk_bundle *vk)
Unload and cleanup shaders.
Definition render_shaders.c:131
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:75
Common Vulkan code header.