xref: /aosp_15_r20/external/mesa3d/src/amd/vulkan/radv_rmv.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2016 Red Hat.
3  * Copyright © 2016 Bas Nieuwenhuizen
4  *
5  * based in part on anv driver which is:
6  * Copyright © 2015 Intel Corporation
7  *
8  * SPDX-License-Identifier: MIT
9  */
10 
11 #ifndef RADV_RMV_H
12 #define RADV_RMV_H
13 
14 #include "rmv/vk_rmv_common.h"
15 #include "rmv/vk_rmv_tokens.h"
16 
17 #include "radv_radeon_winsys.h"
18 
19 struct radv_device;
20 struct radv_physical_device;
21 struct radv_pipeline;
22 struct radv_ray_tracing_pipeline;
23 
24 void radv_memory_trace_init(struct radv_device *device);
25 
26 void radv_rmv_fill_device_info(const struct radv_physical_device *pdev, struct vk_rmv_device_info *info);
27 
28 void radv_rmv_collect_trace_events(struct radv_device *device);
29 
30 void radv_memory_trace_finish(struct radv_device *device);
31 
32 void radv_rmv_log_heap_create(struct radv_device *device, VkDeviceMemory heap, bool is_internal,
33                               VkMemoryAllocateFlags alloc_flags);
34 
35 void radv_rmv_log_bo_allocate(struct radv_device *device, struct radeon_winsys_bo *bo, bool is_internal);
36 
37 void radv_rmv_log_bo_destroy(struct radv_device *device, struct radeon_winsys_bo *bo);
38 
39 void radv_rmv_log_buffer_bind(struct radv_device *device, VkBuffer _buffer);
40 
41 void radv_rmv_log_image_create(struct radv_device *device, const VkImageCreateInfo *create_info, bool is_internal,
42                                VkImage _image);
43 
44 void radv_rmv_log_image_bind(struct radv_device *device, uint32_t bind_idx, VkImage _image);
45 
46 void radv_rmv_log_query_pool_create(struct radv_device *device, VkQueryPool pool);
47 
48 void radv_rmv_log_command_buffer_bo_create(struct radv_device *device, struct radeon_winsys_bo *bo,
49                                            uint32_t executable_size, uint32_t data_size, uint32_t scratch_size);
50 
51 void radv_rmv_log_command_buffer_bo_destroy(struct radv_device *device, struct radeon_winsys_bo *bo);
52 
53 void radv_rmv_log_border_color_palette_create(struct radv_device *device, struct radeon_winsys_bo *bo);
54 
55 void radv_rmv_log_border_color_palette_destroy(struct radv_device *device, struct radeon_winsys_bo *bo);
56 
57 void radv_rmv_log_sparse_add_residency(struct radv_device *device, struct radeon_winsys_bo *src_bo, uint64_t offset);
58 
59 void radv_rmv_log_sparse_remove_residency(struct radv_device *device, struct radeon_winsys_bo *src_bo, uint64_t offset);
60 
61 void radv_rmv_log_descriptor_pool_create(struct radv_device *device, const VkDescriptorPoolCreateInfo *create_info,
62                                          VkDescriptorPool pool);
63 
64 void radv_rmv_log_graphics_pipeline_create(struct radv_device *device, struct radv_pipeline *pipeline,
65                                            bool is_internal);
66 
67 void radv_rmv_log_compute_pipeline_create(struct radv_device *device, struct radv_pipeline *pipeline, bool is_internal);
68 
69 void radv_rmv_log_rt_pipeline_create(struct radv_device *device, struct radv_ray_tracing_pipeline *pipeline);
70 
71 void radv_rmv_log_event_create(struct radv_device *device, VkEvent event, VkEventCreateFlags flags, bool is_internal);
72 
73 void radv_rmv_log_submit(struct radv_device *device, enum amd_ip_type type);
74 
75 void radv_rmv_log_resource_destroy(struct radv_device *device, uint64_t handle);
76 
77 #endif /* RADV_RMV_H */
78