2015-07-06 20:17:11 +00:00
Current Compilation Full-Functionality Level: ESSL 1.00-3.00, GLSL 1.10-3.30
2013-07-09 23:57:13 +00:00
2015-07-06 20:17:11 +00:00
Summary of main missing features:
AEP
- GL_KHR_blend_equation_advanced
- GL_OES_sample_variables
- GL_OES_shader_image_atomic
- GL_OES_shader_multisample_interpolation
- GL_OES_texture_storage_multisample_2d_array
+ GL_EXT_geometry_shader
+ GL_EXT_geometry_point_size
- GL_EXT_gpu_shader5
- GL_EXT_primitive_bounding_box
+ GL_EXT_shader_io_blocks
+ GL_EXT_tessellation_shader
+ GL_EXT_tessellation_point_size
- GL_EXT_texture_buffer
- GL_EXT_texture_cube_map_array
Missing features in ES 3.1
- Arrays of arrays
- .length() on run-time array
Missing desktop features that are in EAP
- per-sample shading
- "precise"
Missing desktop features, non AEP
- subroutines
- built-in functions for type 'double'
- second-generation function-overloading disambiguation algorithm (version 400)
- Preprocessor token pasting (##), ## does macro expansion after pasting not before
- textureQueryLevels and textureQueryLod
2014-07-28 04:21:04 +00: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-06 23:57:42 +00:00
+ create version system
2013-11-27 02:41:52 +00:00
2013-08-29 00:39:25 +00:00
Link Validation
2013-09-17 19:26:08 +00:00
+ provide input config file for setting limits
2014-04-22 19:06:23 +00:00
- also consider spitting out measures of complexity
2013-09-20 06:20:21 +00:00
+ ensure no static references thrown away
2013-09-26 00:45:21 +00:00
- generate static use of object even if the only use is to access the length of its array
2013-08-29 00:39:25 +00: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-24 21:18:46 +00:00
- give error for sharing a packed block
2013-10-15 21:46:20 +00:00
- 1.2: matching initializers for uniforms
2013-11-05 18:07:25 +00:00
- 1.3: only statically used built-ins have to be redeclared as flat
2013-10-15 21:46:20 +00:00
- 1.5: matching between gl_PerVertex blocks and gl_PerFragment blocks
2013-08-29 00:39:25 +00:00
- 1.3: deprecated mixing fixed vertex/fragment stage with programmable fragment/vertex stage.
2013-12-18 03:06:24 +00:00
+ 4.0: tessellation primitive, vertices, spacing, order,
2013-10-15 21:46:20 +00:00
- 4.3: compute shader not combined with any other stages
2013-08-29 00:39:25 +00:00
- 4.3: remove cross-version linking restrictions.
- 4.3: Allow mismatches in interpolation and auxiliary qualification across stages.
2014-04-22 19:06:23 +00: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 18:07:25 +00:00
Intra-stage linking, single shader
2013-11-15 01:34:27 +00:00
+ recursion for functions
2013-11-05 18:07:25 +00:00
- limits checking:
2013-11-27 02:41:52 +00:00
+ bindings
2013-11-05 18:07:25 +00:00
- number of input/output compononents
2013-12-18 03:06:24 +00:00
+ tessellation limits
+ tessellation primitive array sizing consistency
2013-12-06 23:57:42 +00:00
+ Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords
+ Non ES: gl_ClipDistance ...
2013-11-05 18:07:25 +00:00
- ...
2013-09-24 21:18:46 +00:00
+ exactly one main
2013-11-05 18:07:25 +00:00
+ ES 3.0: fragment outputs all have locations, if more than one
2013-12-07 00:28:07 +00:00
+ location aliasing/overlap (except desktop vertex shader inputs)
2014-08-19 06:08:38 +00:00
+ binding overlap for atomic counters
2013-11-05 18:07:25 +00:00
+ Non ES: geometry shader input array sizes and input layout qualifier declaration
2013-11-20 21:12:43 +00: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 01:34:27 +00:00
+ 1.50: match between all explicit input array sizes and input primitive
2013-11-20 22:16:41 +00: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 01:06:34 +00:00
+ 1.50: origin_upper_left and pixel_center_integer have to match
2013-11-15 01:34:27 +00:00
- Even the potential for recursion through subroutine uniforms is an error.
2014-04-22 19:06:23 +00: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 01:34:27 +00: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 06:08:38 +00:00
+ component/binding/index/offset match check
2014-08-11 02:32:30 +00:00
+ compute shader layout(local_size_*) matching
2013-10-01 21:58:43 +00:00
+ mixed es/non-es profiles are an error
2014-08-19 06:08:38 +00:00
- binding overlap for atomic counters
2013-11-15 01:34:27 +00:00
- matching redeclarations of interface blocks
2013-11-05 18:07:25 +00:00
- 4.3: implicit array sizing is cross shader within a stage
2014-04-22 19:06:23 +00: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 03:59:04 +00:00
2013-08-29 00:39:25 +00:00
Shader Functionality to Implement/Finish
2013-10-02 05:10:48 +00:00
ESSL 2.0 (#version 100)
2013-10-15 21:46:20 +00:00
+ implement non-inductive loop limitation detection
+ implement non-inductive array accesses limitation detection
2013-08-03 00:04:10 +00:00
ESSL 3.0
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
2014-08-13 20:04:19 +00: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 06:08:38 +00:00
+ overlapping bindings/offsets and offset post increment
2014-08-14 19:45:52 +00:00
+ frexp/ldexp
+ packUnorm4x8(),packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
2014-08-14 23:30:11 +00:00
+ 2DMS samplers and images
2014-08-24 18:21:00 +00:00
+ inheritance of memory qualifiers in block members
2013-07-09 23:57:13 +00:00
GLSL 1.2
2013-10-02 05:10:48 +00:00
+ Handle multiple compilation units per stage
+ Allow initializers on uniform declarations
2013-10-30 23:17:34 +00:00
+ signature matching takes type conversions into account, ambiguity is an error
2013-07-09 23:57:13 +00:00
GLSL 1.3
2013-11-05 18:07:25 +00:00
+ flat redeclaration of built-in variables
2013-07-09 23:57:13 +00:00
- Preprocessor token pasting (##), ## does macro expansion after pasting not before
2013-11-05 18:07:25 +00:00
+ non-perspective (linear) interpolation (noperspective)
2013-10-18 03:56:23 +00: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-09 23:57:13 +00:00
GLSL 1.4 (Non-ES)
2014-04-14 15:46:40 +00:00
+ rectangular textures
2013-10-18 03:56:23 +00: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-09 23:57:13 +00:00
GLSL 1.5 (Non-ES)
2014-04-14 22:08:16 +00:00
+ Deprecated gl_MaxVaryingComponents
2013-10-23 19:34:05 +00:00
+ Add new minimum maximums for gl_MaxVertexOutputComponents, gl_MaxGeometryInputComponents, gl_MaxGeometryOutputComponents, and gl_MaxFragmentInputComponents,
2013-07-09 23:57:13 +00:00
rather than relying on gl_MaxVaryingComponents. Also, corrected gl_MaxVaryingComponents to be 60 instead of 64.
2013-10-18 03:56:23 +00:00
+ Added gl_PrimitiveID as an input to fragment shaders.
2013-11-07 01:06:34 +00: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-14 22:08:16 +00:00
+ Added support for multi-sample textures through sampler2DMS and sampler2DMSArray support in texelFetch() and textureSize().
2013-10-18 03:56:23 +00: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 19:34:05 +00: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-20 23:46:57 +00:00
+ texel offset limit checking
+ 1.50: geometry shaders: max_vertices must be checked against gl_MaxGeometryOutputVertices (maybe at compile time)
2014-08-13 20:04:19 +00:00
GLSL 3.3
+ Add ARB_explicit_attrib_location extension
+ Add ARB_shader_bit_encoding extension
2013-07-09 23:57:13 +00:00
GLSL 4.0
2013-12-18 03:06:24 +00: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 18:57:40 +00:00
+ built-in variables, functions, and constants verification
+ layout qualifiers for primitive types
2013-08-27 03:59:04 +00: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 06:02:01 +00:00
+ More implicit conversions
2013-08-27 03:59:04 +00: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 06:02:01 +00: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 03:59:04 +00: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-14 20:05:57 +00: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 19:45:52 +00:00
+ Added new built-in floating-point functions
+ frexp() and ldexp()
2014-05-06 06:02:01 +00:00
+ packUnorm2x16(), unpackUnorm2x16(),
2014-08-14 19:45:52 +00: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 03:59:04 +00:00
- New built-in to query LOD, textureQueryLod().
- New overloaded function matching algorithm, handling selection from many valid multiple choices.
2013-10-21 19:25:59 +00:00
+ Texture gather functions that return four texels with a single call.
+ textureGather()
+ textureGatherOffset()
+ textureGatherOffsets()
2013-10-18 03:56:23 +00:00
+ Add streams out from geometry shader. Output can be directed to streams through
+ EmitStreamVertex() and EndStreamPrimitive().
2013-07-09 23:57:13 +00:00
GLSL 4.1
2013-12-11 18:57:40 +00:00
+ Support for partitioning shaders into multiple programs to provide light-weight mixing of different shader stages.
2013-08-27 03:59:04 +00:00
(GL_ARB_separate_shader_objects)
2014-04-24 22:38:50 +00:00
+ layout qualifiers
+ redeclaration of input/output blocks
+ ...
2013-08-27 03:59:04 +00:00
- Add 64-bit floating-point attributes for vertex shader inputs.
2013-10-24 01:25:40 +00:00
+ Support viewport arrays so where the geometry shader selects which viewport array will transform its output.
2013-07-09 23:57:13 +00:00
GLSL 4.2
2013-08-27 03:59:04 +00: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 00:39:25 +00:00
including '\'.
2013-08-27 03:59:04 +00: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 18:19:36 +00:00
+ Add image types (GL_ARB_shader_image_load_store)
2013-08-27 03:59:04 +00:00
+ 33 new types, all with <20> image<67> in their name, correspond to the non-shadow texture types
2014-08-10 18:19:36 +00: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 03:59:04 +00: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 00:39:25 +00:00
Note, this is not backward compatible, it may depend on #version.
2014-05-10 22:24:50 +00:00
+ Allow implicit conversions of return values to the declared type of the function.
2013-10-18 03:56:23 +00: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 03:59:04 +00: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-13 20:04:19 +00: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 06:08:38 +00:00
+ Add layout qualifier identifiers binding and offset to bind units to sampler and image variable declarations, atomic counters, and uniform blocks.
2014-08-14 20:05:57 +00: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 02:12:44 +00: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 03:56:23 +00:00
+ Add C-style curly brace initializer lists syntax for initializers. Full initialization of aggregates is required when these are used.
2014-05-10 22:24:50 +00:00
+ Allow .length() to be applied to vectors and matrices, returning the number of components or columns.
2013-08-27 03:59:04 +00:00
+ Clarify that .length() returns an int type and can be used as a constant integer expression.
2013-10-18 03:56:23 +00:00
+ Allow swizzle operations on scalars.
2014-05-06 06:02:01 +00: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 18:12:04 +00: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-03 20:23:57 +00:00
as a valid constant expression 3, even though it is an expression that will evaluate to 3.
2013-10-21 19:25:59 +00:00
+ Use vec2 instead of vec3 for coordinate in textureGather*(sampler2DRect,...).
+ Clarify that textureGatherOffset() can take non-constants for the offsets.
2013-07-09 23:57:13 +00:00
GLSL 4.3
2014-08-13 20:04:19 +00:00
+ Add shader storage buffer objects, as per the ARB_shader_storage_buffer_object extension. This includes
2014-08-12 02:11:55 +00: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-13 20:04:19 +00:00
+ read/write memory shared with the application and other shader invocations
2014-08-12 02:11:55 +00:00
+ adding the std430 layout qualifier for shader storage blocks
2014-08-13 20:04:19 +00:00
+ add atomic built-ins
+ layout(binding=)
2013-08-27 03:59:04 +00: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-03 20:23:57 +00: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 18:07:25 +00:00
- Arrays of arrays are now supported, as per the GL_ARB_arrays_of_arrays extension.
2014-08-11 02:32:30 +00:00
+ Compute shaders are now supported, as per the GL_ARB_compute_shader extension.
2014-08-14 07:07:21 +00:00
+ Added imageSize() built-ins to query the dimensions of an image.
2015-07-06 20:17:11 +00:00
- Allow explicit locations/indexes to be assigned to subroutines, as per the GL_ARB_explicit_uniform_location extension.
2014-01-08 23:25:18 +00:00
+ Accept ES GLSL shader #version statements, which will request ES functionality for ES GLSL
2013-08-27 03:59:04 +00:00
versions 100 and 300, as per the GL_ARB_ES3_compatibility extension.
2014-01-08 23:25:18 +00:00
+ Clarify and correct scoping rules to what would normally be expected and what was intended.
2013-08-27 03:59:04 +00:00
(Function parameters and body nest inside global space. Loop variables and body nest inside
loop scope.)
2014-01-08 23:25:18 +00: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 03:59:04 +00:00
containing undefined macro names. This reverts back to following expected CPP behavior.
2014-01-08 23:25:18 +00:00
+ Set both gl_MaxFragmentImageUniforms and gl_MaxCombinedImageUniforms to 8.
2013-08-27 03:59:04 +00:00
- Clarify textureSize() for cube map arrays.
- For layout qualifiers,
2014-01-08 23:25:18 +00:00
+ make negative output locations a compile-time error, once integer expressions are allowed in layouts
2013-08-27 03:59:04 +00: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 01:25:40 +00:00
+ Make gl_Layer and gl_ViewportIndex also be inputs to the fragment shader, as per the
2013-08-27 03:59:04 +00:00
GL_ARB_fragment_layer_viewport extension.
- Clarify fragment output variables cannot be double precision.
2014-01-08 23:25:18 +00:00
+ Allow the new shared keyword to be in layout-qualifier-id, allowing backward compatibility
2013-08-27 03:59:04 +00: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-09 23:57:13 +00:00
GLSL 4.4
2014-02-03 16:28:23 +00:00
+ Incorporate the ARB_enhanced_layouts extension, which adds
2014-01-08 23:25:18 +00:00
+ compile-time constant expressions for layout qualifier integers
2014-02-03 16:28:23 +00:00
+ new offset and align layout qualifiers for control over buffer block layouts
2014-01-08 23:25:18 +00: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 16:28:23 +00:00
+ new xfb_buffer, xfb_stride, and xfb_offsetlayout qualifiers to allow the shader to control
2013-08-27 03:59:04 +00: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-13 20:04:19 +00: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