14#ifndef __DC_PVR_PVR_HEADER_H
15#define __DC_PVR_PVR_HEADER_H
36typedef enum pvr_color_fmts {
47typedef enum pvr_clip_mode {
58typedef enum pvr_list_type {
72typedef enum pvr_cull_mode {
83typedef enum pvr_depthcmp_mode {
95typedef enum pvr_uv_size {
119typedef enum pvr_txr_shading_mode {
127typedef enum pvr_filter_mode {
140typedef enum pvr_fog_type {
152typedef enum pvr_blend_mode {
167typedef enum pvr_pixel_mode {
182typedef enum pvr_strip_len {
193typedef enum pvr_hdr_type {
217 return ((uint32_t)addr & 0x00fffff8) >> 3;
224#define pvr_to_pvr_txr_ptr(addr) to_pvr_txr_ptr(addr)
230typedef struct pvr_poly_hdr_cmd {
254typedef struct pvr_poly_hdr_mode1 {
267typedef struct pvr_poly_hdr_mode2 {
293typedef struct pvr_poly_hdr_mode3 {
307typedef __attribute__((aligned(32))) struct pvr_poly_hdr {
362_Static_assert(
sizeof(
pvr_poly_hdr_t) == 32,
"Invalid header size");
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:230
bool txr_en
< Enable specular lighting
Definition pvr_header.h:234
bool uvfmt_f16
Definition pvr_header.h:231
bool auto_strip_len
Definition pvr_header.h:242
pvr_hdr_type_t hdr_type
< Mark an end-of-strip
Definition pvr_header.h:246
pvr_strip_len_t strip_len
< Clipping mode
Definition pvr_header.h:240
bool strip_end
Definition pvr_header.h:245
pvr_color_fmts_t color_fmt
< Enable texturing
Definition pvr_header.h:235
bool mod_normal
< Select color encoding
Definition pvr_header.h:236
bool gouraud
< Use 16-bit floating-point U/Vs
Definition pvr_header.h:232
pvr_clip_mode_t clip_mode
Definition pvr_header.h:239
pvr_list_type_t list_type
< Auto select triangle strips length
Definition pvr_header.h:243
bool modifier_en
< true: normal, false: cheap shadow
Definition pvr_header.h:237
bool oargb_en
< Enable gouraud shading
Definition pvr_header.h:233
PVR header mode1.
Definition pvr_header.h:254
bool depth_write_dis
< Enable texturing (2nd bit)
Definition pvr_header.h:257
pvr_depthcmp_mode_t depth_cmp
< Culling mode
Definition pvr_header.h:259
bool txr_en
Definition pvr_header.h:256
pvr_cull_mode_t culling
< Disable depth writes
Definition pvr_header.h:258
PVR header mode2.
Definition pvr_header.h:267
bool txralpha_dis
< Flip U after 1.0
Definition pvr_header.h:278
pvr_txr_shading_mode_t shading
< Texture width
Definition pvr_header.h:270
pvr_filter_mode_t filter_mode
< Enable texture supersampling
Definition pvr_header.h:273
bool fog_clamp
< Enable alpha channel in vertex colors
Definition pvr_header.h:280
pvr_blend_mode_t blend_src
< Blend mode for the background
Definition pvr_header.h:285
uint32_t mip_bias
< Shading mode
Definition pvr_header.h:271
pvr_fog_type_t fog_type
< Enable fog clamping
Definition pvr_header.h:281
bool supersampling
< Bias for mipmaps
Definition pvr_header.h:272
bool v_clamp
< Texture filtering mode
Definition pvr_header.h:274
bool u_clamp
< Clamp V to 1.0
Definition pvr_header.h:275
pvr_uv_size_t u_size
< Texture height
Definition pvr_header.h:269
pvr_uv_size_t v_size
Definition pvr_header.h:268
bool alpha
< Disable alpha channel in textures
Definition pvr_header.h:279
bool blend_dst_acc2
< Select fog type
Definition pvr_header.h:282
pvr_blend_mode_t blend_dst
< Blend from the 2nd accumulation buffer
Definition pvr_header.h:284
bool v_flip
< Clamp U to 1.0
Definition pvr_header.h:276
bool blend_src_acc2
< Blend to the 2nd accumulation buffer
Definition pvr_header.h:283
bool u_flip
< Flip V after 1.0
Definition pvr_header.h:277
PVR header mode3.
Definition pvr_header.h:293
bool vq_en
< Select the texture's pixel format
Definition pvr_header.h:298
bool nontwiddled
< Set if texture stride is multiple of 32
Definition pvr_header.h:296
pvr_pixel_mode_t pixel_mode
< Set if texture is not twiddled
Definition pvr_header.h:297
bool x32stride
< Pre-processed texture address
Definition pvr_header.h:295
pvr_txr_ptr_t txr_base
Definition pvr_header.h:294
bool mipmap_en
< Set if the texture is VQ encoded
Definition pvr_header.h:299
PVR polygon header.
Definition pvr_header.h:307
uint32_t mode3_0
Legacy name.
Definition pvr_header.h:323
uint32_t start_x
Left (inclusive) border of user clip area.
Definition pvr_header.h:354
uint32_t end_y
Bottom (inclusive) border of user clip area.
Definition pvr_header.h:357
uint32_t mode2_0
Legacy name.
Definition pvr_header.h:318
uint32_t cmd
Raw access to cmd param.
Definition pvr_header.h:309
pvr_poly_hdr_mode1_t m1
mode1 parameters
Definition pvr_header.h:314
float b
Intensity color blue.
Definition pvr_header.h:332
uint32_t mode3
Raw access to mode3 param.
Definition pvr_header.h:322
float r
Intensity color red.
Definition pvr_header.h:330
uint32_t mode2_1
Legacy name.
Definition pvr_header.h:338
uint32_t mode1
Raw access to mode1 param.
Definition pvr_header.h:313
uint32_t mode3_1
Legacy name.
Definition pvr_header.h:339
uint32_t mode2
Raw access to mode2 param.
Definition pvr_header.h:317
uint32_t start_y
Top (inclusive) border of user clip area.
Definition pvr_header.h:355
uint32_t end_x
Right (inclusive) border of user clip area.
Definition pvr_header.h:356
float a
Intensity color alpha.
Definition pvr_header.h:329
float g
Intensity color green.
Definition pvr_header.h:331
uint32_t oargb
32-bit ARGB specular color for sprites
Definition pvr_header.h:350
pvr_poly_hdr_mode3_t m3
mode3 parameters (modifiers: outside volume)
Definition pvr_header.h:324
pvr_poly_hdr_mode2_t m2
mode2 parameters (modifiers: outside volume)
Definition pvr_header.h:319
uint32_t argb
32-bit ARGB vertex color for sprites
Definition pvr_header.h:349
pvr_poly_hdr_cmd_t m0
command parameters
Definition pvr_header.h:310