Monado OpenXR Runtime
Loading...
Searching...
No Matches
vk_format.h
Go to the documentation of this file.
1// Copyright 2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Vulkan helpers for formats.
6 *
7 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
8 * @ingroup aux_vk
9 */
10
11#pragma once
12
13#include "xrt/xrt_compiler.h"
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
22/*!
23 * Given a UNORM format, return the corresponding sRGB format.
24 *
25 * @param unorm The UNORM format to convert.
26 * @return The corresponding sRGB format, or VK_FORMAT_UNDEFINED if the input format is not recognized.
27 *
28 * @ingroup aux_vk
29 */
30VkFormat
32
33/*!
34 * Given an sRGB format, return the corresponding UNORM format.
35 *
36 * @param srgb The sRGB format to convert.
37 * @return The corresponding UNORM format, or VK_FORMAT_UNDEFINED if the input format is not recognized.
38 *
39 * @ingroup aux_vk
40 */
41VkFormat
43
44
45#ifdef __cplusplus
46}
47#endif
VkFormat vk_format_convert_unorm_to_srgb(VkFormat unorm)
Given a UNORM format, return the corresponding sRGB format.
Definition vk_format.c:81
VkFormat vk_format_convert_srgb_to_unorm(VkFormat srgb)
Given an sRGB format, return the corresponding UNORM format.
Definition vk_format.c:93
Header holding common defines.
Include all of the Vulkan headers in one place, and cope with any "messy" includes implied by it.