• 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_BUFFER_H
12 #define VN_BUFFER_H
13 
14 #include "vn_common.h"
15 
16 struct vn_buffer {
17    struct vn_object_base base;
18 
19    VkMemoryRequirements2 memory_requirements;
20    VkMemoryDedicatedRequirements dedicated_requirements;
21 };
22 VK_DEFINE_NONDISP_HANDLE_CASTS(vn_buffer,
23                                base.base,
24                                VkBuffer,
25                                VK_OBJECT_TYPE_BUFFER)
26 
27 struct vn_buffer_view {
28    struct vn_object_base base;
29 };
30 VK_DEFINE_NONDISP_HANDLE_CASTS(vn_buffer_view,
31                                base.base,
32                                VkBufferView,
33                                VK_OBJECT_TYPE_BUFFER_VIEW)
34 
35 VkResult
36 vn_buffer_create(struct vn_device *dev,
37                  const VkBufferCreateInfo *create_info,
38                  const VkAllocationCallbacks *alloc,
39                  struct vn_buffer **out_buf);
40 
41 #endif /* VN_BUFFER_H */
42