2014-04-15 02:08:16 +04:00
Current functionality level: ESSL 3.0, GLSL 1.5
2013-07-10 03:57:13 +04:00
2014-07-28 08:21:04 +04:00
Bugs
- implicitly-sized gl_ClipDistance[] (at least in tessellation shaders) with sizes greater than one are not getting sizes greater than one
2013-12-07 03:57:42 +04:00
+ create version system
2013-11-27 06:41:52 +04:00
2013-08-29 04:39:25 +04:00
Link Validation
2013-09-17 23:26:08 +04:00
+ provide input config file for setting limits
2014-04-22 23:06:23 +04:00
- also consider spitting out measures of complexity
2013-09-20 10:20:21 +04:00
+ ensure no static references thrown away
2013-09-26 04:45:21 +04:00
- generate static use of object even if the only use is to access the length of its array
2013-08-29 04:39:25 +04:00
Cross-stage linking
- type consistency check of uniform and ins <-> outs, both variables and blocks, stage-specific arrayness matching
- location/binding/index check
- mixed es/non-es profiles
- statically consumed input not produced by previous stage
2013-09-25 01:18:46 +04:00
- give error for sharing a packed block
2013-10-16 01:46:20 +04:00
- 1.2: matching initializers for uniforms
2013-11-05 22:07:25 +04:00
- 1.3: only statically used built-ins have to be redeclared as flat
2013-10-16 01:46:20 +04:00
- 1.5: matching between gl_PerVertex blocks and gl_PerFragment blocks
2013-08-29 04:39:25 +04:00
- 1.3: deprecated mixing fixed vertex/fragment stage with programmable fragment/vertex stage.
2013-12-18 07:06:24 +04:00
+ 4.0: tessellation primitive, vertices, spacing, order,
2013-10-16 01:46:20 +04:00
- 4.3: compute shader not combined with any other stages
2013-08-29 04:39:25 +04:00
- 4.3: remove cross-version linking restrictions.
- 4.3: Allow mismatches in interpolation and auxiliary qualification across stages.
2014-04-22 23:06:23 +04:00
- 4.4: A stage contains two different blocks, each with no instance name, where the blocks contain a member with the same name.
2013-11-05 22:07:25 +04:00
Intra-stage linking, single shader
2013-11-15 05:34:27 +04:00
+ recursion for functions
2013-11-05 22:07:25 +04:00
- limits checking:
2013-11-27 06:41:52 +04:00
+ bindings
2013-11-05 22:07:25 +04:00
- number of input/output compononents
2013-12-18 07:06:24 +04:00
+ tessellation limits
+ tessellation primitive array sizing consistency
2013-12-07 03:57:42 +04:00
+ Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords
+ Non ES: gl_ClipDistance ...
2013-11-05 22:07:25 +04:00
- ...
2013-09-25 01:18:46 +04:00
+ exactly one main
2013-11-05 22:07:25 +04:00
+ ES 3.0: fragment outputs all have locations, if more than one
2013-12-07 04:28:07 +04:00
+ location aliasing/overlap (except desktop vertex shader inputs)
2014-08-19 10:08:38 +04:00
+ binding overlap for atomic counters
2013-11-05 22:07:25 +04:00
+ Non ES: geometry shader input array sizes and input layout qualifier declaration
2013-11-21 01:12:43 +04:00
+ Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
+ Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
2013-11-15 05:34:27 +04:00
+ 1.50: match between all explicit input array sizes and input primitive
2013-11-21 02:16:41 +04:00
+ 1.50: at least one geometry shader says input primitive and at least one says output primitive...
+ 1.50: at least one geometry shader says max_vertices...
2013-11-07 05:06:34 +04:00
+ 1.50: origin_upper_left and pixel_center_integer have to match
2013-11-15 05:34:27 +04:00
- Even the potential for recursion through subroutine uniforms is an error.
2014-04-22 23:06:23 +04:00
- 4.4: An interface contains two different blocks, each with no instance name, where the blocks contain a member with the same name.
- 4.4: component aliasing (except desktop vertex shader inputs)
2013-11-15 05:34:27 +04:00
- 4.4: overlapping transform/feedback offsets, offset/stride overflow checks, and stride matching
Intra-stage linking, multiple shader (Non-ES)
+ type consistency check of uniforms, globals, ins, and outs
+ value checking of global const initializers
+ value checking of uniform initializers
+ location match
- block matching
2014-08-19 10:08:38 +04:00
+ component/binding/index/offset match check
2014-08-11 06:32:30 +04:00
+ compute shader layout(local_size_*) matching
2013-10-02 01:58:43 +04:00
+ mixed es/non-es profiles are an error
2014-08-19 10:08:38 +04:00
- binding overlap for atomic counters
2013-11-15 05:34:27 +04:00
- matching redeclarations of interface blocks
2013-11-05 22:07:25 +04:00
- 4.3: implicit array sizing is cross shader within a stage
2014-04-22 23:06:23 +04:00
- 4.4: If gl_FragCoord is redeclared in any fragment shader in a program, it must be redeclared in all the fragment shaders in that program that have a static use gl_FragCoord
2013-08-27 07:59:04 +04:00
2013-08-29 04:39:25 +04:00
Shader Functionality to Implement/Finish
2013-10-02 09:10:48 +04:00
ESSL 2.0 (#version 100)
2013-10-16 01:46:20 +04:00
+ implement non-inductive loop limitation detection
+ implement non-inductive array accesses limitation detection
2013-08-03 04:04:10 +04:00
ESSL 3.0
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
2014-08-14 00:04:19 +04:00
ESSL 3.1
+ Compute shaders
+ Shader storage buffer objects
- Arrays of arrays
+ Atomic counters
+ Images
+ Separate program objects (also known as separate shader objects)
+ Explicit uniform locations
+ Texture gather
+ Bitfield operations
+ Integer mix function
2014-08-19 10:08:38 +04:00
+ overlapping bindings/offsets and offset post increment
2014-08-14 23:45:52 +04:00
+ frexp/ldexp
+ packUnorm4x8(),packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
2014-08-15 03:30:11 +04:00
+ 2DMS samplers and images
2014-08-24 22:21:00 +04:00
+ inheritance of memory qualifiers in block members
2013-07-10 03:57:13 +04:00
GLSL 1.2
2013-10-02 09:10:48 +04:00
+ Handle multiple compilation units per stage
+ Allow initializers on uniform declarations
2013-10-31 03:17:34 +04:00
+ signature matching takes type conversions into account, ambiguity is an error
2013-07-10 03:57:13 +04:00
GLSL 1.3
2013-11-05 22:07:25 +04:00
+ flat redeclaration of built-in variables
2013-07-10 03:57:13 +04:00
- Preprocessor token pasting (##), ## does macro expansion after pasting not before
2013-11-05 22:07:25 +04:00
+ non-perspective (linear) interpolation (noperspective)
2013-10-18 07:56:23 +04:00
+ add gl_ClipDistance[] to both vertex and fragment shaders
+ Deprecated gl_ClipVertex
+ deprecate almost all built-in state
+ ftransform() is deprecated
+ Deprecated built-in vertex inputs (attributes) and some outputs (varyings).
2013-07-10 03:57:13 +04:00
GLSL 1.4 (Non-ES)
2014-04-14 19:46:40 +04:00
+ rectangular textures
2013-10-18 07:56:23 +04:00
+ track as removed in this release, but present in others:
+ Use of gl_ClipVertex. Use gl_ClipDistance instead.
+ Built-in vertex shader inputs.
+ Built-in uniforms except for depth range parameters
+ Built-in interface between vertex and fragment: gl_TexCoord, gl_FogFragCoord, and all the color values.
+ Built-in two-sided coloring.
+ Fixed functionality for a programmable stage.
+ ftransform(). Use invariant outputs instead.
2013-07-10 03:57:13 +04:00
GLSL 1.5 (Non-ES)
2014-04-15 02:08:16 +04:00
+ Deprecated gl_MaxVaryingComponents
2013-10-23 23:34:05 +04:00
+ Add new minimum maximums for gl_MaxVertexOutputComponents, gl_MaxGeometryInputComponents, gl_MaxGeometryOutputComponents, and gl_MaxFragmentInputComponents,
2013-07-10 03:57:13 +04:00
rather than relying on gl_MaxVaryingComponents. Also, corrected gl_MaxVaryingComponents to be 60 instead of 64.
2013-10-18 07:56:23 +04:00
+ Added gl_PrimitiveID as an input to fragment shaders.
2013-11-07 05:06:34 +04:00
+ Added gl_FragCoord qualifiers origin_upper_left, and pixel_center_integer to modify the values returned by gl_FragCoord (and have no affect on any other aspect of the pipeline or language).
+ including redeclaration of gl_FragCoord that adds nothing
2014-04-15 02:08:16 +04:00
+ Added support for multi-sample textures through sampler2DMS and sampler2DMSArray support in texelFetch() and textureSize().
2013-10-18 07:56:23 +04:00
+ Broadened interface blocks from just uniforms to in and out interfaces as well.
+ Broaden array usage to include vertex shader inputs (vertex in).
2013-10-23 23:34:05 +04:00
+ Added geometry shaders. This includes targeting layers in FBO rendering.
+ geometry shader layouts: they must be declared, telling the system the primitive input and output types and maximum number of vertices.
+ Added geometry shader constants.
+ Broaden structure usage to include geometry inputs and geometry outputs.
2013-11-21 03:46:57 +04:00
+ texel offset limit checking
+ 1.50: geometry shaders: max_vertices must be checked against gl_MaxGeometryOutputVertices (maybe at compile time)
2014-08-14 00:04:19 +04:00
GLSL 3.3
+ Add ARB_explicit_attrib_location extension
+ Add ARB_shader_bit_encoding extension
2013-07-10 03:57:13 +04:00
GLSL 4.0
2013-12-18 07:06:24 +04:00
+ tessellation control stage and tessellation evaluation stage. Includes barrier() built-in for synchronization.
+ patch in, patch out
+ input/output arrays
+ unsized array sizing to gl_MaxPatchVertices, including gl_in/gl_out
2013-12-11 22:57:40 +04:00
+ built-in variables, functions, and constants verification
+ layout qualifiers for primitive types
2013-08-27 07:59:04 +04:00
- Polymorphic functions: Run-time selection of what function gets called, through the new keyword subroutine.
- 64bit floating point numbers with the new type keyword double. Built-in functions extended for doubles, and new function matching rules are added to both allow implicit conversions when calling a function and preserve most existing function matching once doubles are included.
2014-05-06 10:02:01 +04:00
+ More implicit conversions
2013-08-27 07:59:04 +04:00
+ float to double, and similarly for all floating-point vector and matrix types
+ int to uint, and similarly for all integer vector types
+ int to double, and similarly for all vectors of integers and doubles.
+ uint to double, and similarly for all vectors of integers and doubles.
2014-05-06 10:02:01 +04:00
+ Cube map array textures and texture functions texture(), textureSize(), textureLod(), and textureGrad().
+ Sampler arrays can take a variable index now, as long as it's value is uniform for all uses.
2013-08-27 07:59:04 +04:00
- Per-sample shading. Including sample input mask gl_SampleMaskIn[] and per-sample interpolation, with explicit interpolation built-ins interpolateAtCentroid(), interpolateAtSample(), and interpolateAtOffset().
- New precise qualifier to disallow optimizations that re-order operations or treat different instances of the same operator with different precision.
2014-08-15 00:05:57 +04:00
+ Add a fused multiply and add built-in, fma(), in relation to the new precise qualifier. (Because <20> a * b + c<> will require two operations under new rules for precise.)
2014-08-14 23:45:52 +04:00
+ Added new built-in floating-point functions
+ frexp() and ldexp()
2014-05-06 10:02:01 +04:00
+ packUnorm2x16(), unpackUnorm2x16(),
2014-08-14 23:45:52 +04:00
+ packUnorm4x8(), packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
+ packDouble2x32() and unpackDouble2x32()
+ Add new built-in integer functions
+ uaddCarry() and usubBorrow()
+ umulExtended() and imulExtended()
+ bitfieldExtract() and bitfieldInsert()
+ bitfieldReverse()
+ bitCount(), findLSB(), andfindMSB()
2013-08-27 07:59:04 +04:00
- New built-in to query LOD, textureQueryLod().
- New overloaded function matching algorithm, handling selection from many valid multiple choices.
2013-10-21 23:25:59 +04:00
+ Texture gather functions that return four texels with a single call.
+ textureGather()
+ textureGatherOffset()
+ textureGatherOffsets()
2013-10-18 07:56:23 +04:00
+ Add streams out from geometry shader. Output can be directed to streams through
+ EmitStreamVertex() and EndStreamPrimitive().
2013-07-10 03:57:13 +04:00
GLSL 4.1
2013-12-11 22:57:40 +04:00
+ Support for partitioning shaders into multiple programs to provide light-weight mixing of different shader stages.
2013-08-27 07:59:04 +04:00
(GL_ARB_separate_shader_objects)
2014-04-25 02:38:50 +04:00
+ layout qualifiers
+ redeclaration of input/output blocks
+ ...
2013-08-27 07:59:04 +04:00
- Add 64-bit floating-point attributes for vertex shader inputs.
2013-10-24 05:25:40 +04:00
+ Support viewport arrays so where the geometry shader selects which viewport array will transform its output.
2013-07-10 03:57:13 +04:00
GLSL 4.2
2013-08-27 07:59:04 +04:00
+ Move these previously deprecated features to be only in the compatibility profile:
+ The keyword attribute for vertex shader inputs. (Use in instead.)
+ The keyword varying for inputs and outputs. (Use in and out instead.)
+ The original texturing built-in functions. (Use the new forms instead.)
+ The built-in variables gl_FragColor and gl_FragData. (Use out instead.)
+ Built-in constants related to these.
+ Change from ASCII to UTF-8 for the language character set and also allow any characters inside comments (except the byte value 0),
2013-08-29 04:39:25 +04:00
including '\'.
2013-08-27 07:59:04 +04:00
+ Add line-continuation using '\', as in C++.
+ ES convergence
+ Clarify that .xyzwxy.xy is illegal, as it temporarily makes a <20> vec6<63> .
+ Clarify that return statements only accept values (no return of a void function).
2014-08-10 22:19:36 +04:00
+ Add image types (GL_ARB_shader_image_load_store)
2013-08-27 07:59:04 +04:00
+ 33 new types, all with <20> image<67> in their name, correspond to the non-shadow texture types
2014-08-10 22:19:36 +04:00
+ addition of memory qualifiers: coherent, volatile, restrict, readonly, and writeonly
+ can read/write/modify images from a shader, through new built-in functions
+ qualifiers can act independently on the opaque shader variable and the backing image, so extra qualifiers can be used to separately qualify these
+ early_fragment_tests
2013-08-27 07:59:04 +04:00
+ Variables declared in if and else statements are scoped only to the end of those statements, especially for non-compound statements
2013-08-29 04:39:25 +04:00
Note, this is not backward compatible, it may depend on #version.
2014-05-11 02:24:50 +04:00
+ Allow implicit conversions of return values to the declared type of the function.
2013-10-18 07:56:23 +04:00
+ The const keyword can be used to declare variables within a function body with initializer expressions that are not constant expressions.
2013-08-27 07:59:04 +04:00
+ Qualifiers on variable declarations no longer have to follow a strict order. The layout qualifier can be used multiple times, and multiple parameter qualifiers can be used.
+ Parameter qualifiers can include precision and memory qualifiers.
2014-08-14 00:04:19 +04:00
+ Add a new atomic_uint type to support atomic counters. Also, add built-in functions for manipulating atomic counters.
+ atomicCounterIncrement, atomicCounterDecrement, and atomicCounter
2014-08-19 10:08:38 +04:00
+ Add layout qualifier identifiers binding and offset to bind units to sampler and image variable declarations, atomic counters, and uniform blocks.
2014-08-15 00:05:57 +04:00
+ Add built-in functions to pack/unpack 16 bit floating-point numbers (ARB_shading_language_pack2f).
+ packHalf2x16 and unpackHalf2x16
+ packSnorm2x16and unpackSnorm2x16
2014-08-19 06:12:44 +04:00
+ Add gl_FragDepth layout qualifiers to communicate what kind of changes will be made to gl_FragDepth (GL_AMD_conservative depth).
2013-10-18 07:56:23 +04:00
+ Add C-style curly brace initializer lists syntax for initializers. Full initialization of aggregates is required when these are used.
2014-05-11 02:24:50 +04:00
+ Allow .length() to be applied to vectors and matrices, returning the number of components or columns.
2013-08-27 07:59:04 +04:00
+ Clarify that .length() returns an int type and can be used as a constant integer expression.
2013-10-18 07:56:23 +04:00
+ Allow swizzle operations on scalars.
2014-05-06 10:02:01 +04:00
+ Positive signed decimal literals, as well as octal and hexadecimal, can set all 32 bits. This includes setting the sign bit to create a negative value.
2014-05-12 22:12:04 +04:00
+ Clarified that a comma sequence-operator expression cannot be a constant expression. E.g., <20> (2,3)<29> is not allowed, semantically,
2013-10-04 00:23:57 +04:00
as a valid constant expression 3, even though it is an expression that will evaluate to 3.
2013-10-21 23:25:59 +04:00
+ Use vec2 instead of vec3 for coordinate in textureGather*(sampler2DRect,...).
+ Clarify that textureGatherOffset() can take non-constants for the offsets.
2013-07-10 03:57:13 +04:00
GLSL 4.3
2014-08-14 00:04:19 +04:00
+ Add shader storage buffer objects, as per the ARB_shader_storage_buffer_object extension. This includes
2014-08-12 06:11:55 +04:00
+ allowing the last member of a storage buffer block to be an array that does not know its size until render time
2014-08-14 00:04:19 +04:00
+ read/write memory shared with the application and other shader invocations
2014-08-12 06:11:55 +04:00
+ adding the std430 layout qualifier for shader storage blocks
2014-08-14 00:04:19 +04:00
+ add atomic built-ins
+ layout(binding=)
2013-08-27 07:59:04 +04:00
- Allow .length() on all arrays; returning a compile-time constant or not, depending on how the
array is sized, as per the ARB_shader_storage_buffer_object extension.
- Be clear that implicit array sizing is only within a stage, not cross stage.
2013-10-04 00:23:57 +04:00
- Array clarifications:
- All arrays are inherently homogeneous, except for arrays of the new shader storage buffer objects
- Arrays of shader storage buffer objects will be dereferenced when the .length() method is used on an unsized array
member, so that must a have valid index.
- Arrays of other objects (uniform blocks) containing implicitly sized arrays will have the same implicit size for all
elements of the array.
2013-11-05 22:07:25 +04:00
- Arrays of arrays are now supported, as per the GL_ARB_arrays_of_arrays extension.
2014-08-11 06:32:30 +04:00
+ Compute shaders are now supported, as per the GL_ARB_compute_shader extension.
2014-08-14 11:07:21 +04:00
+ Added imageSize() built-ins to query the dimensions of an image.
2013-08-27 07:59:04 +04:00
- All choice of depth or stencil texturing, for a packed depth-stencil texture, as per the
GL_ARB_stencil_texturing extension.
- Allow explicit locations/indexes to be assigned to uniform variables and subroutines, as per the
GL_ARB_explicit_uniform_location extension.
2014-01-09 03:25:18 +04:00
+ Accept ES GLSL shader #version statements, which will request ES functionality for ES GLSL
2013-08-27 07:59:04 +04:00
versions 100 and 300, as per the GL_ARB_ES3_compatibility extension.
2014-01-09 03:25:18 +04:00
+ Clarify and correct scoping rules to what would normally be expected and what was intended.
2013-08-27 07:59:04 +04:00
(Function parameters and body nest inside global space. Loop variables and body nest inside
loop scope.)
2014-01-09 03:25:18 +04:00
+ There are no digraphs (trigraphs were already disallowed).
+ Remove the CPP difference that it is a compile-time error to use #if or #elif on expressions
2013-08-27 07:59:04 +04:00
containing undefined macro names. This reverts back to following expected CPP behavior.
2014-01-09 03:25:18 +04:00
+ Set both gl_MaxFragmentImageUniforms and gl_MaxCombinedImageUniforms to 8.
2013-08-27 07:59:04 +04:00
- Clarify textureSize() for cube map arrays.
- For layout qualifiers,
2014-01-09 03:25:18 +04:00
+ make negative output locations a compile-time error, once integer expressions are allowed in layouts
2013-08-27 07:59:04 +04:00
- make indexes outside the range [0,1] a compile-time error.
- Add textureQueryLevels() built-ins to query the number of mipmap levels, as per the
GL_ARB_texture_query_levels extension.
2013-10-24 05:25:40 +04:00
+ Make gl_Layer and gl_ViewportIndex also be inputs to the fragment shader, as per the
2013-08-27 07:59:04 +04:00
GL_ARB_fragment_layer_viewport extension.
- Clarify fragment output variables cannot be double precision.
2014-01-09 03:25:18 +04:00
+ Allow the new shared keyword to be in layout-qualifier-id, allowing backward compatibility
2013-08-27 07:59:04 +04:00
with the shared identifier that was previously used.
+ Added overlooked texture function float textureOffset (sampler2DArrayShadow sampler, vec4 P, vec2 offset [, float bias] ).
+ Add missing type in grammar, ATOMIC_UINT, and missing qualifiers COHERENT, VOLATILE, RESTRICT, READONLY, and WRITEONLY.
+ Add missing initializer lists to grammar.
2013-07-10 03:57:13 +04:00
GLSL 4.4
2014-02-03 20:28:23 +04:00
+ Incorporate the ARB_enhanced_layouts extension, which adds
2014-01-09 03:25:18 +04:00
+ compile-time constant expressions for layout qualifier integers
2014-02-03 20:28:23 +04:00
+ new offset and align layout qualifiers for control over buffer block layouts
2014-01-09 03:25:18 +04:00
+ add location layout qualifier for input and output blocks and block members
+ new component layout qualifier for finer-grained layout control of input and output variables and blocks
2014-02-03 20:28:23 +04:00
+ new xfb_buffer, xfb_stride, and xfb_offsetlayout qualifiers to allow the shader to control
2013-08-27 07:59:04 +04:00
transform feedback buffering.
+ Bug 10530: To be consistent with ES, include sample types as valid in a precision statement.
Note the defaults are irrelevant, as precision qualifiers are not required or have any meaning.
2014-08-14 00:04:19 +04:00
GLSL 4.5
+ Incorporate the ARB_ES3_1_compatibility extension
+ Supports OpenGL ES 310 shaders.
+ Adds imageAtomicExchange() built-in function for floating-point images.
+ Adds coherent to atomic and image-atomic built-in function parameters.
+ Adds gl_HelperInvocation built-in variable to say whether a fragment shader invocation is
only as a helper, so the shader can skip code not needed or harmful when in a helper invocation.
+ Adds gl_MaxSamplesbuilt-in constant, and several other built-in constants.
+ Adds mix() built-in functions for selection of int, uint, andbool components.
+ Incorporate the GL_ARB_shader_texture_image_samples extension to query how many samples are in a multi-sample texture or image.
+ Incorporate the GL_ARB_cull_distance extensions to add the built-in variable gl_CullDistance[] , which will cull whole primitives.
+ Incorporate the GL_ARB_derivative_control extension