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