blob: 9ae7715597942c4af4635d06595f09ed64a6d840 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/*
* Copyright 2019 Google LLC
* SPDX-License-Identifier: MIT
*
* based in part on anv and radv which are:
* Copyright © 2015 Intel Corporation
* Copyright © 2016 Red Hat.
* Copyright © 2016 Bas Nieuwenhuizen
*/
#ifndef VN_RENDER_PASS_H
#define VN_RENDER_PASS_H
#include "vn_common.h"
struct vn_present_src_attachment {
uint32_t index;
VkPipelineStageFlags src_stage_mask;
VkAccessFlags src_access_mask;
VkPipelineStageFlags dst_stage_mask;
VkAccessFlags dst_access_mask;
};
struct vn_subpass {
bool has_color_attachment;
bool has_depth_stencil_attachment;
};
struct vn_render_pass {
struct vn_object_base base;
VkExtent2D granularity;
uint32_t present_count;
uint32_t present_acquire_count;
uint32_t present_release_count;
uint32_t subpass_count;
/* Attachments where initialLayout or finalLayout was
* VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
*/
struct vn_present_src_attachment *present_attachments;
/* Slice of present_attachments where initialLayout was
* VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
*/
struct vn_present_src_attachment *present_acquire_attachments;
/* Slice of present_attachments where finalLayout was
* VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
*/
struct vn_present_src_attachment *present_release_attachments;
struct vn_subpass *subpasses;
};
VK_DEFINE_NONDISP_HANDLE_CASTS(vn_render_pass,
base.base,
VkRenderPass,
VK_OBJECT_TYPE_RENDER_PASS)
struct vn_framebuffer {
struct vn_object_base base;
uint32_t image_view_count;
VkImageView image_views[];
};
VK_DEFINE_NONDISP_HANDLE_CASTS(vn_framebuffer,
base.base,
VkFramebuffer,
VK_OBJECT_TYPE_FRAMEBUFFER)
#endif /* VN_RENDER_PASS_H */
|