glslang-zig/glslang/Include
qining 0840838d17 Support specialization composite constants
Fix issue #163, support creation and reference of composite type
specialization constants.

e.g.:
```
layout(constant_id = 200) const float myfloat = 1.25;
layout(constant_id = 201) const int myint = 14;
struct structtype {
  float f;
  int i;
};
const structtype outer_struct_var = {myfloat, myint};
void main(){}
```
generated code (use glslangValidator):
```
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 12

                              Capability Shader
               1:             ExtInstImport  "GLSL.std.450"
                              MemoryModel Logical GLSL450
                              EntryPoint Vertex 4  "main"
                              Source GLSL 450
                              Name 4  "main"
                              Name 10  "structtype"
                              MemberName 10(structtype) 0  "f"
                              MemberName 10(structtype) 1  "i"
                              Decorate 7 SpecId 200
                              Decorate 9 SpecId 201
               2:             TypeVoid
               3:             TypeFunction 2
               6:             TypeFloat 32
               7:    6(float) SpecConstant 1067450368
               8:             TypeInt 32 1
               9:      8(int) SpecConstant 14
  10(structtype):             TypeStruct 6(float) 8(int)
              11:10(structtype) SpecConstantComposite 7 9
         4(main):           2 Function None 3
               5:             Label
                              Return
                              FunctionEnd
```

Rname two function names to match their functionalities.
1) Rename `GlslangToSpvTraverser::createSpvSpecConstant()` to
`createSpvConstant()`;
2) Rename `GlslangToSpvTraverser::createSpvConstant()` to
`createSpvConstantFromConstUnionArray()`

Add function `GlslangToSpvTraverser::createSpvConstantFromSubTree()` to
handle constant creation from sub trees (e.g.: specialization constants).

Related PR: #208
2016-03-24 18:04:00 -04:00
..
arrays.h SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl). 2016-02-15 21:46:55 -07:00
BaseTypes.h SPV: Fix 'location' inheritance bug. 2016-02-19 12:21:50 -07:00
Common.h Fix compilation issues with MSVC 2010 2016-02-23 22:17:38 +01:00
ConstantUnion.h Array of Array prep: Turn a batch of 0's into nullptr or UnsizedArraySize. 2015-08-09 18:15:25 -06:00
InfoSink.h Create a new method to return string name or number to DRY code. 2015-08-06 15:24:56 -04:00
InitializeGlobals.h Interface and naming improvements: 2013-11-01 17:41:52 +00:00
intermediate.h Front-end: Add specialization-constant subtrees for const variables/symbols. 2016-03-20 16:46:00 -06:00
PoolAlloc.h glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
ResourceLimits.h Implement GL_ARB_shader_texture_image_samples. Also add in gl_MaxSamples and the float imageAtomicExchange. 2014-08-13 16:54:02 +00:00
revision.h SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl). 2016-02-15 21:46:55 -07:00
revision.template Add a versioning system and tie it to the -v command-line option. System is described in glslang/Include/revision.template. 2013-12-04 04:43:40 +00:00
ShHandle.h Fix warnings/errors for strict aliasing & function prototypes 2016-02-23 12:17:11 -05:00
Types.h Support specialization composite constants 2016-03-24 18:04:00 -04:00