KallistiOS
git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
pvr_legacy.h
Go to the documentation of this file.
1
/* KallistiOS ##version##
2
dc/pvr/pvr_legacy.h
3
Copyright (C) 2002 Megan Potter
4
Copyright (C) 2014 Lawrence Sebald
5
Copyright (C) 2023 Ruslan Rostovtsev
6
Copyright (C) 2024 Falco Girgis
7
*/
8
9
/** \file dc/pvr/pvr_legacy.h
10
\brief All deprecated PVR API Constants
11
\ingroup pvr_legacy
12
\author Megan Potter
13
\author Roger Cattermole
14
\author Paul Boese
15
\author Brian Paul
16
\author Lawrence Sebald
17
\author Benoit Miller
18
\author Ruslan Rostovtsev
19
\author Falco Girgis
20
*/
21
22
#ifndef __DC_PVR_PVR_LEGACY_H
23
#define __DC_PVR_PVR_LEGACY_H
24
25
#include <sys/cdefs.h>
26
__BEGIN_DECLS
27
28
/** \defgroup pvr_legacy Legacy Constants
29
\ingroup pvr
30
\brief Deprecated and legacy defines for constants.
31
\deprecated
32
These were essentially pointless code-bloat and their respective fields
33
have since been refactored in the API to use regular C boolean types.
34
\note
35
This file remains only for backwards compatibility reasons.
36
@{
37
*/
38
39
/** \defgroup pvr_alpha_switch Alpha Toggle
40
\brief Enable or Disable Alpha Blending
41
\ingroup pvr_blend
42
43
This causes the alpha value in the vertex color to be paid attention to. It
44
really only makes sense to enable this for translucent or punch-thru polys.
45
46
@{
47
*/
48
#define PVR_ALPHA_DISABLE 0
/**< \brief Disable alpha blending */
49
#define PVR_ALPHA_ENABLE 1
/**< \brief Enable alpha blending */
50
/** @} */
51
52
/** \defgroup pvr_shading_types Shading Modes
53
\brief PowerVR primitive context shading modes
54
\ingroup pvr_ctx_attrib
55
56
Each polygon can define how it wants to be shaded, be it with flat or
57
Gouraud shading using these constants in the appropriate place in its
58
pvr_poly_cxt_t.
59
60
@{
61
*/
62
#define PVR_SHADE_FLAT 0
/**< \brief Use flat shading */
63
#define PVR_SHADE_GOURAUD 1
/**< \brief Use Gouraud shading */
64
/** @} */
65
66
/** \defgroup pvr_colclamp_switch Clamping Toggle
67
\brief Enable or Disable Color Clamping
68
\ingroup pvr_ctx_color
69
70
Enabling color clamping will clamp colors between the minimum and maximum
71
values before any sort of fog processing.
72
73
@{
74
*/
75
#define PVR_CLRCLAMP_DISABLE 0
/**< \brief Disable color clamping */
76
#define PVR_CLRCLAMP_ENABLE 1
/**< \brief Enable color clamping */
77
/** @} */
78
79
/** \defgroup pvr_offset_switch Offset Toggle
80
\brief Enable or Disable Offset Color
81
\ingroup pvr_ctx_color
82
83
Enabling offset color calculation allows for "specular" like effects on a
84
per-vertex basis, by providing an additive color in the calculation of the
85
final pixel colors. In vertex types with a "oargb" parameter, that's what it
86
is for.
87
88
\note
89
This must be enabled for bumpmap polygons in order to allow you to
90
specify the parameters in the oargb field of the vertices.
91
92
@{
93
*/
94
#define PVR_SPECULAR_DISABLE 0
/**< \brief Disable offset colors */
95
#define PVR_SPECULAR_ENABLE 1
/**< \brief Enable offset colors */
96
/** @} */
97
98
/** \defgroup pvr_mod_types Types
99
\brief Modifier volume types for PowerVR primitive contexts
100
\ingroup pvr_ctx_modvol
101
@{
102
*/
103
#define PVR_MODIFIER_CHEAP_SHADOW 0
104
#define PVR_MODIFIER_NORMAL 1
105
/** @} */
106
107
/** \defgroup pvr_blend Blending
108
\brief Blending attributes for PVR primitive contexts
109
\ingroup pvr_ctx_attrib
110
*/
111
112
/** \defgroup pvr_blend_switch Blending Toggle
113
\brief Enable or Disable Blending.
114
\ingroup pvr_blend
115
116
@{
117
*/
118
#define PVR_BLEND_DISABLE 0
/**< \brief Disable blending */
119
#define PVR_BLEND_ENABLE 1
/**< \brief Enable blending */
120
/** @} */
121
122
/** \defgroup pvr_uv_fmts U/V Data Format
123
\brief U/V data format for PVR textures
124
\ingroup pvr_ctx_texture
125
@{
126
*/
127
#define PVR_UVFMT_32BIT 0
/**< \brief 32-bit floating point U/V */
128
#define PVR_UVFMT_16BIT 1
/**< \brief 16-bit floating point U/V */
129
/** @} */
130
131
/** \defgroup pvr_mod_switch Toggle
132
\brief Enable or Disable Modifier Effects
133
\ingroup pvr_ctx_modvol
134
@{
135
*/
136
#define PVR_MODIFIER_DISABLE 0
/**< \brief Disable modifier effects */
137
#define PVR_MODIFIER_ENABLE 1
/**< \brief Enable modifier effects */
138
/** @} */
139
140
/** \defgroup pvr_depth_switch Write Toggle
141
\brief Enable or Disable Depth Writes.
142
\ingroup pvr_ctx_depth
143
@{
144
*/
145
#define PVR_DEPTHWRITE_ENABLE 0
/**< \brief Update the Z value */
146
#define PVR_DEPTHWRITE_DISABLE 1
/**< \brief Do not update the Z value */
147
/** @} */
148
149
/** \defgroup pvr_txr_switch Toggle
150
\brief Enable or Disable Texturing on Polygons.
151
\ingroup pvr_ctx_texture
152
153
@{
154
*/
155
#define PVR_TEXTURE_DISABLE 0
/**< \brief Disable texturing */
156
#define PVR_TEXTURE_ENABLE 1
/**< \brief Enable texturing */
157
/** @} */
158
159
/** \defgroup pvr_mip_switch Mipmap Toggle
160
\brief Enable or Disable Mipmap Processing
161
\ingroup pvr_ctx_texture
162
163
@{
164
*/
165
#define PVR_MIPMAP_DISABLE 0
/**< \brief Disable mipmap processing */
166
#define PVR_MIPMAP_ENABLE 1
/**< \brief Enable mipmap processing */
167
/** @} */
168
169
/** \defgroup pvr_txralpha_switch Alpha Toggle
170
\brief Enable or Disable Texture Alpha Blending
171
\ingroup pvr_ctx_texture
172
173
This causes the alpha value in the texel color to be paid attention to. It
174
really only makes sense to enable this for translucent or punch-thru polys.
175
176
@{
177
*/
178
#define PVR_TXRALPHA_ENABLE 0
/**< \brief Enable alpha blending */
179
#define PVR_TXRALPHA_DISABLE 1
/**< \brief Disable alpha blending */
180
/** @} */
181
182
/** \defgroup pvr_bitmasks_legacy Constants and Masks
183
\brief Legacy polygon header constants and masks
184
\deprecated Replaced by \ref pvr_bitmasks
185
Note that thanks to the arrangement of constants, this is mainly a matter of
186
bit shifting to compile headers...
187
@{
188
*/
189
#define PVR_TA_CMD_TYPE_SHIFT 24
190
#define PVR_TA_CMD_TYPE_MASK (7 << PVR_TA_CMD_TYPE_SHIFT)
191
192
#define PVR_TA_CMD_USERCLIP_SHIFT 16
193
#define PVR_TA_CMD_USERCLIP_MASK (3 << PVR_TA_CMD_USERCLIP_SHIFT)
194
195
#define PVR_TA_CMD_CLRFMT_SHIFT 4
196
#define PVR_TA_CMD_CLRFMT_MASK (7 << PVR_TA_CMD_CLRFMT_SHIFT)
197
198
#define PVR_TA_CMD_SPECULAR_SHIFT 2
199
#define PVR_TA_CMD_SPECULAR_MASK (1 << PVR_TA_CMD_SPECULAR_SHIFT)
200
201
#define PVR_TA_CMD_SHADE_SHIFT 1
202
#define PVR_TA_CMD_SHADE_MASK (1 << PVR_TA_CMD_SHADE_SHIFT)
203
204
#define PVR_TA_CMD_UVFMT_SHIFT 0
205
#define PVR_TA_CMD_UVFMT_MASK (1 << PVR_TA_CMD_UVFMT_SHIFT)
206
207
#define PVR_TA_CMD_MODIFIER_SHIFT 7
208
#define PVR_TA_CMD_MODIFIER_MASK (1 << PVR_TA_CMD_MODIFIER_SHIFT)
209
210
#define PVR_TA_CMD_MODIFIERMODE_SHIFT 6
211
#define PVR_TA_CMD_MODIFIERMODE_MASK (1 << PVR_TA_CMD_MODIFIERMODE_SHIFT)
212
213
#define PVR_TA_PM1_DEPTHCMP_SHIFT 29
214
#define PVR_TA_PM1_DEPTHCMP_MASK (7 << PVR_TA_PM1_DEPTHCMP_SHIFT)
215
216
#define PVR_TA_PM1_CULLING_SHIFT 27
217
#define PVR_TA_PM1_CULLING_MASK (3 << PVR_TA_PM1_CULLING_SHIFT)
218
219
#define PVR_TA_PM1_DEPTHWRITE_SHIFT 26
220
#define PVR_TA_PM1_DEPTHWRITE_MASK (1 << PVR_TA_PM1_DEPTHWRITE_SHIFT)
221
222
#define PVR_TA_PM1_TXRENABLE_SHIFT 25
223
#define PVR_TA_PM1_TXRENABLE_MASK (1 << PVR_TA_PM1_TXRENABLE_SHIFT)
224
225
#define PVR_TA_PM1_MODIFIERINST_SHIFT 29
226
#define PVR_TA_PM1_MODIFIERINST_MASK (3 << PVR_TA_PM1_MODIFIERINST_SHIFT)
227
228
#define PVR_TA_PM2_SRCBLEND_SHIFT 29
229
#define PVR_TA_PM2_SRCBLEND_MASK (7 << PVR_TA_PM2_SRCBLEND_SHIFT)
230
231
#define PVR_TA_PM2_DSTBLEND_SHIFT 26
232
#define PVR_TA_PM2_DSTBLEND_MASK (7 << PVR_TA_PM2_DSTBLEND_SHIFT)
233
234
#define PVR_TA_PM2_SRCENABLE_SHIFT 25
235
#define PVR_TA_PM2_SRCENABLE_MASK (1 << PVR_TA_PM2_SRCENABLE_SHIFT)
236
237
#define PVR_TA_PM2_DSTENABLE_SHIFT 24
238
#define PVR_TA_PM2_DSTENABLE_MASK (1 << PVR_TA_PM2_DSTENABLE_SHIFT)
239
240
#define PVR_TA_PM2_FOG_SHIFT 22
241
#define PVR_TA_PM2_FOG_MASK (3 << PVR_TA_PM2_FOG_SHIFT)
242
243
#define PVR_TA_PM2_CLAMP_SHIFT 21
244
#define PVR_TA_PM2_CLAMP_MASK (1 << PVR_TA_PM2_CLAMP_SHIFT)
245
246
#define PVR_TA_PM2_ALPHA_SHIFT 20
247
#define PVR_TA_PM2_ALPHA_MASK (1 << PVR_TA_PM2_ALPHA_SHIFT)
248
249
#define PVR_TA_PM2_TXRALPHA_SHIFT 19
250
#define PVR_TA_PM2_TXRALPHA_MASK (1 << PVR_TA_PM2_TXRALPHA_SHIFT)
251
252
#define PVR_TA_PM2_UVFLIP_SHIFT 17
253
#define PVR_TA_PM2_UVFLIP_MASK (3 << PVR_TA_PM2_UVFLIP_SHIFT)
254
255
#define PVR_TA_PM2_UVCLAMP_SHIFT 15
256
#define PVR_TA_PM2_UVCLAMP_MASK (3 << PVR_TA_PM2_UVCLAMP_SHIFT)
257
258
#define PVR_TA_PM2_FILTER_SHIFT 13
259
#define PVR_TA_PM2_FILTER_MASK (3 << PVR_TA_PM2_FILTER_SHIFT)
260
261
#define PVR_TA_PM2_MIPBIAS_SHIFT 8
262
#define PVR_TA_PM2_MIPBIAS_MASK (15 << PVR_TA_PM2_MIPBIAS_SHIFT)
263
264
#define PVR_TA_PM2_TXRENV_SHIFT 6
265
#define PVR_TA_PM2_TXRENV_MASK (3 << PVR_TA_PM2_TXRENV_SHIFT)
266
267
#define PVR_TA_PM2_USIZE_SHIFT 3
268
#define PVR_TA_PM2_USIZE_MASK (7 << PVR_TA_PM2_USIZE_SHIFT)
269
270
#define PVR_TA_PM2_VSIZE_SHIFT 0
271
#define PVR_TA_PM2_VSIZE_MASK (7 << PVR_TA_PM2_VSIZE_SHIFT)
272
273
#define PVR_TA_PM3_MIPMAP_SHIFT 31
274
#define PVR_TA_PM3_MIPMAP_MASK (1 << PVR_TA_PM3_MIPMAP_SHIFT)
275
276
#define PVR_TA_PM3_TXRFMT_SHIFT 0
277
#define PVR_TA_PM3_TXRFMT_MASK 0xffffffff
278
/** @} */
279
280
/** @} */
281
282
__END_DECLS
283
284
#endif
/* __DC_PVR_PVR_LEGACY_H */
kernel
arch
dreamcast
include
dc
pvr
pvr_legacy.h
Generated by
1.12.0