1 /* 2 * Copyright (C) 2021 Collabora Ltd. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the next 12 * paragraph) shall be included in all copies or substantial portions of the 13 * Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #ifndef PANVK_PRIVATE_H 25 #error "Must be included from panvk_private.h" 26 #endif 27 28 #ifndef PAN_ARCH 29 #error "no arch" 30 #endif 31 32 #include <vulkan/vulkan.h> 33 #include "compiler/shader_enums.h" 34 35 void 36 panvk_per_arch(emit_varying)(const struct panvk_device *dev, 37 const struct panvk_varyings_info *varyings, 38 gl_shader_stage stage, unsigned idx, 39 void *attrib); 40 41 void 42 panvk_per_arch(emit_varyings)(const struct panvk_device *dev, 43 const struct panvk_varyings_info *varyings, 44 gl_shader_stage stage, 45 void *descs); 46 47 void 48 panvk_per_arch(emit_varying_bufs)(const struct panvk_varyings_info *varyings, 49 void *descs); 50 51 void 52 panvk_per_arch(emit_attrib_bufs)(const struct panvk_attribs_info *info, 53 const struct panvk_attrib_buf *bufs, 54 unsigned buf_count, 55 const struct panvk_draw_info *draw, 56 void *descs); 57 58 void 59 panvk_per_arch(emit_attribs)(const struct panvk_device *dev, 60 const struct panvk_draw_info *draw, 61 const struct panvk_attribs_info *attribs, 62 const struct panvk_attrib_buf *bufs, 63 unsigned buf_count, 64 void *descs); 65 66 void 67 panvk_per_arch(emit_ubo)(mali_ptr address, size_t size, void *desc); 68 69 void 70 panvk_per_arch(emit_ubos)(const struct panvk_pipeline *pipeline, 71 const struct panvk_descriptor_state *state, 72 void *descs); 73 74 void 75 panvk_per_arch(emit_sampler)(const VkSamplerCreateInfo *pCreateInfo, 76 void *desc); 77 78 void 79 panvk_per_arch(emit_vertex_job)(const struct panvk_pipeline *pipeline, 80 const struct panvk_draw_info *draw, 81 void *job); 82 83 void 84 panvk_per_arch(emit_compute_job)(const struct panvk_pipeline *pipeline, 85 const struct panvk_dispatch_info *dispatch, 86 void *job); 87 88 void 89 panvk_per_arch(emit_tiler_job)(const struct panvk_pipeline *pipeline, 90 const struct panvk_draw_info *draw, 91 void *job); 92 93 void 94 panvk_per_arch(emit_viewport)(const VkViewport *viewport, 95 const VkRect2D *scissor, 96 void *vpd); 97 98 void 99 panvk_per_arch(emit_blend)(const struct panvk_device *dev, 100 const struct panvk_pipeline *pipeline, 101 unsigned rt, void *bd); 102 103 void 104 panvk_per_arch(emit_blend_constant)(const struct panvk_device *dev, 105 const struct panvk_pipeline *pipeline, 106 unsigned rt, const float *constants, 107 void *bd); 108 109 void 110 panvk_per_arch(emit_dyn_fs_rsd)(const struct panvk_pipeline *pipeline, 111 const struct panvk_cmd_state *state, 112 void *rsd); 113 114 void 115 panvk_per_arch(emit_base_fs_rsd)(const struct panvk_device *dev, 116 const struct panvk_pipeline *pipeline, 117 void *rsd); 118 119 void 120 panvk_per_arch(emit_non_fs_rsd)(const struct panvk_device *dev, 121 const struct pan_shader_info *shader_info, 122 mali_ptr shader_ptr, 123 void *rsd); 124 125 void 126 panvk_per_arch(emit_tiler_context)(const struct panvk_device *dev, 127 unsigned width, unsigned height, 128 const struct panfrost_ptr *descs); 129