KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
pvr_header.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 dc/pvr/pvr_header.h
4 Copyright (C) 2025 Paul Cercueil
5*/
6
7/** \file dc/pvr/pvr_header.h
8 \brief Polygon/Sprite header definitions
9 \ingroup pvr
10
11 \author Paul Cercueil
12*/
13
14#ifndef __DC_PVR_PVR_HEADER_H
15#define __DC_PVR_PVR_HEADER_H
16
17#include <stdalign.h>
18#include <stdint.h>
19#include <stdio.h>
20
21#include <sys/cdefs.h>
22__BEGIN_DECLS
23
24/** \defgroup pvr_primitives_headers Headers
25 \brief Structs relative to PVR headers
26 \ingroup pvr_primitives
27 \headerfile dc/pvr/pvr_header.h
28
29 @{
30*/
31
32/** \brief Vertex color formats
33
34 These control how colors are represented in polygon data.
35*/
37 PVR_CLRFMT_ARGBPACKED, /**< 32-bit integer ARGB */
38 PVR_CLRFMT_4FLOATS, /**< 4 floating point values */
39 PVR_CLRFMT_INTENSITY, /**< Intensity color */
40 PVR_CLRFMT_INTENSITY_PREV, /**< Use last intensity */
41};
42
43/** \brief Primitive clipping modes
44
45 These control how primitives are clipped against the user clipping area.
46*/
48 PVR_USERCLIP_DISABLE = 0, /**< Disable clipping */
49 PVR_USERCLIP_INSIDE = 2, /**< Enable clipping inside area */
50 PVR_USERCLIP_OUTSIDE = 3, /**< Enable clipping outside area */
51};
52
53/** \brief PVR rendering lists
54
55 Each primitive submitted to the PVR must be placed in one of these lists,
56 depending on its characteristics.
57*/
59 PVR_LIST_OP_POLY, /**< Opaque polygon list */
60 PVR_LIST_OP_MOD, /**< Opaque modifier list */
61 PVR_LIST_TR_POLY, /**< Translucent polygon list */
62 PVR_LIST_TR_MOD, /**< Translucent modifier list*/
63 PVR_LIST_PT_POLY, /**< Punch-thru polygon list */
64};
65
66/** \brief Primitive culling modes
67
68 These culling modes can be set by polygons to determine when they are
69 culled. They work pretty much as you'd expect them to if you've ever used
70 any 3D hardware before.
71*/
73 PVR_CULLING_NONE, /**< Disable culling */
74 PVR_CULLING_SMALL, /**< Cull if small */
75 PVR_CULLING_CCW, /**< Cull if counterclockwise */
76 PVR_CULLING_CW, /**< Cull if clockwise */
77};
78
79/** \brief Depth comparison modes
80
81 These set the depth function used for comparisons.
82*/
84 PVR_DEPTHCMP_NEVER, /**< Never pass */
85 PVR_DEPTHCMP_LESS, /**< Less than */
86 PVR_DEPTHCMP_EQUAL, /**< Equal to */
87 PVR_DEPTHCMP_LEQUAL, /**< Less than or equal to */
88 PVR_DEPTHCMP_GREATER, /**< Greater than */
89 PVR_DEPTHCMP_NOTEQUAL, /**< Not equal to */
90 PVR_DEPTHCMP_GEQUAL, /**< Greater than or equal to */
91 PVR_DEPTHCMP_ALWAYS, /**< Always pass */
92};
93
94/** \brief Texture U/V size */
105
106/** \brief Texture color calculation modes.
107
108 The shading mode specifies how the pixel value used as the "foreground" or
109 "source" for blending is computed.
110
111 Here, "tex" represents the pixel value from the texture, and "col"
112 represents the pixel value from the polygon's color. RGB() represents the
113 color channels, A() represents the alpha channel, and ARGB() represents the
114 whole pixel (color + alpha).
115
116 Note that the offset color (aka. oargb), if specular lighting is enabled,
117 is added to the result. Its alpha channel is ignored.
118*/
120 PVR_TXRENV_REPLACE, /**< px = ARGB(tex) */
121 PVR_TXRENV_MODULATE, /**< px = A(tex) + RGB(col) * RGB(tex) */
122 PVR_TXRENV_DECAL, /**< px = A(col) + RGB(tex) * A(tex) + RGB(col) * (1 - A(tex)) */
123 PVR_TXRENV_MODULATEALPHA, /**< px = ARGB(col) * ARGB(tex) */
124};
125
126/** \brief Texture sampling modes */
128 PVR_FILTER_NEAREST, /**< No filtering (point sample) */
129 PVR_FILTER_BILINEAR, /**< Bilinear interpolation */
130 PVR_FILTER_TRILINEAR1, /**< Trilinear interpolation pass 1 */
131 PVR_FILTER_TRILINEAR2, /**< Trilinear interpolation pass 2 */
133};
134
135/** \brief Fog modes
136
137 Each polygon can decide what fog type is used by specifying the fog mode
138 in its header.
139*/
141 PVR_FOG_TABLE, /**< Table fog */
142 PVR_FOG_VERTEX, /**< Vertex fog */
143 PVR_FOG_DISABLE, /**< Disable fog */
144 PVR_FOG_TABLE2, /**< Table fog mode 2 */
145};
146
147/** \brief Blending modes
148
149 These are all the blending modes that can be done with regard to alpha
150 blending on the PVR.
151*/
153 PVR_BLEND_ZERO, /**< None of this color */
154 PVR_BLEND_ONE, /**< All of this color */
155 PVR_BLEND_DESTCOLOR, /**< Destination color */
156 PVR_BLEND_INVDESTCOLOR, /**< Inverse of destination color */
157 PVR_BLEND_SRCALPHA, /**< Blend with source alpha */
158 PVR_BLEND_INVSRCALPHA, /**< Blend with inverse source alpha */
159 PVR_BLEND_DESTALPHA, /**< Blend with destination alpha */
160 PVR_BLEND_INVDESTALPHA, /**< Blend with inverse destination alpha */
161};
162
163/** \brief Texture formats
164
165 These are the texture formats that the PVR supports.
166*/
168 PVR_PIXEL_MODE_ARGB1555, /**< 16-bit ARGB1555 */
169 PVR_PIXEL_MODE_RGB565, /**< 16-bit RGB565 */
170 PVR_PIXEL_MODE_ARGB4444, /**< 16-bit ARGB4444 */
171 PVR_PIXEL_MODE_YUV422, /**< YUV422 format */
172 PVR_PIXEL_MODE_BUMP, /**< Bumpmap format */
173 PVR_PIXEL_MODE_PAL_4BPP, /**< 4BPP paletted format */
174 PVR_PIXEL_MODE_PAL_8BPP, /**< 8BPP paletted format */
175};
176
177/** \brief Triangle strip length
178
179 This sets the maximum length of a triangle strip, if not
180 configured in auto mode.
181*/
188
189/** \brief Polygon header type
190
191 This enum contains the possible PVR header types.
192*/
200
201/** \brief Texture address
202
203 This type represents an address of a texture in VRAM,
204 pre-processed to be used in headers.
205*/
206typedef uint32_t pvr_txr_ptr_t;
207
208/** \brief Get texture address from VRAM address
209
210 This function can be used to get a texture address that can be used
211 in a PVR header from the texture's VRAM address.
212
213 \param addr The texture's address in VRAM
214 \return The pre-processed texture address
215*/
217 return ((uint32_t)addr & 0x00fffff8) >> 3;
218}
219
220/** \brief PVR header command
221
222 This structure contains all the fields for the command of PVR headers.
223*/
225 bool uvfmt_f16 :1; /* 0 */ /**< Use 16-bit floating-point U/Vs */
226 bool gouraud :1; /* 1 */ /**< Enable gouraud shading */
227 bool oargb_en :1; /* 2 */ /**< Enable specular lighting */
228 bool txr_en :1; /* 3 */ /**< Enable texturing */
229 enum pvr_color_fmts color_fmt :2; /* 5-4 */ /**< Select color encoding */
230 bool mod_normal :1; /* 6 */ /**< true: normal, false: cheap shadow */
231 bool modifier_en :1; /* 7 */ /**< Enable modifier effects */
232 uint32_t __pad0 :8; /* 15-8 */
233 enum pvr_clip_mode clip_mode :2; /* 17-16 */ /**< Clipping mode */
234 enum pvr_strip_len strip_len :2; /* 19-18 */ /**< Triangle strips length (if non-auto) */
235 uint32_t __pad1 :3; /* 22-20 */
236 bool auto_strip_len :1; /* 23 */ /**< Auto select triangle strips length */
237
238 enum pvr_list_type list_type :3; /* 26-24 */ /**< Render list to use */
239 uint32_t __pad2 :1; /* 27 */
240 bool strip_end :1; /* 28 */ /**< Mark an end-of-strip */
241 enum pvr_hdr_type hdr_type :3; /* 31-29 */ /**< Header type */
242};
243
244/** \brief PVR header mode1
245
246 This structure contains all the fields for the mode1 parameter of
247 PVR headers.
248*/
250 uint32_t __pad3 :25; /* 24-0 */
251 bool txr_en :1; /* 25 */ /**< Enable texturing (2nd bit) */
252 bool depth_write_dis :1; /* 26 */ /**< Disable depth writes */
253 enum pvr_cull_mode culling :2; /* 28-27 */ /**< Culling mode */
254 enum pvr_depthcmp_mode depth_cmp :3; /* 31-29 */ /**< Depth comparison mode */
255};
256
257/** \brief PVR header mode2
258
259 This structure contains all the fields for the mode2 parameter of
260 PVR headers.
261*/
263 enum pvr_uv_size v_size :3; /* 2-0 */ /**< Texture height */
264 enum pvr_uv_size u_size :3; /* 5-3 */ /**< Texture width */
265 enum pvr_txr_shading_mode shading :2; /* 7-6 */ /**< Shading mode */
266 uint32_t mip_bias :4; /* 11-8 */ /**< Bias for mipmaps */
267 bool supersampling :1; /* 12 */ /**< Enable texture supersampling */
268 enum pvr_filter_mode filter_mode :2; /* 14-13 */ /**< Texture filtering mode */
269 bool v_clamp :1; /* 15 */ /**< Clamp V to 1.0 */
270 bool u_clamp :1; /* 16 */ /**< Clamp U to 1.0 */
271 bool v_flip :1; /* 17 */ /**< Flip V after 1.0 */
272 bool u_flip :1; /* 18 */ /**< Flip U after 1.0 */
273 bool txralpha_dis :1; /* 19 */ /**< Disable alpha channel in textures */
274 bool alpha :1; /* 20 */ /**< Enable alpha channel in vertex colors */
275 bool fog_clamp :1; /* 21 */ /**< Enable fog clamping */
276 enum pvr_fog_type fog_type :2; /* 23-22 */ /**< Select fog type */
277 bool blend_dst_acc2 :1; /* 24 */ /**< Blend to the 2nd accumulation buffer */
278 bool blend_src_acc2 :1; /* 25 */ /**< Blend from the 2nd accumulation buffer */
279 enum pvr_blend_mode blend_dst :3; /* 28-26 */ /**< Blend mode for the background */
280 enum pvr_blend_mode blend_src :3; /* 31-29 */ /**< Blend mode for the foreground */
281};
282
283/** \brief PVR header mode3
284
285 This structure contains all the fields for the mode3 parameter of
286 PVR headers.
287*/
289 pvr_txr_ptr_t txr_base :25; /* 24-0 */ /**< Pre-processed texture address */
290 bool x32stride :1; /* 25 */ /**< Set if texture stride is multiple of 32 */
291 bool nontwiddled :1; /* 26 */ /**< Set if texture is not twiddled */
292 enum pvr_pixel_mode pixel_mode :3; /* 29-27 */ /**< Select the texture's pixel format */
293 bool vq_en :1; /* 30 */ /**< Set if the texture is VQ encoded */
294 bool mipmap_en :1; /* 31 */ /**< Enable mipmaps */
295};
296
297/** \brief PVR polygon header.
298
299 This structure contains information about how the following polygons should
300 be rendered.
301*/
302typedef __attribute__((aligned(32))) struct pvr_poly_hdr {
303 union {
304 uint32_t cmd; /**< Raw access to cmd param */
305 struct pvr_poly_hdr_cmd m0; /**< command parameters */
306 };
307 union {
308 uint32_t mode1; /**< Raw access to mode1 param */
309 struct pvr_poly_hdr_mode1 m1; /**< mode1 parameters */
310 };
311 union {
312 uint32_t mode2; /**< Raw access to mode2 param */
313 uint32_t mode2_0; /**< Legacy name */
314 uint32_t d5; /**< Dummy value 5 */
315 struct pvr_poly_hdr_mode2 m2; /**< mode2 parameters (modifiers: outside volume) */
316 };
317 union {
318 uint32_t mode3; /**< Raw access to mode3 param */
319 uint32_t mode3_0; /**< Legacy name */
320 uint32_t d6; /**< Dummy value 6 */
321 struct pvr_poly_hdr_mode3 m3; /**< mode3 parameters (modifiers: outside volume) */
322 };
323 union {
324 struct {
325 uint32_t d1; /**< Dummy value 1 */
326 uint32_t d2; /**< Dummy value 2 */
327 uint32_t d3; /**< Dummy value 3 */
328 uint32_t d4; /**< Dummy value 4 */
329 };
330 struct {
331 /* Intensity color */
332 float a; /**< Intensity color alpha */
333 float r; /**< Intensity color red */
334 float g; /**< Intensity color green */
335 float b; /**< Intensity color blue */
336 };
337 struct {
338 /* Modifier volume */
339 union {
340 struct {
341 uint32_t mode2_1; /**< Legacy name */
342 uint32_t mode3_1; /**< Legacy name */
343 };
344 struct {
345 struct pvr_poly_hdr_mode2 m2; /**< mode2 parameters (modifiers: inside volume) */
346 struct pvr_poly_hdr_mode3 m3; /**< mode3 parameters (modifiers: inside volume) */
347 } modifier;
348 };
349 uint64_t __pad4;
350 };
351 struct {
352 /* Sprite */
353 uint32_t argb; /**< 32-bit ARGB vertex color for sprites */
354 uint32_t oargb; /**< 32-bit ARGB specular color for sprites */
355 uint64_t __pad5;
356 };
357 };
359
360_Static_assert(sizeof(pvr_poly_hdr_t) == 32, "Invalid header size");
361
362/** @} */
363
364__END_DECLS
365#endif /* __DC_PVR_PVR_HEADER_H */
pvr_hdr_type
Polygon header type.
Definition pvr_header.h:193
static pvr_txr_ptr_t to_pvr_txr_ptr(pvr_ptr_t addr)
Get texture address from VRAM address.
Definition pvr_header.h:216
pvr_pixel_mode
Texture formats.
Definition pvr_header.h:167
pvr_clip_mode
Primitive clipping modes.
Definition pvr_header.h:47
pvr_list_type
PVR rendering lists.
Definition pvr_header.h:58
pvr_blend_mode
Blending modes.
Definition pvr_header.h:152
pvr_strip_len
Triangle strip length.
Definition pvr_header.h:182
uint32_t pvr_txr_ptr_t
Texture address.
Definition pvr_header.h:206
pvr_txr_shading_mode
Texture color calculation modes.
Definition pvr_header.h:119
pvr_cull_mode
Primitive culling modes.
Definition pvr_header.h:72
pvr_uv_size
Texture U/V size.
Definition pvr_header.h:95
pvr_color_fmts
Vertex color formats.
Definition pvr_header.h:36
pvr_depthcmp_mode
Depth comparison modes.
Definition pvr_header.h:83
pvr_filter_mode
Texture sampling modes.
Definition pvr_header.h:127
pvr_fog_type
Fog modes.
Definition pvr_header.h:140
@ PVR_HDR_EOL
Definition pvr_header.h:194
@ PVR_HDR_OBJECT_LIST_SET
Definition pvr_header.h:196
@ PVR_HDR_SPRITE
Definition pvr_header.h:198
@ PVR_HDR_POLY
Definition pvr_header.h:197
@ PVR_HDR_USERCLIP
Definition pvr_header.h:195
@ PVR_PIXEL_MODE_YUV422
YUV422 format.
Definition pvr_header.h:171
@ PVR_PIXEL_MODE_PAL_4BPP
4BPP paletted format
Definition pvr_header.h:173
@ PVR_PIXEL_MODE_BUMP
Bumpmap format.
Definition pvr_header.h:172
@ PVR_PIXEL_MODE_RGB565
16-bit RGB565
Definition pvr_header.h:169
@ PVR_PIXEL_MODE_ARGB1555
16-bit ARGB1555
Definition pvr_header.h:168
@ PVR_PIXEL_MODE_PAL_8BPP
8BPP paletted format
Definition pvr_header.h:174
@ PVR_PIXEL_MODE_ARGB4444
16-bit ARGB4444
Definition pvr_header.h:170
@ PVR_USERCLIP_INSIDE
Enable clipping inside area.
Definition pvr_header.h:49
@ PVR_USERCLIP_OUTSIDE
Enable clipping outside area.
Definition pvr_header.h:50
@ PVR_USERCLIP_DISABLE
Disable clipping.
Definition pvr_header.h:48
@ PVR_LIST_PT_POLY
Punch-thru polygon list.
Definition pvr_header.h:63
@ PVR_LIST_OP_MOD
Opaque modifier list.
Definition pvr_header.h:60
@ PVR_LIST_OP_POLY
Opaque polygon list.
Definition pvr_header.h:59
@ PVR_LIST_TR_POLY
Translucent polygon list.
Definition pvr_header.h:61
@ PVR_LIST_TR_MOD
Translucent modifier list.
Definition pvr_header.h:62
@ PVR_BLEND_DESTCOLOR
Destination color.
Definition pvr_header.h:155
@ PVR_BLEND_DESTALPHA
Blend with destination alpha.
Definition pvr_header.h:159
@ PVR_BLEND_SRCALPHA
Blend with source alpha.
Definition pvr_header.h:157
@ PVR_BLEND_ZERO
None of this color.
Definition pvr_header.h:153
@ PVR_BLEND_ONE
All of this color.
Definition pvr_header.h:154
@ PVR_BLEND_INVSRCALPHA
Blend with inverse source alpha.
Definition pvr_header.h:158
@ PVR_BLEND_INVDESTCOLOR
Inverse of destination color.
Definition pvr_header.h:156
@ PVR_BLEND_INVDESTALPHA
Blend with inverse destination alpha.
Definition pvr_header.h:160
@ PVR_STRIP_LEN_2
Definition pvr_header.h:184
@ PVR_STRIP_LEN_1
Definition pvr_header.h:183
@ PVR_STRIP_LEN_4
Definition pvr_header.h:185
@ PVR_STRIP_LEN_6
Definition pvr_header.h:186
@ PVR_TXRENV_MODULATE
px = A(tex) + RGB(col) * RGB(tex)
Definition pvr_header.h:121
@ PVR_TXRENV_REPLACE
px = ARGB(tex)
Definition pvr_header.h:120
@ PVR_TXRENV_MODULATEALPHA
px = ARGB(col) * ARGB(tex)
Definition pvr_header.h:123
@ PVR_TXRENV_DECAL
px = A(col) + RGB(tex) * A(tex) + RGB(col) * (1 - A(tex))
Definition pvr_header.h:122
@ PVR_CULLING_CW
Cull if clockwise.
Definition pvr_header.h:76
@ PVR_CULLING_NONE
Disable culling.
Definition pvr_header.h:73
@ PVR_CULLING_SMALL
Cull if small.
Definition pvr_header.h:74
@ PVR_CULLING_CCW
Cull if counterclockwise.
Definition pvr_header.h:75
@ PVR_UV_SIZE_64
Definition pvr_header.h:99
@ PVR_UV_SIZE_8
Definition pvr_header.h:96
@ PVR_UV_SIZE_1024
Definition pvr_header.h:103
@ PVR_UV_SIZE_128
Definition pvr_header.h:100
@ PVR_UV_SIZE_512
Definition pvr_header.h:102
@ PVR_UV_SIZE_16
Definition pvr_header.h:97
@ PVR_UV_SIZE_256
Definition pvr_header.h:101
@ PVR_UV_SIZE_32
Definition pvr_header.h:98
@ PVR_CLRFMT_4FLOATS
4 floating point values
Definition pvr_header.h:38
@ PVR_CLRFMT_INTENSITY_PREV
Use last intensity.
Definition pvr_header.h:40
@ PVR_CLRFMT_INTENSITY
Intensity color.
Definition pvr_header.h:39
@ PVR_CLRFMT_ARGBPACKED
32-bit integer ARGB
Definition pvr_header.h:37
@ PVR_DEPTHCMP_LESS
Less than.
Definition pvr_header.h:85
@ PVR_DEPTHCMP_GEQUAL
Greater than or equal to.
Definition pvr_header.h:90
@ PVR_DEPTHCMP_GREATER
Greater than.
Definition pvr_header.h:88
@ PVR_DEPTHCMP_LEQUAL
Less than or equal to.
Definition pvr_header.h:87
@ PVR_DEPTHCMP_NOTEQUAL
Not equal to.
Definition pvr_header.h:89
@ PVR_DEPTHCMP_ALWAYS
Always pass.
Definition pvr_header.h:91
@ PVR_DEPTHCMP_EQUAL
Equal to.
Definition pvr_header.h:86
@ PVR_DEPTHCMP_NEVER
Never pass.
Definition pvr_header.h:84
@ PVR_FILTER_TRILINEAR2
Trilinear interpolation pass 2.
Definition pvr_header.h:131
@ PVR_FILTER_NONE
Definition pvr_header.h:132
@ PVR_FILTER_BILINEAR
Bilinear interpolation.
Definition pvr_header.h:129
@ PVR_FILTER_NEAREST
No filtering (point sample)
Definition pvr_header.h:128
@ PVR_FILTER_TRILINEAR1
Trilinear interpolation pass 1.
Definition pvr_header.h:130
@ PVR_FOG_TABLE2
Table fog mode 2.
Definition pvr_header.h:144
@ PVR_FOG_VERTEX
Vertex fog.
Definition pvr_header.h:142
@ PVR_FOG_DISABLE
Disable fog.
Definition pvr_header.h:143
@ PVR_FOG_TABLE
Table fog.
Definition pvr_header.h:141
void * pvr_ptr_t
PVR texture memory pointer.
Definition pvr_mem.h:45
Basic sys/stdio.h file from newlib.
PVR header command.
Definition pvr_header.h:224
uint32_t __pad1
< Triangle strips length (if non-auto)
Definition pvr_header.h:235
enum pvr_list_type list_type
< Auto select triangle strips length
Definition pvr_header.h:238
bool oargb_en
< Enable gouraud shading
Definition pvr_header.h:227
bool uvfmt_f16
Definition pvr_header.h:225
bool mod_normal
< Select color encoding
Definition pvr_header.h:230
enum pvr_color_fmts color_fmt
< Enable texturing
Definition pvr_header.h:229
bool gouraud
< Use 16-bit floating-point U/Vs
Definition pvr_header.h:226
enum pvr_hdr_type hdr_type
< Mark an end-of-strip
Definition pvr_header.h:241
bool strip_end
Definition pvr_header.h:240
bool auto_strip_len
Definition pvr_header.h:236
bool modifier_en
< true: normal, false: cheap shadow
Definition pvr_header.h:231
enum pvr_clip_mode clip_mode
Definition pvr_header.h:233
uint32_t __pad2
< Render list to use
Definition pvr_header.h:239
uint32_t __pad0
< Enable modifier effects
Definition pvr_header.h:232
enum pvr_strip_len strip_len
< Clipping mode
Definition pvr_header.h:234
bool txr_en
< Enable specular lighting
Definition pvr_header.h:228
PVR header mode1.
Definition pvr_header.h:249
uint32_t __pad3
Definition pvr_header.h:250
enum pvr_cull_mode culling
< Disable depth writes
Definition pvr_header.h:253
enum pvr_depthcmp_mode depth_cmp
< Culling mode
Definition pvr_header.h:254
bool depth_write_dis
< Enable texturing (2nd bit)
Definition pvr_header.h:252
bool txr_en
Definition pvr_header.h:251
PVR header mode2.
Definition pvr_header.h:262
enum pvr_uv_size v_size
Definition pvr_header.h:263
enum pvr_uv_size u_size
< Texture height
Definition pvr_header.h:264
enum pvr_blend_mode blend_dst
< Blend from the 2nd accumulation buffer
Definition pvr_header.h:279
bool v_flip
< Clamp U to 1.0
Definition pvr_header.h:271
bool u_flip
< Flip V after 1.0
Definition pvr_header.h:272
enum pvr_fog_type fog_type
< Enable fog clamping
Definition pvr_header.h:276
enum pvr_filter_mode filter_mode
< Enable texture supersampling
Definition pvr_header.h:268
bool alpha
< Disable alpha channel in textures
Definition pvr_header.h:274
bool supersampling
< Bias for mipmaps
Definition pvr_header.h:267
bool v_clamp
< Texture filtering mode
Definition pvr_header.h:269
bool fog_clamp
< Enable alpha channel in vertex colors
Definition pvr_header.h:275
bool txralpha_dis
< Flip U after 1.0
Definition pvr_header.h:273
bool blend_dst_acc2
< Select fog type
Definition pvr_header.h:277
bool u_clamp
< Clamp V to 1.0
Definition pvr_header.h:270
enum pvr_blend_mode blend_src
< Blend mode for the background
Definition pvr_header.h:280
enum pvr_txr_shading_mode shading
< Texture width
Definition pvr_header.h:265
bool blend_src_acc2
< Blend to the 2nd accumulation buffer
Definition pvr_header.h:278
uint32_t mip_bias
< Shading mode
Definition pvr_header.h:266
PVR header mode3.
Definition pvr_header.h:288
bool x32stride
< Pre-processed texture address
Definition pvr_header.h:290
enum pvr_pixel_mode pixel_mode
< Set if texture is not twiddled
Definition pvr_header.h:292
bool mipmap_en
< Set if the texture is VQ encoded
Definition pvr_header.h:294
bool nontwiddled
< Set if texture stride is multiple of 32
Definition pvr_header.h:291
bool vq_en
< Select the texture's pixel format
Definition pvr_header.h:293
pvr_txr_ptr_t txr_base
Definition pvr_header.h:289
PVR polygon header.
Definition pvr_header.h:302
uint32_t d5
Dummy value 5.
Definition pvr_header.h:314
uint32_t d1
Dummy value 1.
Definition pvr_header.h:325
uint32_t mode3_0
Legacy name.
Definition pvr_header.h:319
uint32_t mode2_0
Legacy name.
Definition pvr_header.h:313
uint32_t cmd
Raw access to cmd param.
Definition pvr_header.h:304
float b
Intensity color blue.
Definition pvr_header.h:335
uint32_t mode3
Raw access to mode3 param.
Definition pvr_header.h:318
float r
Intensity color red.
Definition pvr_header.h:333
uint32_t mode2_1
Legacy name.
Definition pvr_header.h:341
uint64_t __pad4
Definition pvr_header.h:349
uint32_t mode1
Raw access to mode1 param.
Definition pvr_header.h:308
uint32_t mode3_1
Legacy name.
Definition pvr_header.h:342
uint32_t mode2
Raw access to mode2 param.
Definition pvr_header.h:312
uint64_t __pad5
Definition pvr_header.h:355
uint32_t d2
Dummy value 2.
Definition pvr_header.h:326
float a
Intensity color alpha.
Definition pvr_header.h:332
uint32_t d3
Dummy value 3.
Definition pvr_header.h:327
float g
Intensity color green.
Definition pvr_header.h:334
uint32_t oargb
32-bit ARGB specular color for sprites
Definition pvr_header.h:354
uint32_t d4
Dummy value 4.
Definition pvr_header.h:328
uint32_t argb
32-bit ARGB vertex color for sprites
Definition pvr_header.h:353
uint32_t d6
Dummy value 6.
Definition pvr_header.h:320