Debian Codegraph @

src/kosmickrisp/vulkan/kk_bo.h

raw symbols SCIP
1 /*
2 * Copyright © 2025 LunarG, Inc
3 * Copyright 2025 Google LLC
4 * SPDX-License-Identifier: MIT
5 */
6
7 #ifndef KK_BO_H
8 #define KK_BO_H 1
9
10 #include "kosmickrisp/bridge/mtl_types.h"
11
12 #include "vulkan/vulkan_core.h"
13
14 #include <inttypes.h>
15
16 struct kk_device;
17 struct vk_object_base;
18
19 struct kk_bo {
20 mtl_heap *mtl_handle;
21 mtl_buffer *map;
22 uint64_t size_B;
23 uint64_t gpu; // GPU address
24 void *cpu; // CPU address
25 };
26
27 VkResult kk_alloc_bo(struct kk_device *dev, struct vk_object_base *log_obj,
28 uint64_t size_B, uint64_t align_B, struct kk_bo **bo_out);
29
30 void kk_destroy_bo(struct kk_device *dev, struct kk_bo *bo);
31
32 #endif /* KK_BO_H */