1 /* 2 * Copyright © 2021 Collabora Ltd. 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #ifndef PANVK_BUFFER_VIEW_H 7 #define PANVK_BUFFER_VIEW_H 8 9 #ifndef PAN_ARCH 10 #error "PAN_ARCH must be defined" 11 #endif 12 13 #include <stdint.h> 14 15 #include "panvk_mempool.h" 16 17 #include "vk_buffer_view.h" 18 19 #include "genxml/gen_macros.h" 20 21 struct panvk_buffer_view { 22 struct vk_buffer_view vk; 23 struct panvk_priv_mem mem; 24 25 struct { 26 struct mali_texture_packed tex; 27 28 #if PAN_ARCH <= 7 29 /* Valhall passes a texture descriptor to the LEA_TEX instruction. */ 30 struct mali_attribute_buffer_packed img_attrib_buf[2]; 31 #endif 32 } descs; 33 }; 34 35 VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_buffer_view, vk.base, VkBufferView, 36 VK_OBJECT_TYPE_BUFFER_VIEW) 37 38 #endif 39