glslang/Test/test-spirv-list
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

110 lines
2.2 KiB
Plaintext

# Test looping constructs.
# No tests yet for making sure break and continue from a nested loop
# goes to the innermost target.
spv.do-simple.vert
spv.do-while-continue-break.vert
spv.for-complex-condition.vert
spv.for-continue-break.vert
spv.for-simple.vert
spv.for-notest.vert
spv.for-nobody.vert
spv.while-continue-break.vert
spv.while-simple.vert
# vulkan-specific tests
spv.set.vert
spv.double.comp
spv.100ops.frag
spv.130.frag
spv.140.frag
spv.150.geom
spv.150.vert
spv.300BuiltIns.vert
spv.300layout.frag
spv.300layout.vert
spv.300layoutp.vert
spv.310.comp
spv.330.geom
spv.400.frag
spv.400.tesc
spv.400.tese
spv.420.geom
spv.430.vert
spv.accessChain.frag
spv.aggOps.frag
spv.always-discard.frag
spv.always-discard2.frag
spv.bitCast.frag
spv.bool.vert
spv.boolInBlock.frag
spv.branch-return.vert
spv.conditionalDiscard.frag
spv.conversion.frag
spv.dataOut.frag
spv.dataOutIndirect.frag
spv.dataOutIndirect.vert
spv.deepRvalue.frag
spv.depthOut.frag
spv.discard-dce.frag
spv.doWhileLoop.frag
spv.earlyReturnDiscard.frag
spv.flowControl.frag
spv.forLoop.frag
spv.forwardFun.frag
spv.functionCall.frag
spv.functionSemantics.frag
spv.interpOps.frag
spv.layoutNested.vert
spv.length.frag
spv.localAggregates.frag
spv.loops.frag
spv.loopsArtificial.frag
spv.matFun.vert
spv.matrix.frag
spv.matrix2.frag
spv.memoryQualifier.frag
spv.merge-unreachable.frag
spv.newTexture.frag
spv.noDeadDecorations.vert
spv.nonSquare.vert
spv.Operations.frag
spv.intOps.vert
spv.precision.frag
spv.prepost.frag
spv.qualifiers.vert
spv.shiftOps.frag
spv.simpleFunctionCall.frag
spv.simpleMat.vert
spv.sparseTexture.frag
spv.sparseTextureClamp.frag
spv.structAssignment.frag
spv.structDeref.frag
spv.structure.frag
spv.switch.frag
spv.swizzle.frag
spv.test.frag
spv.test.vert
spv.texture.frag
spv.texture.vert
spv.image.frag
spv.types.frag
spv.uint.frag
spv.uniformArray.frag
spv.variableArrayIndex.frag
spv.varyingArray.frag
spv.varyingArrayIndirect.frag
spv.voidFunction.frag
spv.whileLoop.frag
spv.AofA.frag
spv.queryL.frag
spv.separate.frag
spv.shortCircuit.frag
spv.pushConstant.vert
spv.subpass.frag
spv.specConstant.vert
spv.specConstant.comp
spv.specConstantComposite.vert
# GLSL-level semantics
vulkan.frag
vulkan.vert
vulkan.comp