37725e8c |
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_ |
2d658c89 |
87 | #define setup_sprite_untextured_512 setup_sprite_untextured_512_ |
37725e8c |
88 | #define scale2x_tiles8 scale2x_tiles8_ |
89 | #endif |
90 | |
91 | void compute_all_gradients(psx_gpu_struct * __restrict__ psx_gpu, |
92 | const vertex_struct * __restrict__ a, const vertex_struct * __restrict__ b, |
93 | const vertex_struct * __restrict__ c); |
94 | |
95 | void update_texture_8bpp_cache_slice(psx_gpu_struct *psx_gpu, |
96 | u32 texture_page); |
97 | |
98 | void setup_spans_up_left(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
99 | vertex_struct *v_b, vertex_struct *v_c); |
100 | void setup_spans_up_right(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
101 | vertex_struct *v_b, vertex_struct *v_c); |
102 | void setup_spans_down_left(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
103 | vertex_struct *v_b, vertex_struct *v_c); |
104 | void setup_spans_down_right(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
105 | vertex_struct *v_b, vertex_struct *v_c); |
106 | void setup_spans_up_a(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
107 | vertex_struct *v_b, vertex_struct *v_c); |
108 | void setup_spans_up_b(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
109 | vertex_struct *v_b, vertex_struct *v_c); |
110 | void setup_spans_down_a(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
111 | vertex_struct *v_b, vertex_struct *v_c); |
112 | void setup_spans_down_b(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
113 | vertex_struct *v_b, vertex_struct *v_c); |
114 | void setup_spans_up_down(psx_gpu_struct *psx_gpu, vertex_struct *v_a, |
115 | vertex_struct *v_b, vertex_struct *v_c); |
116 | |
117 | void setup_blocks_shaded_textured_dithered_unswizzled_indirect(psx_gpu_struct |
118 | *psx_gpu); |
119 | |
120 | void setup_blocks_shaded_untextured_dithered_unswizzled_indirect(psx_gpu_struct |
121 | *psx_gpu); |
122 | void setup_blocks_shaded_untextured_undithered_unswizzled_indirect( |
123 | psx_gpu_struct *psx_gpu); |
124 | void setup_blocks_shaded_untextured_dithered_unswizzled_direct(psx_gpu_struct |
125 | *psx_gpu); |
126 | void setup_blocks_shaded_untextured_undithered_unswizzled_direct( |
127 | psx_gpu_struct *psx_gpu); |
128 | |
129 | void setup_blocks_unshaded_textured_dithered_unswizzled_indirect(psx_gpu_struct |
130 | *psx_gpu); |
131 | void setup_blocks_unshaded_untextured_undithered_unswizzled_indirect( |
132 | psx_gpu_struct *psx_gpu); |
133 | void setup_blocks_unshaded_untextured_undithered_unswizzled_direct( |
134 | psx_gpu_struct *psx_gpu); |
135 | |
136 | void setup_blocks_shaded_textured_dithered_swizzled_indirect(psx_gpu_struct |
137 | *psx_gpu); |
138 | void setup_blocks_unshaded_textured_dithered_swizzled_indirect(psx_gpu_struct |
139 | *psx_gpu); |
140 | |
141 | void texture_blocks_untextured(psx_gpu_struct *psx_gpu); |
142 | void texture_blocks_4bpp(psx_gpu_struct *psx_gpu); |
143 | void texture_blocks_8bpp(psx_gpu_struct *psx_gpu); |
144 | void texture_blocks_16bpp(psx_gpu_struct *psx_gpu); |
145 | |
146 | void shade_blocks_shaded_textured_modulated_dithered_direct(psx_gpu_struct |
147 | *psx_gpu); |
148 | void shade_blocks_shaded_textured_modulated_undithered_direct(psx_gpu_struct |
149 | *psx_gpu); |
150 | void shade_blocks_unshaded_textured_modulated_dithered_direct(psx_gpu_struct |
151 | *psx_gpu); |
152 | void shade_blocks_unshaded_textured_modulated_undithered_direct(psx_gpu_struct |
153 | *psx_gpu); |
154 | |
155 | void shade_blocks_shaded_textured_modulated_dithered_indirect(psx_gpu_struct |
156 | *psx_gpu); |
157 | void shade_blocks_shaded_textured_modulated_undithered_indirect(psx_gpu_struct |
158 | *psx_gpu); |
159 | void shade_blocks_unshaded_textured_modulated_dithered_indirect(psx_gpu_struct |
160 | *psx_gpu); |
161 | void shade_blocks_unshaded_textured_modulated_undithered_indirect(psx_gpu_struct |
162 | *psx_gpu); |
163 | |
164 | void shade_blocks_textured_unmodulated_indirect(psx_gpu_struct *psx_gpu); |
165 | void shade_blocks_textured_unmodulated_direct(psx_gpu_struct *psx_gpu); |
166 | |
167 | void shade_blocks_unshaded_untextured_indirect(psx_gpu_struct *psx_gpu); |
168 | void shade_blocks_unshaded_untextured_direct(psx_gpu_struct *psx_gpu); |
169 | |
170 | void blend_blocks_textured_average_off(psx_gpu_struct *psx_gpu); |
171 | void blend_blocks_textured_average_on(psx_gpu_struct *psx_gpu); |
172 | void blend_blocks_textured_add_off(psx_gpu_struct *psx_gpu); |
173 | void blend_blocks_textured_add_on(psx_gpu_struct *psx_gpu); |
174 | void blend_blocks_textured_subtract_off(psx_gpu_struct *psx_gpu); |
175 | void blend_blocks_textured_subtract_on(psx_gpu_struct *psx_gpu); |
176 | void blend_blocks_textured_add_fourth_off(psx_gpu_struct *psx_gpu); |
177 | void blend_blocks_textured_add_fourth_on(psx_gpu_struct *psx_gpu); |
178 | |
179 | void blend_blocks_untextured_average_off(psx_gpu_struct *psx_gpu); |
180 | void blend_blocks_untextured_average_on(psx_gpu_struct *psx_gpu); |
181 | void blend_blocks_untextured_add_off(psx_gpu_struct *psx_gpu); |
182 | void blend_blocks_untextured_add_on(psx_gpu_struct *psx_gpu); |
183 | void blend_blocks_untextured_subtract_off(psx_gpu_struct *psx_gpu); |
184 | void blend_blocks_untextured_subtract_on(psx_gpu_struct *psx_gpu); |
185 | void blend_blocks_untextured_add_fourth_off(psx_gpu_struct *psx_gpu); |
186 | void blend_blocks_untextured_add_fourth_on(psx_gpu_struct *psx_gpu); |
187 | |
188 | void blend_blocks_textured_unblended_off(psx_gpu_struct *psx_gpu); |
189 | void blend_blocks_textured_unblended_on(psx_gpu_struct *psx_gpu); |
190 | |
191 | void texture_sprite_blocks_8bpp(psx_gpu_struct *psx_gpu); |
192 | |
193 | void setup_sprite_4bpp(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, |
194 | s32 width, s32 height, u32 color); |
195 | void setup_sprite_8bpp(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, |
196 | s32 width, s32 height, u32 color); |
197 | void setup_sprite_16bpp(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, |
198 | s32 width, s32 height, u32 color); |
199 | |
200 | void setup_sprite_4bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, |
201 | s32 width, s32 height, u32 color); |
202 | void setup_sprite_8bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, |
203 | s32 width, s32 height, u32 color); |
204 | void setup_sprite_16bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, |
205 | s32 width, s32 height, u32 color); |
206 | |
2d658c89 |
207 | void setup_sprite_untextured_512(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, |
37725e8c |
208 | s32 v, s32 width, s32 height, u32 color); |
37725e8c |
209 | |
210 | void scale2x_tiles8(void *dst, const void *src, int w8, int h); |
211 | |
212 | #ifdef ASM_PROTOTYPES |
213 | #undef compute_all_gradients |
214 | #undef update_texture_8bpp_cache_slice |
215 | #undef setup_spans_up_left |
216 | #undef setup_spans_up_right |
217 | #undef setup_spans_down_left |
218 | #undef setup_spans_down_right |
219 | #undef setup_spans_up_a |
220 | #undef setup_spans_up_b |
221 | #undef setup_spans_down_a |
222 | #undef setup_spans_down_b |
223 | #undef setup_spans_up_down |
224 | #undef setup_blocks_shaded_textured_dithered_unswizzled_indirect |
225 | #undef setup_blocks_shaded_untextured_dithered_unswizzled_indirect |
226 | #undef setup_blocks_shaded_untextured_undithered_unswizzled_indirect |
227 | #undef setup_blocks_shaded_untextured_dithered_unswizzled_direct |
228 | #undef setup_blocks_shaded_untextured_undithered_unswizzled_direct |
229 | #undef setup_blocks_unshaded_textured_dithered_unswizzled_indirect |
230 | #undef setup_blocks_unshaded_untextured_undithered_unswizzled_indirect |
231 | #undef setup_blocks_unshaded_untextured_undithered_unswizzled_direct |
232 | #undef setup_blocks_shaded_textured_dithered_swizzled_indirect |
233 | #undef setup_blocks_unshaded_textured_dithered_swizzled_indirect |
234 | #undef texture_blocks_untextured |
235 | #undef texture_blocks_4bpp |
236 | #undef texture_blocks_8bpp |
237 | #undef texture_blocks_16bpp |
238 | #undef shade_blocks_shaded_textured_modulated_dithered_direct |
239 | #undef shade_blocks_shaded_textured_modulated_undithered_direct |
240 | #undef shade_blocks_unshaded_textured_modulated_dithered_direct |
241 | #undef shade_blocks_unshaded_textured_modulated_undithered_direct |
242 | #undef shade_blocks_shaded_textured_modulated_dithered_indirect |
243 | #undef shade_blocks_shaded_textured_modulated_undithered_indirect |
244 | #undef shade_blocks_unshaded_textured_modulated_dithered_indirect |
245 | #undef shade_blocks_unshaded_textured_modulated_undithered_indirect |
246 | #undef shade_blocks_textured_unmodulated_indirect |
247 | #undef shade_blocks_textured_unmodulated_direct |
248 | #undef shade_blocks_unshaded_untextured_indirect |
249 | #undef shade_blocks_unshaded_untextured_direct |
250 | #undef blend_blocks_textured_average_off |
251 | #undef blend_blocks_textured_average_on |
252 | #undef blend_blocks_textured_add_off |
253 | #undef blend_blocks_textured_add_on |
254 | #undef blend_blocks_textured_subtract_off |
255 | #undef blend_blocks_textured_subtract_on |
256 | #undef blend_blocks_textured_add_fourth_off |
257 | #undef blend_blocks_textured_add_fourth_on |
258 | #undef blend_blocks_untextured_average_off |
259 | #undef blend_blocks_untextured_average_on |
260 | #undef blend_blocks_untextured_add_off |
261 | #undef blend_blocks_untextured_add_on |
262 | #undef blend_blocks_untextured_subtract_off |
263 | #undef blend_blocks_untextured_subtract_on |
264 | #undef blend_blocks_untextured_add_fourth_off |
265 | #undef blend_blocks_untextured_add_fourth_on |
266 | #undef blend_blocks_textured_unblended_off |
267 | #undef blend_blocks_textured_unblended_on |
268 | #undef texture_sprite_blocks_8bpp |
269 | #undef setup_sprite_4bpp |
270 | #undef setup_sprite_8bpp |
271 | #undef setup_sprite_16bpp |
272 | #undef setup_sprite_4bpp_4x |
273 | #undef setup_sprite_8bpp_4x |
274 | #undef setup_sprite_16bpp_4x |
2d658c89 |
275 | #undef setup_sprite_untextured_512 |
37725e8c |
276 | #undef scale2x_tiles8 |
277 | #endif |