Path: blob/21.2-virgl/src/broadcom/vulkan/v3dv_meta_copy.h
4560 views
/*1* Copyright © 2021 Raspberry Pi2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS20* IN THE SOFTWARE.21*/22#ifndef V3DV_META_COPY_H23#define V3DV_META_COPY_H2425/* Disable level 0 write, just write following mipmaps */26#define V3D_TFU_IOA_DIMTW (1 << 0)27#define V3D_TFU_IOA_FORMAT_SHIFT 328#define V3D_TFU_IOA_FORMAT_LINEARTILE 329#define V3D_TFU_IOA_FORMAT_UBLINEAR_1_COLUMN 430#define V3D_TFU_IOA_FORMAT_UBLINEAR_2_COLUMN 531#define V3D_TFU_IOA_FORMAT_UIF_NO_XOR 632#define V3D_TFU_IOA_FORMAT_UIF_XOR 73334#define V3D_TFU_ICFG_NUMMM_SHIFT 535#define V3D_TFU_ICFG_TTYPE_SHIFT 93637#define V3D_TFU_ICFG_OPAD_SHIFT 223839#define V3D_TFU_ICFG_FORMAT_SHIFT 1840#define V3D_TFU_ICFG_FORMAT_RASTER 041#define V3D_TFU_ICFG_FORMAT_SAND_128 142#define V3D_TFU_ICFG_FORMAT_SAND_256 243#define V3D_TFU_ICFG_FORMAT_LINEARTILE 1144#define V3D_TFU_ICFG_FORMAT_UBLINEAR_1_COLUMN 1245#define V3D_TFU_ICFG_FORMAT_UBLINEAR_2_COLUMN 1346#define V3D_TFU_ICFG_FORMAT_UIF_NO_XOR 1447#define V3D_TFU_ICFG_FORMAT_UIF_XOR 154849/**50* Copy operations implemented in this file don't operate on a framebuffer51* object provided by the user, however, since most use the TLB for this,52* we still need to have some representation of the framebuffer. For the most53* part, the job's frame tiling information is enough for this, however we54* still need additional information such us the internal type of our single55* render target, so we use this auxiliary struct to pass that information56* around.57*/58struct framebuffer_data {59/* The internal type of the single render target */60uint32_t internal_type;6162/* Supertile coverage */63uint32_t min_x_supertile;64uint32_t min_y_supertile;65uint32_t max_x_supertile;66uint32_t max_y_supertile;6768/* Format info */69VkFormat vk_format;70const struct v3dv_format *format;71uint8_t internal_depth_type;72};7374#endif757677