Give new scopes to non-compound (simple) if-then-else substatements, correcting scoping for declarations they contain.
Also, updated several tests and the Todo list. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22845 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
3af0d53dac
commit
d46b31fdc5
6 changed files with 272 additions and 55 deletions
172
Todo.txt
172
Todo.txt
|
|
@ -12,6 +12,31 @@ Testing
|
|||
Interfacing
|
||||
- finish putting into a glslang namespace
|
||||
|
||||
Shader Linking Validation
|
||||
- ensure no static references thrown away
|
||||
Cross-stage linking
|
||||
- type consistency check of uniform and ins <-> outs, both variables and blocks, stage-specific arrayness matching
|
||||
- location/binding/index check
|
||||
- matching initializers for uniforms
|
||||
- mixed es/non-es profiles
|
||||
- statically consumed input not produced by previous stage
|
||||
- matching between gl_PerVertex blocks and gl_PerFragment blocks
|
||||
- compute shader not with other stages
|
||||
Intra-stage linking
|
||||
- exactly one main
|
||||
- type consistency check of uniforms, globals, ins, and outs, both variables and blocks
|
||||
- location/component/binding/index/offset match check
|
||||
- location/component aliasing (except desktop vertex shader inputs)
|
||||
- geometry shader input array sizes and input layout qualifier declaration
|
||||
- compute shader layout(local_size_*) matching
|
||||
- mixed es/non-es profiles
|
||||
- matching initializers for globals
|
||||
- recursion for both functions and subroutines
|
||||
- matching redeclarations of interface blocks
|
||||
- read or write to both gl_ClipVertex and gl_ClipDistance
|
||||
- write to only one of gl_FragColor, gl_FragData, or user-declared
|
||||
- 4.4: overlapping transform/feedback offsets, offset/stride overflow checks, and stride matching
|
||||
|
||||
Functionality to Implement/Finish
|
||||
ESSL 3.0
|
||||
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
|
||||
|
|
@ -46,6 +71,7 @@ Functionality to Implement/Finish
|
|||
rather than relying on gl_MaxVaryingComponents. Also, corrected gl_MaxVaryingComponents to be 60 instead of 64.
|
||||
- Added gl_PrimitiveID as an input to fragment shaders.
|
||||
- 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
|
||||
- Added support for multi-sample textures through sampler2DMS and sampler2DMSArray support in texelFetch() and textureSize().
|
||||
- Broadened interface blocks from just uniforms to in and out interfaces as well.
|
||||
- Broaden array usage to include vertex shader inputs (vertex in).
|
||||
|
|
@ -55,7 +81,153 @@ Functionality to Implement/Finish
|
|||
- gl_FragCoord qualifiers use the layout(): origin_upper_left and pixel_center_integer.
|
||||
- Broaden structure usage to include geometry inputs and geometry outputs.
|
||||
GLSL 4.0
|
||||
- tessellation control stage and tessellation evaluation stage. Includes barrier() built-in for synchronization.
|
||||
- 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.
|
||||
+ More implicit conversions
|
||||
+ 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.
|
||||
- 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.
|
||||
- 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.
|
||||
- Add a fused multiply andadd built-in, fma(), in relation to the new precise qualifier. (Because “a * b + c” will require two operations under new rules for precise.)
|
||||
- Added new built-in floating-point functions
|
||||
- frexp() and ldexp()
|
||||
- packUnorm2x16(), packUnorm4x8(),packSnorm4x8(), and packDouble2x32()
|
||||
- unpackUnorm2x16(), unpackUnorm4x8(),unpackSnorm4x8(), and unpackDouble2x32()
|
||||
- Add new built-in integer functions
|
||||
- uaddCarry() andusubBorrow()
|
||||
- umulExtended() andimulExtended()
|
||||
- bitfieldExtract() andbitfieldInsert()
|
||||
- bitfieldReverse()
|
||||
- bitCount(),findLSB(), andfindMSB()
|
||||
- New built-in to query LOD, textureQueryLod().
|
||||
- New overloaded function matching algorithm, handling selection from many valid multiple choices.
|
||||
- Texture gather functions that return four texels with a single call.
|
||||
- textureGather()
|
||||
- textureGatherOffset()
|
||||
- textureGatherOffsets()
|
||||
- Add streams out from geometry shader. Output can be directed to streams through
|
||||
- EmitStreamVertex() and EndStreamPrimitive().
|
||||
GLSL 4.1
|
||||
- Support for partitioning shaders into multiple programs to provide light-weight mixing of different shader stages.
|
||||
(GL_ARB_separate_shader_objects)
|
||||
- layout qualifiers
|
||||
- redeclaration of input/output blocks
|
||||
- ...
|
||||
- Add 64-bit floating-point attributes for vertex shader inputs.
|
||||
- Support viewport arrays so where the geometry shader selects which viewport array will transform its output.
|
||||
GLSL 4.2
|
||||
- Add 420-style function signature matching rules
|
||||
+ 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),
|
||||
including '\'.
|
||||
+ Add line-continuation using '\', as in C++.
|
||||
+ ES convergence
|
||||
+ Clarify that .xyzwxy.xy is illegal, as it temporarily makes a “vec6”.
|
||||
+ Clarify that return statements only accept values (no return of a void function).
|
||||
- Add image types (GL_ARB_shader_image_load_store)
|
||||
+ 33 new types, all with “image” in their name, correspond to the non-shadow texture types
|
||||
+ 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
|
||||
+ Variables declared in if and else statements are scoped only to the end of those statements, especially for non-compound statements
|
||||
Note, this is not backward compatible, it may depend on #version.
|
||||
- Allow implicit conversions of return values to the declared type of the function.
|
||||
- The const keyword can be used to declare variables within a function body with initializer expressions that are not constant expressions.
|
||||
+ 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.
|
||||
- Add a new atomic_uint type to support atomic counters. Also, add built-in functions for manipulating atomic counters.
|
||||
- atomicCounterIncrement, atomicCounterDecrement, and atomicCounter
|
||||
- Add layout qualifier identifiers binding and offset to bind units to sampler and image variable declarations, atomic counters, and uniform blocks.
|
||||
- Add built-in functions to pack/unpack 16 bit floating-point numbers (ARB_shading_language_pack2f).
|
||||
- packHalf2x16 and unpackHalf2x16
|
||||
- packSnorm2x16and unpackSnorm2x16
|
||||
- Add gl_FragDepthlayout qualifiers to communicate what kind of changes will be made to gl_FragDepth(GL_AMD_conservative depth).
|
||||
- Add C-style curly brace initializer lists syntax for initializers. Full initialization of aggregates is required when these are used.
|
||||
- Allow .length() to be applied to vectors and matrices, returning the number of components or columns.
|
||||
+ Clarify that .length() returns an int type and can be used as a constant integer expression.
|
||||
- Allow swizzle operations on scalars.
|
||||
- Even the potential for recursion through subroutine uniforms is an error.
|
||||
- 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.
|
||||
- Make GLSL consistent with the API regarding user clipping, by no longer referring to gl_Positionwhen gl_ClipVertex is not written. Rather, user clipping becomes undefined.
|
||||
- Minor consistency fixes, corrections
|
||||
- Consistently state structures have members not fields. The period ( . ) is still called the field selector, for all its multiple uses.
|
||||
- Remove comment that there is no communication between instantiations of a shader.
|
||||
- Clarified that a comma sequence-operator expression cannot be a constant expression. E.g., “(2,3)” is not allowed, semantically, as a valid constant expression 3, even though it is an expression that will evaluate to 3.
|
||||
- Use vec2instead of vec3for coordinate in textureGather*(sampler2DRect,...).
|
||||
- Clarify that textureGatherOffset() can take non-constants for the offsets.
|
||||
GLSL 4.3
|
||||
- Add shader storage bufferobjects, as per the ARB_shader_storage_buffer_object extension.
|
||||
This includes 1) allowing the last member of a storage buffer block to be an array that does not
|
||||
know its size until render time, and 2) read/write memory shared with the application and other
|
||||
shader invocations. It also adds the std430layout qualifier for shader storage blocks.
|
||||
- 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.
|
||||
- Array clarifications: 1) All arrays are inherently homogeneous, except for arrays of the new
|
||||
shader storage buffer objects. 2) 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.
|
||||
3) Arrays of other objects (uniform blocks) containing implicitly sized arrays will have the same
|
||||
implicit size for all elements of the array.
|
||||
- Arrays of arrays are now supported, as per the GL_ARB_arrays_of_arraysextension.
|
||||
- Compute shaders are now supported, as per the GL_ARB_compute_shader extension.
|
||||
- Added imageSize() built-ins to query the dimensions of an image.
|
||||
- Define robust out-of-bounds access behavior when enabled, as per the GL_ARB_robust_buffer_access_behavior extension.
|
||||
- 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.
|
||||
- Accept ES GLSL shader #version statements, which will request ES functionality for ES GLSL
|
||||
versions 100 and 300, as per the GL_ARB_ES3_compatibility extension.
|
||||
- Clarified about 90 errors as being either compile time, link time, or either.
|
||||
- Clarify and correct scoping rules to what would normally be expected and what was intended.
|
||||
(Function parameters and body nest inside global space. Loop variables and body nest inside
|
||||
loop scope.)
|
||||
- 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
|
||||
containing undefined macro names. This reverts back to following expected CPP behavior.
|
||||
- Set both gl_MaxFragmentImageUniformsand gl_MaxCombinedImageUniformsto 8.
|
||||
- Clarify textureSize() for cube map arrays.
|
||||
- For layout qualifiers,
|
||||
- make negative output locations a compile-time error, and
|
||||
- make indexes outside the range [0,1] a compile-time error.
|
||||
- Allow mismatches in interpolation and auxiliary qualification across stages.
|
||||
- Remove cross-version linking restrictions.
|
||||
- Add textureQueryLevels() built-ins to query the number of mipmap levels, as per the
|
||||
GL_ARB_texture_query_levels extension.
|
||||
- Make gl_Layer and gl_ViewportIndex also be inputs to the fragment shader, as per the
|
||||
GL_ARB_fragment_layer_viewport extension.
|
||||
- Be explicit that compile-time constant expressions evaluating on the host may get a different
|
||||
value than the same expression on the target. Also reinforce that compile-time constant
|
||||
expressions are evaluated as if precise and invariantwere used.
|
||||
- Add more examples and rules to be more specific about the required behavior of the precise
|
||||
qualifier.
|
||||
- Clarify fragment output variables cannot be double precision.
|
||||
- Clarify that “floating-point” generally means both single- and double-precision and be more
|
||||
consistent with that.
|
||||
- Be clear that early_fragment_tests is only needed in one fragment-stage compilation unit.
|
||||
- Allow the new shared keyword to be in layout-qualifier-id, allowing backward compatibility
|
||||
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.
|
||||
- do version checking for the above
|
||||
+ Add missing initializer lists to grammar.
|
||||
GLSL 4.4
|
||||
- Incorporate the ARB_enhanced_layouts extension, which adds
|
||||
- compile-time constant expressions for layout qualifier integers
|
||||
- new offset and align layout qualifiers for control over buffer block layouts
|
||||
- add location layout qualifier for input and output blocks and block members
|
||||
- new componentlayout qualifier for finer-grained layout control of input and output variables and blocks
|
||||
- new xfb_buffer, xfb_stride, and xfb_offsetlayout qualifiers to allow the shader to control
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue