Monado OpenXR Runtime
Loading...
Searching...
No Matches
vk_image_readback_to_xf_pool.h
Go to the documentation of this file.
1
// Copyright 2022, Collabora, Ltd.
2
// Copyright 2025-2026, NVIDIA CORPORATION.
3
// SPDX-License-Identifier: BSL-1.0
4
/*!
5
* @file
6
* @brief Pool to read back VkImages from the gpu
7
*
8
* @author Moshi Turner <moshiturner@protonmail.com>
9
* @author Jakob Bornecrantz <jakob@collabora.com>
10
* @ingroup aux_vk
11
*/
12
13
#pragma once
14
15
#include "
os/os_threading.h
"
16
17
#include "
xrt/xrt_frame.h
"
18
#include "
xrt/xrt_handles.h
"
19
#include "
xrt/xrt_compositor.h
"
20
#include "
xrt/xrt_vulkan_includes.h
"
21
22
#include "
util/u_logging.h
"
23
#include "
util/u_extension_list.h
"
24
25
#include "
vk/vk_helpers.h
"
26
27
28
#define READBACK_POOL_NUM_FRAMES 16
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
34
35
// Opaque handle
36
struct
vk_image_readback_to_xf_pool
;
37
38
struct
vk_image_readback_to_xf
39
{
40
struct
xrt_frame
base_frame;
41
42
struct
vk_image_readback_to_xf_pool
*
pool
;
43
44
VkImageLayout layout;
45
46
VkExtent2D image_extent;
47
VkImage image;
48
VkDeviceMemory memory;
49
50
bool
in_use;
51
bool
created;
52
};
53
54
55
bool
56
vk_image_readback_to_xf_pool_get_unused_frame(
struct
vk_bundle
*vk,
57
struct
vk_image_readback_to_xf_pool
*
pool
,
58
struct
vk_image_readback_to_xf
**out);
59
60
void
61
vk_image_readback_to_xf_pool_create(
struct
vk_bundle
*vk,
62
VkExtent2D
extent
,
63
struct
vk_image_readback_to_xf_pool
**out_pool,
64
enum
xrt_format
xrt_format
,
65
VkFormat vk_format);
66
67
void
68
vk_image_readback_to_xf_pool_destroy(
struct
vk_bundle
*vk,
struct
vk_image_readback_to_xf_pool
**pool_ptr);
69
70
#ifdef __cplusplus
71
}
72
#endif
os_threading.h
Wrapper around OS threading native functions.
extent
Definition
t_rift_blobwatch.c:106
pool
Definition
u_worker.c:50
vk_bundle
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition
vk_helpers.h:75
vk_image_readback_to_xf_pool
Definition
vk_image_readback_to_xf_pool.c:18
vk_image_readback_to_xf
Definition
vk_image_readback_to_xf_pool.h:39
xrt_frame
Basic frame data structure - holds a pointer to buffer.
Definition
xrt_frame.h:25
u_extension_list.h
A collection of strings, like a list of extensions to enable.
u_logging.h
Basic logging functionality.
vk_helpers.h
Common Vulkan code header.
xrt_compositor.h
Header declaring XRT graphics interfaces.
xrt_format
xrt_format
Common formats, use u_format_* functions to reason about them.
Definition
xrt_defines.h:193
xrt_frame.h
Data frame header.
xrt_handles.h
Native handle types.
xrt_vulkan_includes.h
Include all of the Vulkan headers in one place, and cope with any "messy" includes implied by it.
auxiliary
vk
vk_image_readback_to_xf_pool.h
Generated by
1.9.8