14#ifndef __DC_PVR_PVR_HEADER_H
15#define __DC_PVR_PVR_HEADER_H
38typedef enum pvr_color_fmts {
49typedef enum pvr_clip_mode {
60typedef enum pvr_list_type {
69#define pvr_list_type_t pvr_list_t
77typedef enum pvr_cull_mode {
88typedef enum pvr_depthcmp_mode {
100typedef enum pvr_uv_size {
124typedef enum pvr_txr_shading_mode {
132typedef enum pvr_filter_mode {
145typedef enum pvr_fog_type {
157typedef enum pvr_blend_mode {
172typedef enum pvr_pixel_mode {
190typedef enum pvr_strip_len {
201typedef enum pvr_hdr_type {
232#define pvr_to_pvr_txr_ptr(addr) to_pvr_txr_ptr(addr)
238typedef struct pvr_poly_hdr_cmd {
266typedef struct pvr_poly_hdr_mode1 {
279typedef struct pvr_poly_hdr_mode2 {
305typedef struct pvr_poly_hdr_mode3 {
319typedef __attribute__((aligned(32))) struct pvr_poly_hdr {
374_Static_assert(
sizeof(
pvr_poly_hdr_t) == 32,
"Invalid header size");
Various common macros used throughout the codebase.
#define PVR_RAM_SIZE
RAM size in bytes.
Definition pvr_regs.h:198
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:238
bool txr_en
< Enable specular lighting
Definition pvr_header.h:242
bool uvfmt_f16
Definition pvr_header.h:239
bool auto_strip_len
Definition pvr_header.h:250
pvr_hdr_type_t hdr_type
< Mark an end-of-strip
Definition pvr_header.h:258
pvr_strip_len_t strip_len
< Clipping mode
Definition pvr_header.h:248
bool strip_end
Definition pvr_header.h:257
pvr_color_fmts_t color_fmt
< Enable texturing
Definition pvr_header.h:243
bool mod_normal
< Select color encoding
Definition pvr_header.h:244
bool gouraud
< Use 16-bit floating-point U/Vs
Definition pvr_header.h:240
pvr_clip_mode_t clip_mode
Definition pvr_header.h:247
pvr_list_t list_type
< Group_En: apply this header's strip_len.
Definition pvr_header.h:255
bool modifier_en
< true: normal, false: cheap shadow
Definition pvr_header.h:245
bool oargb_en
< Enable gouraud shading
Definition pvr_header.h:241
PVR header mode1.
Definition pvr_header.h:266
bool depth_write_dis
< Enable texturing (2nd bit)
Definition pvr_header.h:269
pvr_depthcmp_mode_t depth_cmp
< Culling mode
Definition pvr_header.h:271
bool txr_en
Definition pvr_header.h:268
pvr_cull_mode_t culling
< Disable depth writes
Definition pvr_header.h:270
PVR header mode2.
Definition pvr_header.h:279
bool txralpha_dis
< Flip U after 1.0
Definition pvr_header.h:290
pvr_txr_shading_mode_t shading
< Texture width
Definition pvr_header.h:282
pvr_filter_mode_t filter_mode
< Enable texture supersampling
Definition pvr_header.h:285
bool fog_clamp
< Enable alpha channel in vertex colors
Definition pvr_header.h:292
pvr_blend_mode_t blend_src
< Blend mode for the background
Definition pvr_header.h:297
uint32_t mip_bias
< Shading mode
Definition pvr_header.h:283
pvr_fog_type_t fog_type
< Enable fog clamping
Definition pvr_header.h:293
bool supersampling
< Bias for mipmaps
Definition pvr_header.h:284
bool v_clamp
< Texture filtering mode
Definition pvr_header.h:286
bool u_clamp
< Clamp V to 1.0
Definition pvr_header.h:287
pvr_uv_size_t u_size
< Texture height
Definition pvr_header.h:281
pvr_uv_size_t v_size
Definition pvr_header.h:280
bool alpha
< Disable alpha channel in textures
Definition pvr_header.h:291
bool blend_dst_acc2
< Select fog type
Definition pvr_header.h:294
pvr_blend_mode_t blend_dst
< Blend from the 2nd accumulation buffer
Definition pvr_header.h:296
bool v_flip
< Clamp U to 1.0
Definition pvr_header.h:288
bool blend_src_acc2
< Blend to the 2nd accumulation buffer
Definition pvr_header.h:295
bool u_flip
< Flip V after 1.0
Definition pvr_header.h:289
PVR header mode3.
Definition pvr_header.h:305
bool vq_en
< Select the texture's pixel format
Definition pvr_header.h:310
bool nontwiddled
< Set if texture stride is multiple of 32
Definition pvr_header.h:308
pvr_pixel_mode_t pixel_mode
< Set if texture is not twiddled
Definition pvr_header.h:309
bool x32stride
< Pre-processed texture address
Definition pvr_header.h:307
pvr_txr_ptr_t txr_base
Definition pvr_header.h:306
bool mipmap_en
< Set if the texture is VQ encoded
Definition pvr_header.h:311
PVR polygon header.
Definition pvr_header.h:319
uint32_t mode3_0
Legacy name.
Definition pvr_header.h:335
uint32_t start_x
Left (inclusive) border of user clip area.
Definition pvr_header.h:366
uint32_t end_y
Bottom (inclusive) border of user clip area.
Definition pvr_header.h:369
uint32_t mode2_0
Legacy name.
Definition pvr_header.h:330
uint32_t cmd
Raw access to cmd param.
Definition pvr_header.h:321
pvr_poly_hdr_mode1_t m1
mode1 parameters
Definition pvr_header.h:326
float b
Intensity color blue.
Definition pvr_header.h:344
uint32_t mode3
Raw access to mode3 param.
Definition pvr_header.h:334
float r
Intensity color red.
Definition pvr_header.h:342
uint32_t mode2_1
Legacy name.
Definition pvr_header.h:350
uint32_t mode1
Raw access to mode1 param.
Definition pvr_header.h:325
uint32_t mode3_1
Legacy name.
Definition pvr_header.h:351
uint32_t mode2
Raw access to mode2 param.
Definition pvr_header.h:329
uint32_t start_y
Top (inclusive) border of user clip area.
Definition pvr_header.h:367
uint32_t end_x
Right (inclusive) border of user clip area.
Definition pvr_header.h:368
float a
Intensity color alpha.
Definition pvr_header.h:341
float g
Intensity color green.
Definition pvr_header.h:343
uint32_t oargb
32-bit ARGB specular color for sprites
Definition pvr_header.h:362
pvr_poly_hdr_mode3_t m3
mode3 parameters (modifiers: outside volume)
Definition pvr_header.h:336
pvr_poly_hdr_mode2_t m2
mode2 parameters (modifiers: outside volume)
Definition pvr_header.h:331
uint32_t argb
32-bit ARGB vertex color for sprites
Definition pvr_header.h:361
pvr_poly_hdr_cmd_t m0
command parameters
Definition pvr_header.h:322