Path: blob/21.2-virgl/src/panfrost/lib/pan_indirect_draw.h
4560 views
/*1* Copyright (C) 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, ARISING FROM,19* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE20* SOFTWARE.21*/2223#ifndef __PAN_INDIRECT_DRAW_SHADERS_H__24#define __PAN_INDIRECT_DRAW_SHADERS_H__2526struct pan_device;27struct pan_scoreboard;28struct pan_pool;2930struct pan_indirect_draw_info {31mali_ptr draw_buf;32mali_ptr index_buf;33mali_ptr first_vertex_sysval;34mali_ptr base_vertex_sysval;35mali_ptr base_instance_sysval;36mali_ptr vertex_job;37mali_ptr tiler_job;38mali_ptr attrib_bufs;39mali_ptr attribs;40mali_ptr varying_bufs;41unsigned attrib_count;42uint32_t restart_index;43unsigned flags;44unsigned index_size;45unsigned last_indirect_draw;46};4748unsigned49panfrost_emit_indirect_draw(struct pan_pool *pool,50struct pan_scoreboard *scoreboard,51const struct pan_indirect_draw_info *draw_info,52struct panfrost_ptr *ctx);5354void55panfrost_init_indirect_draw_shaders(struct panfrost_device *dev,56struct pan_pool *bin_pool);5758void59panfrost_cleanup_indirect_draw_shaders(struct panfrost_device *dev);6061#endif626364