Path: blob/21.2-virgl/src/panfrost/vulkan/panvk_cs.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, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER20* DEALINGS IN THE SOFTWARE.21*/2223#ifndef PANVK_CS_H24#define PANVK_CS_H2526#include <vulkan/vulkan.h>2728#include "compiler/shader_enums.h"29#include "panfrost-job.h"30#include "pan_cs.h"3132struct pan_blend_state;33struct pan_shader_info;34struct panfrost_ptr;35struct pan_pool;3637union panvk_sysval_data;38struct panvk_framebuffer;39struct panvk_cmd_state;40struct panvk_compute_dim;41struct panvk_device;42struct panvk_batch;43struct panvk_varyings_info;44struct panvk_attrib_buf;45struct panvk_attribs_info;46struct panvk_pipeline;47struct panvk_draw_info;48struct panvk_descriptor_state;49struct panvk_subpass;50struct panvk_clear_value;5152void53panvk_emit_varyings(const struct panvk_device *dev,54const struct panvk_varyings_info *varyings,55gl_shader_stage stage,56void *descs);5758void59panvk_emit_varying_bufs(const struct panvk_device *dev,60const struct panvk_varyings_info *varyings,61void *descs);6263void64panvk_emit_attrib_bufs(const struct panvk_device *dev,65const struct panvk_attribs_info *info,66const struct panvk_attrib_buf *bufs,67unsigned buf_count,68const struct panvk_draw_info *draw,69void *descs);7071void72panvk_emit_attribs(const struct panvk_device *dev,73const struct panvk_attribs_info *attribs,74const struct panvk_attrib_buf *bufs,75unsigned buf_count,76void *descs);7778void79panvk_emit_ubos(const struct panvk_pipeline *pipeline,80const struct panvk_descriptor_state *state,81void *descs);8283void84panvk_emit_vertex_job(const struct panvk_device *dev,85const struct panvk_pipeline *pipeline,86const struct panvk_draw_info *draw,87void *job);8889void90panvk_emit_tiler_job(const struct panvk_device *dev,91const struct panvk_pipeline *pipeline,92const struct panvk_draw_info *draw,93void *job);9495void96panvk_emit_fragment_job(const struct panvk_device *dev,97const struct panvk_framebuffer *fb,98mali_ptr fbdesc,99void *job);100101void102panvk_emit_viewport(const VkViewport *viewport, const VkRect2D *scissor,103void *vpd);104105void106panvk_emit_blend(const struct panvk_device *dev,107const struct panvk_pipeline *pipeline,108unsigned rt, void *bd);109110void111panvk_emit_blend_constant(const struct panvk_device *dev,112const struct panvk_pipeline *pipeline,113unsigned rt, const float *constants, void *bd);114115void116panvk_emit_dyn_fs_rsd(const struct panvk_device *dev,117const struct panvk_pipeline *pipeline,118const struct panvk_cmd_state *state,119void *rsd);120121void122panvk_emit_base_fs_rsd(const struct panvk_device *dev,123const struct panvk_pipeline *pipeline,124void *rsd);125126void127panvk_emit_non_fs_rsd(const struct panvk_device *dev,128const struct pan_shader_info *shader_info,129mali_ptr shader_ptr,130void *rsd);131132void133panvk_emit_bifrost_tiler_context(const struct panvk_device *dev,134unsigned width, unsigned height,135const struct panfrost_ptr *descs);136137unsigned138panvk_emit_fb(const struct panvk_device *dev,139const struct panvk_batch *batch,140const struct panvk_subpass *subpass,141const struct panvk_pipeline *pipeline,142const struct panvk_framebuffer *fb,143const struct panvk_clear_value *clears,144const struct pan_tls_info *tlsinfo,145const struct pan_tiler_context *tilerctx,146void *desc);147148void149panvk_emit_tls(const struct panvk_device *dev,150const struct panvk_pipeline *pipeline,151const struct pan_compute_dim *wg_count,152struct pan_pool *tls_pool,153void *desc);154155void156panvk_sysval_upload_viewport_scale(const VkViewport *viewport,157union panvk_sysval_data *data);158159void160panvk_sysval_upload_viewport_offset(const VkViewport *viewport,161union panvk_sysval_data *data);162163#endif164165166