• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 Google LLC
3  * SPDX-License-Identifier: MIT
4  *
5  * based in part on anv and radv which are:
6  * Copyright © 2015 Intel Corporation
7  * Copyright © 2016 Red Hat.
8  * Copyright © 2016 Bas Nieuwenhuizen
9  */
10 
11 #ifndef VN_RENDER_PASS_H
12 #define VN_RENDER_PASS_H
13 
14 #include "vn_common.h"
15 
16 struct vn_present_src_attachment {
17    bool acquire;
18    uint32_t index;
19 
20    VkPipelineStageFlags src_stage_mask;
21    VkAccessFlags src_access_mask;
22 
23    VkPipelineStageFlags dst_stage_mask;
24    VkAccessFlags dst_access_mask;
25 };
26 
27 struct vn_render_pass {
28    struct vn_object_base base;
29 
30    VkExtent2D granularity;
31 
32    /* track attachments that have PRESENT_SRC as their initialLayout or
33     * finalLayout
34     */
35    uint32_t acquire_count;
36    uint32_t release_count;
37    uint32_t present_src_count;
38    struct vn_present_src_attachment present_src_attachments[];
39 };
40 VK_DEFINE_NONDISP_HANDLE_CASTS(vn_render_pass,
41                                base.base,
42                                VkRenderPass,
43                                VK_OBJECT_TYPE_RENDER_PASS)
44 
45 struct vn_framebuffer {
46    struct vn_object_base base;
47 
48    uint32_t image_view_count;
49    VkImageView image_views[];
50 };
51 VK_DEFINE_NONDISP_HANDLE_CASTS(vn_framebuffer,
52                                base.base,
53                                VkFramebuffer,
54                                VK_OBJECT_TYPE_FRAMEBUFFER)
55 
56 #endif /* VN_RENDER_PASS_H */
57