15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_ES2_compatibility 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_ES2_compatibility 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Jeff Bolz, NVIDIA Corporation (jbolz 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Acorn Pooley, NVIDIA 165bd8deadSopenharmony_ci Bruce Merry, ARM 175bd8deadSopenharmony_ci Greg Roth, NVIDIA 185bd8deadSopenharmony_ci Pat Brown, NVIDIA 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ciNotice 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ci Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at 235bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciSpecification Update Policy 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 285bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 295bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 305bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 315bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 325bd8deadSopenharmony_ci described in more detail at 335bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciStatus 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci Complete. Approved by the ARB on June 9, 2010. 385bd8deadSopenharmony_ci Approved by the Khronos Board of Promoters on July 23, 2010. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciVersion 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Last Modified Date: March 12, 2012 435bd8deadSopenharmony_ci Revision: 7 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciNumber 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci ARB Extension #95 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciDependencies 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci Written based on the wording of the OpenGL 4.0 Compatibility 525bd8deadSopenharmony_ci Profile (March 11, 2010) specification. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci This extension interacts with ARB_tessellation_shader or OpenGL 4.0. 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ciOverview 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci This extension adds support for features of OpenGL ES 2.0 that are 595bd8deadSopenharmony_ci missing from OpenGL 3.x. Enabling these features will ease the process 605bd8deadSopenharmony_ci of porting applications from OpenGL ES 2.0 to OpenGL. 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ciIP Status 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci No known IP claims. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciNew Procedures and Functions 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci void ReleaseShaderCompiler(void); 695bd8deadSopenharmony_ci void ShaderBinary(sizei count, const uint *shaders, 705bd8deadSopenharmony_ci enum binaryformat, const void *binary, sizei length); 715bd8deadSopenharmony_ci void GetShaderPrecisionFormat(enum shadertype, 725bd8deadSopenharmony_ci enum precisiontype, 735bd8deadSopenharmony_ci int *range, int *precision); 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci void DepthRangef(clampf n, clampf f); 765bd8deadSopenharmony_ci void ClearDepthf(clampf d); 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ciNew Tokens 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci Accepted by the <value> parameter of GetBooleanv, GetIntegerv, 815bd8deadSopenharmony_ci GetInteger64v, GetFloatv, and GetDoublev: 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci SHADER_COMPILER 0x8DFA 845bd8deadSopenharmony_ci SHADER_BINARY_FORMATS 0x8DF8 855bd8deadSopenharmony_ci NUM_SHADER_BINARY_FORMATS 0x8DF9 865bd8deadSopenharmony_ci MAX_VERTEX_UNIFORM_VECTORS 0x8DFB 875bd8deadSopenharmony_ci MAX_VARYING_VECTORS 0x8DFC 885bd8deadSopenharmony_ci MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD 895bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A 905bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Accepted by the <type> parameter of VertexAttribPointer: 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci FIXED 0x140C 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci Accepted by the <precisiontype> parameter of 975bd8deadSopenharmony_ci GetShaderPrecisionFormat: 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci LOW_FLOAT 0x8DF0 1005bd8deadSopenharmony_ci MEDIUM_FLOAT 0x8DF1 1015bd8deadSopenharmony_ci HIGH_FLOAT 0x8DF2 1025bd8deadSopenharmony_ci LOW_INT 0x8DF3 1035bd8deadSopenharmony_ci MEDIUM_INT 0x8DF4 1045bd8deadSopenharmony_ci HIGH_INT 0x8DF5 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Accepted by the <format> parameter of most commands taking sized 1075bd8deadSopenharmony_ci internal formats: 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci RGB565 0x8D62 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 4.0 Specification (OpenGL Operation) 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci Add a new Section 2.1.5 (Fixed-Point Computation) and renumber later 1145bd8deadSopenharmony_ci sections: 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci Fixed-Point Computation 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci Vertex attributes may be specified using a 32-bit two's-complement signed 1195bd8deadSopenharmony_ci representation with 16 bits to the right of the binary point (fraction 1205bd8deadSopenharmony_ci bits). 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci Add to Table 2.2, p. 16 (GL data types) 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci GL Type | Minimum | Description 1265bd8deadSopenharmony_ci | Bit Width | 1275bd8deadSopenharmony_ci ----------------------------------- 1285bd8deadSopenharmony_ci fixed | 32 | Signed 2's complement 16.16 scaled integer 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Section 2.8, p.36 (Vertex Arrays) 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci Adjust the sentence in the first paragraph on p. 37: 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci For type the values BYTE, SHORT, INT, FLOAT, HALF_FLOAT, DOUBLE, and 1365bd8deadSopenharmony_ci FIXED indicate types byte, short, int, float, half, double, and fixed 1375bd8deadSopenharmony_ci respectively;... 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci Modify the descripion of the pseudocode explaining 1415bd8deadSopenharmony_ci ArrayElementInstanced as follows (p.42): 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci ... VertexAttrib[size]N[type]v will be called. When a generic vertex 1445bd8deadSopenharmony_ci attribute array contains fixed-point data, the generic vertex 1455bd8deadSopenharmony_ci attribute values are specified using a fixed-point signed 2's 1465bd8deadSopenharmony_ci complement 16.16 scaled integer format. 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci Section 2.8.2, p.43 (Drawing Commands) 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci Modify the paragraphs that begin with "with one exception" (page 44): 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci with one exception: the current normal coordinate, color, secondary 1535bd8deadSopenharmony_ci color, color index, edge flag, fog coordinate, texture coordinates, 1545bd8deadSopenharmony_ci and generic attribute values are not modified by the execution of 1555bd8deadSopenharmony_ci DrawArraysOneInstance. 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci ... 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci with one exception: the current normal coordinate, color, secondary 1605bd8deadSopenharmony_ci color, color index, edge flag, fog coordinate, texture coordinates, and 1615bd8deadSopenharmony_ci generic attribute values are not modified by the execution of 1625bd8deadSopenharmony_ci DrawElements. 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci Table 2.5, p. 39 (Vertex array sizes (values per vertex) and data types.) 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci Add "fixed" as a legal type for VertexAttribPointer 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci Section 2.14, p. 89 (Vertex Shaders) 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci Modify the third paragraph: 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci To use a vertex shader, shader source code is first loaded into a shader 1755bd8deadSopenharmony_ci object and then compiled. Alternatively, pre-compiled shader binary code 1765bd8deadSopenharmony_ci may be directly loaded into a shader object. An OpenGL implementation 1775bd8deadSopenharmony_ci must support shader compilation (the boolean value SHADER_COMPILER must 1785bd8deadSopenharmony_ci be TRUE). If the integer value NUM_SHADER_BINARY_FORMATS is greater than 1795bd8deadSopenharmony_ci zero, then shader binary loading is supported. One or more vertex shader 1805bd8deadSopenharmony_ci objects are then attached to a program object.... 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci Section 2.14.1, p. 89 (Shader Objects) 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci Add before the description of DeleteShader: 1865bd8deadSopenharmony_ci 1875bd8deadSopenharmony_ci Resources allocated by the shader compiler may be released with the 1885bd8deadSopenharmony_ci command 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci void ReleaseShaderCompiler(void); 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci This is a hint from the application, and does not prevent later use 1935bd8deadSopenharmony_ci of the shader compiler. If shader source is loaded and compiled after 1945bd8deadSopenharmony_ci ReleaseShaderCompiler has been called, CompileShader must succeed 1955bd8deadSopenharmony_ci provided there are no errors in the shader source. 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci The range and precision for different numeric formats supported by the 1985bd8deadSopenharmony_ci shader compiler may be determined with the command 1995bd8deadSopenharmony_ci GetShaderPrecisionFormat (see section 6.1.16) 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ci Add a new Section 2.14.2 (Loading Shader Binaries) and shift other 2035bd8deadSopenharmony_ci section numbers. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci Precompiled shader binaries may be loaded with the command 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci void ShaderBinary(sizei count, const uint *shaders, 2085bd8deadSopenharmony_ci enum binaryformat, const void *binary, 2095bd8deadSopenharmony_ci sizei length); 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci <shaders> contains a list of <count> shader object handles. Each 2125bd8deadSopenharmony_ci handle refers to a unique shader type (vertex shader or fragment 2135bd8deadSopenharmony_ci shader). <binary> points to <length> bytes of pre-compiled binary 2145bd8deadSopenharmony_ci shader code in client memory, and <binaryformat> denotes the format 2155bd8deadSopenharmony_ci of the pre-compiled code. 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci The binary image will be decoded according to the extension 2185bd8deadSopenharmony_ci specification defining the specified <binaryformat>. OpenGL defines 2195bd8deadSopenharmony_ci no specific binary formats, but does provide a mechanism to obtain 2205bd8deadSopenharmony_ci token values for such formats provided by extensions. The number of 2215bd8deadSopenharmony_ci shader binary formats supported can be obtained by querying the 2225bd8deadSopenharmony_ci value of NUM_SHADER_BINARY_FORMATS. The list of specific binary 2235bd8deadSopenharmony_ci formats supported can be obtained by querying the value of 2245bd8deadSopenharmony_ci SHADER_BINARY_FORMATS. 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci Depending on the types of the shader objects in <shaders>, 2275bd8deadSopenharmony_ci ShaderBinary will individually load binary vertex or fragment 2285bd8deadSopenharmony_ci shaders, or load an executable binary that contains an optimized 2295bd8deadSopenharmony_ci pair of vertex and fragment shaders stored in the same binary. 2305bd8deadSopenharmony_ci 2315bd8deadSopenharmony_ci An INVALID_ENUM error is generated if <binaryformat> is not a 2325bd8deadSopenharmony_ci supported format returned in SHADER_BINARY_FORMATS. An INVALID_VALUE 2335bd8deadSopenharmony_ci error is generated if the data pointed to by binary does not match 2345bd8deadSopenharmony_ci the specified <binaryformat>. Additional errors corresponding to 2355bd8deadSopenharmony_ci specific binary formats may be generated as specified by the 2365bd8deadSopenharmony_ci extensions defining those formats. An INVALID_OPERATION error is 2375bd8deadSopenharmony_ci generated if more than one of the handles refers to the same type of 2385bd8deadSopenharmony_ci shader (vertex or fragment shader.) 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci If ShaderBinary fails, the old state of shader objects for which the 2415bd8deadSopenharmony_ci binary was being loaded will not be restored. Note that if shader 2425bd8deadSopenharmony_ci binary interfaces are supported, then an OpenGL implementation may 2435bd8deadSopenharmony_ci require that an optimized pair of vertex and fragment shader binaries 2445bd8deadSopenharmony_ci that were compiled together be specified to LinkProgram. Not 2455bd8deadSopenharmony_ci specifying an optimized pair may cause LinkProgram to fail. 2465bd8deadSopenharmony_ci 2475bd8deadSopenharmony_ci Section 2.14.4, p. 97 (Uniform Variables) 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci Add after the definition of MAX_VERTEX_UNIFORM_COMPONENTS: 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci The implementation-dependent constant MAX_VERTEX_UNIFORM_VECTORS has 2525bd8deadSopenharmony_ci a value equal to the value of MAX_VERTEX_UNIFORM_COMPONENTS divided 2535bd8deadSopenharmony_ci by four. 2545bd8deadSopenharmony_ci 2555bd8deadSopenharmony_ci 2565bd8deadSopenharmony_ci Section 2.14.7, p. 118 (Varying Variables) 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ci Add after the definition of MAX_VARYING_COMPONENTS: 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci The implementation-dependent constant MAX_VARYING_VECTORS has a 2615bd8deadSopenharmony_ci value equal to the value of MAX_VARYING_COMPONENTS divided by four. 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci Section 2.16.1, p. 164 (Controlling the Viewport) 2655bd8deadSopenharmony_ci 2665bd8deadSopenharmony_ci Change the second paragraph: 2675bd8deadSopenharmony_ci 2685bd8deadSopenharmony_ci The factor and offset applied to zd encoded by n and f are set using 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci void DepthRange(clampd n, clampd f); 2715bd8deadSopenharmony_ci void DepthRangef(clampf n, clampf f); 2725bd8deadSopenharmony_ci 2735bd8deadSopenharmony_ci ... 2745bd8deadSopenharmony_ci 2755bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 4.0 Specification (Rasterization) 2765bd8deadSopenharmony_ci 2775bd8deadSopenharmony_ci Section 3.9.3 (Texture Image Specification) 2785bd8deadSopenharmony_ci 2795bd8deadSopenharmony_ci Add to the list of required texture and renderbuffer color formats on 2805bd8deadSopenharmony_ci page 262, on the same line as R11F_G11F_B10F: 2815bd8deadSopenharmony_ci 2825bd8deadSopenharmony_ci - RGB565 2835bd8deadSopenharmony_ci 2845bd8deadSopenharmony_ci Add to Table 3.17 (Correspondance of sized ...) on page 265, following 2855bd8deadSopenharmony_ci the row for format RGB5: 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci Sized Internal Format Base Internal Format R bits G bits B bits A bits Shared bits 2885bd8deadSopenharmony_ci --------------------- -------------------- ------ ------ ------ ------ ----------- 2895bd8deadSopenharmony_ci RGB565 RGB 5 6 5 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci 2925bd8deadSopenharmony_ci Section 3.12.1, p. 323 (Shader Variables) 2935bd8deadSopenharmony_ci 2945bd8deadSopenharmony_ci Add after the definition of MAX_FRAGMENT_UNIFORM_COMPONENTS: 2955bd8deadSopenharmony_ci 2965bd8deadSopenharmony_ci The implementation-dependent constant MAX_FRAGMENT_UNIFORM_VECTORS 2975bd8deadSopenharmony_ci has a value equal to the value of MAX_FRAGMENT_UNIFORM_COMPONENTS 2985bd8deadSopenharmony_ci divided by four. 2995bd8deadSopenharmony_ci 3005bd8deadSopenharmony_ci 3015bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 4.0 Specification (Per-Fragment Operations 3025bd8deadSopenharmony_ciand the Frame Buffer) 3035bd8deadSopenharmony_ci 3045bd8deadSopenharmony_ci Section 4.2.1, p. 352 (Selecting a Buffer for Writing) 3055bd8deadSopenharmony_ci 3065bd8deadSopenharmony_ci Extend this paragraph: 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci Indicating a buffer or buffers using DrawBuffer or DrawBuffers causes 3095bd8deadSopenharmony_ci subsequent pixel color value writes to affect the indicated buffers. If 3105bd8deadSopenharmony_ci the GL is bound to a framebuffer object and a draw buffer selects an 3115bd8deadSopenharmony_ci attachment that has no image attached, then that fragment color is not 3125bd8deadSopenharmony_ci written to any buffer. 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci 3155bd8deadSopenharmony_ci Section 4.2.3, p. 358 (Clearing the Buffers) 3165bd8deadSopenharmony_ci 3175bd8deadSopenharmony_ci Change the third paragraph 3185bd8deadSopenharmony_ci 3195bd8deadSopenharmony_ci The commands 3205bd8deadSopenharmony_ci 3215bd8deadSopenharmony_ci void ClearDepth(clampd d); 3225bd8deadSopenharmony_ci void ClearDepthf(clampf d); 3235bd8deadSopenharmony_ci 3245bd8deadSopenharmony_ci set the depth value used when clearing the depth buffer. 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci 3275bd8deadSopenharmony_ci Section 4.3.2, p. 363 (Reading Pixels) 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci Add after the description of ReadPixels: 3305bd8deadSopenharmony_ci 3315bd8deadSopenharmony_ci If the current read buffer is neither floating point nor integer, 3325bd8deadSopenharmony_ci calling GetIntegerv with the symbolic constants 3335bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE will 3345bd8deadSopenharmony_ci return RGBA and UNSIGNED_BYTE respectively; otherwise it will generate 3355bd8deadSopenharmony_ci an INVALID_OPERATION error. 3365bd8deadSopenharmony_ci 3375bd8deadSopenharmony_ci Extend this sentence: 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci ReadPixels generates an INVALID_OPERATION error if it attempts to 3405bd8deadSopenharmony_ci select a color buffer while READ_BUFFER is NONE or if the GL is 3415bd8deadSopenharmony_ci using a framebuffer object (i.e. READ_FRAMEBUFFER_BINDING is 3425bd8deadSopenharmony_ci non-zero) and the read buffer selects an attachment that has no 3435bd8deadSopenharmony_ci image attached. 3445bd8deadSopenharmony_ci 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci Section 4.4.4, p. 390 (Framebuffer Completeness) 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci Remove all references to draw/read buffers affecting completeness. In 3495bd8deadSopenharmony_ci particular, delete: 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci - The value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE must not be NONE 3525bd8deadSopenharmony_ci for any color attachment point(s) named by DRAW_BUFFERi. 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci { FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER } 3555bd8deadSopenharmony_ci 3565bd8deadSopenharmony_ci - If READ_BUFFER is not NONE, then the value of 3575bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE must not be NONE for the 3585bd8deadSopenharmony_ci color attachment point named by READ_BUFFER. 3595bd8deadSopenharmony_ci 3605bd8deadSopenharmony_ci { FRAMEBUFFER_INCOMPLETE_READ_BUFFER } 3615bd8deadSopenharmony_ci 3625bd8deadSopenharmony_ci - Changing the read buffer or one of the draw buffers. 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 4.0 Specification (Special Functions) 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci None 3685bd8deadSopenharmony_ci 3695bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 4.0 Specification (State and 3705bd8deadSopenharmony_ciState Requests) 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci Section 6.1.18 (Shader and Program Queries) 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ci Add after the description of GetShaderSource: 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci The command 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci void GetShaderPrecisionFormat(enum shadertype, 3795bd8deadSopenharmony_ci enum precisiontype, 3805bd8deadSopenharmony_ci int *range, int *precision); 3815bd8deadSopenharmony_ci 3825bd8deadSopenharmony_ci returns the range and precision for different numeric formats 3835bd8deadSopenharmony_ci supported by the shader compiler. <shadertype> must be VERTEX_SHADER 3845bd8deadSopenharmony_ci or FRAGMENT_SHADER. <precisiontype> must be one of LOW_FLOAT, 3855bd8deadSopenharmony_ci MEDIUM_FLOAT, HIGH_FLOAT, LOW_INT, MEDIUM_INT or HIGH_INT. <range> 3865bd8deadSopenharmony_ci points to an array of two integers in which encodings of the 3875bd8deadSopenharmony_ci format's numeric range are returned. If min and max are the smallest 3885bd8deadSopenharmony_ci and largest values representable in the format, then the values 3895bd8deadSopenharmony_ci returned are defined to be 3905bd8deadSopenharmony_ci 3915bd8deadSopenharmony_ci <range>[0] = floor(log2(|min|)) 3925bd8deadSopenharmony_ci <range>[1] = floor(log2(|max|)) 3935bd8deadSopenharmony_ci 3945bd8deadSopenharmony_ci <precision> points to an integer in which the log2 value of the 3955bd8deadSopenharmony_ci number of bits of precision of the format is returned. If the 3965bd8deadSopenharmony_ci smallest representable value greater than 1 is 1 + <eps>, then 3975bd8deadSopenharmony_ci *<precision> will contain floor(-log2(eps)), and every value in the 3985bd8deadSopenharmony_ci range 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci [-2^<range>[0], 2^<range>[1]] 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci can be represented to at least one part in 2^*<precision>. For 4035bd8deadSopenharmony_ci example, an IEEE single-precision floating-point format would return 4045bd8deadSopenharmony_ci <range>[0] = 127, <range>[1] = 127, and *<precision> = 23, while a 4055bd8deadSopenharmony_ci 32-bit two's-complement integer format would return <range>[0] = 31, 4065bd8deadSopenharmony_ci <range>[1] = 30, and *<precision> = 0. 4075bd8deadSopenharmony_ci 4085bd8deadSopenharmony_ci The minimum required precision and range for formats corresponding 4095bd8deadSopenharmony_ci to the different values of <precisiontype> are described in section 4105bd8deadSopenharmony_ci 4.5 of the OpenGL Shading Language specification. 4115bd8deadSopenharmony_ci 4125bd8deadSopenharmony_ci 4135bd8deadSopenharmony_ciAdditions to the OpenGL Shading Language Specification, version 4.00.8 4145bd8deadSopenharmony_ci 4155bd8deadSopenharmony_ci Section 3.3, p. 8 (Preprocessor) 4165bd8deadSopenharmony_ci 4175bd8deadSopenharmony_ci ...Version 1.10 of the language does not require shaders to include this 4185bd8deadSopenharmony_ci directive, and shaders that do not include a #version directive will be 4195bd8deadSopenharmony_ci treated as targeting version 1.10. Shaders that specify #version 100 will 4205bd8deadSopenharmony_ci be treated as targeting version 1.00 of the OpenGL ES Shading Language, 4215bd8deadSopenharmony_ci which is a strict subset of version 1.50. 4225bd8deadSopenharmony_ci 4235bd8deadSopenharmony_ci 4245bd8deadSopenharmony_ci Section 7.3, p. 90 (Built-In Constants) 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ci Add the following constants: 4275bd8deadSopenharmony_ci 4285bd8deadSopenharmony_ci const int gl_MaxVertexUniformVectors = 256; 4295bd8deadSopenharmony_ci const int gl_MaxFragmentUniformVectors = 256; 4305bd8deadSopenharmony_ci const int gl_MaxVaryingVectors = 15; 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci 4335bd8deadSopenharmony_ci Add a new Section X.Y (Counting of Varyings and Uniforms) 4345bd8deadSopenharmony_ci 4355bd8deadSopenharmony_ci GLSL ES 1.00 specifies the storage available for varying variables in 4365bd8deadSopenharmony_ci terms of an array of 4-vectors. Similarly for uniform variables. The 4375bd8deadSopenharmony_ci assumption is that variables will be packed into these arrays without 4385bd8deadSopenharmony_ci wasting space. This places significant burden on implementations since 4395bd8deadSopenharmony_ci optimal packing is computationally intensive. Implementations may have 4405bd8deadSopenharmony_ci more internal resources than exposed to the application and so avoid the 4415bd8deadSopenharmony_ci need to perform packing but this is also considered an expensive 4425bd8deadSopenharmony_ci solution. 4435bd8deadSopenharmony_ci 4445bd8deadSopenharmony_ci ES 2.0 therefore relaxes the requirements for packing by specifying a 4455bd8deadSopenharmony_ci simpler algorithm that may be used. This algorithm specifies a minimum 4465bd8deadSopenharmony_ci requirement for when a set of variables must be supported by an 4475bd8deadSopenharmony_ci implementation. The implementation is allowed to support more than the 4485bd8deadSopenharmony_ci minimum and so may use a more efficient algorithm and/or may support more 4495bd8deadSopenharmony_ci registers than the virtual target machine. 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ci In all cases, failing resource allocation for variables must result in an 4525bd8deadSopenharmony_ci error. 4535bd8deadSopenharmony_ci 4545bd8deadSopenharmony_ci The resource allocation of variables must succeed for all cases where the 4555bd8deadSopenharmony_ci following packing algorithm succeeds: 4565bd8deadSopenharmony_ci 4575bd8deadSopenharmony_ci - The target architecture consists of a grid of registers, 4585bd8deadSopenharmony_ci gl_MaxVaryingVectors rows by 4 columns for varying variables and 4595bd8deadSopenharmony_ci gl_Max{Vertex,Fragment}UniformVectors rows by 4 columns for uniform 4605bd8deadSopenharmony_ci variables. Each register can contain a float value. 4615bd8deadSopenharmony_ci 4625bd8deadSopenharmony_ci - Variables are packed into the registers one at a time so that they each 4635bd8deadSopenharmony_ci occupy a contiguous subrectangle. No splitting of variables is 4645bd8deadSopenharmony_ci permitted. 4655bd8deadSopenharmony_ci 4665bd8deadSopenharmony_ci - The orientation of variables is fixed. Vectors always occupy registers 4675bd8deadSopenharmony_ci in a single row. Elements of an array must be in different rows. E.g. 4685bd8deadSopenharmony_ci vec4 will always occupy one row; float[8] will occupy one column. Since 4695bd8deadSopenharmony_ci it is not permitted to split a variable, large arrays e.g.. for 4705bd8deadSopenharmony_ci varyings, float[17] will always fail with this algorithm. 4715bd8deadSopenharmony_ci 4725bd8deadSopenharmony_ci - Variables consume only the minimum space required with the exception 4735bd8deadSopenharmony_ci that mat2 occupies 2 complete rows. This is to allow implementations 4745bd8deadSopenharmony_ci more flexibility in how variables are stored. 4755bd8deadSopenharmony_ci 4765bd8deadSopenharmony_ci - Arrays of size N are assumed to take N times the size of the base type. 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci - Variables are packed in the following order: 4795bd8deadSopenharmony_ci 4805bd8deadSopenharmony_ci 1. Arrays of mat4 and mat4 4815bd8deadSopenharmony_ci 2. Arrays of mat2 and mat2 (since they occupy full rows) 4825bd8deadSopenharmony_ci 3. Arrays of vec4 and vec4 4835bd8deadSopenharmony_ci 4. Arrays of mat3 and mat3 4845bd8deadSopenharmony_ci 5. Arrays of vec3 and vec3 4855bd8deadSopenharmony_ci 6. Arrays of vec2 and vec2 4865bd8deadSopenharmony_ci 7. Arrays of float and float 4875bd8deadSopenharmony_ci 4885bd8deadSopenharmony_ci - For each of the above types, the arrays are processed in order of size, 4895bd8deadSopenharmony_ci largest first. Arrays of size 1 and the base type are considered 4905bd8deadSopenharmony_ci equivalent. In the case of varyings, the first type to be packed 4915bd8deadSopenharmony_ci (successfully) is mat4[2] followed by mat4, mat2[2], mat2, vec4[8], 4925bd8deadSopenharmony_ci vec4[7],...vec4[1], vec4, mat3[2], mat3 and so on. The last variables 4935bd8deadSopenharmony_ci to be packed will be float (and float[1]). 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci - For 2,3 and 4 component variables packing is started using the 1st 4965bd8deadSopenharmony_ci column of the 1st row. Variables are then allocated to successive rows, 4975bd8deadSopenharmony_ci aligning them to the 1st column. 4985bd8deadSopenharmony_ci 4995bd8deadSopenharmony_ci - For 2 component variables, when there are no spare rows, the strategy 5005bd8deadSopenharmony_ci is switched to using the highest numbered row and the lowest numbered 5015bd8deadSopenharmony_ci column where the variable will fit. (In practice, this means they will 5025bd8deadSopenharmony_ci be aligned to the x or z component.) Packing of any further 3 or 4 5035bd8deadSopenharmony_ci component variables will fail at this point. 5045bd8deadSopenharmony_ci 5055bd8deadSopenharmony_ci - 1 component variables (i.e. floats and arrays of floats) have their own 5065bd8deadSopenharmony_ci packing rule. They are packed in order of size, largest first. Each 5075bd8deadSopenharmony_ci variable is placed in the column that leaves the least amount of space 5085bd8deadSopenharmony_ci in the column and aligned to the lowest available rows within that 5095bd8deadSopenharmony_ci column. During this phase of packing, space will be available in up to 5105bd8deadSopenharmony_ci 4 columns. The space within each column is always contiguous. 5115bd8deadSopenharmony_ci 5125bd8deadSopenharmony_ci - If at any time the packing of a variable fails, the compiler or linker 5135bd8deadSopenharmony_ci must report an error. 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ci Example: pack the following types, if gl_MaxVaryingVectors were equal to 5165bd8deadSopenharmony_ci eight: 5175bd8deadSopenharmony_ci 5185bd8deadSopenharmony_ci varying vec4 a; // top left 5195bd8deadSopenharmony_ci varying mat3 b; // align to left, lowest numbered rows 5205bd8deadSopenharmony_ci varying vec2 c[3]; // align to left, lowest numbered rows 5215bd8deadSopenharmony_ci varying vec2 d[2]; // Cannot align to left so align to z column, 5225bd8deadSopenharmony_ci // highest numbered rows 5235bd8deadSopenharmony_ci varying vec2 e; // Align to left, lowest numbered rows. 5245bd8deadSopenharmony_ci varying float f[3] // Column with minimum space 5255bd8deadSopenharmony_ci varying float g[2]; // Column with minimum space (choice of 2, 5265bd8deadSopenharmony_ci // either one can be used) 5275bd8deadSopenharmony_ci varying float h; // Column with minimum space 5285bd8deadSopenharmony_ci 5295bd8deadSopenharmony_ci In this example, the varyings happen to be listed in the order in which 5305bd8deadSopenharmony_ci they are packed. Packing is independent of the order of declaration. 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ci x y z w 5335bd8deadSopenharmony_ci 0 a a a a 5345bd8deadSopenharmony_ci 1 b b b f 5355bd8deadSopenharmony_ci 2 b b b f 5365bd8deadSopenharmony_ci 3 b b b f 5375bd8deadSopenharmony_ci 4 c c g h 5385bd8deadSopenharmony_ci 5 c c g 5395bd8deadSopenharmony_ci 6 c c d d 5405bd8deadSopenharmony_ci 7 e e d d 5415bd8deadSopenharmony_ci 5425bd8deadSopenharmony_ci Some varyings e.g. mat4[8] will be too large to fit. These always fail 5435bd8deadSopenharmony_ci with this algorithm. 5445bd8deadSopenharmony_ci 5455bd8deadSopenharmony_ci If referenced in the fragment shader (after preprocessing), the built-in 5465bd8deadSopenharmony_ci special variables (gl_FragCoord, gl_FrontFacing and gl_PointCoord) are 5475bd8deadSopenharmony_ci included when calculating the storage requirements of varyings. 5485bd8deadSopenharmony_ci 5495bd8deadSopenharmony_ci Only varyings statically used in both shaders are counted. 5505bd8deadSopenharmony_ci 5515bd8deadSopenharmony_ci When calculating the number of uniform variables used, any literal 5525bd8deadSopenharmony_ci constants present in the shader source after preprocessing are included 5535bd8deadSopenharmony_ci when calculating the storage requirements. Multiple instances of 5545bd8deadSopenharmony_ci identical constants should count multiple times. 5555bd8deadSopenharmony_ci 5565bd8deadSopenharmony_ci Part of the storage may be reserved by an implementation for its own use 5575bd8deadSopenharmony_ci e.g. for computation of transcendental functions. This reduces the number 5585bd8deadSopenharmony_ci of uniforms available to the shader. The size of this reduction is 5595bd8deadSopenharmony_ci undefined but should be minimized. 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ci 5625bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 5635bd8deadSopenharmony_ci 5645bd8deadSopenharmony_ci None 5655bd8deadSopenharmony_ci 5665bd8deadSopenharmony_ciErrors 5675bd8deadSopenharmony_ci 5685bd8deadSopenharmony_ci ShaderBinary generates an INVALID_ENUM error if <binaryformat> is 5695bd8deadSopenharmony_ci not a supported format returned in SHADER_BINARY_FORMATS. 5705bd8deadSopenharmony_ci 5715bd8deadSopenharmony_ci ShaderBinary generates an INVALID_VALUE error if the data pointed to 5725bd8deadSopenharmony_ci by binary does not match the specified <binaryformat>. 5735bd8deadSopenharmony_ci 5745bd8deadSopenharmony_ci ShaderBinary generates an INVALID_OPERATION error if more than one 5755bd8deadSopenharmony_ci of the handles refers to the same type of shader (vertex or fragment 5765bd8deadSopenharmony_ci shader.) 5775bd8deadSopenharmony_ci 5785bd8deadSopenharmony_ci GetIntegerv, GetBooleanv, and GetFloatv generate an INVALID_OPERATION 5795bd8deadSopenharmony_ci error if <pname> is IMPLEMENTATION_COLOR_READ_TYPE or 5805bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_FORMAT and the current read buffer is floating 5815bd8deadSopenharmony_ci point or integer format. 5825bd8deadSopenharmony_ci 5835bd8deadSopenharmony_ci ReadPixels generates an INVALID_OPERATION error if it attempts to 5845bd8deadSopenharmony_ci select a color buffer while READ_BUFFER is NONE or if the GL is 5855bd8deadSopenharmony_ci using a framebuffer object (i.e. READ_FRAMEBUFFER_BINDING is 5865bd8deadSopenharmony_ci non-zero) and the read buffer selects an attachment that has no 5875bd8deadSopenharmony_ci image attached. 5885bd8deadSopenharmony_ci 5895bd8deadSopenharmony_ciNew State 5905bd8deadSopenharmony_ci 5915bd8deadSopenharmony_ci None 5925bd8deadSopenharmony_ci 5935bd8deadSopenharmony_ciNew Implementation Dependent State 5945bd8deadSopenharmony_ci 5955bd8deadSopenharmony_ci Minimum 5965bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. 5975bd8deadSopenharmony_ci ------------------------- ------- ------------ ------- ------------------------ ------ 5985bd8deadSopenharmony_ci SHADER_BINARY_FORMATS 0* x Z GetIntegerv - Enumerated shader binary 2.14.2 5995bd8deadSopenharmony_ci formats 6005bd8deadSopenharmony_ci NUM_SHADER_BINARY_FORMATS Z+ GetIntegerv 0 Number of shader binary 2.14.2 6015bd8deadSopenharmony_ci formats 6025bd8deadSopenharmony_ci SHADER_COMPILER B GetBooleanv - Shader compiler supported 2.14 6035bd8deadSopenharmony_ci 6045bd8deadSopenharmony_ci MAX_VERTEX_UNIFORM_VECTORS Z+ GetIntegerv 256 Number of vectors for 2.14.4 6055bd8deadSopenharmony_ci vertex shader uniform 6065bd8deadSopenharmony_ci variables 6075bd8deadSopenharmony_ci MAX_VARYING_VECTORS Z+ GetIntegerv 15 Number of vectors for 2.14.6 6085bd8deadSopenharmony_ci varying variables 6095bd8deadSopenharmony_ci MAX_FRAGMENT_UNIFORM_VECTORS Z+ GetIntegerv 256 Number of vectors for 3.12.1 6105bd8deadSopenharmony_ci fragment shader uniform 6115bd8deadSopenharmony_ci variables 6125bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_TYPE Z+ GetIntegerv - Implementation preferred 4.3.2 6135bd8deadSopenharmony_ci pixel type 6145bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_FORMAT Z+ GetIntegerv - Implementation preferred 4.3.2 6155bd8deadSopenharmony_ci pixel format 6165bd8deadSopenharmony_ci 6175bd8deadSopenharmony_ci 6185bd8deadSopenharmony_ciIssues 6195bd8deadSopenharmony_ci 6205bd8deadSopenharmony_ci (1) Should the uniform/varying limits MAX_*_COMPONENTS vs MAX_*_VECTORS 6215bd8deadSopenharmony_ci constants be allowed to take independent values, or are they tied 6225bd8deadSopenharmony_ci together? 6235bd8deadSopenharmony_ci 6245bd8deadSopenharmony_ci UNRESOLVED: Currently MAX_*_VECTORS = MAX_*_COMPONENTS / 4. 6255bd8deadSopenharmony_ci 6265bd8deadSopenharmony_ci (2) What should IMPLEMENTATION_COLOR_READ_FORMAT and 6275bd8deadSopenharmony_ci IMPLEMENTATION_COLOR_READ_TYPE do? OpenGL does not have the same 6285bd8deadSopenharmony_ci limitations of allowed format/type for ReadPixels that ES has. 6295bd8deadSopenharmony_ci 6305bd8deadSopenharmony_ci RESOLVED: Always return RGBA/UNSIGNED_BYTE. 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ci This query is in the weird situation where the application needs to know 6335bd8deadSopenharmony_ci how to compute a size based on the format/type combination that is 6345bd8deadSopenharmony_ci returned as well as how to interpret the data. So if the GL attempts to 6355bd8deadSopenharmony_ci return "something useful", it may cause an application to have 6365bd8deadSopenharmony_ci unpredictable behavior if it doesn't understand the values that are 6375bd8deadSopenharmony_ci returned. Given the wide variety of format/type conversions supported by 6385bd8deadSopenharmony_ci GL, this feature is not particularly useful - the app can simply use the 6395bd8deadSopenharmony_ci format it wants. 6405bd8deadSopenharmony_ci 6415bd8deadSopenharmony_ci What's really required of this for compatibility is to return a valid 6425bd8deadSopenharmony_ci format for any legal renderable format in GL ES2.0. RGBA/UNSIGNED_BYTE 6435bd8deadSopenharmony_ci should be sufficient to accomplish that. Having these queries return 6445bd8deadSopenharmony_ci an error for float and integer formats discourages their use in the 6455bd8deadSopenharmony_ci future. 6465bd8deadSopenharmony_ci 6475bd8deadSopenharmony_ci (3) The current GLSL ES packing rules hardcode 8 and 128 rather than 6485bd8deadSopenharmony_ci scaling with the limits exposed by the implementation. Should these 6495bd8deadSopenharmony_ci scale? 6505bd8deadSopenharmony_ci 6515bd8deadSopenharmony_ci RESOLVED: Yes, replace references to 8 and 128 with gl_Max*Vectors. 6525bd8deadSopenharmony_ci 6535bd8deadSopenharmony_ci (4) How can we deal with the conflicting behavior of current vertex 6545bd8deadSopenharmony_ci attribute state being made indeterminate by DrawArrays/DrawElements? 6555bd8deadSopenharmony_ci 6565bd8deadSopenharmony_ci UNRESOLVED: GL behavior is currently undefined, so make it defined to 6575bd8deadSopenharmony_ci match ES behavior. Are there any performance concerns with this? 6585bd8deadSopenharmony_ci 6595bd8deadSopenharmony_ci (5) Should the varying/uniform packing rules apply to double-precision 6605bd8deadSopenharmony_ci types in GL SM5? 6615bd8deadSopenharmony_ci 6625bd8deadSopenharmony_ci UNRESOLVED: Yes. Need to insert these into the ordered list of types. 6635bd8deadSopenharmony_ci 6645bd8deadSopenharmony_ci (6) What should we do about conflicting #version values? 6655bd8deadSopenharmony_ci 6665bd8deadSopenharmony_ci RESOLVED: The original GLSL 1.00 spec did not include #version, it was 6675bd8deadSopenharmony_ci added in GLSL 1.10 and the first accepted value was "110". GLSL ES has 6685bd8deadSopenharmony_ci only one version and it is "100", so there is currently no overlap and 6695bd8deadSopenharmony_ci ambiguity. So GLSL can be extended to accept "100" and always interpret 6705bd8deadSopenharmony_ci it to mean "GLSL ES 1.00 functionality". 6715bd8deadSopenharmony_ci 6725bd8deadSopenharmony_ci Future versions of the shading language specs should be modified to 6735bd8deadSopenharmony_ci require something in the shader text to indicate which type of GLSL is 6745bd8deadSopenharmony_ci being used. In GLSL 1.50, the #version command accepts 6755bd8deadSopenharmony_ci 6765bd8deadSopenharmony_ci #version <number> <profile_opt> 6775bd8deadSopenharmony_ci 6785bd8deadSopenharmony_ci where <profile_opt> can be either "core" or "compatibility". We could 6795bd8deadSopenharmony_ci require "es" for GLSL ES shaders and make the profile be required in 6805bd8deadSopenharmony_ci both GLSL and GLSL ES. 6815bd8deadSopenharmony_ci 6825bd8deadSopenharmony_ci (7) Are there any existing packing rules that the ES packing rules may 6835bd8deadSopenharmony_ci conflict with? 6845bd8deadSopenharmony_ci 6855bd8deadSopenharmony_ci UNRESOLVED: Named uniform blocks have extensive packing rules, but the ES 6865bd8deadSopenharmony_ci rules only apply to the default uniform block so those aren't in 6875bd8deadSopenharmony_ci conflict. The only mention of how things may be packed in the default 6885bd8deadSopenharmony_ci uniform block is that matrices consume no more than 4*min(r,c) 6895bd8deadSopenharmony_ci components. For both uniforms and varyings, the spec does not explicitly 6905bd8deadSopenharmony_ci guarantee that if a program is within the limit then linking will 6915bd8deadSopenharmony_ci succeed, but that guarantee may be reasonably inferred. 6925bd8deadSopenharmony_ci 6935bd8deadSopenharmony_ci The ES rules guarantee that under certain circumstances linking is 6945bd8deadSopenharmony_ci guaranteed to succeed. Adopting these rules as *the* minimum guarantee 6955bd8deadSopenharmony_ci will weaken the desktop rules. However, it is likely that some vec4- 6965bd8deadSopenharmony_ci centric implementations may not be able to satisfy the inferred desktop 6975bd8deadSopenharmony_ci guarantee. For example, any time a single variable has more array 6985bd8deadSopenharmony_ci elements than MAX_*_UNIFORM_COMPONENTS/4 and is dynamically indexed. 6995bd8deadSopenharmony_ci 7005bd8deadSopenharmony_ci Proposed resolution is to adopt the ES rules as the minimum guarnatee 7015bd8deadSopenharmony_ci for the default uniform block and for varyings. 7025bd8deadSopenharmony_ci 7035bd8deadSopenharmony_ci (8) How should we handle draw buffer completeness? 7045bd8deadSopenharmony_ci 7055bd8deadSopenharmony_ci RESOLVED: Remove draw/readbuffer completeness checks, and treat 7065bd8deadSopenharmony_ci drawbuffers referring to missing attachments as if they were NONE. 7075bd8deadSopenharmony_ci 7085bd8deadSopenharmony_ci GL ES does not support MRT and the notions of DrawBuffers and ReadBuffer 7095bd8deadSopenharmony_ci were removed, including the FRAMEBUFFER_INCOMPLETE_{DRAW,READ}_BUFFER 7105bd8deadSopenharmony_ci checks. One consequence of this is that a GL ES application can render to 7115bd8deadSopenharmony_ci a depth-only FBO without calling DrawBuffer, whereas in Desktop GL an 7125bd8deadSopenharmony_ci application must call DrawBuffer(NONE). To make Desktop GL a superset, we 7135bd8deadSopenharmony_ci must remove the need to call DrawBuffer(NONE), and the most 7145bd8deadSopenharmony_ci straightforward way to do that is to remove these completeness checks. 7155bd8deadSopenharmony_ci 7165bd8deadSopenharmony_ci (9) What divergent behaviors should this spec leave unaltered? 7175bd8deadSopenharmony_ci 7185bd8deadSopenharmony_ci RESOLVED: There are various differing features that cannot be 7195bd8deadSopenharmony_ci resolved without breaking backward compatibility with desktop 7205bd8deadSopenharmony_ci applications. 7215bd8deadSopenharmony_ci 7225bd8deadSopenharmony_ci * Framebuffer Objects are shared on desktop, but not in ES. 7235bd8deadSopenharmony_ci * Some textures are incomplete in ES that would be considered 7245bd8deadSopenharmony_ci complete on desktop. 7255bd8deadSopenharmony_ci * ES requires different version string formats for API and shading 7265bd8deadSopenharmony_ci language version queries. 7275bd8deadSopenharmony_ci 7285bd8deadSopenharmony_ci 7295bd8deadSopenharmony_ci (10) Which changes should be made to both the core and compatibility 7305bd8deadSopenharmony_ci profiles and which should be restricted to the core profile? 7315bd8deadSopenharmony_ci 7325bd8deadSopenharmony_ci UNRESOLVED: We should probably decide what needs to go into core and 7335bd8deadSopenharmony_ci what into compatibility. In the cases that core has removed the 7345bd8deadSopenharmony_ci features being expanded, this decision is clear. Even where this is 7355bd8deadSopenharmony_ci not the case, it may make sense to limit certain features to 7365bd8deadSopenharmony_ci compatibility rather than clutter up core with features only present 7375bd8deadSopenharmony_ci for ES compatibility. 7385bd8deadSopenharmony_ci 7395bd8deadSopenharmony_ci Bruce Merry's suggested division: 7405bd8deadSopenharmony_ci 7415bd8deadSopenharmony_ci Core + compatibility: 7425bd8deadSopenharmony_ci ReleaseShaderCompiler 7435bd8deadSopenharmony_ci Relaxation of framebuffer completeness rules 7445bd8deadSopenharmony_ci Preserving current attributes after Draw* 7455bd8deadSopenharmony_ci 7465bd8deadSopenharmony_ci Compatibility only: 7475bd8deadSopenharmony_ci Fixed-point vertex attributes 7485bd8deadSopenharmony_ci Float versions of DepthRange and ClearDepth 7495bd8deadSopenharmony_ci Binary shaders 7505bd8deadSopenharmony_ci #version 100 7515bd8deadSopenharmony_ci ES2 packing model 7525bd8deadSopenharmony_ci implementation read color format 7535bd8deadSopenharmony_ci vector-based resource-limits 7545bd8deadSopenharmony_ci GetShaderPrecisionFormat 7555bd8deadSopenharmony_ci 7565bd8deadSopenharmony_ci (11) Are immediate mode vertex attrib calls that take fixed point 7575bd8deadSopenharmony_ci parameters required? 7585bd8deadSopenharmony_ci 7595bd8deadSopenharmony_ci RESOLVED: No. The purpose of this extension is limited to 7605bd8deadSopenharmony_ci facilitating the porting of ES2 applications to the desktop. Adding 7615bd8deadSopenharmony_ci immediate mode VertexAttrib calls to promote internal consistency 7625bd8deadSopenharmony_ci with other desktop features is less important. 7635bd8deadSopenharmony_ci 7645bd8deadSopenharmony_ci (12) Should RGB565 be added to the extension? 7655bd8deadSopenharmony_ci 7665bd8deadSopenharmony_ci RESOLVED: Yes. The initial version of this extension did not include it, 7675bd8deadSopenharmony_ci as did OpenGL 4.1, which included functionality from this extension. 7685bd8deadSopenharmony_ci This was an oversight. RGB565 was added to the required format list in 7695bd8deadSopenharmony_ci the initial release of the OpenGL 4.2 spec, but it was not added to the 7705bd8deadSopenharmony_ci table of sized internal color formats. However, RGB565 7715bd8deadSopenharmony_ci compatibility is important to ES2 compatibility. 7725bd8deadSopenharmony_ci 7735bd8deadSopenharmony_ci The ARB discussed this situation in February 2012 and agreed to revise 7745bd8deadSopenharmony_ci the extension spec and OpenGL 4.2 spec to fully support RGB565. While 7755bd8deadSopenharmony_ci some drivers may not support RGB565, we believe they will add support 7765bd8deadSopenharmony_ci quickly. 7775bd8deadSopenharmony_ci 7785bd8deadSopenharmony_ci (13) OpenGL ES 2.0 may have some unavoidable differences from an OpenGL 7795bd8deadSopenharmony_ci context supporting ES2_compatibility, since this extension can't change 7805bd8deadSopenharmony_ci default GL state values or prevent behavior defined to work by the GL 7815bd8deadSopenharmony_ci specification. How do we deal with these differences? 7825bd8deadSopenharmony_ci 7835bd8deadSopenharmony_ci RESOLVED: If the application needs a strict OpenGL ES 2.0 7845bd8deadSopenharmony_ci implementation, it should not attempt to use a desktop GL context 7855bd8deadSopenharmony_ci with the ES2_compatibility extension supported. Instead, use the 7865bd8deadSopenharmony_ci {GLX|WGL}_EXT_create_context_es_profile extensions to request an 7875bd8deadSopenharmony_ci actual OpenGL ES 2.0 context, which will not have these caveats. 7885bd8deadSopenharmony_ci 7895bd8deadSopenharmony_ciRevision History 7905bd8deadSopenharmony_ci 7915bd8deadSopenharmony_ci Rev. Date Author Changes 7925bd8deadSopenharmony_ci ---- ---------- --------- ----------------------------------------- 7935bd8deadSopenharmony_ci 7 03/12/2013 Jon Leech Add issue 13 and copy resolution from 7945bd8deadSopenharmony_ci ES3_compatibility spec. 7955bd8deadSopenharmony_ci 6 04/13/2012 Jon Leech Add RGB565 to required texture & renderbuffer 7965bd8deadSopenharmony_ci formats and to the table of sized internal 7975bd8deadSopenharmony_ci formats (Bug 8530). 7985bd8deadSopenharmony_ci 5 08/04/2010 Jon Leech Add SHADER_BINARY_FORMATS to new tokens 7995bd8deadSopenharmony_ci section. 8005bd8deadSopenharmony_ci 4 05/26/2010 Jon Leech Add missing tokens, make language more 8015bd8deadSopenharmony_ci consistent with GL core spec in some places, 8025bd8deadSopenharmony_ci and reflow paragraphs. 8035bd8deadSopenharmony_ci 3 05/21/2010 groth limit features to the minimum for portability 8045bd8deadSopenharmony_ci purge VertexAttrib*. limit shaderbinary to V&F 8055bd8deadSopenharmony_ci adjust page/section numbers and text to 4.0 8065bd8deadSopenharmony_ci 2 05/19/2010 groth respond to bmerry's feedback 8075bd8deadSopenharmony_ci 1 12/28/2009 jbolz Internal revisions. 808