gpu_neon: place asm func prototypes into a separate header
[pcsx_rearmed.git] / plugins / gpu_neon / psx_gpu / psx_gpu_simd.h
1 #include "vector_types.h"
2
3 #ifdef ASM_PROTOTYPES
4 #define compute_all_gradients compute_all_gradients_
5 #define update_texture_8bpp_cache_slice update_texture_8bpp_cache_slice_
6 #define setup_spans_up_left setup_spans_up_left_
7 #define setup_spans_up_right setup_spans_up_right_
8 #define setup_spans_down_left setup_spans_down_left_
9 #define setup_spans_down_right setup_spans_down_right_
10 #define setup_spans_up_a setup_spans_up_a_
11 #define setup_spans_up_b setup_spans_up_b_
12 #define setup_spans_down_a setup_spans_down_a_
13 #define setup_spans_down_b setup_spans_down_b_
14 #define setup_spans_up_down setup_spans_up_down_
15 #define setup_blocks_shaded_textured_dithered_unswizzled_indirect \
16         setup_blocks_shaded_textured_dithered_unswizzled_indirect_
17 #define setup_blocks_shaded_untextured_dithered_unswizzled_indirect \
18         setup_blocks_shaded_untextured_dithered_unswizzled_indirect_
19 #define setup_blocks_shaded_untextured_undithered_unswizzled_indirect \
20         setup_blocks_shaded_untextured_undithered_unswizzled_indirect_
21 #define setup_blocks_shaded_untextured_dithered_unswizzled_direct \
22         setup_blocks_shaded_untextured_dithered_unswizzled_direct_
23 #define setup_blocks_shaded_untextured_undithered_unswizzled_direct \
24         setup_blocks_shaded_untextured_undithered_unswizzled_direct_
25 #define setup_blocks_unshaded_textured_dithered_unswizzled_indirect \
26         setup_blocks_unshaded_textured_dithered_unswizzled_indirect_
27 #define setup_blocks_unshaded_untextured_undithered_unswizzled_indirect \
28         setup_blocks_unshaded_untextured_undithered_unswizzled_indirect_
29 #define setup_blocks_unshaded_untextured_undithered_unswizzled_direct \
30         setup_blocks_unshaded_untextured_undithered_unswizzled_direct_
31 #define setup_blocks_shaded_textured_dithered_swizzled_indirect \
32         setup_blocks_shaded_textured_dithered_swizzled_indirect_
33 #define setup_blocks_unshaded_textured_dithered_swizzled_indirect \
34         setup_blocks_unshaded_textured_dithered_swizzled_indirect_
35 #define texture_blocks_untextured texture_blocks_untextured_
36 #define texture_blocks_4bpp texture_blocks_4bpp_
37 #define texture_blocks_8bpp texture_blocks_8bpp_
38 #define texture_blocks_16bpp texture_blocks_16bpp_
39 #define shade_blocks_shaded_textured_modulated_dithered_direct \
40         shade_blocks_shaded_textured_modulated_dithered_direct_
41 #define shade_blocks_shaded_textured_modulated_undithered_direct \
42         shade_blocks_shaded_textured_modulated_undithered_direct_
43 #define shade_blocks_unshaded_textured_modulated_dithered_direct \
44         shade_blocks_unshaded_textured_modulated_dithered_direct_
45 #define shade_blocks_unshaded_textured_modulated_undithered_direct \
46         shade_blocks_unshaded_textured_modulated_undithered_direct_
47 #define shade_blocks_shaded_textured_modulated_dithered_indirect \
48         shade_blocks_shaded_textured_modulated_dithered_indirect_
49 #define shade_blocks_shaded_textured_modulated_undithered_indirect \
50         shade_blocks_shaded_textured_modulated_undithered_indirect_
51 #define shade_blocks_unshaded_textured_modulated_dithered_indirect \
52         shade_blocks_unshaded_textured_modulated_dithered_indirect_
53 #define shade_blocks_unshaded_textured_modulated_undithered_indirect \
54         shade_blocks_unshaded_textured_modulated_undithered_indirect_
55 #define shade_blocks_textured_unmodulated_indirect \
56         shade_blocks_textured_unmodulated_indirect_
57 #define shade_blocks_textured_unmodulated_direct \
58         shade_blocks_textured_unmodulated_direct_
59 #define shade_blocks_unshaded_untextured_indirect \
60         shade_blocks_unshaded_untextured_indirect_
61 #define shade_blocks_unshaded_untextured_direct shade_blocks_unshaded_untextured_direct_
62 #define blend_blocks_textured_average_off blend_blocks_textured_average_off_
63 #define blend_blocks_textured_average_on blend_blocks_textured_average_on_
64 #define blend_blocks_textured_add_off blend_blocks_textured_add_off_
65 #define blend_blocks_textured_add_on blend_blocks_textured_add_on_
66 #define blend_blocks_textured_subtract_off blend_blocks_textured_subtract_off_
67 #define blend_blocks_textured_subtract_on blend_blocks_textured_subtract_on_
68 #define blend_blocks_textured_add_fourth_off blend_blocks_textured_add_fourth_off_
69 #define blend_blocks_textured_add_fourth_on blend_blocks_textured_add_fourth_on_
70 #define blend_blocks_untextured_average_off blend_blocks_untextured_average_off_
71 #define blend_blocks_untextured_average_on blend_blocks_untextured_average_on_
72 #define blend_blocks_untextured_add_off blend_blocks_untextured_add_off_
73 #define blend_blocks_untextured_add_on blend_blocks_untextured_add_on_
74 #define blend_blocks_untextured_subtract_off blend_blocks_untextured_subtract_off_
75 #define blend_blocks_untextured_subtract_on blend_blocks_untextured_subtract_on_
76 #define blend_blocks_untextured_add_fourth_off blend_blocks_untextured_add_fourth_off_
77 #define blend_blocks_untextured_add_fourth_on blend_blocks_untextured_add_fourth_on_
78 #define blend_blocks_textured_unblended_off blend_blocks_textured_unblended_off_
79 #define blend_blocks_textured_unblended_on blend_blocks_textured_unblended_on_
80 #define texture_sprite_blocks_8bpp texture_sprite_blocks_8bpp_
81 #define setup_sprite_4bpp setup_sprite_4bpp_
82 #define setup_sprite_8bpp setup_sprite_8bpp_
83 #define setup_sprite_16bpp setup_sprite_16bpp_
84 #define setup_sprite_4bpp_4x setup_sprite_4bpp_4x_
85 #define setup_sprite_8bpp_4x setup_sprite_8bpp_4x_
86 #define setup_sprite_16bpp_4x setup_sprite_16bpp_4x_
87 #define setup_sprite_untextured setup_sprite_untextured_
88 #define setup_sprite_untextured_simple setup_sprite_untextured_simple_
89 #define scale2x_tiles8 scale2x_tiles8_
90 #endif
91
92 void compute_all_gradients(psx_gpu_struct * __restrict__ psx_gpu,
93  const vertex_struct * __restrict__ a, const vertex_struct * __restrict__ b,
94  const vertex_struct * __restrict__ c);
95
96 void update_texture_8bpp_cache_slice(psx_gpu_struct *psx_gpu,
97  u32 texture_page);
98
99 void setup_spans_up_left(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
100  vertex_struct *v_b, vertex_struct *v_c);
101 void setup_spans_up_right(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
102  vertex_struct *v_b, vertex_struct *v_c);
103 void setup_spans_down_left(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
104  vertex_struct *v_b, vertex_struct *v_c);
105 void setup_spans_down_right(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
106  vertex_struct *v_b, vertex_struct *v_c);
107 void setup_spans_up_a(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
108  vertex_struct *v_b, vertex_struct *v_c);
109 void setup_spans_up_b(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
110  vertex_struct *v_b, vertex_struct *v_c);
111 void setup_spans_down_a(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
112  vertex_struct *v_b, vertex_struct *v_c);
113 void setup_spans_down_b(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
114  vertex_struct *v_b, vertex_struct *v_c);
115 void setup_spans_up_down(psx_gpu_struct *psx_gpu, vertex_struct *v_a,
116  vertex_struct *v_b, vertex_struct *v_c);
117
118 void setup_blocks_shaded_textured_dithered_unswizzled_indirect(psx_gpu_struct
119  *psx_gpu);
120
121 void setup_blocks_shaded_untextured_dithered_unswizzled_indirect(psx_gpu_struct
122  *psx_gpu);
123 void setup_blocks_shaded_untextured_undithered_unswizzled_indirect(
124  psx_gpu_struct *psx_gpu);
125 void setup_blocks_shaded_untextured_dithered_unswizzled_direct(psx_gpu_struct
126  *psx_gpu);
127 void setup_blocks_shaded_untextured_undithered_unswizzled_direct(
128  psx_gpu_struct *psx_gpu);
129
130 void setup_blocks_unshaded_textured_dithered_unswizzled_indirect(psx_gpu_struct
131  *psx_gpu);
132 void setup_blocks_unshaded_untextured_undithered_unswizzled_indirect(
133  psx_gpu_struct *psx_gpu);
134 void setup_blocks_unshaded_untextured_undithered_unswizzled_direct(
135  psx_gpu_struct *psx_gpu);
136
137 void setup_blocks_shaded_textured_dithered_swizzled_indirect(psx_gpu_struct
138  *psx_gpu);
139 void setup_blocks_unshaded_textured_dithered_swizzled_indirect(psx_gpu_struct
140  *psx_gpu);
141
142 void texture_blocks_untextured(psx_gpu_struct *psx_gpu);
143 void texture_blocks_4bpp(psx_gpu_struct *psx_gpu);
144 void texture_blocks_8bpp(psx_gpu_struct *psx_gpu);
145 void texture_blocks_16bpp(psx_gpu_struct *psx_gpu);
146
147 void shade_blocks_shaded_textured_modulated_dithered_direct(psx_gpu_struct
148  *psx_gpu);
149 void shade_blocks_shaded_textured_modulated_undithered_direct(psx_gpu_struct
150  *psx_gpu);
151 void shade_blocks_unshaded_textured_modulated_dithered_direct(psx_gpu_struct
152  *psx_gpu);
153 void shade_blocks_unshaded_textured_modulated_undithered_direct(psx_gpu_struct
154  *psx_gpu);
155
156 void shade_blocks_shaded_textured_modulated_dithered_indirect(psx_gpu_struct
157  *psx_gpu);
158 void shade_blocks_shaded_textured_modulated_undithered_indirect(psx_gpu_struct
159  *psx_gpu);
160 void shade_blocks_unshaded_textured_modulated_dithered_indirect(psx_gpu_struct
161  *psx_gpu);
162 void shade_blocks_unshaded_textured_modulated_undithered_indirect(psx_gpu_struct
163  *psx_gpu);
164
165 void shade_blocks_textured_unmodulated_indirect(psx_gpu_struct *psx_gpu);
166 void shade_blocks_textured_unmodulated_direct(psx_gpu_struct *psx_gpu);
167
168 void shade_blocks_unshaded_untextured_indirect(psx_gpu_struct *psx_gpu);
169 void shade_blocks_unshaded_untextured_direct(psx_gpu_struct *psx_gpu);
170
171 void blend_blocks_textured_average_off(psx_gpu_struct *psx_gpu);
172 void blend_blocks_textured_average_on(psx_gpu_struct *psx_gpu);
173 void blend_blocks_textured_add_off(psx_gpu_struct *psx_gpu);
174 void blend_blocks_textured_add_on(psx_gpu_struct *psx_gpu);
175 void blend_blocks_textured_subtract_off(psx_gpu_struct *psx_gpu);
176 void blend_blocks_textured_subtract_on(psx_gpu_struct *psx_gpu);
177 void blend_blocks_textured_add_fourth_off(psx_gpu_struct *psx_gpu);
178 void blend_blocks_textured_add_fourth_on(psx_gpu_struct *psx_gpu);
179
180 void blend_blocks_untextured_average_off(psx_gpu_struct *psx_gpu);
181 void blend_blocks_untextured_average_on(psx_gpu_struct *psx_gpu);
182 void blend_blocks_untextured_add_off(psx_gpu_struct *psx_gpu);
183 void blend_blocks_untextured_add_on(psx_gpu_struct *psx_gpu);
184 void blend_blocks_untextured_subtract_off(psx_gpu_struct *psx_gpu);
185 void blend_blocks_untextured_subtract_on(psx_gpu_struct *psx_gpu);
186 void blend_blocks_untextured_add_fourth_off(psx_gpu_struct *psx_gpu);
187 void blend_blocks_untextured_add_fourth_on(psx_gpu_struct *psx_gpu);
188
189 void blend_blocks_textured_unblended_off(psx_gpu_struct *psx_gpu);
190 void blend_blocks_textured_unblended_on(psx_gpu_struct *psx_gpu);
191
192 void texture_sprite_blocks_8bpp(psx_gpu_struct *psx_gpu);
193
194 void setup_sprite_4bpp(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v,
195  s32 width, s32 height, u32 color);
196 void setup_sprite_8bpp(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v,
197  s32 width, s32 height, u32 color);
198 void setup_sprite_16bpp(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v,
199  s32 width, s32 height, u32 color);
200
201 void setup_sprite_4bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v,
202  s32 width, s32 height, u32 color);
203 void setup_sprite_8bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v,
204  s32 width, s32 height, u32 color);
205 void setup_sprite_16bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v,
206  s32 width, s32 height, u32 color);
207
208 void setup_sprite_untextured(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u,
209  s32 v, s32 width, s32 height, u32 color);
210 void setup_sprite_untextured_simple(psx_gpu_struct *psx_gpu, s32 x, s32 y,
211  s32 u, s32 v, s32 width, s32 height, u32 color);
212
213 void scale2x_tiles8(void *dst, const void *src, int w8, int h);
214
215 #ifdef ASM_PROTOTYPES
216 #undef compute_all_gradients
217 #undef update_texture_8bpp_cache_slice
218 #undef setup_spans_up_left
219 #undef setup_spans_up_right
220 #undef setup_spans_down_left
221 #undef setup_spans_down_right
222 #undef setup_spans_up_a
223 #undef setup_spans_up_b
224 #undef setup_spans_down_a
225 #undef setup_spans_down_b
226 #undef setup_spans_up_down
227 #undef setup_blocks_shaded_textured_dithered_unswizzled_indirect
228 #undef setup_blocks_shaded_untextured_dithered_unswizzled_indirect
229 #undef setup_blocks_shaded_untextured_undithered_unswizzled_indirect
230 #undef setup_blocks_shaded_untextured_dithered_unswizzled_direct
231 #undef setup_blocks_shaded_untextured_undithered_unswizzled_direct
232 #undef setup_blocks_unshaded_textured_dithered_unswizzled_indirect
233 #undef setup_blocks_unshaded_untextured_undithered_unswizzled_indirect
234 #undef setup_blocks_unshaded_untextured_undithered_unswizzled_direct
235 #undef setup_blocks_shaded_textured_dithered_swizzled_indirect
236 #undef setup_blocks_unshaded_textured_dithered_swizzled_indirect
237 #undef texture_blocks_untextured
238 #undef texture_blocks_4bpp
239 #undef texture_blocks_8bpp
240 #undef texture_blocks_16bpp
241 #undef shade_blocks_shaded_textured_modulated_dithered_direct
242 #undef shade_blocks_shaded_textured_modulated_undithered_direct
243 #undef shade_blocks_unshaded_textured_modulated_dithered_direct
244 #undef shade_blocks_unshaded_textured_modulated_undithered_direct
245 #undef shade_blocks_shaded_textured_modulated_dithered_indirect
246 #undef shade_blocks_shaded_textured_modulated_undithered_indirect
247 #undef shade_blocks_unshaded_textured_modulated_dithered_indirect
248 #undef shade_blocks_unshaded_textured_modulated_undithered_indirect
249 #undef shade_blocks_textured_unmodulated_indirect
250 #undef shade_blocks_textured_unmodulated_direct
251 #undef shade_blocks_unshaded_untextured_indirect
252 #undef shade_blocks_unshaded_untextured_direct
253 #undef blend_blocks_textured_average_off
254 #undef blend_blocks_textured_average_on
255 #undef blend_blocks_textured_add_off
256 #undef blend_blocks_textured_add_on
257 #undef blend_blocks_textured_subtract_off
258 #undef blend_blocks_textured_subtract_on
259 #undef blend_blocks_textured_add_fourth_off
260 #undef blend_blocks_textured_add_fourth_on
261 #undef blend_blocks_untextured_average_off
262 #undef blend_blocks_untextured_average_on
263 #undef blend_blocks_untextured_add_off
264 #undef blend_blocks_untextured_add_on
265 #undef blend_blocks_untextured_subtract_off
266 #undef blend_blocks_untextured_subtract_on
267 #undef blend_blocks_untextured_add_fourth_off
268 #undef blend_blocks_untextured_add_fourth_on
269 #undef blend_blocks_textured_unblended_off
270 #undef blend_blocks_textured_unblended_on
271 #undef texture_sprite_blocks_8bpp
272 #undef setup_sprite_4bpp
273 #undef setup_sprite_8bpp
274 #undef setup_sprite_16bpp
275 #undef setup_sprite_4bpp_4x
276 #undef setup_sprite_8bpp_4x
277 #undef setup_sprite_16bpp_4x
278 #undef setup_sprite_untextured
279 #undef setup_sprite_untextured_simple
280 #undef scale2x_tiles8
281 #endif