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);
170typedef struct pvr_stats {
Various common macros used throughout the codebase.
static uint32_t("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x)
Definition purupuru.h:96
void pvr_set_zclip(float zc)
Set Z clipping depth.
void pvr_set_shadow_scale(bool enable, float scale_value)
Set cheap shadow parameters.
int pvr_set_vertical_scale(float factor)
Set the vertical scale factor.
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:170
size_t vtx_buffer_used
Number of bytes used in the vertex buffer for the last frame.
Definition pvr_misc.h:177
size_t vtx_buffer_used_max
Number of bytes used in the vertex buffer for the largest frame.
Definition pvr_misc.h:178
uint64_t buf_last_time
DMA buffer file time for the last frame in nanoseconds.
Definition pvr_misc.h:174
size_t frame_count
Total number of rendered/viewed frames.
Definition pvr_misc.h:175
uint64_t frame_last_time
Ready-to-Ready length for the last frame in nanoseconds.
Definition pvr_misc.h:171
float frame_rate
Current frame rate (per second)
Definition pvr_misc.h:179
uint32_t enabled_list_mask
Which lists are enabled?
Definition pvr_misc.h:180
size_t vbl_count
VBlank count.
Definition pvr_misc.h:176
uint64_t reg_last_time
Registration time for the last frame in nanoseconds.
Definition pvr_misc.h:172
uint64_t rnd_last_time
Rendering time for the last frame in nanoseconds.
Definition pvr_misc.h:173