24#ifndef __DC_PVR_PVR_MISC_H
25#define __DC_PVR_PVR_MISC_H
43#define PVR_PACK_COLOR(a, r, g, b) ( \
44 ( ((uint8_t)( (a) * 255 ) ) << 24 ) | \
45 ( ((uint8_t)( (r) * 255 ) ) << 16 ) | \
46 ( ((uint8_t)( (g) * 255 ) ) << 8 ) | \
47 ( ((uint8_t)( (b) * 255 ) ) << 0 ) )
65 return (u2.i & 0xFFFF0000) | (v2.i >> 16);
156typedef struct pvr_stats {
void pvr_set_zclip(float zc)
Set Z clipping depth.
void pvr_set_shadow_scale(bool enable, float scale_value)
Set cheap shadow parameters.
void pvr_set_bg_color(float r, float g, float b)
Set the background plane color.
void pvr_set_presort_mode(bool presort)
Set the translucent polygon sort mode for the next frame.
int pvr_get_vbl_count(void)
Retrieve the current VBlank count.
int pvr_get_stats(pvr_stats_t *stat)
Get the current statistics from the PVR.
static uint32_t PVR_PACK_16BIT_UV(float u, float v)
Pack two floating point coordinates into one 32-bit value, truncating them to 16-bits each.
Definition pvr_misc.h:56
PVR statistics structure.
Definition pvr_misc.h:156
size_t vtx_buffer_used
Number of bytes used in the vertex buffer for the last frame.
Definition pvr_misc.h:163
size_t vtx_buffer_used_max
Number of bytes used in the vertex buffer for the largest frame.
Definition pvr_misc.h:164
uint64_t buf_last_time
DMA buffer file time for the last frame in nanoseconds.
Definition pvr_misc.h:160
size_t frame_count
Total number of rendered/viewed frames.
Definition pvr_misc.h:161
uint64_t frame_last_time
Ready-to-Ready length for the last frame in nanoseconds.
Definition pvr_misc.h:157
float frame_rate
Current frame rate (per second)
Definition pvr_misc.h:165
uint32_t enabled_list_mask
Which lists are enabled?
Definition pvr_misc.h:166
size_t vbl_count
VBlank count.
Definition pvr_misc.h:162
uint64_t reg_last_time
Registration time for the last frame in nanoseconds.
Definition pvr_misc.h:158
uint64_t rnd_last_time
Rendering time for the last frame in nanoseconds.
Definition pvr_misc.h:159