Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/panfrost/vulkan/panvk_cs.h
4560 views
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_CS_H
25
#define PANVK_CS_H
26
27
#include <vulkan/vulkan.h>
28
29
#include "compiler/shader_enums.h"
30
#include "panfrost-job.h"
31
#include "pan_cs.h"
32
33
struct pan_blend_state;
34
struct pan_shader_info;
35
struct panfrost_ptr;
36
struct pan_pool;
37
38
union panvk_sysval_data;
39
struct panvk_framebuffer;
40
struct panvk_cmd_state;
41
struct panvk_compute_dim;
42
struct panvk_device;
43
struct panvk_batch;
44
struct panvk_varyings_info;
45
struct panvk_attrib_buf;
46
struct panvk_attribs_info;
47
struct panvk_pipeline;
48
struct panvk_draw_info;
49
struct panvk_descriptor_state;
50
struct panvk_subpass;
51
struct panvk_clear_value;
52
53
void
54
panvk_emit_varyings(const struct panvk_device *dev,
55
const struct panvk_varyings_info *varyings,
56
gl_shader_stage stage,
57
void *descs);
58
59
void
60
panvk_emit_varying_bufs(const struct panvk_device *dev,
61
const struct panvk_varyings_info *varyings,
62
void *descs);
63
64
void
65
panvk_emit_attrib_bufs(const struct panvk_device *dev,
66
const struct panvk_attribs_info *info,
67
const struct panvk_attrib_buf *bufs,
68
unsigned buf_count,
69
const struct panvk_draw_info *draw,
70
void *descs);
71
72
void
73
panvk_emit_attribs(const struct panvk_device *dev,
74
const struct panvk_attribs_info *attribs,
75
const struct panvk_attrib_buf *bufs,
76
unsigned buf_count,
77
void *descs);
78
79
void
80
panvk_emit_ubos(const struct panvk_pipeline *pipeline,
81
const struct panvk_descriptor_state *state,
82
void *descs);
83
84
void
85
panvk_emit_vertex_job(const struct panvk_device *dev,
86
const struct panvk_pipeline *pipeline,
87
const struct panvk_draw_info *draw,
88
void *job);
89
90
void
91
panvk_emit_tiler_job(const struct panvk_device *dev,
92
const struct panvk_pipeline *pipeline,
93
const struct panvk_draw_info *draw,
94
void *job);
95
96
void
97
panvk_emit_fragment_job(const struct panvk_device *dev,
98
const struct panvk_framebuffer *fb,
99
mali_ptr fbdesc,
100
void *job);
101
102
void
103
panvk_emit_viewport(const VkViewport *viewport, const VkRect2D *scissor,
104
void *vpd);
105
106
void
107
panvk_emit_blend(const struct panvk_device *dev,
108
const struct panvk_pipeline *pipeline,
109
unsigned rt, void *bd);
110
111
void
112
panvk_emit_blend_constant(const struct panvk_device *dev,
113
const struct panvk_pipeline *pipeline,
114
unsigned rt, const float *constants, void *bd);
115
116
void
117
panvk_emit_dyn_fs_rsd(const struct panvk_device *dev,
118
const struct panvk_pipeline *pipeline,
119
const struct panvk_cmd_state *state,
120
void *rsd);
121
122
void
123
panvk_emit_base_fs_rsd(const struct panvk_device *dev,
124
const struct panvk_pipeline *pipeline,
125
void *rsd);
126
127
void
128
panvk_emit_non_fs_rsd(const struct panvk_device *dev,
129
const struct pan_shader_info *shader_info,
130
mali_ptr shader_ptr,
131
void *rsd);
132
133
void
134
panvk_emit_bifrost_tiler_context(const struct panvk_device *dev,
135
unsigned width, unsigned height,
136
const struct panfrost_ptr *descs);
137
138
unsigned
139
panvk_emit_fb(const struct panvk_device *dev,
140
const struct panvk_batch *batch,
141
const struct panvk_subpass *subpass,
142
const struct panvk_pipeline *pipeline,
143
const struct panvk_framebuffer *fb,
144
const struct panvk_clear_value *clears,
145
const struct pan_tls_info *tlsinfo,
146
const struct pan_tiler_context *tilerctx,
147
void *desc);
148
149
void
150
panvk_emit_tls(const struct panvk_device *dev,
151
const struct panvk_pipeline *pipeline,
152
const struct pan_compute_dim *wg_count,
153
struct pan_pool *tls_pool,
154
void *desc);
155
156
void
157
panvk_sysval_upload_viewport_scale(const VkViewport *viewport,
158
union panvk_sysval_data *data);
159
160
void
161
panvk_sysval_upload_viewport_offset(const VkViewport *viewport,
162
union panvk_sysval_data *data);
163
164
#endif
165
166