1XXX - incomplete 2 3Name 4 5 SGIX_bali_timer_instruments 6 7Name Strings 8 9 GL_SGIX_bali_timer_instruments 10 11Version 12 13 $Date: 1998/10/02 18:20:29 $ prf $Revision: 1.2 $ 14 15Number 16 17 XXX 18 19Dependencies 20 21 SGIX_instruments is required 22 23Overview 24 25 This extension defines two timing-related instruments: one to 26 measure the time spent in the geometry subsystem, and another 27 to measure the time spent in the rasterization subsystem. These 28 instruments can be used to balance the load of the two subsystems 29 and to fine-tune application performance. 30 31 32Issues 33 34 XXX 35 36New Procedures and Functions 37 38 None 39 40New Tokens 41 42 Accepted by the <cap> parameter of Enable, Disable and IsEnabled: 43 44 BALI_GEOM_TIMER_INSTRUMENT 0xXXXX 45 BALI_RASTER_TIMER_INSTRUMENT 0xXXXX 46 47 Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 48 GetFloatv, and GetDoublev: 49 50 BALI_INSTRUMENT_TIME_UNIT 0xXXXX 51 52Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 53 54 None 55 56Additions to Chapter 3 of the 1.0 Specification (Rasterization) 57 58 None 59 60Additions to Chapter 4 of the 1.0 Specification (Per-Fragment 61Operations and the Frame Buffer) 62 63 None 64 65Additions to Chapter 5 of the 1.2 Specification (Special Functions) 66 67 Add to the end of section 5.X entitled Instruments: 68 69 Timer instruments provide a method to measure and regulate the 70 performance of the GL pipeline in terms of geometry and 71 rasterization. Because most applications tend to be limited by 72 either geometry processing or rasterization, timer instruments 73 will enable an application to identify possible bottlenecks and 74 undesired distribution of work between the two subsystems, and 75 thereby to improve load-management. 76 77 If BALI_GEOM_TIMER_INSTRUMENT is enabled and the instruments have 78 been started via a call to StartInstrumentsSGIX, a counter of the 79 amount of time spent in geometry subsystem is maintained. A 80 similar counter is maintained for the time spend on rasterization 81 if BALI_RASTER_TIMER_INSTRUMENT is enabled. 82 83 The actual amount of time spent on geometry processing and 84 rasterization returned by BALI_GEOM_TIMER_INSTRUMENT and 85 BALI_RASTER_TIMER_INSTRUMENT, respectively, is calculated using 86 the real time clock of the scalar processor (SP). The values 87 returned by these instruments will be measured in time units. The 88 length of a time unit can be queried using the enum 89 INSTRUMENT_TIME_UNIT_SGIX (see Chapter 6). This number will be 90 affected by processor speed and other implementation-specific 91 considerations. 92 93 Each response from BALI_GEOM_TIMER_INSTRUMENT and 94 BALI_RASTER_TIMER_INSTRUMENT uses 6 32-bit words of the buffer. 95 The first word (index 0) will be the enum name of the instrument 96 (BALI_GEOM_TIMER_INSTRUMENT or BALI_RASTER_TIMER_INSTRUMENT). The 97 second word (index 1) of the instrument is the size in words of 98 all the data returned by the instrument, which is six for the 99 instruments defined in this extension. The fourth word (index 3) 100 will be the instrument value. (The preceeding word (index 2) 101 would be a dummy word.) In future implementations, a 64-bit value 102 may be used for the instrument value (this will occupy indices 2 103 and 3) instead of a 32-bit value. The fifth word (index 4) will be 104 another dummy value. The sixth word (index 5) will contain the marker 105 passed to StopInstrumentsSGIX or ReadInstrumentsSGIX. 106 The following is a simple diagram of how this information will be 107 passed down the pipe. Since the host and the pipe will be communicating 108 with 64-bits, three 64-bit packets will be sent across the pipe for each 109 measurement that is made. 110 111 112 ------------------------------------------------- 113 | | | 114 | [enabled enum name] | [size in words] | 115 | | | 116 ------------------------------------------------- 117 118 ------------------------------------------------- 119 | | | 120 | [dummy] | [instrument value] | 121 | | | 122 ------------------------------------------------- 123 124 ------------------------------------------------- 125 | | | 126 | [dummy] | [marker] | 127 | | | 128 ------------------------------------------------- 129 130 131Additions to Chapter 6 of the 1.2 Specification (State and State Requests) 132 133 XXX 134 135Additions to the GLX Specification 136 137 XXX 138 139Errors 140 141 None 142 143New State 144 145 Initial Initial 146 Get Value Get Command Type Value Attrib 147 --------- ----------- ---- ----- ------ 148 INSTRUMENT_TIME_UNIT_SGIX GetInteger Z 0 - 149 150New Implementation Dependent State 151 152 None 153 154 155 156 157