xref: /aosp_15_r20/external/mesa3d/src/panfrost/vulkan/panvk_image_view.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2021 Collabora Ltd.
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #ifndef PANVK_IMAGE_VIEW_H
7 #define PANVK_IMAGE_VIEW_H
8 
9 #ifndef PAN_ARCH
10 #error "PAN_ARCH must be defined"
11 #endif
12 
13 #include <stdint.h>
14 
15 #include "vk_image.h"
16 
17 #include "pan_texture.h"
18 
19 #include "genxml/gen_macros.h"
20 
21 struct panvk_priv_bo;
22 
23 struct panvk_image_view {
24    struct vk_image_view vk;
25 
26    struct pan_image_view pview;
27 
28    struct panvk_priv_mem mem;
29 
30    struct {
31       struct mali_texture_packed tex;
32 
33 #if PAN_ARCH <= 7
34       /* Valhall passes a texture descriptor to the LEA_TEX instruction. */
35       struct mali_attribute_buffer_packed img_attrib_buf[2];
36 #endif
37    } descs;
38 };
39 
40 VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_image_view, vk.base, VkImageView,
41                                VK_OBJECT_TYPE_IMAGE_VIEW);
42 
43 #endif
44