Table of Contents Glide Programming Guide


Monitoring System Performance



Download 6.22 Mb.
Page92/106
Date03.02.2023
Size6.22 Mb.
#60547
1   ...   88   89   90   91   92   93   94   95   ...   106
GLIDEPGM

6Monitoring System Performance


The Voodoo Graphics hardware maintains a set of five counters that collect statistics about the fate of pixels as they move through the pixel pipeline. Glide provides access to these counters through the GrSstPerfStats_t structure and grSstPerfStats().
typedef struct GrSstPerfStats_s {
FxU32 pixelsIn; /* # pixels processed (minus buffer clears) */
FxU32 chromaFail; /* # pixels not drawn due to chroma key test failure */
FxU32 zFuncFail; /* # pixels not drawn due to depth test failure */
FxU32 aFuncFail; /* # pixels not drawn due to alpha test failure */
FxU32 pixelsOut; /* # pixels drawn (including buffer clears and LFB writes) */
} GrSstPerfStats_t;

void grSstPerfStats( GrSstPerfStats_t *pStats )


In order to account for every pixel counted and saved in pixelsOut, one must use the following equation:
pixelsOut = LfbWritePixels + bufferClearPixels + (pixelsIn zFuncFailchromaFail aFuncFail)
bufferClearPixels represents the number of pixels written as a result of calls to grBufferClear() and can be calculated as:
bufferClearPixels = (# of times the buffer was cleared)* (clip window width) * (clip window height)
grSstPerfStats() does not wait for the system to be idle, and hence does not include statistics for commands that are still in the FIFO. Call grSstIdle() to empty the FIFO.
All five counters are reset whenever grSstResetPerfStats() is called. The hardware counters are only 24‑bits wide, so regular calls to grSstResetPerfStats() are required to avoid overflow. Alternatively, counter overflows can be detected and accounted for without calling grSstResetPerfStats().
void grSstResetPerfStats( void )


Chapter 13. Glide Utilities


Download 6.22 Mb.

Share with your friends:
1   ...   88   89   90   91   92   93   94   95   ...   106




The database is protected by copyright ©ininet.org 2024
send message

    Main page