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 {
68#define pvr_list_type_t pvr_list_t
76typedef enum pvr_cull_mode {
87typedef enum pvr_depthcmp_mode {
99typedef enum pvr_uv_size {
123typedef enum pvr_txr_shading_mode {
131typedef enum pvr_filter_mode {
144typedef enum pvr_fog_type {
156typedef enum pvr_blend_mode {
171typedef enum pvr_pixel_mode {
186typedef enum pvr_strip_len {
197typedef enum pvr_hdr_type {
228#define pvr_to_pvr_txr_ptr(addr) to_pvr_txr_ptr(addr)
234typedef struct pvr_poly_hdr_cmd {
258typedef struct pvr_poly_hdr_mode1 {
271typedef struct pvr_poly_hdr_mode2 {
297typedef struct pvr_poly_hdr_mode3 {
311typedef __attribute__((aligned(32))) struct pvr_poly_hdr {
366_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:179
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:234
bool txr_en
< Enable specular lighting
Definition pvr_header.h:238
bool uvfmt_f16
Definition pvr_header.h:235
bool auto_strip_len
Definition pvr_header.h:246
pvr_hdr_type_t hdr_type
< Mark an end-of-strip
Definition pvr_header.h:250
pvr_strip_len_t strip_len
< Clipping mode
Definition pvr_header.h:244
bool strip_end
Definition pvr_header.h:249
pvr_color_fmts_t color_fmt
< Enable texturing
Definition pvr_header.h:239
bool mod_normal
< Select color encoding
Definition pvr_header.h:240
bool gouraud
< Use 16-bit floating-point U/Vs
Definition pvr_header.h:236
pvr_clip_mode_t clip_mode
Definition pvr_header.h:243
pvr_list_t list_type
< Auto select triangle strips length
Definition pvr_header.h:247
bool modifier_en
< true: normal, false: cheap shadow
Definition pvr_header.h:241
bool oargb_en
< Enable gouraud shading
Definition pvr_header.h:237
PVR header mode1.
Definition pvr_header.h:258
bool depth_write_dis
< Enable texturing (2nd bit)
Definition pvr_header.h:261
pvr_depthcmp_mode_t depth_cmp
< Culling mode
Definition pvr_header.h:263
bool txr_en
Definition pvr_header.h:260
pvr_cull_mode_t culling
< Disable depth writes
Definition pvr_header.h:262
PVR header mode2.
Definition pvr_header.h:271
bool txralpha_dis
< Flip U after 1.0
Definition pvr_header.h:282
pvr_txr_shading_mode_t shading
< Texture width
Definition pvr_header.h:274
pvr_filter_mode_t filter_mode
< Enable texture supersampling
Definition pvr_header.h:277
bool fog_clamp
< Enable alpha channel in vertex colors
Definition pvr_header.h:284
pvr_blend_mode_t blend_src
< Blend mode for the background
Definition pvr_header.h:289
uint32_t mip_bias
< Shading mode
Definition pvr_header.h:275
pvr_fog_type_t fog_type
< Enable fog clamping
Definition pvr_header.h:285
bool supersampling
< Bias for mipmaps
Definition pvr_header.h:276
bool v_clamp
< Texture filtering mode
Definition pvr_header.h:278
bool u_clamp
< Clamp V to 1.0
Definition pvr_header.h:279
pvr_uv_size_t u_size
< Texture height
Definition pvr_header.h:273
pvr_uv_size_t v_size
Definition pvr_header.h:272
bool alpha
< Disable alpha channel in textures
Definition pvr_header.h:283
bool blend_dst_acc2
< Select fog type
Definition pvr_header.h:286
pvr_blend_mode_t blend_dst
< Blend from the 2nd accumulation buffer
Definition pvr_header.h:288
bool v_flip
< Clamp U to 1.0
Definition pvr_header.h:280
bool blend_src_acc2
< Blend to the 2nd accumulation buffer
Definition pvr_header.h:287
bool u_flip
< Flip V after 1.0
Definition pvr_header.h:281
PVR header mode3.
Definition pvr_header.h:297
bool vq_en
< Select the texture's pixel format
Definition pvr_header.h:302
bool nontwiddled
< Set if texture stride is multiple of 32
Definition pvr_header.h:300
pvr_pixel_mode_t pixel_mode
< Set if texture is not twiddled
Definition pvr_header.h:301
bool x32stride
< Pre-processed texture address
Definition pvr_header.h:299
pvr_txr_ptr_t txr_base
Definition pvr_header.h:298
bool mipmap_en
< Set if the texture is VQ encoded
Definition pvr_header.h:303
PVR polygon header.
Definition pvr_header.h:311
uint32_t mode3_0
Legacy name.
Definition pvr_header.h:327
uint32_t start_x
Left (inclusive) border of user clip area.
Definition pvr_header.h:358
uint32_t end_y
Bottom (inclusive) border of user clip area.
Definition pvr_header.h:361
uint32_t mode2_0
Legacy name.
Definition pvr_header.h:322
uint32_t cmd
Raw access to cmd param.
Definition pvr_header.h:313
pvr_poly_hdr_mode1_t m1
mode1 parameters
Definition pvr_header.h:318
float b
Intensity color blue.
Definition pvr_header.h:336
uint32_t mode3
Raw access to mode3 param.
Definition pvr_header.h:326
float r
Intensity color red.
Definition pvr_header.h:334
uint32_t mode2_1
Legacy name.
Definition pvr_header.h:342
uint32_t mode1
Raw access to mode1 param.
Definition pvr_header.h:317
uint32_t mode3_1
Legacy name.
Definition pvr_header.h:343
uint32_t mode2
Raw access to mode2 param.
Definition pvr_header.h:321
uint32_t start_y
Top (inclusive) border of user clip area.
Definition pvr_header.h:359
uint32_t end_x
Right (inclusive) border of user clip area.
Definition pvr_header.h:360
float a
Intensity color alpha.
Definition pvr_header.h:333
float g
Intensity color green.
Definition pvr_header.h:335
uint32_t oargb
32-bit ARGB specular color for sprites
Definition pvr_header.h:354
pvr_poly_hdr_mode3_t m3
mode3 parameters (modifiers: outside volume)
Definition pvr_header.h:328
pvr_poly_hdr_mode2_t m2
mode2 parameters (modifiers: outside volume)
Definition pvr_header.h:323
uint32_t argb
32-bit ARGB vertex color for sprites
Definition pvr_header.h:353
pvr_poly_hdr_cmd_t m0
command parameters
Definition pvr_header.h:314