Merge pull request #75 from google/fix-vs2013-debug
[platform/upstream/glslang.git] / Todo.txt
1 Current Compilation Full-Functionality Level: ESSL 1.00-3.00, GLSL 1.10-3.30
2
3 Key:
4   + means something got completed
5   - means something has not yet been done
6   [Name] means Name is working on it
7
8 Summary of main missing features:
9
10 AEP
11  + GL_KHR_blend_equation_advanced
12  + GL_OES_sample_variables
13  + GL_OES_shader_image_atomic
14  + GL_OES_shader_multisample_interpolation
15  + GL_OES_texture_storage_multisample_2d_array
16  + GL_EXT_geometry_shader
17  + GL_EXT_geometry_point_size
18  + GL_EXT_gpu_shader5
19  + GL_EXT_primitive_bounding_box
20  + GL_EXT_shader_io_blocks
21  + GL_EXT_tessellation_shader
22  + GL_EXT_tessellation_point_size
23  + GL_EXT_texture_buffer
24  + GL_EXT_texture_cube_map_array
25
26 Missing features in ES 3.1
27  + Arrays of arrays
28  + .length() on run-time array
29
30 Missing desktop features that are in EAP
31  + per-sample shading
32  - "precise"
33  
34 Missing desktop features, non AEP
35  - subroutines
36  - built-in functions for type 'double'
37  - second-generation function-overloading disambiguation algorithm (version 400)
38  - Preprocessor token pasting (##), ## does macro expansion after pasting not before
39  + textureQueryLevels and textureQueryLod
40  
41 Bugs
42  - implicitly-sized gl_ClipDistance[] (at least in tessellation shaders) with sizes greater than one are not getting sizes greater than one
43
44 + create version system
45
46 Link Validation
47     + provide input config file for setting limits
48       - also consider spitting out measures of complexity
49     + ensure no static references thrown away
50     - generate static use of object even if the only use is to access the length of its array
51     Cross-stage linking
52       - type consistency check of uniform and ins <-> outs, both variables and blocks, stage-specific arrayness matching
53       - location/binding/index check
54       - mixed es/non-es profiles
55       - statically consumed input not produced by previous stage
56       - give error for sharing a packed block
57       - 1.2: matching initializers for uniforms
58       - 1.3: only statically used built-ins have to be redeclared as flat
59       - 1.5: matching between gl_PerVertex blocks and gl_PerFragment blocks
60       - 1.3: deprecated mixing fixed vertex/fragment stage with programmable fragment/vertex stage.
61       + 4.0: tessellation primitive, vertices, spacing, order, 
62       - 4.3: compute shader not combined with any other stages
63       - 4.3: remove cross-version linking restrictions.
64       - 4.3: Allow mismatches in interpolation and auxiliary qualification across stages.
65       - 4.4: A stage contains two different blocks, each with no instance name, where the blocks contain a member with the same name.
66     Intra-stage linking, single shader
67       + recursion for functions
68       - limits checking:
69           + bindings
70           - number of input/output compononents
71           + tessellation limits
72           + tessellation primitive array sizing consistency
73           + Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords
74           + Non ES: gl_ClipDistance ...
75           - ...
76       + exactly one main
77       + ES 3.0: fragment outputs all have locations, if more than one
78       + location aliasing/overlap (except desktop vertex shader inputs)
79       + binding overlap for atomic counters
80       + Non ES: geometry shader input array sizes and input layout qualifier declaration
81       + Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
82       + Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
83       + 1.50: match between all explicit input array sizes and input primitive
84       + 1.50: at least one geometry shader says input primitive and at least one says output primitive...
85       + 1.50: at least one geometry shader says max_vertices...
86       + 1.50: origin_upper_left and pixel_center_integer have to match
87       - Even the potential for recursion through subroutine uniforms is an error.
88       - 4.4: An interface contains two different blocks, each with no instance name, where the blocks contain a member with the same name.
89       - 4.4: component aliasing (except desktop vertex shader inputs)
90       - 4.4: overlapping transform/feedback offsets, offset/stride overflow checks, and stride matching
91     Intra-stage linking, multiple shader (Non-ES)
92       + type consistency check of uniforms, globals, ins, and outs
93       + value checking of global const initializers
94       + value checking of uniform initializers
95       + location match
96       - block matching
97       + component/binding/index/offset match check
98       + compute shader layout(local_size_*) matching
99       + mixed es/non-es profiles are an error
100       - binding overlap for atomic counters
101       - matching redeclarations of interface blocks
102       - 4.3: implicit array sizing is cross shader within a stage
103       - 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
104
105 Shader Functionality to Implement/Finish
106     ESSL 2.0 (#version 100)
107       + implement non-inductive loop limitation detection
108       + implement non-inductive array accesses limitation detection
109     ESSL 3.0
110       - "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
111     ESSL 3.1
112       + Compute shaders
113       + Shader storage buffer objects
114       - Arrays of arrays
115       + Atomic counters
116       + Images
117       + Separate program objects (also known as separate shader objects)
118       + Explicit uniform locations
119       + Texture gather
120       + Bitfield operations
121       + Integer mix function
122       + overlapping bindings/offsets and offset post increment
123       + frexp/ldexp
124       + packUnorm4x8(),packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
125       + 2DMS samplers and images
126       + inheritance of memory qualifiers in block members
127     GLSL 1.2
128       + Handle multiple compilation units per stage
129       + Allow initializers on uniform declarations
130       + signature matching takes type conversions into account, ambiguity is an error
131     GLSL 1.3
132       + flat redeclaration of built-in variables
133       - Preprocessor token pasting (##), ## does macro expansion after pasting not before
134       + non-perspective (linear) interpolation (noperspective)
135       + add gl_ClipDistance[] to both vertex and fragment shaders
136       + Deprecated gl_ClipVertex
137       + deprecate almost all built-in state
138       + ftransform() is deprecated
139       + Deprecated built-in vertex inputs (attributes) and some outputs (varyings).
140     GLSL 1.4 (Non-ES)
141       + rectangular textures
142       + track as removed in this release, but present in others:
143         + Use of gl_ClipVertex.  Use gl_ClipDistance instead.
144         + Built-in vertex shader inputs.
145         + Built-in uniforms except for depth range parameters
146         + Built-in interface between vertex and fragment:  gl_TexCoord, gl_FogFragCoord, and all the color values.
147         + Built-in two-sided coloring.
148         + Fixed functionality for a programmable stage. 
149         + ftransform().  Use invariant outputs instead.
150     GLSL 1.5 (Non-ES)
151       + Deprecated gl_MaxVaryingComponents
152       + Add new minimum maximums for gl_MaxVertexOutputComponents, gl_MaxGeometryInputComponents, gl_MaxGeometryOutputComponents, and gl_MaxFragmentInputComponents, 
153                 rather than relying on gl_MaxVaryingComponents.  Also, corrected gl_MaxVaryingComponents to be 60 instead of 64.
154       + Added gl_PrimitiveID as an input to fragment shaders.
155       + 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).
156         + including redeclaration of gl_FragCoord that adds nothing
157       + Added support for multi-sample textures through sampler2DMS and sampler2DMSArray support in texelFetch() and textureSize().
158       + Broadened interface blocks from just uniforms to in and out interfaces as well.
159       + Broaden array usage to include vertex shader inputs (vertex in).
160       + Added geometry shaders.  This includes targeting layers in FBO rendering.
161       + geometry shader layouts: they must be declared, telling the system the primitive input and output types and maximum number of vertices.
162       + Added geometry shader constants.
163       + Broaden structure usage to include geometry inputs and geometry outputs.
164       + texel offset limit checking
165       + 1.50: geometry shaders: max_vertices must be checked against gl_MaxGeometryOutputVertices (maybe at compile time)
166     GLSL 3.3
167       + Add ARB_explicit_attrib_location extension
168       + Add ARB_shader_bit_encoding extension
169     GLSL 4.0
170       + tessellation control stage and tessellation evaluation stage. Includes barrier() built-in for synchronization.
171         + patch in, patch out
172         + input/output arrays
173           + unsized array sizing to gl_MaxPatchVertices, including gl_in/gl_out
174         + built-in variables, functions, and constants verification
175         + layout qualifiers for primitive types
176       - Polymorphic functions: Run-time selection of what function gets called, through the new keyword subroutine.
177       - 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. 
178       + More implicit conversions 
179          + float to double, and similarly for all floating-point vector and matrix types
180          + int to uint, and similarly for all integer vector types
181          + int to double, and similarly for all vectors of integers and doubles.
182          + uint to double, and similarly for all vectors of integers and doubles.
183       + Cube map array textures and texture functions texture(), textureSize(), textureLod(), and textureGrad().
184       + Sampler arrays can take a variable index now, as long as it's value is uniform for all uses.
185       - Per-sample shading. Including sample input mask gl_SampleMaskIn[] and per-sample interpolation, with explicit interpolation built-ins interpolateAtCentroid(), interpolateAtSample(), and interpolateAtOffset().
186       - New precise qualifier to disallow optimizations that re-order operations or treat different instances of the same operator with different precision.
187       + Add a fused multiply and add built-in, fma(), in relation to the new precise qualifier. (Because \93a * b + c\94 will require two operations under new rules for precise.)
188       + Added new built-in floating-point functions 
189          + frexp() and ldexp()
190          + packUnorm2x16(), unpackUnorm2x16(),
191          + packUnorm4x8(), packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
192          + packDouble2x32() and unpackDouble2x32()
193       + Add new built-in integer functions
194          + uaddCarry() and usubBorrow()
195          + umulExtended() and imulExtended()
196          + bitfieldExtract() and bitfieldInsert()
197          + bitfieldReverse()
198          + bitCount(), findLSB(), andfindMSB()
199       + New built-in to query LOD, textureQueryLod().
200       - New overloaded function matching algorithm, handling selection from many valid multiple choices.
201       + Texture gather functions that return four texels with a single call.
202          + textureGather()
203          + textureGatherOffset()
204          + textureGatherOffsets()
205       + Add streams out from geometry shader. Output can be directed to streams through
206          + EmitStreamVertex() and EndStreamPrimitive().
207     GLSL 4.1
208       + Support for partitioning shaders into multiple programs to provide light-weight mixing of different shader stages.
209             (GL_ARB_separate_shader_objects)
210         + layout qualifiers
211         + redeclaration of input/output blocks
212         + ...
213       - Add 64-bit floating-point attributes for vertex shader inputs.
214       + Support viewport arrays so where the geometry shader selects which viewport array will transform its output.
215     GLSL 4.2
216       + Move these previously deprecated features to be only in the compatibility profile:
217         + The keyword attribute for vertex shader inputs. (Use in instead.)
218         + The keyword varying for inputs and outputs. (Use in and out instead.)
219         + The original texturing built-in functions. (Use the new forms instead.)
220         + The built-in variables gl_FragColor and gl_FragData. (Use out instead.)
221         + Built-in constants related to these.
222       + Change from ASCII to UTF-8 for the language character set and also allow any characters inside comments (except the byte value 0), 
223         including '\'.
224       + Add line-continuation using '\', as in C++.
225       + ES convergence
226         + Clarify that .xyzwxy.xy is illegal, as it temporarily makes a \93vec6\94.
227         + Clarify that return statements only accept values (no return of a void function).
228       + Add image types (GL_ARB_shader_image_load_store)
229         + 33 new types, all with \93image\94 in their name, correspond to the non-shadow texture types
230         + addition of memory qualifiers: coherent, volatile, restrict, readonly, and writeonly
231         + can read/write/modify images from a shader, through new built-in functions
232         + qualifiers can act independently on the opaque shader variable and the backing image, so extra qualifiers can be used to separately qualify these
233         + early_fragment_tests
234       + Variables declared in if and else statements are scoped only to the end of those statements, especially for non-compound statements
235         Note, this is not backward compatible, it may depend on #version.
236       + Allow implicit conversions of return values to the declared type of the function.
237       + The const keyword can be used to declare variables within a function body with initializer expressions that are not constant expressions.
238       + 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.
239       + Parameter qualifiers can include precision and memory qualifiers.
240       + Add a new atomic_uint type to support atomic counters. Also, add built-in functions for manipulating atomic counters.
241         + atomicCounterIncrement, atomicCounterDecrement, and atomicCounter
242       + Add layout qualifier identifiers binding and offset to bind units to sampler and image variable declarations, atomic counters, and uniform blocks.
243       + Add built-in functions to pack/unpack 16 bit floating-point numbers (ARB_shading_language_pack2f).
244         + packHalf2x16 and unpackHalf2x16
245         + packSnorm2x16and unpackSnorm2x16
246       + Add gl_FragDepth layout qualifiers to communicate what kind of changes will be made to gl_FragDepth (GL_AMD_conservative depth).
247       + Add C-style curly brace initializer lists syntax for initializers. Full initialization of aggregates is required when these are used.
248       + Allow .length() to be applied to vectors and matrices, returning the number of components or columns.
249       + Clarify that .length() returns an int type and can be used as a constant integer expression.
250       + Allow swizzle operations on scalars.
251       + 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.
252       + Clarified that a comma sequence-operator expression cannot be a constant expression. E.g., \93(2,3)\94 is not allowed, semantically, 
253             as a valid constant expression 3, even though it is an expression that will evaluate to 3.
254       + Use vec2 instead of vec3 for coordinate in textureGather*(sampler2DRect,...).
255       + Clarify that textureGatherOffset() can take non-constants for the offsets.
256     GLSL 4.3
257       + Add shader storage buffer objects, as per the ARB_shader_storage_buffer_object extension. This includes 
258             + allowing the last member of a storage buffer block to be an array that does not know its size until render time
259             + read/write memory shared with the application and other shader invocations
260             + adding the std430 layout qualifier for shader storage blocks
261             + add atomic built-ins
262             + layout(binding=)
263       - Allow .length() on all arrays; returning a compile-time constant or not, depending on how the 
264         array is sized, as per the ARB_shader_storage_buffer_object extension.
265       - Be clear that implicit array sizing is only within a stage, not cross stage.
266       - Array clarifications: 
267             - All arrays are inherently homogeneous, except for arrays of the new shader storage buffer objects
268             - Arrays of shader storage buffer objects will be dereferenced when the .length() method is used on an unsized array 
269                 member, so that must a have valid index. 
270             - Arrays of other objects (uniform blocks) containing implicitly sized arrays will have the same implicit size for all 
271                 elements of the array.
272       - Arrays of arrays are now supported, as per the GL_ARB_arrays_of_arrays extension.
273       + Compute shaders are now supported, as per the GL_ARB_compute_shader extension.
274       + Added imageSize() built-ins to query the dimensions of an image.
275       - Allow explicit locations/indexes to be assigned to subroutines, as per the GL_ARB_explicit_uniform_location extension.
276       + Accept ES GLSL shader #version statements, which will request ES functionality for ES GLSL 
277         versions 100 and 300, as per the GL_ARB_ES3_compatibility extension.
278       + Clarify and correct scoping rules to what would normally be expected and what was intended. 
279         (Function parameters and body nest inside global space. Loop variables and body nest inside 
280         loop scope.)
281       + There are no digraphs (trigraphs were already disallowed).
282       + Remove the CPP difference that it is a compile-time error to use #if or #elif on expressions 
283         containing undefined macro names. This reverts back to following expected CPP behavior.
284       + Set both gl_MaxFragmentImageUniforms and gl_MaxCombinedImageUniforms to 8.
285       - Clarify textureSize() for cube map arrays.
286       - For layout qualifiers,
287             + make negative output locations a compile-time error, once integer expressions are allowed in layouts
288             - make indexes outside the range [0,1] a compile-time error.
289       + Add textureQueryLevels() built-ins to query the number of mipmap levels, as per the 
290         GL_ARB_texture_query_levels extension.
291       + Make gl_Layer and gl_ViewportIndex also be inputs to the fragment shader, as per the 
292         GL_ARB_fragment_layer_viewport extension.
293       - Clarify fragment output variables cannot be double precision.
294       + Allow the new shared keyword to be in layout-qualifier-id, allowing backward compatibility 
295         with the shared identifier that was previously used.
296       + Added overlooked texture function float textureOffset (sampler2DArrayShadow sampler, vec4 P, vec2 offset [, float bias] ).
297       + Add missing type in grammar, ATOMIC_UINT, and missing qualifiers COHERENT, VOLATILE, RESTRICT, READONLY, and WRITEONLY.
298       + Add missing initializer lists to grammar.
299     GLSL 4.4
300       + Incorporate the ARB_enhanced_layouts extension, which adds
301         + compile-time constant expressions for layout qualifier integers
302         + new offset and align layout qualifiers for control over buffer block layouts
303         + add location layout qualifier for input and output blocks and block members
304         + new component layout qualifier for finer-grained layout control of input and output variables and blocks
305         + new xfb_buffer, xfb_stride, and xfb_offsetlayout qualifiers to allow the shader to control 
306           transform feedback buffering.
307       + Bug 10530: To be consistent with ES, include sample types as valid in a precision statement. 
308         Note the defaults are irrelevant, as precision qualifiers are not required or have any meaning.
309     GLSL 4.5
310       + Incorporate the ARB_ES3_1_compatibility extension
311         + Supports OpenGL ES 310 shaders.
312         + Adds imageAtomicExchange() built-in function for floating-point images.
313         + Adds coherent to atomic and image-atomic built-in function parameters.
314         + Adds gl_HelperInvocation built-in variable to say whether a fragment shader invocation is 
315               only as a helper, so the shader can skip code not needed or harmful when in a helper invocation.
316         + Adds gl_MaxSamplesbuilt-in constant, and several other built-in constants.
317         + Adds mix() built-in functions for selection of int, uint, andbool components.
318       + Incorporate the GL_ARB_shader_texture_image_samples extension to query how many samples are in a multi-sample texture or image.
319       + Incorporate the GL_ARB_cull_distance extensions to add the built-in variable gl_CullDistance[] , which will cull whole primitives.
320       + Incorporate the GL_ARB_derivative_control extension