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 struct mali_texture_packed other_aspect_tex; 33 34 #if PAN_ARCH <= 7 35 /* Valhall passes a texture descriptor to the LEA_TEX instruction. */ 36 struct mali_attribute_buffer_packed img_attrib_buf[2]; 37 #endif 38 } descs; 39 }; 40 41 VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_image_view, vk.base, VkImageView, 42 VK_OBJECT_TYPE_IMAGE_VIEW); 43 44 #endif 45