New tokens for use by GetActiveUniform() and GetActiveUniformsiv() Table 2.10 adds the following tokens: SAMPLER_BUFFER, INT_SAMPLER_BUFFER, INT_SAMPLER_2D_RECT, UNSIGNED_INT_SAMPLER_BUFFER, and UNSIGNED_INT_SAMPLER_2D_RECT Uniforms in a named uniform block may not be modified using the Uniform* commands. (Previously the spec said they may be modified, however this was likely a typographical error). Tested by tests/spec/glsl-1.50/execution/vs-named-block-no-modify.c. Though is not explicitly stated, it appears that primitive restart should *not* restart the gl_VertexID index. An undetected attempt to read data from a mapped buffer object has undefined results, and may result in GL interruption or termination. Most, but not all GL commands will detect attempts to read data from a mapped buffer object. (Previously all commands did so.) For type FLOAT_32_UNSIGNED_INT_24_8_REV, "data" must be evenly divisible by 4. Commands such as TexParameter(), TexImage(), BindTexture(), and queries of all such state no longercheck the texture image unit number against MAX_COMBINED_TEXTURE_IMAGE_UNITS. Verbiage related to fragment color clamping is removed. There's nothing to test here. SRGB conversion is no longer switched off by disabling FRAMEBUFFER_SRGB. It now happens whenever FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING is SRGB. Passing the constants FRONT, BACK, LEFT, RIGHT, or FRONT_AND_BACK to DrawBuffers() results in INVALID_ENUM. (Previously, it resulted in INVALID_OPERATION). Clear() may now be passed a bitfield of zero, causing no buffers to be cleared. Blit operations: format conversion rules are cleaned up so that the only conversion that is possible is between floating and fixed point (the 3.1 spec seems buggy, so this is likely a clarification rather than a deliberate change in functionality). Rendering commands and commands that read the framebuffer will generate INVALID_FRAMEBUFFER_OPERATION if called while the framebuffer is not framebuffer complete, *even* if no fragments are read/written to the framebuffer (for example, RASTERIZER_DISCARD does not prevent INVALID_FRAMEBUFFER_OPERATION). (This is likely a clarification rather than an explicit change in functionality). Texture state queries no longer result in INVALID_OPERATION error if the value of ACTIVE_TEXTURE is greater than or equal to MAX_COMBINED_TEXTURE_IMAGE_UNITS. In implementation dependent aggregate shader limits (table 6.44), MAX_VARYING_COMPONENTS is reduced from 64 to 60. In implementation dependent version and extension support (table 6.40), MAJOR_VERSION now has a minimum value of 3 (presumably it's just an oversight that this wasn't included in OpenGL 3.1). In program object state (table 6.30), UNIFORM_BUFFER_START and UNIFORM_BUFFER_SIZE are added. In vertex array object state (table 6.4), VERTEX_ATTRIB_ARRAY_SIZE now has type "16 * xZ5" (previously was "16 * xZ") The requirement that "polygon shading is completed before polygon mode is interpreted" is dropped. Renderbuffer objects are added to the list of objects that can be shared between contexts. When a buffer, texture, or renderbuffer object is deleted, bind points in other contexts are not affected. Names remain valid until the underlying object can be deleted because it is no longer in use. However, names are immediately marked unused at the time of deletion, so they may be returned by future Gen* commands even if the name is still in use (this appears to be a clarification, not a change in behaviour). Wide lines are deprecated Only the output variables that are read by the subsequent pipeline stage need to be written; it is allowed to have superfluous declarations of output variables. Layout declarations can only be made at global scope. Layout qualifiers can appear with an individual variable declared with an interface qualifier (i.e. a single "in", "out", or "uniform" variable outside of any interface block). Order is not important within a layout-qualifier-id-list (with certain exceptions). The tokens in a layout-qualifier-id-list are identifiers, not keywords. The tokens in a layout-qualifier-id-list are not case-sensitive (with certain exceptions). Vertex shaders have no input layout qualifiers. Fragment shaders cannot have output layout qualifiers. Vertex shaders cannot have output layout qualifiers. No statements are allowed in a switch statement before the first case statement. It is now an error for the set of shaders forming a program to statically read or write both gl_ClipVertex and gl_ClipDistance (previously, it was only an error for a *shader*, not the set of shaders forming a program, and it was only an error to statically *write* to both, not to read). The minimum value allowed for gl_MaxCombinedTextureImageUnits has been increased from 16 to 48. The minimum value allowed for gl_MaxVaryingFloats and gl_MaxVaryingComponents has been reduced from 64 to 60. The minimum value allowed for gl_MaxTextureUnits has been reduced from 16 to 2. gl_MaxTextureCoords (min: 8) is added. gl_MaxTextureUnits is now only available in the compatibility profile (previously it was always available). In the compatibility profile, the GL can provide fixed functionality behavior for any programmable pipeline stage. This is not allowed in the core profile. The function determinant() is added. Rule "INVARIANT IDENTIFIER" for "single_declaration" is no longer vertex only. Tested by tests/spec/glsl-1.50/{execution,linker}/invariant-qualifier-everywhere*.shader_test Texture border size ("bs") is replaced with 0 in the texel fetch equations. Reference to TEXTURE_BORDER is dropped from the list of requirements in order to guarantee that a call to CompressedTexSubImage1D, CompressedTexSubImage2D, CompressedTexSubImage3D will not result in an INVALID_OPERATION error. Reference to border/TEXTURE_BORDER is dropped from the list of values which must match in order to guarantee that a call to CompressedTexImage1D, CompressedTexImage2D, or CompressedTexImage3D will not result in an INVALID_OPERATION error. TEXTURE_BORDER queries are removed. Need to test that glGetTexLevelParameterfv() generates an error if TEXTURE_BORDER queried. Tested by spec/gl-3.2/texture-border-deprecated.c When a *BaseVertex drawing command is used, the primitive restart comparison occurs before the basevertex offset is added. DrawElementsBaseVertex() is added. DrawElementsInstancedBaseVertex() is added. DrawRangeElementsBaseVertex() is added. For DrawRangeElementsBaseVertex, index values are compared to start and end values prior to adding basevertex. MultiDrawElementsBaseVertex() is added. When the *BaseVertex drawing commands are used with an indices buffer having <32-bit width, the addition of a basevertex should occur as though upconverted to 32-bit. When the *BaseVertex drawing commands are used, basevertex is implicitly added to each index in the indices buffer. When the *BaseVertex drawing commands are used, the operation is undefined if adding the offset would cause a negative index. The specification of gl_FragCoord is expanded to account for pixel-center and origin conventions. All redeclarations of gl_FragCoord must use the same set of qualifiers. Fragment shaders can have an input layout only for redeclaring gl_FragCoord. If gl_FragCoord is redeclared in any fragment shader compilation unit, it must be redeclared in all fragment shader compilation units that have a static use of gl_FragCoord. Redeclaring gl_FragCoord does not affect rasterization, transformation, or any other part of the OpenGL pipeline or language features. Redeclaring gl_FragCoord in any shader other than a fragment shader is illegal. The layout qualifier identifiers for gl_FragCoord are "origin_upper_left" and "pixel_center_integer". Within a fragment shader compilation unit, the first redeclartion of gl_FragCoord (if any) must appear before the first use of gl_FragCoord. gl_FragCoord may be redeclared as "layout(origin_upper_left) in vec4 gl_FragCoord;", causing (0.5, 0.5) to be used for the upper left pixel of the window. gl_FragCoord may be redeclared as "layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;", causing (0.0, 0.0) to be used for the upper left pixel of the window. gl_FragCoord may be redeclared as "layout(pixel_center_integer) in vec4 gl_FragCoord;", causing (0.0, 0.0) to be used for the lower left pixel of the window. gl_FragCoord may be redeclared in a way that changes nothing (i.e. "in vec4 gl_FragCoord;"), causing (0.5, 0.5) to be used for the lower left pixel of the window. Linking will now fail if a geometry shader fails to specify input primitive type, output primitive type, or maximum output vertex count. Tested by piglit/tests/spec/glsl-1.50/linker/gs-must-specify-*.shader_test. Linking will now fail if input primitive type, output primitive type, or maximum output vertex count is specified differently in multiple geometry shader objects. Tested by piglit/tests/spec/glsl-1.50/linker/gs-different-*.shader_test and piglit/tests/spec/glsl-1.50/linker/gs-input-sizing-conflicting-input-layouts.shader_test. Linking will now fail if there is a geometry shader but no vertex shader. Tested by piglit/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test. GetActiveUniformBlockiv() now accepts a pname of UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER. Tested by spec/arb_uniform_buffer_object/referenced-by-shader.c GetIntegerv() now accepts MAX_GEOMETRY_UNIFORM_BLOCKS. Tested by piglit/tests/spec/gl-3.2/minmax.c MAX_VARYING_COMPONENTS now only applies when linking a program containing only a vertex and fragment shader. The maximum number of components of varying and special variables that can be written by the vertex shader is MAX_VERTEX_OUTPUT_COMPONENTS. When a geometry shader is active, transform feedback records geometry shader outputs. Tested by piglit/tests/spec/ext_transform_feedback/geometry-shaders-basic.c Geometry shaders handle incomplete textures in the same way as vertex shaders. If a geometry shader is active, vertices processed by the vertex shader are passed to the geometry shader. Tested by piglit/tests/spec/ext_transform_feedback/geometry-shaders-basic.c Shader-only texturing is now available to geometry shaders. The constant MAX_GEOMETRY_TEXTURE_UNITS is added. Tested by piglit/tests/spec/gl-3.2/minmax.c. The geometry shader pipeline stage is after primitive assembly, prior to transform feedback. Tested by piglit/tests/spec/ext_transform_feedback/geometry-shaders-basic.c Geometry shaders with input type "lines" may only be used with the GL_LINES, GL_LINE_STRIP, and GL_LINE_LOOP primitive types. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c Geometry shaders with input type "lines_adjacency" may only be used with the GL_LINES_ADJACENCY and GL_LINE_STRIP_ADJACENCY primitive types. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c Geometry shaders with input type "points" may only be used with the GL_POINTS primitive type. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c Geometry shaders with input type "triangles" may only be used with the GL_TRIANGLES, GL_TRIANGLE_STRIP, and GL_TRIANGLE_FAN primitive types. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c Geometry shaders with input type "triangles_adjacency" may only be used with the GL_TRIANGLES_ADJACENCY and GL_TRIANGLE_STRIP_ADJACENCY primitive types. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c It is a link error if multiple geometry shader objects specify different input primitive types. Tested by piglit/tests/spec/glsl-1.50/linker/gs-input-sizing-conflicting-input-layouts.shader_test It is a link error if no geometry shader object specifies an input primitive type. Tested by piglit/tests/spec/glsl-1.50/linker/gs-input-sizing-no-input-layout-declared.shader_test The input primitive type may be queried using GetProgramiv(GEOMETRY_INPUT_TYPE). Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c If the number of vertices emitted by the geometry shader is not sufficient to produce a single primitive, nothing is drawn. Tested by tests/spec/glsl-1.50/execution/geometry/gs-emits-too-few-verts.c The maximum number of output vertices can be queried using GetProgramiv(GEOMETRY_VERTICES_OUT). Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c The output primitve type can be queried using GetProgramiv(GEOMETRY_OUTPUT_TYPE) Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c MAX_GEOMETRY_UNIFORM_COMPONENTS is added. Tested by piglit/tests/spec/gl-3.2/minmax.c. For triangles drawn in point or line mode, gl_PrimitiveIDIn is incremented only once per triangle, even though multiple points/lines may eventually be drawn. GEOMTERY_VERTICES_OUT may not exceed MAX_GEOMETRY_OUTPUT_VERTICES. If a drawing operation is performed while a geometry shader is active, and the primitive mode is incompatible with the geometry shader's input primitive type, INVALID_OPERATION will result and nothing will be drawn. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c If a geometry shader outputs more than its declared maximum number of output vertices, then the emitted vertices *may* have no effect. Not necessary to test since it is undefined whether the emitted vertex have any effect. MAX_GEOMETRY_INPUT_COMPONENTS is added. Tested by piglit/tests/spec/gl-3.2/minmax.c. MAX_GEOMETRY_OUTPUT_COMPONENTS is added. Tested by piglit/tests/spec/gl-3.2/minmax.c. Restarting a primitive topology using the primitive restart index has no effect on the primitive ID counter. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c The product of the total number of vertices and the sum of all components of all active varying variables may not exceed MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS. Writing to gl_Position from either the vertex or geometry shader is optional. Tested by: tests/spec/glsl-1.50/execution/geometry-basic.shader_test tests/spec/glsl-1.50/execution/geometry/primitive-types.c gl_in[] receives values from built-in output variables written by the vertex shader. For the purpose of error checking the primitiveMode parameter of BeginTransformFeedback(), if a geometry shader is present, its output primitive type is used instead of the mode parameter passed to drawing commands. Transform feedback occurs after geometry shading. Tested by piglit/tests/spec/ext_transform_feedback/geometry-shaders-basic.c If a geometry shader is active, PRIMITIVES_GENERATED counts the number of primitives it emits. Tested by piglit/tests/spec/ext_transform_feedback/geometry-shaders-basic.c Table 2.12 describes the behaviour of the provoking vertex for all primitive types, including the new "adjacency" types. Geometry shading is added to the pipeline. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test "Line Strips with Adjacency" is added. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c "Lines with Adjacency" is added. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c "Triangle Strips with Adjacency" is added. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c "Triangles with Adjacency" is added. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Line Strips with Adjacency" mode, if the number of vertices is less than 4, all vertices are ignored. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Line Strips with Adjacency" mode, if there is no geometry shader, adjacent vertices are ignored. In "Line Strips with Adjacency" mode, line segments are drawn between vertex i+2 and i+3 (i counts from 0 to n-1, vertices count from 1 to n+3). Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Lines with Adjacency" mode, if the number of vertices is 4n+k and k != 0, the final k vertices are ignored. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Lines with Adjacency" mode, if there is no geometry shader, adjacent vertices are ignored. In "Lines with Adjacency" mode, line segments are drawn between vertex 4*i+2 and 4*i+3 (i counts from 0 to n-1, vertices count from 1 to 4n+k). Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Triangle Strips with Adjacency" mode, if the number of vertices is 2(n+2)+k and k == 1, the final vertex is ignored. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Triangle Strips with Adjacency" mode, if there is no geometry shader, adjacent vertices are ignored. In "Triangle Strips with Adjacency" mode, n triangles are drawn when there are 2(n+2)+k vertices (the exact set of triangles drawn is specified in table 2.4). Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Triangles with Adjacency" mode, if the number of vertices is 6n+k and k != 0, the final k verties are ignored. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c In "Triangles with Adjacency" mode, if there is no geometry shader, adjacent vertices are ignored. In "Triangles with Adjacency" mode, triangles are drawn using vertex 6*i+1, 6*i+3, and 6*i+5 (i counts from 0 to n-1, vertices count from 1 to 6n+k). Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-types.c VERTEX_PROGRAM_POINT_SIZE has been changed to PROGRAM_POINT_SIZE. Piglit N/A because the enum value is the same. If a geometry shader is active, gl_PrimitiveID contains the value emitted by the geometry shader for the provoking vertex. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-out.shader_test MAX_FRAGMENT_INPUT_COMPONENTS is added. Tested by piglit/tests/spec/gl-3.2/minmax.c. GetProgramiv() generates an INVALID_OPERATION error if it is passed GEOMETRY_VERTICES_OUT, GEOMETRY_INPUT_TYPE, or GEOMETRY_OUTPUT_TYPE for a program which has not been linked successfully or which does not contain a geometry shader. Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c GetProgramiv() may now be passed GEOMETRY_INPUT_TYPE. Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c GetProgramiv() may now be passed GEOMETRY_OUTPUT_TYPE. Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c GetProgramiv() may now be passed GEOMETRY_VERTICES_OUT. Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c GetShaderiv() may now return GEOMETRY_SHADER if pname is SHADER_TYPE. Tested by tests/spec/glsl-1.50/execution/geometry/getshaderiv-may-return-GS.c Implementation dependent geometry shader limits (table 6.42) is new. Tested by piglit/tests/spec/gl-3.2/minmax.c. In implementation dependent aggregate shader limits (table 6.44), MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS is added. In implementation dependent aggregate shader limits (table 6.44), MAX_COMBINED_TEXTURE_IMAGE_UNITS has increased from 32 to 48. Tested by piglit/tests/spec/gl-3.2/minmax.c. In implementation dependent aggregate shader limits (table 6.44), MAX_COMBINED_UNIFORM_BLOCKS has increased from 24 to 36. Tested by piglit/tests/spec/gl-3.2/minmax.c. In implementation dependent aggregate shader limits (table 6.44), MAX_UNIFORM_BUFFER_BINDINGS has increased from 24 to 36. Tested by piglit/tests/spec/gl-3.2/minmax.c. In implementation dependent fragment processing limits (table 6.43), MAX_FRAGMENT_INPUT_COMPONENTS is new. Tested by piglit/tests/spec/gl-3.2/minmax.c. In implementation dependent vertex shader limits (table 6.41), MAX_VERTEX_OUTPUT_COMPONENTS is new. Tested by piglit/tests/spec/gl-3.2/minmax.c. In program object state (table 6.29), GEOMETRY_VERTICES_OUT, GEOMETRY_INPUT_TYPE, and GEOMETRY_OUTPUT_TYPE are added. Tested by tests/spec/glsl-1.50/execution/geometry/query-gs-prim-types.c In program object state (table 6.32), VERTEX_PROGRAM_POINT_SIZE changes to PROGRAM_POINT_SIZE. Piglit N/A because the enum value is the same. In shader object state (table 6.25), SHADER_TYPE is now Z3 (previously was Z2). In texture environment and generation (table 6.17), ACTIVE_TEXTURE is now Z48* (previously was Z32*). In textures (table 6.13-6.14), TEXTURE_BINDING_xD, TEXTURE_BINDING_1D_ARRAY, TEXTURE_BINDING_2D_ARRAY, TEXTURE_BINDING_RECTANGLE, TEXTURE_BINDING_BUFFER, and TEXTURE_BINDING_CUBE_MAP are now replicated by 48 instead of 32. Note: MAX_FRAGMENT_INPUT_COMPONENTS is 128 (double the old value of MAX_VARYING_COMPONENTS). Tested by piglit/tests/spec/gl-3.2/minmax.c Note: MAX_GEOMETRY_OUTPUT_COMPONENTS is 128 (double the old value of MAX_VARYING_COMPONENTS). Tested by piglit/tests/spec/gl-3.2/minmax.c MAX_VARYING_COMPONENTS and MAX_VARYING_FLOATS are deprecated Geometry shaders are added. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test Vertex shaders no longer need to compute the homogeneous position of the incoming vertex. The qualifiers "smooth", "flat", and "noperspective" are no longer limited just to vertex shader outs and fragment shader ins. They can appear on geometry shader ins and geometry shader outs. Tested by: spec/glsl-1.50/compiler/gs-also-uses-smooth-flat-noperspective.geom spec/glsl-1.50/execution/gs-also-uses-smooth-flat-noperspective.shader_test Each geometry shader input (or input block) needs to be declared as an array. Tested by piglit/tests/spec/glsl-1.50/compiler/gs-input-nonarray*.geom Each geometry shader input array can optionally have a size declared. Tested by: piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-length-after-other-size-blocks.geom piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-length-after-other-size.geom For the vertex/geometry interface, if the vertex output is an array, it must appear in an output block (2D arrays are not supported). Tested by: spec/glsl-1.50/execution/vs-gs-arrays-within-blocks-pass.shader_test spec/glsl-1.50/execution/vs-gs-arrays-fail.shader_test For the vertex/geometry interface, variables of the same name must match in type and qualification (except that geometry variable must be an array, and vertex variable must not). Tested by spec/glsl-1.50/execution/vs-gs-varyings-match-types.shader_test Geometry shader inputs receive values from vertex outputs. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test If a geometry shader input array does not have a size provided, the array size will be set by the input layout declaration(s) establishing the type of input primitive. Tested by piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-*.geom If a geometry shader input array has a size provided, it must be consistent with the input layout declaration(s) establishing the type of input primitive. Tested by piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-*.geom If a program contains vertex and fragment shaders but no geometry shader, then there is a vertex/fragment interface (as in GLSL 1.40). Not necessary to test since this is what happens prior to GLSL 1.50. Integral fragment shader inputs must be qualified with "flat". Tested by spec/glsl-1.30/compiler/interpolation-qualifiers/nonflat-int.frag and related. Integral vertex shader outputs need no longer be qualified with "flat". Tested by spec/glsl-1.30/compiler/interpolation-qualifiers/vs-flat-int-05.vert and related. Layout qualifiers can appear with just an interface qualifier ("in", "out", or "uniform"). Implicitly tested by the piglit tests that exercise the individual layout qualifiers. All geometry shader input unsized array declarations will be sized by an *earlier* input layout qualifier (when present) according to: points=1, lines=2, lines_adjacency=4, triangles=3, triangles_adjacency=6. Tested by piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-*.geom All input layouts specified in geometry shader compilation units must declare the same layout. Tested by: piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-layout-consistent-with-prev-layout.geom piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-layout-inconsistent-with-prev-layout.geom piglit/tests/spec/glsl-1.50/linker/gs-input-sizing-conflicting-input-layouts.shader_test At least one compilation unit in a geometry shader must declare an input layout. Tested by piglit/tests/spec/glsl-1.50/linker/gs-input-sizing-no-input-layout-declared.shader_test For geometry shader inputs declared without an array size (including gl_in), a layout must be declared before any array use requiring the size be known (e.g. use of the length() method). Partially tested by: piglit/tests/spec/glsl-1.50/compiler/gs-input-sizing-*.geom Tests for gl_in still need to be written. Geometry shaders allow input layout qualifiers *only* on the interface qualifier "in" (i.e. "layout(...) in;"). Tested by spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c If a geometry shader input is declared with an array size, it must match the length implied by the geometry shader input layout. Tested by tests/spec/glsl-1.50/compiler/gs-input-sizing-*.geom It is a link-time error if not all geometry shader input sizes match (including both declared array sizes and the length implied by the geometry shader input layout). Tested by: piglit/tests/spec/glsl-1.50/execution/gs-input-sizing-layout-consistent-with-static-usage.shader_test piglit/tests/spec/glsl-1.50/execution/gs-input-sizing-layout-larger-than-static-usage.shader_test piglit/tests/spec/glsl-1.50/linker/gs-input-sizing-layout-*.shader_test Not all geometry shader compilation units need to declare an input layout. Tested by tests/spec/glsl-1.50/linker/gs-input-sizing-layout-*.shader_test Only one layout qualifier identifier may appear for geometry shader inputs. Tested by spec/glsl-1.50/compiler/layout-in-only-one-qualifier-id.geom The intrinsically declared geometry shader input array gl_in[] will be sized by any input layout declaration. The layout qualifier identifiers for geometry shader inputs are "points", "lines", "lines_adjacency", "triangles", and "triangles_adjacency". Tested by piglit/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c All geometry shader output layout declarations in a program must declare the same layout and the same value for max_vertices. Tested by: spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-prim-type.geom Geometry shaders can have output layout qualifiers *only* on the interface qualifier "out" (i.e. "layout(...) out;"). Tested by spec/glsl-1.50/execution/geometry/gs-output-layout-qualifiers.c If one declaration declares both primitive type and max_vertices, order is irrelevant. Tested by spec/glsl-1.50/compiler/layout-out-order-irrelevant.geom It is an error if max_vertices is declared to be a value greater than gl_MaxGeometryOutputVertices. Tested by spec/glsl-1.50/compiler/layout-max-verts-limited.geom Not all geometry shader compilation units need to declare an output layout declaration. Implicitly covered by tests piglit/tests/spec/glsl-1.50/execution/gs-input-sizing-*. One declaration can declare either a primitive type (points, line_strip, or triangle_strip), or max_vertices, or both. tested by other layout tests The geometry shader output layout qualifier "max_vertices = <integer-constant>" is used to declare the maximum number of vertices the shader will ever emit in a single execution. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test The geometry shader output layout qualifiers of "points", "line_strip", or "triangle_strip" are used to declare the primitive type used for geometry shader output. Tested by spec/glsl-1.50/execution/geometry/gs-output-layout-qualifiers.c The variables gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, and gl_BackSecondaryColor can now be redeclared in geometry shaders (previously they were only allowed to be redeclared in vertex shaders). Not necessary to test since this only affects compatibility profiles. The default precision qualifiers that were previously predeclared for vertex shaders now apply to geometry shaders as well. The built-in macro GL_FRAGMENT_PRECISION_HIGH, which was previously defined to 1 in vertex and fragment shaders, is now available in geometry shaders as well. Fragment shaders will select the value of gl_PrimitiveID that is written by the geometry shader for the provoking vertex. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-out.shader_test Geometry shaders also contain the special input variable "in int gl_PrimitiveIDIn", which is filled with the number of primitives processed by the geometry shader since the current set of rendering primitives was started. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-in.shader_test Geometry shaders also contain the special output variable "out int gl_PrimitiveID", which is communicated to fragment shaders. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-out.shader_test If a geometry shader fails to write to gl_PrimitiveID, the value of gl_PrimitiveID within the fragment shader is undefined. Not necessary to test since the value is undefined. If the geometry shader does not write gl_Position before its first call to EmitVertex(), or between calls to EmitVertex(), its value is undefined. Not necessary to test since the value is undefined. If the vertex shader does not write gl_Position, its value is undefined. Not necessary to test since the value is undefined. The gl_PerVertex interface block also appears as a geometry shader input interface block, having block-name gl_PerVertex, instance_name gl_in, and an implicit array size. The gl_PerVertex interface block also appears as a geometry shader output interface block, declared identically to the gl_PerVertex vertex shader output interface block. gl_ClipVertex is also added to the gl_PerVertex output and input interface blocks in the geometry shader. Not necessary to test since this only affects compatibility profiles. If a geometry shader is present, the value in gl_PrimitiveID comes from the geometry shader's gl_PrimitiveID output. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-out.shader_test If no geometry shader is present, the value in gl_PrimitiveID is the number of primitives processed by the vertex shader since the current set of rendering primitives was started. The built-in input variable "in int gl_PrimitiveID" is added. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/primitive-id-out.shader_test gl_ClipDistance must be sized either implicitly or explicitly to the same size in all shaders (previously the size needed to match between vertex and fragment shaders). The built-in constants in this section are also provided to geometry shaders (previously they were available only to vertex and fragment shaders). Tested by piglit/tests/spec/glsl-1.50/compiler/constants.geom gl_MaxFragmentInputComponents (min: 128) is added. gl_MaxGeometryInputComponents (min: 64) is added. gl_MaxGeometryOutputComponents (min: 128) is added. gl_MaxGeometryOutputVertices (min: 256) is added. gl_MaxGeometryTextureImageUnits (min: 16) is added. gl_MaxGeometryTotalOutputComponents (min: 1024) is added. gl_MaxGeometryUniformComponents (min: 1024) is added. gl_MaxGeometryVaryingComponents (min: 64) is added. gl_MaxVertexOutputComponents (min: 64) is added. These variables are also added to the gl_PerVertex output and input interface blocks in the geometry shader (in the compatibility profile only). Not necessary to test since this only affects compatibility profiles. EmitVertex() is added. This emits the current values of output variables to the current output primitive. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test EndPrimitive() is added. This completes the current output primitive and starts a new one, without emitting any vertices. Tested by piglit/tests/spec/glsl-1.50/execution/geometry/end-primitive.c EndPrimitive() is optional when the output layout is "points". Tested by spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c If a geometry shader calls EmitVertex() more times than it has declared with max_vertices, the results are undefined. Not necessary to test since the results are undefined. It is not necessary to call EndPrimitive() if the geometry shader writes only a single primitive. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test On return from EmitVertex(), the values of output variables are undefined. Not necessary to test since the values are undefined. When a geometry shader terminates, the current output primitive is automatically completed. Tested by piglit/tests/spec/glsl-1.50/execution/geometry-basic.shader_test Texture lookup functions are now available to geometry shaders. Adequately tested by the texelFetch tests. Noise functions are now available to geometry shaders. Tested by spec/glsl-1.50/compiler/gs-noise-functions.geom "layout_list" is renamed to "layout_qualifier_id_list", and rules are reworked so that it is a list of comma-separated layout_qualifier_id's instead of a list of comma-separated IDENTIFIER's. "layout_qualifier_id" has two rules: IDENTIFIER (to match previous behvaiour), and IDENTIFIER EQUAL INTCONSTANT. New rule for "struct_declarator": IDENTIFIER LEFT_BRACKET RIGHT_BRACKET. Implementations are now required to support both GLSL versions 1.40 and 1.50 (previously only version 1.30 was required). __VERSION__ should substitute 150. GLSL 1.40 and GLSL 1.50 shaders may be linked together. Tested by: spec/glsl-1.50/linker/versions-mingled.shader_test spec/glsl-1.50/linker/versions-mingled-multiple-shader.shader_test It is permissible for an input and an output to have the same name provided that one of them is nested inside an interface block with an instance name. Outputs can also appear in interface blocks. "Attribute" and "varying" qualifiers may not be used in interface blocks. A block-name is allowed to have different definitions in different interfaces (e.g. same block name used as both an input and an output block, I think) All input and output block arrays except geometry shader inputs must specify an array size. An output block of one pipeline stage will be matched to an input block with the same block-name (block-name is the name that appears before the "{" that opens the interface block). Arrays of built-in types or structures can be used within an interface block. Block names may not be used at global scope for anythin other than as a block name. Tested by tests/spec/glsl-1.50/compiler/interface-blocks-name-reused-globally.vert Built-in types can be used within an interface block. When accessing interface members through the API: For blocks declared as arrays, the array index must be included when accessing a member of a specific block, and must be omitted when querying a characteristic such as the offset of the member within the block. For interface blocks that are declared as arrays, in order to match, their array sizes must match (exception: between VS and GS, rules are different). Tested by: spec/glsl-1.50/linker/interface-blocks-vs-fs-array-size-mismatch.shader_test spec/glsl-1.50/linker/interface-blocks-vs-gs-array-size-mismatch.shader_test For uniform blocks, the application uses the block name to identify the block. If an interface block has an instance-name, names inside the block are in a scope with their own name space, accessed with "." (like structures). If an interface block has an instance-name, then members of the block are accessed from the OpenGL API by the *block-name*, followed by ".", followed by the name of the member. Tested by spec/glsl-1.50/execution/interface-blocks-api-access-members.c If an interface block has no instance-name (the optional name that appears after the "}") the names inside the block are scoped at the global level for purposes of access from within the shader. covered by other tests If an interface block has no instance-name, then members of the block are accessed from the OpenGL API by their bare name. Tested by spec/glsl-1.50/execution/interface-blocks-api-access-members.c In order for interface blocks to match, their contents must be in identical order. In order for interface blocks to match, their contents must contain identical types, names, and member-wise layout qualification. Indices used to index a uniform block array must be integral constant expressions. Input variables may only appear in input blocks. Input, output, and uniform variable declarations can be grouped into named interface blocks. Interface blocks can have an optional instance name (used to refer to them within the shader). Interpolation and storage qualifiers may appear within an interface block. It is illegal to have an input block in a vertex shader. It is illegal to have an output block in a fragment shader. Output blocks in one stage are matched up to input blocks in the subsequent stage. Output variables may only appear in output blocks. Previously declared structures can be used within an interface block. Repeating the "in", "out", or "uniform" interface qualifier for a member within a block is optional. Structure definitions cannot be nested inside an interface block. Uniform block array declarations must specify an array size. Uniform variables may only appear in uniform blocks. Within interface blocks, initializers are not allowed. Tested by spec/glsl-1.50/compiler/interface-blocks-no-initializer-within-block.vert Within interface blocks, sampler types are not allowed. Tested by spec/glsl-1.50/compiler/interface-blocks-no-sampler-type-within-block.vert Layout qualifiers can appear as part of an interface block definition. Layout qualifiers can appear as part of an interface block member. Input or output instance names on blocks are not used when redeclaring built-in variables. So for example, when gl_FrontColor is redeclared as an input to the geometry shader, it is redeclared as e.g. "flat in vec4 gl_FrontColor". No "gl_in[]" is used. The output variables gl_Position, gl_PointSize, and gl_ClipDistance are now considered to be nested within an interface block having block-name gl_PerVertex and no instance-name. The vertex shader output variable gl_ClipVertex is now considered to be nested within the gl_PerVertex output interface block. Redeclaration of gl_TexCoord is done at global scope, not in an interface block. The variables gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, gl_BackSecondaryColor, gl_TexCoord[], and gl_FogFragCoord are now considered to be nested within the gl_PerVertex output interface block (in the compatibility profile only). New rule for "declaration": type_qualifier IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET RIGHT_BRACKET SEMICOLON New rule for "declaration": type_qualifier IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET SEMICOLON New rule for "declaration": type_qualifier IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE IDENTIFIER SEMICOLON Layered rendering requires the use of framebuffer objects. Through layered rendering, geometry shaders may render primitives to arbitrary layers of a cube-map texture, 3D texture, or 1D or 2D texture array. Tested by spec/gl-3.2/layered-rendering/gl-layer-render.c Blit operations: If both read and draw framebuffers are layered, the blit operation is still performed only on layer zero. Tested by piglit/tests/spec/gl-3.2/layered-rendering/blit.c Blit operations: If the draw framebuffer is layered, pixel values are written to layer zero. Tested by piglit/tests/spec/gl-3.2/layered-rendering/blit.c Blit operations: If the read framebuffer is layered, pixel values are read from layer zero. Tested by piglit/tests/spec/gl-3.2/layered-rendering/blit.c If the number of layers of each attachment are not all identical, rendering will be limited to the smallest number of layers of any attachment. FRAMEBUFFER_ATTACHMENT_LAYERED is set to TRUE if FramebufferTexture is called and texture is the name of a three-dimensional, cube map, two-dimensional multisample array, or one- or two-dimensional array texture. Otherwise it is set to FALSE. Tested by spec/gl-3.2/layered-rendering/framebuffer-layered-attachments.c FramebufferTexture() generates INVALID_OPERATION for buffer textures. Tested by piglit/tests/spec/gl-3.2/layered-rendering/framebuffertexture-buffer-textures.c FramebufferTexture() is added. Tested by spec/gl-3.2/layered-rendering/framebuffertexture.c If FramebufferTexture() is supplied a three-dimensional texture, cube map texture, one- or two-dimensional array texture, or two-dimensional multisample array texture, the entire texture level is attached as a layered framebuffer attachment. Tested by spec/gl-3.2/layered-rendering/framebuffertexture.c If a texture of zero is passed to any FramebufferTexture* function, additional parameters (level, textarget, and/or layer) are ignored, and state values are set to their default values. Tested by spec/gl-3.2/layered-rendering/framebuffertexture-defaults.c The set of framebuffer-attachable images is clarified. I *think* the only thing that's new is the ability to attach an entire level of a three-dimensional texture, cube map texture, or one- or two-dimensional array texture, creating a layered attachment point. Tested by spec/gl-3.2/layered-rendering/framebuffer-layered-attachments.c If any framebuffer attachment is layered, all popelated color attachments must be from textures of the same target (FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS). Tested by spec/gl-3.2/layered-rendering/framebuffer-layer-complete.c If any framebuffer attachment is layered, all popuated attachments must be layered (FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS). Tested by spec/gl-3.2/layered-rendering/framebuffer-layer-complete.c A framebuffer is layered if it is complete and all of its populated attachments are layered. Tested by spec/gl-3.2/layered-rendering/framebuffer-layered-attachments.c A layer number written by a geometry shader has no effect if the framebuffer is not layered. Tested by spec/gl-3.2/layered-rendering/gl-layer-not-layered.c Clear() clears all layers. Tested by: spec/gl-3.2/layered-rendering/clear-color.c spec/gl-3.2/layered-rendering/clear-depth.c ClearBuffer() clears all layers. Tested by: spec/gl-3.2/layered-rendering/clear-color.c spec/gl-3.2/layered-rendering/clear-depth.c Commands such as ReadPixels() always read from layer zero. Tested by piglit/tests/spec/gl-3.2/layered-rendering/readpixels.c If a layer number is out of range (negative or greater than the number of layers of any attachment), the effect is undefined. If there is a geometry shader and it statically assigns to gl_Layer, then all fragments are assigned a layer based on this value. Tested by spec/gl-3.2/layered-rendering/gl-layer-render.c Table 4.12 establishes a mapping between layer number and cube map face. Tested by spec/gl-3.2/layered-rendering/gl-layer-cube-map.c The layer number selects an image for use by stencil test, depth buffer test, blending, and color buffer writes. The vertex used to determine the layer is implementation-dependent. When the current geometry shader does not statically assign a value to gl_Layer, all fragments are assigned a layer of zero. Tested by spec/gl-3.2/layered-rendering/gl-layer.c When there is no geometry shader, all fragments are assigned layer of zero. Tested by spec/gl-3.2/layered-rendering/gl-layer.c GetFramebufferAttachmentParameteriv() may now be passed FRAMEBUFFER_ATTACHMENT_LAYERED. Tested by spec/gl-3.2/layered-rendering/framebuffer-layered-attachments.c In framebuffer (table 6.23), FRAMEBUFFER_ATTACHMENT_LAYERED is added. Tested by spec/gl-3.2/layered-rendering/framebuffer-layered-attachments.c Geometry shaders also contain the special output variable "out int gl_Layer". Tested by spec/gl-3.2/layered-rendering/gl-layer-render.c If a geometry shader statically assigns a value to gl_Layer in some execution paths but not others, then layered rendering mode is still enabled, and gl_Layer is undefined in those execution paths where no value was assigned. If a geometry shader statically assigns a value to gl_Layer, layered rendering mode is enabled. Tested by other piglit tests. The geometry shader output gl_Layer is used to select a layer of a multi-layer framebuffer attachment. Tested by other piglit tests. The value of gl_Layer which is used for rendering comes from one of the vertices of the primitive being shaded; which vertex it comes from is undefined. Flatshading is added to the list of operations applied to vertices processed by the vertex shader. Transform feedback occurs before flatshading. Flatshading selects the varying output corresponding to the provoking vertex of the primitive. The initial value of the provoking vertex mode is LAST_VERTEX_CONVENTION. The provoking vertex is controlled by the ProvokingVertex() command. In coloring (table 6.9), PROVOKING_VERTEX is added. In implementation dependent values (table 6.45), QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION is new. Note that the spec refers to QUADS_FOLLOW_PROVOKING_VERTEX (without the "_CONVENTION") but that's a spec bug. See https://cvs.khronos.org/bugzilla/show_bug.cgi?id=8432. Fragment shader inputs may be structures. Vertex and geometry shader outputs may be structures. The "GL Data Types" table is expanded to include "sync". DeleteSync() deletes sync objects. Tested by spec/arb_sync/DeleteSync.c DeleteSync() does not block on a sync object that is not yet SIGNALED. DeleteSync() generates INVALID_VALUE if the supplied sync parameter is neither zero nor the name of a sync object. Tested by spec/arb_sync/DeleteSync.c DeleteSync() may be called on a sync object that currently has ClientWaitSync() or WaitSync() commands blocking on it. DeleteSync() siglently ignores sync values of zero. Tested by spec/arb_sync/DeleteSync.c FenceSync() creates a new fence sync object, inserts a fence command in the GL command stream, and associates it with the sync object. Sync objects are initially UNSIGNALED. Tested by spec/arb_sync/sync-initialize.c Sync objects have a SYNC_CONDITION property which is the condition passed to FenceSync(). Tested by spec/arb_sync/sync-initialize.c Sync objects have a SYNC_FLAGS property which is the flags value passed to FenceSync(). Tested by spec/arb_sync/sync-initialize.c Sync objects have a SYNC_STATUS property with two possible states: SIGNALED and UNSIGNALED. Sync objects have an OBJECT_TYPE property which is always SYNC_FENCE. Tested by spec/arb_sync/sync-initialize.c The only condition allowed by FenceSync is SYNC_GPU_COMMANDS_COMPLETE (otherwise an INVALID_ENUM error is generated). Tested by spec/arb_sync/FenceSync.c The only flags value allowed by FenceSync is 0 (otherwise an INVALID_VALUE error is generated). Tested by spec/arb_sync/FenceSync.c When all proceeding commands from the same command stream have been fully realized on both the client and the server, the sync object becomes signaled. A single sync object can be blocked in multiple GL contexts. A single sync object can block both client and server. ClientWaitSync() blocks waiting until a sync object is signaled, or a timeout expires. ClientWaitSync() generates INVALID_VALUE if flags contains any bits other than SYNC_FLUSH_COMMANDS_BIT. Tested by spec/arb_sync/ClientWaitSync-errors.c ClientWaitSync() generates INVALID_VALUE if sync is not the name of a sync object. Tested by spec/arb_sync/ClientWaitSync-errors.c ClientWaitSync() returns ALREADY_SIGNALED if sync was already signaled. ClientWaitSync() returns CONDITION_SATISFIED if sync became signaled while the ClientWaitSync() call was in effect. ClientWaitSync() returns TIMEOUT_EXPIRED if timeout occurred before sync was signaled. ClientWaitSync() returns WAIT_FAILED without blocking if there is an error (and also generates a GL error). ClientWaitSync() will return ALREADY_SIGNALED on an already-signaled sync object even if timeout was zero. If an error occurs, WaitSync() does not block. If timeout is zero, ClientWaitSync() tests the current state of sync. The GL command stream may contain multiple WaitSync() commands on the same sync object. When sync object becomes signaled, any queued WaitSync() commands for the same object become no-ops. Timeout may be larger than requested due to implementation-dependent timeout accuracy restrictions. WaitSync() generates INVALID_VALUE if sync is not the name of a sync object. WaitSync() may only be passed a flags value of 0 (INVALID_VALUE is generated otherwise). WaitSync() may only be passed a timeout value of TIMEOUT_IGNORED (INVALID_VALUE is generated otherwise). WaitSync() returns immediately, but causes the GL server to block until sync is signaled. WaitSync() will wait no longer than MAX_SERVER_WAIT_TIMEOUT. If SYNC_FLUSH_COMMANDS_BIT was not passed to ClientWaitSync(), then ClientWaitSync() may hang forever. If SYNC_FLUSH_COMMANDS_BIT was passed to ClientWaitSync(), then it performs the equivalent of glFlush() before blocking on the sync object. If a sync object is marked for deletion while client or server is blocking on it, deletion is deferred until nothing is blocking on it. SYNC_FLUSH_COMMANDS_BIT will not help when waiting for a fence command issued in another context's command stream. If GetSynciv() is passed an invalid pname, INVALID_ENUM is generated. Tested by spec/arb_sync/GetSynciv-errors.c If sync is not the name of a sync object GetSynciv() generates INVALID_VALUE. Tested by spec/arb_sync/GetSynciv-errors.c IsSync() returns true if sync is the name of a sync object. Tested by spec/arb_sync/IsSync.c Properties of a sync object may be queried with GetSynciv(). Tested by spec/arb_sync/sync-initialize.c Sync object names immediately become invalid after calling DeleteSync(), even if the underlying sync object is still associated with a fence command or blocking a *WaitSync command. In implementation dependent values (table 6.45), MAX_SERVER_WAIT_TIMEOUT is new. Sync (table 6.35) is new. Sync objects are added to the list of objects that can be shared between contexts. Multiple GL clients and/or servers can be blocked on a single sync object. When multiple GL clients and/or servers are blocked on a single sync object, the order in which blocks are released is implementation-dependent. In addition to Finish(), FenceSync() may be used to determine when completion of a command has occurred. Table 2.10 adds new tokens for use by GetActiveUniform() and GetActiveUniformsiv(): SAMPLER_2D_MULTISAMPLE, SAMPLER_2D_MULTISAMPLE_ARRAY, INT_SAMPLER_2D_MULTISAMPLE, INT_SAMPLER_2D_MULTISAMPLE_ARRAY, UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, and UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY. Multisample texel fetches are added. Multisample texel fetches have no LOD parameter. Multisample texel fetches may only be performed on multisample texture samplers. Multisample textures support only NEAREST filtering. Sample locations can now be queried with GetMultisamplefv(). Two-dimensional multisample and two-dimensional multisample array textures are added. For rectangular and multisample textures, levelbase is always zero. Multisample textures contain a boolean indicating whether identical sample locations and the same number of samples will be used for all texels in the image. Multisample textures contain an integer identifying the number of samples in each texel. Command TexImage2DMultisample() is added. Tested by piglit/tests/spec/arb_texture_multisample/teximage-2d-multisample.c. Command TexImage3DMultisample() is added. Tested by piglit/tests/spec/arb_texture_multisample/teximage-3d-multisample.c. For TexImage2DMultisample(), target must be TEXTURE_2D_MULTISAMPLE or PROXY_TEXTURE_2D_MULTISAMPLE. Tested by piglit/tests/spec/arb_texture_multisample/teximage-2d-multisample.c. For TexImage3DMultisample(), target must be TeXTURE_2D_MULTISAMPLE_ARRAY or PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY. Tested by piglit/tests/spec/arb_texture_multisample/teximage-3d-multisample.c. If fixedsamplelocations=TRUE is provided to TexImage2DMultisample() or TexImage3DMultisample(), then the sample locations will depend on neither coordinate, internalformat, nor image size. MAX_COLOR_TEXTURE_SAMPLES is added. MAX_DEPTH_TEXTURE_SAMPLES is added. MAX_INTEGER_SAMPLES is added. If SAMPLE_MASK is enabled, the fragment coverage is ANDed with SAMPLE_MASK_VALUE. MAX_SAMPLE_MASK_WORDS specifies how many 32-bit masks SAMPLE_MASK_VALUE is separated into. SAMPLE_MASK and SAMPLE_MASK_VALUE are added. SAMPLE_MASK_VALUE is queried using GetIntegeri_v(SAMPLE_MASK_VALUE) with index set to maskNumber. SAMPLE_MASK_VALUE is separated into n 32-bit masks (to handle the possibility of >32x multisampling). SAMPLE_MASK_VALUE is specified using SampleMaski(). FramebufferTexture2D may be used to bind one layer of a TEXTURE_2D_MULTISAMPLE texture. FramebufferTextureLayer may now be used on a two-dimensional multisample array. MAX_INTEGER_SAMPLES is added to allow the implementation to signal the degree to which multisample integer renderbuffers are supported. When calling FramebufferTexture* commands with TEXTURE_2D_MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY, level must be zero. FRAMEBUFFER_INCOMPLETE_MULTISAMPLE now checks TEXTURE_FIXED_SAMPLE_LOCATIONS. FRAMEBUFFER_INCOMPLETE_MULTISAMPLE now checks both RENDERBUFFER_SAMPLES and TEXTURE_SAMPLES. Renderbuffers effectively have a TEXTURE_FIXED_SAMPLE_LOCATIONS value of TRUE for purposes of checking framebuffer completeness. GetTexLevelParameter{if}v() may now be used with TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY, PROXY_TEXTURE_2D_MULTISAMPLE, or PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY. In framebuffer dependent values (table 6.46), SAMPLE_POSITION is new. In implementation dependent values (table 6.45), MAX_SAMPLE_MASK_WORDS, MAX_COLOR_TEXTURE_SAMPLES, MAX_DEPTH_TEXTURE_SAMPLES, and MAX_INTEGER_SAMPLES are new. In multisampling (table 6.11), SAMPLE_MASK and SAMPLE_MASK_VALUE are added. In textures (table 6.14), TEXTURE_BINDING_2D_MULTISAMPLE and TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY are added. In textures (table 6.16), TEXTURE_SAMPLES and TEXTURE_FIXED_SAMPLE_LOCATIONS are added. The following keywords are added: sampler2DMS, isampler2DMS, usampler2DMS, sampler2DMSArray, isampler2DMSArray, usampler2DMSArray The following basic data types are added: sampler2DMS, sampler2DMSArray, isampler2DMS, isampler2DMSArray, usampler2DMS, usampler2DMSArray gvec4 texelFetch(gsampler2DMS sampler, ivec2 P, int sample) is added. gvec4 texelFetch(gsampler2DMSArray sampler, ivec3 P, int sample) is added. ivec2 textureSize(gsampler2DMS sampler) is added. ivec2 textureSize(gsampler2DMSArray sampler) is added. New rules for "type_specifier_nonarray": SAMPLER2DMS, ISAMPLER2DMS, USAMPLER2DMS, SAMPLER2DMSArray, ISAMPLER2DMSArray, and USAMPLER2DMSArray. The following tokens are added: SAMPLER2DMS, ISAMPLER2DMS, USAMPLER2DMS, SAMPLER2DMSArray, ISAMPLER2DMSArray, USAMPLER2DMSArray.