• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "compiler/shader_enums.h"
33 #include <vulkan/vulkan.h>
34 
35 void panvk_per_arch(emit_varying)(const struct panvk_device *dev,
36                                   const struct panvk_varyings_info *varyings,
37                                   gl_shader_stage stage, unsigned idx,
38                                   void *attrib);
39 
40 void panvk_per_arch(emit_varyings)(const struct panvk_device *dev,
41                                    const struct panvk_varyings_info *varyings,
42                                    gl_shader_stage stage, void *descs);
43 
44 void
45    panvk_per_arch(emit_varying_bufs)(const struct panvk_varyings_info *varyings,
46                                      void *descs);
47 
48 void panvk_per_arch(emit_attrib_bufs)(const struct panvk_attribs_info *info,
49                                       const struct panvk_attrib_buf *bufs,
50                                       unsigned buf_count,
51                                       const struct panvk_draw_info *draw,
52                                       void *descs);
53 
54 void panvk_per_arch(emit_attribs)(const struct panvk_device *dev,
55                                   const struct panvk_draw_info *draw,
56                                   const struct panvk_attribs_info *attribs,
57                                   const struct panvk_attrib_buf *bufs,
58                                   unsigned buf_count, void *descs);
59 
60 void panvk_per_arch(emit_ubo)(mali_ptr address, size_t size, void *desc);
61 
62 void panvk_per_arch(emit_ubos)(const struct panvk_pipeline *pipeline,
63                                const struct panvk_descriptor_state *state,
64                                void *descs);
65 
66 void panvk_per_arch(emit_sampler)(const VkSamplerCreateInfo *pCreateInfo,
67                                   void *desc);
68 
69 void panvk_per_arch(emit_vertex_job)(const struct panvk_pipeline *pipeline,
70                                      const struct panvk_draw_info *draw,
71                                      void *job);
72 
73 void
74    panvk_per_arch(emit_compute_job)(const struct panvk_pipeline *pipeline,
75                                     const struct panvk_dispatch_info *dispatch,
76                                     void *job);
77 
78 void panvk_per_arch(emit_tiler_job)(const struct panvk_pipeline *pipeline,
79                                     const struct panvk_draw_info *draw,
80                                     void *job);
81 
82 void panvk_per_arch(emit_viewport)(const VkViewport *viewport,
83                                    const VkRect2D *scissor, void *vpd);
84 
85 void panvk_per_arch(emit_blend)(const struct panvk_device *dev,
86                                 const struct panvk_pipeline *pipeline,
87                                 unsigned rt, void *bd);
88 
89 void panvk_per_arch(emit_blend_constant)(const struct panvk_device *dev,
90                                          const struct panvk_pipeline *pipeline,
91                                          unsigned rt, const float *constants,
92                                          void *bd);
93 
94 void panvk_per_arch(emit_dyn_fs_rsd)(const struct panvk_pipeline *pipeline,
95                                      const struct panvk_cmd_state *state,
96                                      void *rsd);
97 
98 void panvk_per_arch(emit_base_fs_rsd)(const struct panvk_device *dev,
99                                       const struct panvk_pipeline *pipeline,
100                                       void *rsd);
101 
102 void panvk_per_arch(emit_non_fs_rsd)(const struct panvk_device *dev,
103                                      const struct pan_shader_info *shader_info,
104                                      mali_ptr shader_ptr, void *rsd);
105 
106 void panvk_per_arch(emit_tiler_context)(const struct panvk_device *dev,
107                                         unsigned width, unsigned height,
108                                         const struct panfrost_ptr *descs);
109