15bd8deadSopenharmony_ciXXX - Not complete. 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ciName 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ci SGIX_resample 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_SGIX_resample 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ciVersion 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ci Last Modified Date: January 27, 2015 145bd8deadSopenharmony_ci Revision: 2 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ciNumber 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ci 212 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ciDependencies 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ci SGIX_subsample affects the definition of this extension 235bd8deadSopenharmony_ci EXT_texture3D affects the definition of this extension 245bd8deadSopenharmony_ci EXT_subtexture affects the definition of this extension 255bd8deadSopenharmony_ci EXT_histogram affects the definition of this extension 265bd8deadSopenharmony_ci EXT_convolution affects the definition of this extension 275bd8deadSopenharmony_ci SGI_color_table affects the definition of this extension 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciOverview 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci This extension enhances the unpacking resampling capabilities 325bd8deadSopenharmony_ci of the SGIX_subsample extension. 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci When pixel data is received from the client and an unpacking 355bd8deadSopenharmony_ci upsampling mode other than PIXEL_SUBSAMPLE_RATE_4444_SGIX is 365bd8deadSopenharmony_ci specified, the upsampling is performed via one of two methods: 375bd8deadSopenharmony_ci RESAMPLE_REPLICATE_SGIX, RESAMPLE_ZERO_FILL_SGIX. 385bd8deadSopenharmony_ci Replicate and zero fill are provided to 395bd8deadSopenharmony_ci give the application greatest performance and control over the 405bd8deadSopenharmony_ci filtering process. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci However, when pixel data is read back to the client and a 435bd8deadSopenharmony_ci packing downsampling mode other than PIXEL_SUBSAMPLE_RATE_4444_SGIX 445bd8deadSopenharmony_ci is specified, downsampling is 455bd8deadSopenharmony_ci performed via simple component decimation (point sampling). That is, 465bd8deadSopenharmony_ci only the RESAMPLE_DECIMATE_SGIX is valid. 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciIssues 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci * this spec omits the packing downsampling mode. But I think 525bd8deadSopenharmony_ci we will have to address it at some point, so I'm adding the 535bd8deadSopenharmony_ci RESAMPLE_DECIMATE_SGIX as another tag to complement the unpacking 545bd8deadSopenharmony_ci resample modes. 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci * In the public Khronos spec files and headers, these values 575bd8deadSopenharmony_ci used to be used for some of the tokens: 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci #define GL_PACK_RESAMPLE_SGIX 0x842C 605bd8deadSopenharmony_ci #define GL_UNPACK_RESAMPLE_SGIX 0x842D 615bd8deadSopenharmony_ci #define GL_RESAMPLE_REPLICATE_SGIX 0x842E 625bd8deadSopenharmony_ci #define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F 635bd8deadSopenharmony_ci #define GL_RESAMPLE_DECIMATE_SGIX 0x8430 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci These values corresponded to the internal SGI spec files and 665bd8deadSopenharmony_ci (probably) to what was shipped on SGI IRIX systems supporting this 675bd8deadSopenharmony_ci extension, but the spec was always inconsistent with these values. 685bd8deadSopenharmony_ci Since SGI is long out of the graphics business, in order to reduce 695bd8deadSopenharmony_ci incompatibility between tools pulling from the Khronos spec file 705bd8deadSopenharmony_ci and tools pulling from the extension spec, the spec file has been 715bd8deadSopenharmony_ci changed to match the extension. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ciNew Procedures and Functions 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci None. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ciNew Tokens 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci Accepted by the <pname> parameter of PixelStoref, PixelStorei, 805bd8deadSopenharmony_ci GetBooleanv, GetIntegerv, GetFloatv and GetDoublev: 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci PACK_RESAMPLE_SGIX 0x842E 835bd8deadSopenharmony_ci UNPACK_RESAMPLE_SGIX 0x842F 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci Accepted by the <param> parameter of PixelStoref and 875bd8deadSopenharmony_ci PixelStorei when the <pname> parameter is UNPACK_RESAMPLE_SGIX: 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci RESAMPLE_REPLICATE_SGIX 0x8433 905bd8deadSopenharmony_ci RESAMPLE_ZERO_FILL_SGIX 0x8434 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Accepted by the <param> parameter of PixelStoref and 935bd8deadSopenharmony_ci PixelStorei when the <pname> parameter is PACK_RESAMPLE_SGIX: 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci RESAMPLE_DECIMATE_SGIX 0x8430 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci None. 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization) 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci 3.6.1 Pixel Storage Modes 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci The following is added to Table 3.1: 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci Parameter Name Type Initial Value Valid Range 1095bd8deadSopenharmony_ci -------------- ---- ------------- ----------- 1105bd8deadSopenharmony_ci UNPACK_RESAMPLE_SGIX integer RESAMPLE_REPLICATE_SGIX RESAMPLE_REPLICATE_SGIX 1115bd8deadSopenharmony_ci RESAMPLE_ZERO_FILL_SGIX 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci PACK_RESAMPLE_SGIX integer RESAMPLE_DECIMATE_SGIX RESAMPLE_DECIMATE_SGIX 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci 3.6.3 Rasterization of Pixel Rectangles 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci <In the new section which is inserted before "Conversion to RGB", append> 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci Conversion to Uniform Sampling 1225bd8deadSopenharmony_ci ------------------------------ 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci This step is applied only if the PixelStore parameter 1255bd8deadSopenharmony_ci UNPACK_SUBSAMPLE_RATE_SGIX is set to something other than 1265bd8deadSopenharmony_ci PIXEL_SUBSAMPLE_RATE_4444_SGIX. If UNPACK_SUBSAMPLE_RATE_SGIX is set to 1275bd8deadSopenharmony_ci PIXEL_SUBSAMPLE_RATE_2424_SGIX or PIXEL_SUBSAMPLE_RATE_4242_SGIX then 1285bd8deadSopenharmony_ci the number of components per pixel is increased from two to three. 1295bd8deadSopenharmony_ci After upsampling, the data is treated as though it were RGB. When 1305bd8deadSopenharmony_ci this step is carried out the operation is controlled by the value 1315bd8deadSopenharmony_ci of the PixelStore parameter UNPACK_RESAMPLE_SGIX. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci If UNPACK_RESAMPLE_SGIX is set to RESAMPLE_REPLICATE_SGIX then the first 1345bd8deadSopenharmony_ci component of the ith resulting pixel in a row is taken from the 1355bd8deadSopenharmony_ci first component of input pixel 2*floor(i/2). The second 1365bd8deadSopenharmony_ci component is taken from ith pixel. The third component is taken 1375bd8deadSopenharmony_ci from the first component of input pixel 2*floor(i/2)+1. In the 1385bd8deadSopenharmony_ci 4224 case, the fourth component is taken from the third 1395bd8deadSopenharmony_ci component of each input pixel. This process is fully described 1405bd8deadSopenharmony_ci in the SGIX_subsample spec. 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci If the PixelStore parameter UNPACK_RESAMPLE_SGIX is set to 1435bd8deadSopenharmony_ci RESAMPLE_ZERO_FILL_SGIX then derived components are zeroed. Note that 1445bd8deadSopenharmony_ci subsampled components are co-sited with even numbered pixels, 1455bd8deadSopenharmony_ci and the odd numbered pixels produced have the zeroed components: 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci 2424: 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci <L0,A0> <L1,A1> <L2,A2> <L3,A3> 1505bd8deadSopenharmony_ci <Cb0,Y0> <Cr0,Y1> <Cb2,Y2> <Cr2, Y3> 1515bd8deadSopenharmony_ci | | | | | | | | 1525bd8deadSopenharmony_ci | | o-----o | | | o-----o | 1535bd8deadSopenharmony_ci | | | | | | | | 1545bd8deadSopenharmony_ci | | | 0.0 | 0.0 | | | 0.0 | 0.0 1555bd8deadSopenharmony_ci | | | | | | | | | | | | 1565bd8deadSopenharmony_ci V V V V V V V V V V V V 1575bd8deadSopenharmony_ci <Cb0,Y0,Cr0> <Cb0,Y1,Cr0> <Cb2,Y2,Cr2> <Cb2,Y3,Cr2> 1585bd8deadSopenharmony_ci < R0,G0,B1 > < R0,G1,B1 > < R2,G2,B3 > < R2,G3,B3 > 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci 4242: 1615bd8deadSopenharmony_ci < A0,L0> <A1,L1 > <A2,L2 > < A3,L3 > 1625bd8deadSopenharmony_ci <Y0,Cb0> <Y1,Cr0> <Y2,Cb2> <Y3,Cr2> 1635bd8deadSopenharmony_ci | | | | | | | | 1645bd8deadSopenharmony_ci \ / __\__/ \ / __\__/ 1655bd8deadSopenharmony_ci X ___/ \ X ___/ \ 1665bd8deadSopenharmony_ci / \ / 0.0 \ 0.0 / \ / 0.0 \ 0.0 1675bd8deadSopenharmony_ci | | | | | | | | | | | | 1685bd8deadSopenharmony_ci V V V V V V V V V V V V 1695bd8deadSopenharmony_ci <Cb0,Y0,Cr0> <Cb0,Y1,Cr0> <Cb2,Y2,Cr2> <Cb2,Y3,Cr2> 1705bd8deadSopenharmony_ci < R0,G0,B1 > < R0,G1,B1 > < R2,G2,B3 > < R2,G3,B3 > 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci Note that the <width> parameter to DrawPixels should be even, 1745bd8deadSopenharmony_ci as should the value of UNPACK_SKIP_PIXELS, and 1755bd8deadSopenharmony_ci UNPACK_ROW_LENGTH. If any of these are odd then the error 1765bd8deadSopenharmony_ci INVALID_OPERATION is issued. 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment 1805bd8deadSopenharmony_ciOperations and the Frame Buffer) 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci None. 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions) 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci None. 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests) 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci XXX 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ciAdditions to the GLX Specification 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ciErrors 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci XXX 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ciNew State 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attribute 2035bd8deadSopenharmony_ci --------- ----------- ---- ------------- --------- 2045bd8deadSopenharmony_ci UNPACK_RESAMPLE_SGIX GetIntegerv Z4 RESAMPLE_REPLICATE_SGIX client 2055bd8deadSopenharmony_ci PACK_RESAMPLE_SGIX GetIntegerv Z4 RESAMPLE_REPLICATE_SGIX client 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ciNew Implementation Dependent State 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ci None. 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ciRevision History 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci Revision 1, July 27, 1999 - SGI internal revision #4. 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci Revision 2, January 27, 2015 - note that Khronos spec file values from 2165bd8deadSopenharmony_ci enums have been changed to match the extension spec (Khronos internal 2175bd8deadSopenharmony_ci bug 12653). 218