Path: blob/21.2-virgl/src/panfrost/vulkan/panvk_meta.c
4560 views
/*1* Copyright © 2021 Collabora Ltd.2*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 OTHER20* DEALINGS IN THE SOFTWARE.21*/2223#include "nir/nir_builder.h"24#include "pan_blitter.h"25#include "pan_encoder.h"2627#include "panvk_private.h"2829#include "vk_format.h"3031void32panvk_CmdBlitImage(VkCommandBuffer commandBuffer,33VkImage srcImage,34VkImageLayout srcImageLayout,35VkImage destImage,36VkImageLayout destImageLayout,37uint32_t regionCount,38const VkImageBlit *pRegions,39VkFilter filter)4041{42panvk_stub();43}4445void46panvk_CmdCopyImage(VkCommandBuffer commandBuffer,47VkImage srcImage,48VkImageLayout srcImageLayout,49VkImage destImage,50VkImageLayout destImageLayout,51uint32_t regionCount,52const VkImageCopy *pRegions)53{54panvk_stub();55}5657void58panvk_CmdCopyBufferToImage(VkCommandBuffer commandBuffer,59VkBuffer srcBuffer,60VkImage destImage,61VkImageLayout destImageLayout,62uint32_t regionCount,63const VkBufferImageCopy *pRegions)64{65panvk_stub();66}6768void69panvk_CmdCopyImageToBuffer(VkCommandBuffer commandBuffer,70VkImage srcImage,71VkImageLayout srcImageLayout,72VkBuffer destBuffer,73uint32_t regionCount,74const VkBufferImageCopy *pRegions)75{76panvk_stub();77}7879void80panvk_CmdCopyBuffer(VkCommandBuffer commandBuffer,81VkBuffer srcBuffer,82VkBuffer destBuffer,83uint32_t regionCount,84const VkBufferCopy *pRegions)85{86panvk_stub();87}8889void90panvk_CmdResolveImage(VkCommandBuffer cmd_buffer_h,91VkImage src_image_h,92VkImageLayout src_image_layout,93VkImage dest_image_h,94VkImageLayout dest_image_layout,95uint32_t region_count,96const VkImageResolve *regions)97{98panvk_stub();99}100101void102panvk_CmdFillBuffer(VkCommandBuffer commandBuffer,103VkBuffer dstBuffer,104VkDeviceSize dstOffset,105VkDeviceSize fillSize,106uint32_t data)107{108panvk_stub();109}110111void112panvk_CmdUpdateBuffer(VkCommandBuffer commandBuffer,113VkBuffer dstBuffer,114VkDeviceSize dstOffset,115VkDeviceSize dataSize,116const void *pData)117{118panvk_stub();119}120121void122panvk_CmdClearColorImage(VkCommandBuffer commandBuffer,123VkImage image,124VkImageLayout imageLayout,125const VkClearColorValue *pColor,126uint32_t rangeCount,127const VkImageSubresourceRange *pRanges)128{129panvk_stub();130}131132void133panvk_CmdClearDepthStencilImage(VkCommandBuffer commandBuffer,134VkImage image_h,135VkImageLayout imageLayout,136const VkClearDepthStencilValue *pDepthStencil,137uint32_t rangeCount,138const VkImageSubresourceRange *pRanges)139{140panvk_stub();141}142143void144panvk_CmdClearAttachments(VkCommandBuffer commandBuffer,145uint32_t attachmentCount,146const VkClearAttachment *pAttachments,147uint32_t rectCount,148const VkClearRect *pRects)149{150panvk_stub();151}152153void154panvk_meta_init(struct panvk_physical_device *dev)155{156panvk_pool_init(&dev->meta.bin_pool, &dev->pdev, NULL, PAN_BO_EXECUTE,15716 * 1024, "panvk_meta binary pool", false);158panvk_pool_init(&dev->meta.desc_pool, &dev->pdev, NULL, 0,15916 * 1024, "panvk_meta descriptor pool", false);160panvk_pool_init(&dev->meta.blitter.bin_pool, &dev->pdev, NULL,161PAN_BO_EXECUTE, 16 * 1024,162"panvk_meta blitter binary pool", false);163panvk_pool_init(&dev->meta.blitter.desc_pool, &dev->pdev, NULL,1640, 16 * 1024, "panvk_meta blitter descriptor pool",165false);166pan_blitter_init(&dev->pdev, &dev->meta.blitter.bin_pool.base,167&dev->meta.blitter.desc_pool.base);168}169170void171panvk_meta_cleanup(struct panvk_physical_device *dev)172{173pan_blitter_cleanup(&dev->pdev);174panvk_pool_cleanup(&dev->meta.blitter.desc_pool);175panvk_pool_cleanup(&dev->meta.blitter.bin_pool);176panvk_pool_cleanup(&dev->meta.desc_pool);177panvk_pool_cleanup(&dev->meta.bin_pool);178}179180181