Performance measurement counter functions
Check D2FB_PERFCOUNT bit of d2_getrevisionhw to see if performance counters are available.
Profiling | Performance measurement counter functions |
Performance counting | |
d2_setperfcountevent | Set the event to be counted by performance counter. |
d2_setperfcountvalue | Set the current performance counter value. |
d2_getperfcountvalue | Get the current performance counter value. |
d2_s32 d2_setperfcountevent( d2_device * handle, d2_u32 counter, d2_u32 event )
Set the event to be counted by performance counter.
Does not work while D/AVE is active! When calling this while D/AVE is active executing a display list, rendering errors or even hangups can occur.
handle | device pointer (see: d2_opendevice) |
counter | 0 or 1: which of both available performance counters to use |
event | which events the selected performance counter has to count |
d2_pc_disable | disable performance counter |
d2_pc_davecycles | DAVE active cycles |
d2_pc_fbreads | framebuffer read access |
d2_pc_fbwrites | framebuffer write access |
d2_pc_texreads | texture read access |
d2_pc_invpixels | invisible pixels (enumerated but selected with alpha 0%) |
d2_pc_invpixels_miss | invisible pixels while internal fifo is empty (lost cycles) |
d2_pc_dlrcycles | displaylist reader active cycles |
d2_pc_fbreadhits | framebuffer read hits |
d2_pc_fbreadmisses | framebuffer read misses |
d2_pc_fbwritehits | framebuffer write hits |
d2_pc_fbwritemisses | framebuffer write misses |
d2_pc_texreadhits | texture read hits |
d2_pc_texreadmisses | texture read misses |
d2_pc_clkcycles | every clock cycle (for use as timer) |
d2_pc_dlrburstreads | displaylist reader burst reads |
d2_pc_dlrwordsread | displaylist reader words read |
d2_pc_rlerewinds | texture rle decoder rewinds |
d2_pc_texburstreads | texture cache burst reads |
d2_pc_texwordsread | texture cache words read |
d2_pc_fbburstreads | framebuffer cache burst reads |
d2_pc_fbwordsread | framebuffer cache words read |
d2_pc_fbburstwrites | framebuffer cache burst writes |
d2_pc_fbwordswritten | framebuffer cache words written |
errorcode (D2_OK if successfull) see list of Errorcodes for details
d2_s32 d2_setperfcountvalue( d2_device * handle, d2_u32 counter, d2_slong value )
Set the current performance counter value.
Does not work while D/AVE is active! When calling this while D/AVE is active executing a display list, rendering errors or even hangups can occur.
handle | device pointer (see: d2_opendevice) |
counter | 0 or 1: which of both available performance counters to use |
value | value to be set: 0 for reset |
errorcode (D2_OK if successfull) see list of Errorcodes for details
d2_slong d2_getperfcountvalue( d2_device * handle, d2_u32 counter )
Get the current performance counter value.
handle | device pointer (see: d2_opendevice) |
counter | 0 or 1: which of both available performance counters to use |
current counter register value
Set the event to be counted by performance counter.
d2_s32 d2_setperfcountevent( d2_device * handle, d2_u32 counter, d2_u32 event )
Set the current performance counter value.
d2_s32 d2_setperfcountvalue( d2_device * handle, d2_u32 counter, d2_slong value )
Get the current performance counter value.
d2_slong d2_getperfcountvalue( d2_device * handle, d2_u32 counter )
Query hw revisionID.
d2_u32 d2_getrevisionhw( const d2_device * handle )
Create a new device handle.
d2_device * d2_opendevice( d2_u32 flags )