15bd8deadSopenharmony_ciXXX - incomplete 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ciName 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ci SGIX_bali_r_instruments 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_SGIX_bali_r_instruments 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ciVersion 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ci $Date: 1998/06/17 19:59:07 $ $Revision: 1.4 $ 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciNumber 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci XXX 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciDependencies 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci SGIX_instruments is required 225bd8deadSopenharmony_ci SGIX_multisample affects the definition of this extension. 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ciOverview 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci This extension defines behavior for instruments which are 275bd8deadSopenharmony_ci maintained on the Bali R chips. The behavior is different from 285bd8deadSopenharmony_ci standard instruments behavior since each system may contain more 295bd8deadSopenharmony_ci than one R chip. 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci Additionally, this extension defines two such instruments: one to 325bd8deadSopenharmony_ci count the number of fragments generated and a second to count the 335bd8deadSopenharmony_ci number of fragments which passed the depth test. 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciIssues 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci * Should fragments generated by internal pixel operations be 385bd8deadSopenharmony_ci counted? From a GL point of view they don't exist, but from 395bd8deadSopenharmony_ci an R usage point of view they do. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci * Should we expose the texture cache wait counter? What could 425bd8deadSopenharmony_ci the user do about a bottleneck caused by texture cache misses? 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci * Currently we count only fragments which passed the depth test 455bd8deadSopenharmony_ci and do not count fragments which were drawn when the depth 465bd8deadSopenharmony_ci test was disabled. Is this the correct behavior? 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci * Are there any other R instruments we should add? 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ciNew Procedures and Functions 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci None 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ciNew Tokens 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci Accepted by the <cap> parameter of Enable, Disable and IsEnabled: 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci BALI_FRAGMENTS_GENERATED_INSTRUMENT 0x6090 595bd8deadSopenharmony_ci BALI_DEPTH_PASS_INSTRUMENT 0x6091 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 625bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci BALI_R_CHIP_COUNT 0x6092 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci None 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci None 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 755bd8deadSopenharmony_ciand the Frame Buffer) 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci Add to section 4.1 after the introductory paragraph and prior to 785bd8deadSopenharmony_ci section 4.1.1 (Pixel Ownership Test): 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci If BALI_FRAGMENTS_GENERATED_INSTRUMENT is enabled and the 815bd8deadSopenharmony_ci instruments have been started via a call to StartInstrumentsSGIX, 825bd8deadSopenharmony_ci a counter of the number of fragments generated is maintained. 835bd8deadSopenharmony_ci This counter is incremented by one for each fragment. The GL 845bd8deadSopenharmony_ci implementation is not guaranteed to generate a fragment for every 855bd8deadSopenharmony_ci screen pixel which the primitive touched as long as this 865bd8deadSopenharmony_ci optimization will not affect the final image. For example, if a 875bd8deadSopenharmony_ci region of the primitive only contains fragments which the GL has 885bd8deadSopenharmony_ci determined will fail the Z test, the fragments may not be 895bd8deadSopenharmony_ci generated. Therefore, the count of fragments generated may be 905bd8deadSopenharmony_ci smaller than but may not be greater than the screen space area of 915bd8deadSopenharmony_ci the primitive as determined by the number of pixels touched by the 925bd8deadSopenharmony_ci primitive. 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci Added to subsection 4.1.5 (Depth buffer test) at the end of the 955bd8deadSopenharmony_ci paragraph which begins "If the depth buffer test fails...": 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci If BALI_DEPTH_PASS_INSTRUMENT is enabled and instruments have been 985bd8deadSopenharmony_ci started via a call to StartInstrumentSGIX, a counter of the number 995bd8deadSopenharmony_ci of fragments which have passed the depth test is maintained. This 1005bd8deadSopenharmony_ci counter is incremented by one for each fragment which passes the 1015bd8deadSopenharmony_ci depth test. If MULTISAMPLE_SGIS is enabled, the counter is 1025bd8deadSopenharmony_ci incremented by one for each fragment containing at least one 1035bd8deadSopenharmony_ci sample for which the depth test passed. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci Add to the end of section 5.X entitled Instruments: 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci For instruments which are computed on the Bali R chip, one 1105bd8deadSopenharmony_ci response will be returned to the buffer per R chip. The number of 1115bd8deadSopenharmony_ci R chips is queried using the enum BALI_R_CHIP_COUNT (see Chapter 1125bd8deadSopenharmony_ci 6). From the point of view of this extension, the R chips are 1135bd8deadSopenharmony_ci considered to be completely interchangable and no mechanism for 1145bd8deadSopenharmony_ci identifying which response came from which R chip is provided. 1155bd8deadSopenharmony_ci Generally, the application should combine the results from all the 1165bd8deadSopenharmony_ci R chips together (for example, by adding them) before using the 1175bd8deadSopenharmony_ci information. 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci Each call to StopInstrumentsSGIX or ReadInstrumentsSGIX will 1205bd8deadSopenharmony_ci generate one response per R chip for each enabled R chip 1215bd8deadSopenharmony_ci instrument. This count will be reflected in the return values of 1225bd8deadSopenharmony_ci glGetInstrumentSGIX. The values from each R chip do not 1235bd8deadSopenharmony_ci necessarily return at the same time, so the glGetInstrumentsSGIX 1245bd8deadSopenharmony_ci call may return a value from 0 to BALI_R_CHIP_COUNT times the sum 1255bd8deadSopenharmony_ci in words of the size of the instrument. However, the values from 1265bd8deadSopenharmony_ci each R are returned atomically from the point of view of 1275bd8deadSopenharmony_ci glGetInstrumentsSGIX so the return value must be a multiple of the 1285bd8deadSopenharmony_ci size in words of the instrument. 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci If more than one R instrument is enabled and ReadInstrumentsSGIX 1315bd8deadSopenharmony_ci or StopInstrumentsSGIX is called, no guarantees are made with 1325bd8deadSopenharmony_ci regard to the ordering and interleaving of the reply packets from 1335bd8deadSopenharmony_ci the R chips. The instrument response packets from a single R chip 1345bd8deadSopenharmony_ci may or may not be placed consecutively in the buffer. Conversely, 1355bd8deadSopenharmony_ci the responses from different R chips for a single instrument may 1365bd8deadSopenharmony_ci or may not be placed consecutively in the buffer. Also, no 1375bd8deadSopenharmony_ci assumptions may be made about which R chip generated which 1385bd8deadSopenharmony_ci response. 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci Each R chip response from BALI_FRAGMENTS_GENERATED_INSTRUMENT_SGIX 1415bd8deadSopenharmony_ci and BALI_DEPTH_PASS_INSTRUMENT_SGIX instruments uses 4 words of 1425bd8deadSopenharmony_ci the buffer. The first word (index 0) will be the enum name of the 1435bd8deadSopenharmony_ci instrument (BALI_FRAGMENTS_GENERATED_INSTRUMENT_SGIX or 1445bd8deadSopenharmony_ci BALI_DEPTH_PASS_INSTRUMENT_SGIX). The second word (index 1) of 1455bd8deadSopenharmony_ci the instrument is the size in words of all the data returned by 1465bd8deadSopenharmony_ci the instrument, which is four for the instruments defined in this 1475bd8deadSopenharmony_ci extension. The third word (index 2) will be the instrument 1485bd8deadSopenharmony_ci value. Computation of the instrument values is described in 1495bd8deadSopenharmony_ci Chapter 3 (Rasterization). The fourth word (index 3) will contain 1505bd8deadSopenharmony_ci the marker passed to StopInstrumentsSGIX or ReadInstrumentsSGIX. 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci XXX 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ciAdditions to the GLX Specification 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci XXX 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ciErrors 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci None 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ciNew State 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci XXX 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ciNew Implementation Dependent State 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci Get Value Get Command Type Minimum Value 1715bd8deadSopenharmony_ci --------- ----------- ---- ------------- 1725bd8deadSopenharmony_ci BALI_R_CHIP_COUNT GetIntegerv Z+ 1 173