From 48edadfd247ca02a9647121496a63f2cf0fa2ece Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Thu, 31 Dec 2015 16:11:41 +0800 Subject: [PATCH 01/84] Parser & SPV: Implement two extensions regarding GLSL sparse texture. Implement extension "GL_ARB_sparse_texture2". Implement extension "GL_ARB_sparse_texture_clamp". --- SPIRV/GlslangToSpv.cpp | 82 ++- SPIRV/SpvBuilder.cpp | 84 ++- SPIRV/SpvBuilder.h | 4 +- Test/baseResults/spv.sparseTexture.frag.out | 522 ++++++++++++++++++ .../spv.sparseTextureClamp.frag.out | 456 +++++++++++++++ Test/spv.sparseTexture.frag | 80 +++ Test/spv.sparseTextureClamp.frag | 70 +++ Test/test-spirv-list | 2 + glslang/Include/intermediate.h | 63 +++ glslang/MachineIndependent/Initialize.cpp | 403 +++++++++----- glslang/MachineIndependent/Versions.cpp | 4 + glslang/MachineIndependent/Versions.h | 2 + 12 files changed, 1621 insertions(+), 151 deletions(-) create mode 100644 Test/baseResults/spv.sparseTexture.frag.out create mode 100644 Test/baseResults/spv.sparseTextureClamp.frag.out create mode 100644 Test/spv.sparseTexture.frag create mode 100644 Test/spv.sparseTextureClamp.frag diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 964ff09e..1b565764 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1884,6 +1884,14 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments) { const glslang::TIntermSequence& glslangArguments = node.getSequence(); + + glslang::TSampler sampler = {}; + bool cubeCompare = false; + if (node.isTexture()) { + sampler = glslangArguments[0]->getAsTyped()->getType().getSampler(); + cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; + } + for (int i = 0; i < (int)glslangArguments.size(); ++i) { builder.clearAccessChain(); glslangArguments[i]->traverse(this); @@ -1902,6 +1910,51 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 0) lvalue = true; break; + case glslang::EOpSparseTexture: + if ((cubeCompare && i == 3) || (! cubeCompare && i == 2)) + lvalue = true; + break; + case glslang::EOpSparseTextureClamp: + if ((cubeCompare && i == 4) || (! cubeCompare && i == 3)) + lvalue = true; + break; + case glslang::EOpSparseTextureLod: + case glslang::EOpSparseTextureOffset: + if (i == 3) + lvalue = true; + break; + case glslang::EOpSparseTextureFetch: + if ((sampler.dim != glslang::EsdRect && i == 3) || (sampler.dim == glslang::EsdRect && i == 2)) + lvalue = true; + break; + case glslang::EOpSparseTextureFetchOffset: + if ((sampler.dim != glslang::EsdRect && i == 4) || (sampler.dim == glslang::EsdRect && i == 3)) + lvalue = true; + break; + case glslang::EOpSparseTextureLodOffset: + case glslang::EOpSparseTextureGrad: + case glslang::EOpSparseTextureOffsetClamp: + if (i == 4) + lvalue = true; + break; + case glslang::EOpSparseTextureGradOffset: + case glslang::EOpSparseTextureGradClamp: + if (i == 5) + lvalue = true; + break; + case glslang::EOpSparseTextureGradOffsetClamp: + if (i == 6) + lvalue = true; + break; + case glslang::EOpSparseTextureGather: + if ((sampler.shadow && i == 3) || (! sampler.shadow && i == 2)) + lvalue = true; + break; + case glslang::EOpSparseTextureGatherOffset: + case glslang::EOpSparseTextureGatherOffsets: + if ((sampler.shadow && i == 4) || (! sampler.shadow && i == 3)) + lvalue = true; + break; default: break; } @@ -1963,6 +2016,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return builder.createTextureQueryCall(spv::OpImageQueryLod, params); case glslang::EOpTextureQueryLevels: return builder.createTextureQueryCall(spv::OpImageQueryLevels, params); + case glslang::EOpSparseTexelsResident: + return builder.createUnaryOp(spv::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]); default: assert(0); break; @@ -1990,7 +2045,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO operands.push_back(*opIt); builder.createNoResultOp(spv::OpImageWrite, operands); return spv::NoResult; - } else { + } else if (node->isSparseImage()) { + spv::MissingFunctionality("sparse image functions"); + return spv::NoResult; + } + else { // Process image atomic operations // GLSL "IMAGE_PARAMS" will involve in constructing an image texel pointer and this pointer, @@ -2010,7 +2069,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } // Check for texture functions other than queries - + bool sparse = node->isSparseTexture(); bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; // check for bias argument @@ -2021,6 +2080,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO ++nonBiasArgCount; if (cracked.grad) nonBiasArgCount += 2; + if (cracked.lodClamp) + ++nonBiasArgCount; + if (sparse) + ++nonBiasArgCount; if ((int)arguments.size() > nonBiasArgCount) bias = true; @@ -2032,9 +2095,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO int extraArgs = 0; // sort out where Dref is coming from - if (sampler.shadow && sampler.dim == glslang::EsdCube && sampler.arrayed) + if (cubeCompare) { params.Dref = arguments[2]; - else if (sampler.shadow && cracked.gather) { + ++extraArgs; + } else if (sampler.shadow && cracked.gather) { params.Dref = arguments[2]; ++extraArgs; } else if (sampler.shadow) { @@ -2066,6 +2130,14 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO params.offsets = arguments[2 + extraArgs]; ++extraArgs; } + if (cracked.lodClamp) { + params.lodClamp = arguments[2 + extraArgs]; + ++extraArgs; + } + if (sparse) { + params.texelOut = arguments[2 + extraArgs]; + ++extraArgs; + } if (bias) { params.bias = arguments[2 + extraArgs]; ++extraArgs; @@ -2080,7 +2152,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } - return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), cracked.fetch, cracked.proj, cracked.gather, params); + return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), sparse, cracked.fetch, cracked.proj, cracked.gather, params); } spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 3915b66e..4e0c2e80 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1222,7 +1222,7 @@ Id Builder::createBuiltinCall(Decoration /*precision*/, Id resultType, Id builti // Accept all parameters needed to create a texture instruction. // Create the correct instruction based on the inputs, and make the call. -Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, bool proj, bool gather, const TextureParameters& parameters) +Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, const TextureParameters& parameters) { static const int maxTextureArgs = 10; Id texArgs[maxTextureArgs] = {}; @@ -1275,6 +1275,10 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask); texArgs[numArgs++] = parameters.sample; } + if (parameters.lodClamp) { + mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask); + texArgs[numArgs++] = parameters.lodClamp; + } if (mask == ImageOperandsMaskNone) --numArgs; // undo speculative reservation for the mask argument else @@ -1286,35 +1290,68 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b Op opCode; opCode = OpImageSampleImplicitLod; if (fetch) { - opCode = OpImageFetch; + if (sparse) + opCode = OpImageSparseFetch; + else + opCode = OpImageFetch; } else if (gather) { if (parameters.Dref) - opCode = OpImageDrefGather; + if (sparse) + opCode = OpImageSparseDrefGather; + else + opCode = OpImageDrefGather; else - opCode = OpImageGather; + if (sparse) + opCode = OpImageSparseGather; + else + opCode = OpImageGather; } else if (xplicit) { if (parameters.Dref) { if (proj) - opCode = OpImageSampleProjDrefExplicitLod; + if (sparse) + opCode = OpImageSparseSampleProjDrefExplicitLod; + else + opCode = OpImageSampleProjDrefExplicitLod; else - opCode = OpImageSampleDrefExplicitLod; + if (sparse) + opCode = OpImageSparseSampleDrefExplicitLod; + else + opCode = OpImageSampleDrefExplicitLod; } else { if (proj) - opCode = OpImageSampleProjExplicitLod; + if (sparse) + opCode = OpImageSparseSampleProjExplicitLod; + else + opCode = OpImageSampleProjExplicitLod; else - opCode = OpImageSampleExplicitLod; + if (sparse) + opCode = OpImageSparseSampleExplicitLod; + else + opCode = OpImageSampleExplicitLod; } } else { if (parameters.Dref) { if (proj) - opCode = OpImageSampleProjDrefImplicitLod; + if (sparse) + opCode = OpImageSparseSampleProjDrefImplicitLod; + else + opCode = OpImageSampleProjDrefImplicitLod; else - opCode = OpImageSampleDrefImplicitLod; + if (sparse) + opCode = OpImageSparseSampleDrefImplicitLod; + else + opCode = OpImageSampleDrefImplicitLod; } else { if (proj) - opCode = OpImageSampleProjImplicitLod; + if (sparse) + opCode = OpImageSparseSampleProjImplicitLod; + else + opCode = OpImageSampleProjImplicitLod; else - opCode = OpImageSampleImplicitLod; + if (sparse) + opCode = OpImageSparseSampleImplicitLod; + else + opCode = OpImageSampleImplicitLod; } } @@ -1335,6 +1372,15 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b } } + Id typeId0 = 0; + Id typeId1 = 0; + + if (sparse) { + typeId0 = resultType; + typeId1 = getDerefTypeId(parameters.texelOut); + resultType = makeStructResultType(typeId0, typeId1); + } + // Build the SPIR-V instruction Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode); for (int op = 0; op < optArgNum; ++op) @@ -1348,10 +1394,16 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b Id resultId = textureInst->getResultId(); - // When a smear is needed, do it, as per what was computed - // above when resultType was changed to a scalar type. - if (resultType != smearedType) - resultId = smearScalar(precision, resultId, smearedType); + if (sparse) { + // Decode the return type that was a special structure + createStore(createCompositeExtract(resultId, typeId1, 1), parameters.texelOut); + resultId = createCompositeExtract(resultId, typeId0, 0); + } else { + // When a smear is needed, do it, as per what was computed + // above when resultType was changed to a scalar type. + if (resultType != smearedType) + resultId = smearScalar(precision, resultId, smearedType); + } return resultId; } diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 7bf43962..07c858c6 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -310,10 +310,12 @@ public: Id gradY; Id sample; Id comp; + Id texelOut; + Id lodClamp; }; // Select the correct texture operation based on all inputs, and emit the correct instruction - Id createTextureCall(Decoration precision, Id resultType, bool fetch, bool proj, bool gather, const TextureParameters&); + Id createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, const TextureParameters&); // Emit the OpTextureQuery* instruction that was passed in. // Figure out the right return value and type, and return it. diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out new file mode 100644 index 00000000..24209e08 --- /dev/null +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -0,0 +1,522 @@ +spv.sparseTexture.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 399 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 384 + ExecutionMode 4 OriginLowerLeft + Source GLSL 450 + SourceExtension "GL_ARB_sparse_texture2" + Name 4 "main" + Name 8 "resident" + Name 13 "texel" + Name 18 "itexel" + Name 23 "utexel" + Name 29 "s2D" + Name 33 "c2" + Name 35 "ResType" + Name 44 "s3D" + Name 48 "c3" + Name 59 "isCube" + Name 62 "ResType" + Name 71 "s2DShadow" + Name 77 "ResType" + Name 86 "sCubeArrayShadow" + Name 89 "c4" + Name 108 "usCubeArray" + Name 111 "ResType" + Name 140 "us2DRect" + Name 154 "s2DArrayShadow" + Name 186 "s2DMS" + Name 223 "is2DArray" + Name 256 "sCubeShadow" + Name 289 "s2DRectShadow" + Name 360 "offsets" + Name 384 "outColor" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Function 11(fvec4) + 14: 10(float) Constant 0 + 15: 11(fvec4) ConstantComposite 14 14 14 14 + 16: TypeVector 6(int) 4 + 17: TypePointer Function 16(ivec4) + 19: 16(ivec4) ConstantComposite 9 9 9 9 + 20: TypeInt 32 0 + 21: TypeVector 20(int) 4 + 22: TypePointer Function 21(ivec4) + 24: 20(int) Constant 0 + 25: 21(ivec4) ConstantComposite 24 24 24 24 + 26: TypeImage 10(float) 2D sampled format:Unknown + 27: TypeSampledImage 26 + 28: TypePointer UniformConstant 27 + 29(s2D): 28(ptr) Variable UniformConstant + 31: TypeVector 10(float) 2 + 32: TypePointer UniformConstant 31(fvec2) + 33(c2): 32(ptr) Variable UniformConstant + 35(ResType): TypeStruct 6(int) 11(fvec4) + 41: TypeImage 10(float) 3D sampled format:Unknown + 42: TypeSampledImage 41 + 43: TypePointer UniformConstant 42 + 44(s3D): 43(ptr) Variable UniformConstant + 46: TypeVector 10(float) 3 + 47: TypePointer UniformConstant 46(fvec3) + 48(c3): 47(ptr) Variable UniformConstant + 50: 10(float) Constant 1073741824 + 56: TypeImage 6(int) Cube sampled format:Unknown + 57: TypeSampledImage 56 + 58: TypePointer UniformConstant 57 + 59(isCube): 58(ptr) Variable UniformConstant + 62(ResType): TypeStruct 6(int) 16(ivec4) + 68: TypeImage 10(float) 2D depth sampled format:Unknown + 69: TypeSampledImage 68 + 70: TypePointer UniformConstant 69 + 71(s2DShadow): 70(ptr) Variable UniformConstant + 74: TypePointer Function 10(float) + 77(ResType): TypeStruct 6(int) 10(float) + 83: TypeImage 10(float) Cube depth array sampled format:Unknown + 84: TypeSampledImage 83 + 85: TypePointer UniformConstant 84 +86(sCubeArrayShadow): 85(ptr) Variable UniformConstant + 88: TypePointer UniformConstant 11(fvec4) + 89(c4): 88(ptr) Variable UniformConstant + 91: 10(float) Constant 1065353216 + 105: TypeImage 20(int) Cube array sampled format:Unknown + 106: TypeSampledImage 105 + 107: TypePointer UniformConstant 106 +108(usCubeArray): 107(ptr) Variable UniformConstant + 111(ResType): TypeStruct 6(int) 21(ivec4) + 119: 20(int) Constant 1 + 129: TypeVector 6(int) 3 + 130: 6(int) Constant 2 + 131: 129(ivec3) ConstantComposite 130 130 130 + 137: TypeImage 20(int) Rect sampled format:Unknown + 138: TypeSampledImage 137 + 139: TypePointer UniformConstant 138 + 140(us2DRect): 139(ptr) Variable UniformConstant + 143: TypeVector 6(int) 2 + 144: 6(int) Constant 3 + 145: 143(ivec2) ConstantComposite 144 144 + 151: TypeImage 10(float) 2D depth array sampled format:Unknown + 152: TypeSampledImage 151 + 153: TypePointer UniformConstant 152 +154(s2DArrayShadow): 153(ptr) Variable UniformConstant + 157: 6(int) Constant 5 + 158: 143(ivec2) ConstantComposite 157 157 + 159: 20(int) Constant 2 + 183: TypeImage 10(float) 2D multi-sampled sampled format:Unknown + 184: TypeSampledImage 183 + 185: TypePointer UniformConstant 184 + 186(s2DMS): 185(ptr) Variable UniformConstant + 190: 6(int) Constant 4 + 199: 129(ivec3) ConstantComposite 190 190 190 + 220: TypeImage 6(int) 2D array sampled format:Unknown + 221: TypeSampledImage 220 + 222: TypePointer UniformConstant 221 + 223(is2DArray): 222(ptr) Variable UniformConstant + 226: 6(int) Constant 6 + 227: 143(ivec2) ConstantComposite 226 226 + 235: 6(int) Constant 7 + 236: 143(ivec2) ConstantComposite 235 235 + 253: TypeImage 10(float) Cube depth sampled format:Unknown + 254: TypeSampledImage 253 + 255: TypePointer UniformConstant 254 +256(sCubeShadow): 255(ptr) Variable UniformConstant + 286: TypeImage 10(float) Rect depth sampled format:Unknown + 287: TypeSampledImage 286 + 288: TypePointer UniformConstant 287 +289(s2DRectShadow): 288(ptr) Variable UniformConstant + 294: 20(int) Constant 3 + 306: 143(ivec2) ConstantComposite 130 130 + 335: 143(ivec2) ConstantComposite 190 190 + 357: 20(int) Constant 4 + 358: TypeArray 143(ivec2) 357 + 359: TypePointer UniformConstant 358 + 360(offsets): 359(ptr) Variable UniformConstant + 383: TypePointer Output 11(fvec4) + 384(outColor): 383(ptr) Variable Output + 387: TypeBool + 4(main): 2 Function None 3 + 5: Label + 8(resident): 7(ptr) Variable Function + 13(texel): 12(ptr) Variable Function + 18(itexel): 17(ptr) Variable Function + 23(utexel): 22(ptr) Variable Function + 385: 12(ptr) Variable Function + Store 8(resident) 9 + Store 13(texel) 15 + Store 18(itexel) 19 + Store 23(utexel) 25 + 30: 27 Load 29(s2D) + 34: 31(fvec2) Load 33(c2) + 36: 35(ResType) ImageSparseSampleImplicitLod 30 34 + 37: 11(fvec4) CompositeExtract 36 1 + Store 13(texel) 37 + 38: 6(int) CompositeExtract 36 0 + 39: 6(int) Load 8(resident) + 40: 6(int) BitwiseOr 39 38 + Store 8(resident) 40 + 45: 42 Load 44(s3D) + 49: 46(fvec3) Load 48(c3) + 51: 35(ResType) ImageSparseSampleImplicitLod 45 49 Bias 50 + 52: 11(fvec4) CompositeExtract 51 1 + Store 13(texel) 52 + 53: 6(int) CompositeExtract 51 0 + 54: 6(int) Load 8(resident) + 55: 6(int) BitwiseOr 54 53 + Store 8(resident) 55 + 60: 57 Load 59(isCube) + 61: 46(fvec3) Load 48(c3) + 63: 62(ResType) ImageSparseSampleImplicitLod 60 61 + 64: 16(ivec4) CompositeExtract 63 1 + Store 18(itexel) 64 + 65: 6(int) CompositeExtract 63 0 + 66: 6(int) Load 8(resident) + 67: 6(int) BitwiseOr 66 65 + Store 8(resident) 67 + 72: 69 Load 71(s2DShadow) + 73: 46(fvec3) Load 48(c3) + 75: 74(ptr) AccessChain 13(texel) 24 + 76: 10(float) CompositeExtract 73 2 + 78: 77(ResType) ImageSparseSampleDrefImplicitLod 72 73 76 + 79: 10(float) CompositeExtract 78 1 + Store 75 79 + 80: 6(int) CompositeExtract 78 0 + 81: 6(int) Load 8(resident) + 82: 6(int) BitwiseOr 81 80 + Store 8(resident) 82 + 87: 84 Load 86(sCubeArrayShadow) + 90: 11(fvec4) Load 89(c4) + 92: 74(ptr) AccessChain 13(texel) 24 + 93: 77(ResType) ImageSparseSampleDrefImplicitLod 87 90 91 + 94: 10(float) CompositeExtract 93 1 + Store 92 94 + 95: 6(int) CompositeExtract 93 0 + 96: 6(int) Load 8(resident) + 97: 6(int) BitwiseOr 96 95 + Store 8(resident) 97 + 98: 27 Load 29(s2D) + 99: 31(fvec2) Load 33(c2) + 100: 35(ResType) ImageSparseSampleExplicitLod 98 99 Lod 50 + 101: 11(fvec4) CompositeExtract 100 1 + Store 13(texel) 101 + 102: 6(int) CompositeExtract 100 0 + 103: 6(int) Load 8(resident) + 104: 6(int) BitwiseOr 103 102 + Store 8(resident) 104 + 109: 106 Load 108(usCubeArray) + 110: 11(fvec4) Load 89(c4) + 112:111(ResType) ImageSparseSampleExplicitLod 109 110 Lod 91 + 113: 21(ivec4) CompositeExtract 112 1 + Store 23(utexel) 113 + 114: 6(int) CompositeExtract 112 0 + 115: 6(int) Load 8(resident) + 116: 6(int) BitwiseOr 115 114 + Store 8(resident) 116 + 117: 69 Load 71(s2DShadow) + 118: 46(fvec3) Load 48(c3) + 120: 74(ptr) AccessChain 13(texel) 119 + 121: 10(float) CompositeExtract 118 2 + 122: 77(ResType) ImageSparseSampleDrefExplicitLod 117 118 121 Lod 50 + 123: 10(float) CompositeExtract 122 1 + Store 120 123 + 124: 6(int) CompositeExtract 122 0 + 125: 6(int) Load 8(resident) + 126: 6(int) BitwiseOr 125 124 + Store 8(resident) 126 + 127: 42 Load 44(s3D) + 128: 46(fvec3) Load 48(c3) + 132: 35(ResType) ImageSparseSampleImplicitLod 127 128 Bias ConstOffset 50 131 + 133: 11(fvec4) CompositeExtract 132 1 + Store 13(texel) 133 + 134: 6(int) CompositeExtract 132 0 + 135: 6(int) Load 8(resident) + 136: 6(int) BitwiseOr 135 134 + Store 8(resident) 136 + 141: 138 Load 140(us2DRect) + 142: 31(fvec2) Load 33(c2) + 146:111(ResType) ImageSparseSampleImplicitLod 141 142 ConstOffset 145 + 147: 21(ivec4) CompositeExtract 146 1 + Store 23(utexel) 147 + 148: 6(int) CompositeExtract 146 0 + 149: 6(int) Load 8(resident) + 150: 6(int) BitwiseOr 149 148 + Store 8(resident) 150 + 155: 152 Load 154(s2DArrayShadow) + 156: 11(fvec4) Load 89(c4) + 160: 74(ptr) AccessChain 13(texel) 159 + 161: 10(float) CompositeExtract 156 3 + 162: 77(ResType) ImageSparseSampleDrefImplicitLod 155 156 161 ConstOffset 158 + 163: 10(float) CompositeExtract 162 1 + Store 160 163 + 164: 6(int) CompositeExtract 162 0 + 165: 6(int) Load 8(resident) + 166: 6(int) BitwiseOr 165 164 + Store 8(resident) 166 + 167: 27 Load 29(s2D) + 168: 31(fvec2) Load 33(c2) + 169: 143(ivec2) ConvertFToS 168 + 170: 35(ResType) ImageSparseFetch 167 169 Lod 130 + 171: 11(fvec4) CompositeExtract 170 1 + Store 13(texel) 171 + 172: 6(int) CompositeExtract 170 0 + 173: 6(int) Load 8(resident) + 174: 6(int) BitwiseOr 173 172 + Store 8(resident) 174 + 175: 138 Load 140(us2DRect) + 176: 31(fvec2) Load 33(c2) + 177: 143(ivec2) ConvertFToS 176 + 178:111(ResType) ImageSparseFetch 175 177 + 179: 21(ivec4) CompositeExtract 178 1 + Store 23(utexel) 179 + 180: 6(int) CompositeExtract 178 0 + 181: 6(int) Load 8(resident) + 182: 6(int) BitwiseOr 181 180 + Store 8(resident) 182 + 187: 184 Load 186(s2DMS) + 188: 31(fvec2) Load 33(c2) + 189: 143(ivec2) ConvertFToS 188 + 191: 35(ResType) ImageSparseFetch 187 189 Sample 190 + 192: 11(fvec4) CompositeExtract 191 1 + Store 13(texel) 192 + 193: 6(int) CompositeExtract 191 0 + 194: 6(int) Load 8(resident) + 195: 6(int) BitwiseOr 194 193 + Store 8(resident) 195 + 196: 42 Load 44(s3D) + 197: 46(fvec3) Load 48(c3) + 198: 129(ivec3) ConvertFToS 197 + 200: 35(ResType) ImageSparseFetch 196 198 Lod ConstOffset 130 199 + 201: 11(fvec4) CompositeExtract 200 1 + Store 13(texel) 201 + 202: 6(int) CompositeExtract 200 0 + 203: 6(int) Load 8(resident) + 204: 6(int) BitwiseOr 203 202 + Store 8(resident) 204 + 205: 138 Load 140(us2DRect) + 206: 31(fvec2) Load 33(c2) + 207: 143(ivec2) ConvertFToS 206 + 208:111(ResType) ImageSparseFetch 205 207 ConstOffset 145 + 209: 21(ivec4) CompositeExtract 208 1 + Store 23(utexel) 209 + 210: 6(int) CompositeExtract 208 0 + 211: 6(int) Load 8(resident) + 212: 6(int) BitwiseOr 211 210 + Store 8(resident) 212 + 213: 27 Load 29(s2D) + 214: 31(fvec2) Load 33(c2) + 215: 35(ResType) ImageSparseSampleExplicitLod 213 214 Lod ConstOffset 50 158 + 216: 11(fvec4) CompositeExtract 215 1 + Store 13(texel) 216 + 217: 6(int) CompositeExtract 215 0 + 218: 6(int) Load 8(resident) + 219: 6(int) BitwiseOr 218 217 + Store 8(resident) 219 + 224: 221 Load 223(is2DArray) + 225: 46(fvec3) Load 48(c3) + 228: 62(ResType) ImageSparseSampleExplicitLod 224 225 Lod ConstOffset 50 227 + 229: 16(ivec4) CompositeExtract 228 1 + Store 18(itexel) 229 + 230: 6(int) CompositeExtract 228 0 + 231: 6(int) Load 8(resident) + 232: 6(int) BitwiseOr 231 230 + Store 8(resident) 232 + 233: 69 Load 71(s2DShadow) + 234: 46(fvec3) Load 48(c3) + 237: 74(ptr) AccessChain 13(texel) 159 + 238: 10(float) CompositeExtract 234 2 + 239: 77(ResType) ImageSparseSampleDrefExplicitLod 233 234 238 Lod ConstOffset 50 236 + 240: 10(float) CompositeExtract 239 1 + Store 237 240 + 241: 6(int) CompositeExtract 239 0 + 242: 6(int) Load 8(resident) + 243: 6(int) BitwiseOr 242 241 + Store 8(resident) 243 + 244: 42 Load 44(s3D) + 245: 46(fvec3) Load 48(c3) + 246: 46(fvec3) Load 48(c3) + 247: 46(fvec3) Load 48(c3) + 248: 35(ResType) ImageSparseSampleExplicitLod 244 245 Grad 246 247 + 249: 11(fvec4) CompositeExtract 248 1 + Store 13(texel) 249 + 250: 6(int) CompositeExtract 248 0 + 251: 6(int) Load 8(resident) + 252: 6(int) BitwiseOr 251 250 + Store 8(resident) 252 + 257: 254 Load 256(sCubeShadow) + 258: 11(fvec4) Load 89(c4) + 259: 46(fvec3) Load 48(c3) + 260: 46(fvec3) Load 48(c3) + 261: 74(ptr) AccessChain 13(texel) 119 + 262: 10(float) CompositeExtract 258 3 + 263: 77(ResType) ImageSparseSampleDrefExplicitLod 257 258 262 Grad 259 260 + 264: 10(float) CompositeExtract 263 1 + Store 261 264 + 265: 6(int) CompositeExtract 263 0 + 266: 6(int) Load 8(resident) + 267: 6(int) BitwiseOr 266 265 + Store 8(resident) 267 + 268: 106 Load 108(usCubeArray) + 269: 11(fvec4) Load 89(c4) + 270: 46(fvec3) Load 48(c3) + 271: 46(fvec3) Load 48(c3) + 272:111(ResType) ImageSparseSampleExplicitLod 268 269 Grad 270 271 + 273: 21(ivec4) CompositeExtract 272 1 + Store 23(utexel) 273 + 274: 6(int) CompositeExtract 272 0 + 275: 6(int) Load 8(resident) + 276: 6(int) BitwiseOr 275 274 + Store 8(resident) 276 + 277: 27 Load 29(s2D) + 278: 31(fvec2) Load 33(c2) + 279: 31(fvec2) Load 33(c2) + 280: 31(fvec2) Load 33(c2) + 281: 35(ResType) ImageSparseSampleExplicitLod 277 278 Grad ConstOffset 279 280 158 + 282: 11(fvec4) CompositeExtract 281 1 + Store 13(texel) 282 + 283: 6(int) CompositeExtract 281 0 + 284: 6(int) Load 8(resident) + 285: 6(int) BitwiseOr 284 283 + Store 8(resident) 285 + 290: 287 Load 289(s2DRectShadow) + 291: 46(fvec3) Load 48(c3) + 292: 31(fvec2) Load 33(c2) + 293: 31(fvec2) Load 33(c2) + 295: 74(ptr) AccessChain 13(texel) 294 + 296: 10(float) CompositeExtract 291 2 + 297: 77(ResType) ImageSparseSampleDrefExplicitLod 290 291 296 Grad ConstOffset 292 293 227 + 298: 10(float) CompositeExtract 297 1 + Store 295 298 + 299: 6(int) CompositeExtract 297 0 + 300: 6(int) Load 8(resident) + 301: 6(int) BitwiseOr 300 299 + Store 8(resident) 301 + 302: 221 Load 223(is2DArray) + 303: 46(fvec3) Load 48(c3) + 304: 31(fvec2) Load 33(c2) + 305: 31(fvec2) Load 33(c2) + 307: 62(ResType) ImageSparseSampleExplicitLod 302 303 Grad ConstOffset 304 305 306 + 308: 16(ivec4) CompositeExtract 307 1 + Store 18(itexel) 308 + 309: 6(int) CompositeExtract 307 0 + 310: 6(int) Load 8(resident) + 311: 6(int) BitwiseOr 310 309 + Store 8(resident) 311 + 312: 27 Load 29(s2D) + 313: 31(fvec2) Load 33(c2) + 314: 35(ResType) ImageSparseGather 312 313 9 + 315: 11(fvec4) CompositeExtract 314 1 + Store 13(texel) 315 + 316: 6(int) CompositeExtract 314 0 + 317: 6(int) Load 8(resident) + 318: 6(int) BitwiseOr 317 316 + Store 8(resident) 318 + 319: 221 Load 223(is2DArray) + 320: 46(fvec3) Load 48(c3) + 321: 62(ResType) ImageSparseGather 319 320 130 + 322: 16(ivec4) CompositeExtract 321 1 + Store 18(itexel) 322 + 323: 6(int) CompositeExtract 321 0 + 324: 6(int) Load 8(resident) + 325: 6(int) BitwiseOr 324 323 + Store 8(resident) 325 + 326: 152 Load 154(s2DArrayShadow) + 327: 46(fvec3) Load 48(c3) + 328: 35(ResType) ImageSparseDrefGather 326 327 50 + 329: 11(fvec4) CompositeExtract 328 1 + Store 13(texel) 329 + 330: 6(int) CompositeExtract 328 0 + 331: 6(int) Load 8(resident) + 332: 6(int) BitwiseOr 331 330 + Store 8(resident) 332 + 333: 27 Load 29(s2D) + 334: 31(fvec2) Load 33(c2) + 336: 35(ResType) ImageSparseGather 333 334 9 ConstOffset 335 + 337: 11(fvec4) CompositeExtract 336 1 + Store 13(texel) 337 + 338: 6(int) CompositeExtract 336 0 + 339: 6(int) Load 8(resident) + 340: 6(int) BitwiseOr 339 338 + Store 8(resident) 340 + 341: 221 Load 223(is2DArray) + 342: 46(fvec3) Load 48(c3) + 343: 62(ResType) ImageSparseGather 341 342 130 ConstOffset 158 + 344: 16(ivec4) CompositeExtract 343 1 + Store 18(itexel) 344 + 345: 6(int) CompositeExtract 343 0 + 346: 6(int) Load 8(resident) + 347: 6(int) BitwiseOr 346 345 + Store 8(resident) 347 + 348: 287 Load 289(s2DRectShadow) + 349: 31(fvec2) Load 33(c2) + 350: 35(ResType) ImageSparseDrefGather 348 349 50 ConstOffset 236 + 351: 11(fvec4) CompositeExtract 350 1 + Store 13(texel) 351 + 352: 6(int) CompositeExtract 350 0 + 353: 6(int) Load 8(resident) + 354: 6(int) BitwiseOr 353 352 + Store 8(resident) 354 + 355: 27 Load 29(s2D) + 356: 31(fvec2) Load 33(c2) + 361: 358 Load 360(offsets) + 362: 35(ResType) ImageSparseGather 355 356 9 ConstOffsets 361 + 363: 11(fvec4) CompositeExtract 362 1 + Store 13(texel) 363 + 364: 6(int) CompositeExtract 362 0 + 365: 6(int) Load 8(resident) + 366: 6(int) BitwiseOr 365 364 + Store 8(resident) 366 + 367: 221 Load 223(is2DArray) + 368: 46(fvec3) Load 48(c3) + 369: 358 Load 360(offsets) + 370: 62(ResType) ImageSparseGather 367 368 130 ConstOffsets 369 + 371: 16(ivec4) CompositeExtract 370 1 + Store 18(itexel) 371 + 372: 6(int) CompositeExtract 370 0 + 373: 6(int) Load 8(resident) + 374: 6(int) BitwiseOr 373 372 + Store 8(resident) 374 + 375: 287 Load 289(s2DRectShadow) + 376: 31(fvec2) Load 33(c2) + 377: 358 Load 360(offsets) + 378: 35(ResType) ImageSparseDrefGather 375 376 50 ConstOffsets 377 + 379: 11(fvec4) CompositeExtract 378 1 + Store 13(texel) 379 + 380: 6(int) CompositeExtract 378 0 + 381: 6(int) Load 8(resident) + 382: 6(int) BitwiseOr 381 380 + Store 8(resident) 382 + 386: 6(int) Load 8(resident) + 388: 387(bool) ImageSparseTexelsResident 386 + SelectionMerge 390 None + BranchConditional 388 389 392 + 389: Label + 391: 11(fvec4) Load 13(texel) + Store 385 391 + Branch 390 + 392: Label + 393: 16(ivec4) Load 18(itexel) + 394: 11(fvec4) ConvertSToF 393 + 395: 21(ivec4) Load 23(utexel) + 396: 11(fvec4) ConvertUToF 395 + 397: 11(fvec4) FAdd 394 396 + Store 385 397 + Branch 390 + 390: Label + 398: 11(fvec4) Load 385 + Store 384(outColor) 398 + Return + FunctionEnd diff --git a/Test/baseResults/spv.sparseTextureClamp.frag.out b/Test/baseResults/spv.sparseTextureClamp.frag.out new file mode 100644 index 00000000..42fc27aa --- /dev/null +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -0,0 +1,456 @@ +spv.sparseTextureClamp.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 360 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 345 + ExecutionMode 4 OriginLowerLeft + Source GLSL 450 + SourceExtension "GL_ARB_sparse_texture_clamp" + Name 4 "main" + Name 8 "resident" + Name 13 "texel" + Name 18 "itexel" + Name 23 "utexel" + Name 29 "s2D" + Name 33 "c2" + Name 36 "lodClamp" + Name 38 "ResType" + Name 47 "s3D" + Name 51 "c3" + Name 63 "isCube" + Name 67 "ResType" + Name 76 "s2DShadow" + Name 83 "ResType" + Name 92 "sCubeArrayShadow" + Name 95 "c4" + Name 154 "us2DRect" + Name 161 "ResType" + Name 170 "s2DArrayShadow" + Name 218 "sCubeShadow" + Name 235 "usCubeArray" + Name 286 "s2DRectShadow" + Name 305 "is2DArray" + Name 345 "outColor" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Function 11(fvec4) + 14: 10(float) Constant 0 + 15: 11(fvec4) ConstantComposite 14 14 14 14 + 16: TypeVector 6(int) 4 + 17: TypePointer Function 16(ivec4) + 19: 16(ivec4) ConstantComposite 9 9 9 9 + 20: TypeInt 32 0 + 21: TypeVector 20(int) 4 + 22: TypePointer Function 21(ivec4) + 24: 20(int) Constant 0 + 25: 21(ivec4) ConstantComposite 24 24 24 24 + 26: TypeImage 10(float) 2D sampled format:Unknown + 27: TypeSampledImage 26 + 28: TypePointer UniformConstant 27 + 29(s2D): 28(ptr) Variable UniformConstant + 31: TypeVector 10(float) 2 + 32: TypePointer UniformConstant 31(fvec2) + 33(c2): 32(ptr) Variable UniformConstant + 35: TypePointer UniformConstant 10(float) + 36(lodClamp): 35(ptr) Variable UniformConstant + 38(ResType): TypeStruct 6(int) 11(fvec4) + 44: TypeImage 10(float) 3D sampled format:Unknown + 45: TypeSampledImage 44 + 46: TypePointer UniformConstant 45 + 47(s3D): 46(ptr) Variable UniformConstant + 49: TypeVector 10(float) 3 + 50: TypePointer UniformConstant 49(fvec3) + 51(c3): 50(ptr) Variable UniformConstant + 54: 10(float) Constant 1073741824 + 60: TypeImage 6(int) Cube sampled format:Unknown + 61: TypeSampledImage 60 + 62: TypePointer UniformConstant 61 + 63(isCube): 62(ptr) Variable UniformConstant + 67(ResType): TypeStruct 6(int) 16(ivec4) + 73: TypeImage 10(float) 2D depth sampled format:Unknown + 74: TypeSampledImage 73 + 75: TypePointer UniformConstant 74 + 76(s2DShadow): 75(ptr) Variable UniformConstant + 80: TypePointer Function 10(float) + 83(ResType): TypeStruct 6(int) 10(float) + 89: TypeImage 10(float) Cube depth array sampled format:Unknown + 90: TypeSampledImage 89 + 91: TypePointer UniformConstant 90 +92(sCubeArrayShadow): 91(ptr) Variable UniformConstant + 94: TypePointer UniformConstant 11(fvec4) + 95(c4): 94(ptr) Variable UniformConstant + 97: 10(float) Constant 1065353216 + 142: TypeVector 6(int) 3 + 143: 6(int) Constant 2 + 144: 142(ivec3) ConstantComposite 143 143 143 + 151: TypeImage 20(int) Rect sampled format:Unknown + 152: TypeSampledImage 151 + 153: TypePointer UniformConstant 152 + 154(us2DRect): 153(ptr) Variable UniformConstant + 157: TypeVector 6(int) 2 + 158: 6(int) Constant 3 + 159: 157(ivec2) ConstantComposite 158 158 + 161(ResType): TypeStruct 6(int) 21(ivec4) + 167: TypeImage 10(float) 2D depth array sampled format:Unknown + 168: TypeSampledImage 167 + 169: TypePointer UniformConstant 168 +170(s2DArrayShadow): 169(ptr) Variable UniformConstant + 173: 6(int) Constant 5 + 174: 157(ivec2) ConstantComposite 173 173 + 176: 20(int) Constant 2 + 215: TypeImage 10(float) Cube depth sampled format:Unknown + 216: TypeSampledImage 215 + 217: TypePointer UniformConstant 216 +218(sCubeShadow): 217(ptr) Variable UniformConstant + 224: 20(int) Constant 1 + 232: TypeImage 20(int) Cube array sampled format:Unknown + 233: TypeSampledImage 232 + 234: TypePointer UniformConstant 233 +235(usCubeArray): 234(ptr) Variable UniformConstant + 283: TypeImage 10(float) Rect depth sampled format:Unknown + 284: TypeSampledImage 283 + 285: TypePointer UniformConstant 284 +286(s2DRectShadow): 285(ptr) Variable UniformConstant + 291: 6(int) Constant 6 + 292: 157(ivec2) ConstantComposite 291 291 + 294: 20(int) Constant 3 + 302: TypeImage 6(int) 2D array sampled format:Unknown + 303: TypeSampledImage 302 + 304: TypePointer UniformConstant 303 + 305(is2DArray): 304(ptr) Variable UniformConstant + 310: 157(ivec2) ConstantComposite 143 143 + 344: TypePointer Output 11(fvec4) + 345(outColor): 344(ptr) Variable Output + 348: TypeBool + 4(main): 2 Function None 3 + 5: Label + 8(resident): 7(ptr) Variable Function + 13(texel): 12(ptr) Variable Function + 18(itexel): 17(ptr) Variable Function + 23(utexel): 22(ptr) Variable Function + 346: 12(ptr) Variable Function + Store 8(resident) 9 + Store 13(texel) 15 + Store 18(itexel) 19 + Store 23(utexel) 25 + 30: 27 Load 29(s2D) + 34: 31(fvec2) Load 33(c2) + 37: 10(float) Load 36(lodClamp) + 39: 38(ResType) ImageSparseSampleImplicitLod 30 34 MinLod 37 + 40: 11(fvec4) CompositeExtract 39 1 + Store 13(texel) 40 + 41: 6(int) CompositeExtract 39 0 + 42: 6(int) Load 8(resident) + 43: 6(int) BitwiseOr 42 41 + Store 8(resident) 43 + 48: 45 Load 47(s3D) + 52: 49(fvec3) Load 51(c3) + 53: 10(float) Load 36(lodClamp) + 55: 38(ResType) ImageSparseSampleImplicitLod 48 52 Bias MinLod 54 53 + 56: 11(fvec4) CompositeExtract 55 1 + Store 13(texel) 56 + 57: 6(int) CompositeExtract 55 0 + 58: 6(int) Load 8(resident) + 59: 6(int) BitwiseOr 58 57 + Store 8(resident) 59 + 64: 61 Load 63(isCube) + 65: 49(fvec3) Load 51(c3) + 66: 10(float) Load 36(lodClamp) + 68: 67(ResType) ImageSparseSampleImplicitLod 64 65 MinLod 66 + 69: 16(ivec4) CompositeExtract 68 1 + Store 18(itexel) 69 + 70: 6(int) CompositeExtract 68 0 + 71: 6(int) Load 8(resident) + 72: 6(int) BitwiseOr 71 70 + Store 8(resident) 72 + 77: 74 Load 76(s2DShadow) + 78: 49(fvec3) Load 51(c3) + 79: 10(float) Load 36(lodClamp) + 81: 80(ptr) AccessChain 13(texel) 24 + 82: 10(float) CompositeExtract 78 2 + 84: 83(ResType) ImageSparseSampleDrefImplicitLod 77 78 82 MinLod 79 + 85: 10(float) CompositeExtract 84 1 + Store 81 85 + 86: 6(int) CompositeExtract 84 0 + 87: 6(int) Load 8(resident) + 88: 6(int) BitwiseOr 87 86 + Store 8(resident) 88 + 93: 90 Load 92(sCubeArrayShadow) + 96: 11(fvec4) Load 95(c4) + 98: 10(float) Load 36(lodClamp) + 99: 80(ptr) AccessChain 13(texel) 24 + 100: 83(ResType) ImageSparseSampleDrefImplicitLod 93 96 97 MinLod 98 + 101: 10(float) CompositeExtract 100 1 + Store 99 101 + 102: 6(int) CompositeExtract 100 0 + 103: 6(int) Load 8(resident) + 104: 6(int) BitwiseOr 103 102 + Store 8(resident) 104 + 105: 27 Load 29(s2D) + 106: 31(fvec2) Load 33(c2) + 107: 10(float) Load 36(lodClamp) + 108: 11(fvec4) ImageSampleImplicitLod 105 106 MinLod 107 + 109: 11(fvec4) Load 13(texel) + 110: 11(fvec4) FAdd 109 108 + Store 13(texel) 110 + 111: 45 Load 47(s3D) + 112: 49(fvec3) Load 51(c3) + 113: 10(float) Load 36(lodClamp) + 114: 11(fvec4) ImageSampleImplicitLod 111 112 Bias MinLod 54 113 + 115: 11(fvec4) Load 13(texel) + 116: 11(fvec4) FAdd 115 114 + Store 13(texel) 116 + 117: 61 Load 63(isCube) + 118: 49(fvec3) Load 51(c3) + 119: 10(float) Load 36(lodClamp) + 120: 16(ivec4) ImageSampleImplicitLod 117 118 MinLod 119 + 121: 16(ivec4) Load 18(itexel) + 122: 16(ivec4) IAdd 121 120 + Store 18(itexel) 122 + 123: 74 Load 76(s2DShadow) + 124: 49(fvec3) Load 51(c3) + 125: 10(float) Load 36(lodClamp) + 126: 10(float) CompositeExtract 124 2 + 127: 10(float) ImageSampleDrefImplicitLod 123 124 126 MinLod 125 + 128: 80(ptr) AccessChain 13(texel) 24 + 129: 10(float) Load 128 + 130: 10(float) FAdd 129 127 + 131: 80(ptr) AccessChain 13(texel) 24 + Store 131 130 + 132: 90 Load 92(sCubeArrayShadow) + 133: 11(fvec4) Load 95(c4) + 134: 10(float) Load 36(lodClamp) + 135: 10(float) ImageSampleDrefImplicitLod 132 133 97 MinLod 134 + 136: 80(ptr) AccessChain 13(texel) 24 + 137: 10(float) Load 136 + 138: 10(float) FAdd 137 135 + 139: 80(ptr) AccessChain 13(texel) 24 + Store 139 138 + 140: 45 Load 47(s3D) + 141: 49(fvec3) Load 51(c3) + 145: 10(float) Load 36(lodClamp) + 146: 38(ResType) ImageSparseSampleImplicitLod 140 141 Bias ConstOffset MinLod 54 144 145 + 147: 11(fvec4) CompositeExtract 146 1 + Store 13(texel) 147 + 148: 6(int) CompositeExtract 146 0 + 149: 6(int) Load 8(resident) + 150: 6(int) BitwiseOr 149 148 + Store 8(resident) 150 + 155: 152 Load 154(us2DRect) + 156: 31(fvec2) Load 33(c2) + 160: 10(float) Load 36(lodClamp) + 162:161(ResType) ImageSparseSampleImplicitLod 155 156 ConstOffset MinLod 159 160 + 163: 21(ivec4) CompositeExtract 162 1 + Store 23(utexel) 163 + 164: 6(int) CompositeExtract 162 0 + 165: 6(int) Load 8(resident) + 166: 6(int) BitwiseOr 165 164 + Store 8(resident) 166 + 171: 168 Load 170(s2DArrayShadow) + 172: 11(fvec4) Load 95(c4) + 175: 10(float) Load 36(lodClamp) + 177: 80(ptr) AccessChain 13(texel) 176 + 178: 10(float) CompositeExtract 172 3 + 179: 83(ResType) ImageSparseSampleDrefImplicitLod 171 172 178 ConstOffset MinLod 174 175 + 180: 10(float) CompositeExtract 179 1 + Store 177 180 + 181: 6(int) CompositeExtract 179 0 + 182: 6(int) Load 8(resident) + 183: 6(int) BitwiseOr 182 181 + Store 8(resident) 183 + 184: 45 Load 47(s3D) + 185: 49(fvec3) Load 51(c3) + 186: 10(float) Load 36(lodClamp) + 187: 11(fvec4) ImageSampleImplicitLod 184 185 Bias ConstOffset MinLod 54 144 186 + 188: 11(fvec4) Load 13(texel) + 189: 11(fvec4) FAdd 188 187 + Store 13(texel) 189 + 190: 152 Load 154(us2DRect) + 191: 31(fvec2) Load 33(c2) + 192: 10(float) Load 36(lodClamp) + 193: 21(ivec4) ImageSampleImplicitLod 190 191 ConstOffset MinLod 159 192 + 194: 21(ivec4) Load 23(utexel) + 195: 21(ivec4) IAdd 194 193 + Store 23(utexel) 195 + 196: 168 Load 170(s2DArrayShadow) + 197: 11(fvec4) Load 95(c4) + 198: 10(float) Load 36(lodClamp) + 199: 10(float) CompositeExtract 197 3 + 200: 10(float) ImageSampleDrefImplicitLod 196 197 199 ConstOffset MinLod 174 198 + 201: 80(ptr) AccessChain 13(texel) 176 + 202: 10(float) Load 201 + 203: 10(float) FAdd 202 200 + 204: 80(ptr) AccessChain 13(texel) 176 + Store 204 203 + 205: 45 Load 47(s3D) + 206: 49(fvec3) Load 51(c3) + 207: 49(fvec3) Load 51(c3) + 208: 49(fvec3) Load 51(c3) + 209: 10(float) Load 36(lodClamp) + 210: 38(ResType) ImageSparseSampleExplicitLod 205 206 Grad MinLod 207 208 209 + 211: 11(fvec4) CompositeExtract 210 1 + Store 13(texel) 211 + 212: 6(int) CompositeExtract 210 0 + 213: 6(int) Load 8(resident) + 214: 6(int) BitwiseOr 213 212 + Store 8(resident) 214 + 219: 216 Load 218(sCubeShadow) + 220: 11(fvec4) Load 95(c4) + 221: 49(fvec3) Load 51(c3) + 222: 49(fvec3) Load 51(c3) + 223: 10(float) Load 36(lodClamp) + 225: 80(ptr) AccessChain 13(texel) 224 + 226: 10(float) CompositeExtract 220 3 + 227: 83(ResType) ImageSparseSampleDrefExplicitLod 219 220 226 Grad MinLod 221 222 223 + 228: 10(float) CompositeExtract 227 1 + Store 225 228 + 229: 6(int) CompositeExtract 227 0 + 230: 6(int) Load 8(resident) + 231: 6(int) BitwiseOr 230 229 + Store 8(resident) 231 + 236: 233 Load 235(usCubeArray) + 237: 11(fvec4) Load 95(c4) + 238: 49(fvec3) Load 51(c3) + 239: 49(fvec3) Load 51(c3) + 240: 10(float) Load 36(lodClamp) + 241:161(ResType) ImageSparseSampleExplicitLod 236 237 Grad MinLod 238 239 240 + 242: 21(ivec4) CompositeExtract 241 1 + Store 23(utexel) 242 + 243: 6(int) CompositeExtract 241 0 + 244: 6(int) Load 8(resident) + 245: 6(int) BitwiseOr 244 243 + Store 8(resident) 245 + 246: 45 Load 47(s3D) + 247: 49(fvec3) Load 51(c3) + 248: 49(fvec3) Load 51(c3) + 249: 49(fvec3) Load 51(c3) + 250: 10(float) Load 36(lodClamp) + 251: 11(fvec4) ImageSampleExplicitLod 246 247 Grad MinLod 248 249 250 + 252: 11(fvec4) Load 13(texel) + 253: 11(fvec4) FAdd 252 251 + Store 13(texel) 253 + 254: 216 Load 218(sCubeShadow) + 255: 11(fvec4) Load 95(c4) + 256: 49(fvec3) Load 51(c3) + 257: 49(fvec3) Load 51(c3) + 258: 10(float) Load 36(lodClamp) + 259: 10(float) CompositeExtract 255 3 + 260: 10(float) ImageSampleDrefExplicitLod 254 255 259 Grad MinLod 256 257 258 + 261: 80(ptr) AccessChain 13(texel) 224 + 262: 10(float) Load 261 + 263: 10(float) FAdd 262 260 + 264: 80(ptr) AccessChain 13(texel) 224 + Store 264 263 + 265: 233 Load 235(usCubeArray) + 266: 11(fvec4) Load 95(c4) + 267: 49(fvec3) Load 51(c3) + 268: 49(fvec3) Load 51(c3) + 269: 10(float) Load 36(lodClamp) + 270: 21(ivec4) ImageSampleExplicitLod 265 266 Grad MinLod 267 268 269 + 271: 21(ivec4) Load 23(utexel) + 272: 21(ivec4) IAdd 271 270 + Store 23(utexel) 272 + 273: 27 Load 29(s2D) + 274: 31(fvec2) Load 33(c2) + 275: 31(fvec2) Load 33(c2) + 276: 31(fvec2) Load 33(c2) + 277: 10(float) Load 36(lodClamp) + 278: 38(ResType) ImageSparseSampleExplicitLod 273 274 Grad ConstOffset MinLod 275 276 174 277 + 279: 11(fvec4) CompositeExtract 278 1 + Store 13(texel) 279 + 280: 6(int) CompositeExtract 278 0 + 281: 6(int) Load 8(resident) + 282: 6(int) BitwiseOr 281 280 + Store 8(resident) 282 + 287: 284 Load 286(s2DRectShadow) + 288: 49(fvec3) Load 51(c3) + 289: 31(fvec2) Load 33(c2) + 290: 31(fvec2) Load 33(c2) + 293: 10(float) Load 36(lodClamp) + 295: 80(ptr) AccessChain 13(texel) 294 + 296: 10(float) CompositeExtract 288 2 + 297: 83(ResType) ImageSparseSampleDrefExplicitLod 287 288 296 Grad ConstOffset MinLod 289 290 292 293 + 298: 10(float) CompositeExtract 297 1 + Store 295 298 + 299: 6(int) CompositeExtract 297 0 + 300: 6(int) Load 8(resident) + 301: 6(int) BitwiseOr 300 299 + Store 8(resident) 301 + 306: 303 Load 305(is2DArray) + 307: 49(fvec3) Load 51(c3) + 308: 31(fvec2) Load 33(c2) + 309: 31(fvec2) Load 33(c2) + 311: 10(float) Load 36(lodClamp) + 312: 67(ResType) ImageSparseSampleExplicitLod 306 307 Grad ConstOffset MinLod 308 309 310 311 + 313: 16(ivec4) CompositeExtract 312 1 + Store 18(itexel) 313 + 314: 6(int) CompositeExtract 312 0 + 315: 6(int) Load 8(resident) + 316: 6(int) BitwiseOr 315 314 + Store 8(resident) 316 + 317: 27 Load 29(s2D) + 318: 31(fvec2) Load 33(c2) + 319: 31(fvec2) Load 33(c2) + 320: 31(fvec2) Load 33(c2) + 321: 10(float) Load 36(lodClamp) + 322: 11(fvec4) ImageSampleExplicitLod 317 318 Grad ConstOffset MinLod 319 320 174 321 + 323: 11(fvec4) Load 13(texel) + 324: 11(fvec4) FAdd 323 322 + Store 13(texel) 324 + 325: 284 Load 286(s2DRectShadow) + 326: 49(fvec3) Load 51(c3) + 327: 31(fvec2) Load 33(c2) + 328: 31(fvec2) Load 33(c2) + 329: 10(float) Load 36(lodClamp) + 330: 10(float) CompositeExtract 326 2 + 331: 10(float) ImageSampleDrefExplicitLod 325 326 330 Grad ConstOffset MinLod 327 328 292 329 + 332: 80(ptr) AccessChain 13(texel) 294 + 333: 10(float) Load 332 + 334: 10(float) FAdd 333 331 + 335: 80(ptr) AccessChain 13(texel) 294 + Store 335 334 + 336: 303 Load 305(is2DArray) + 337: 49(fvec3) Load 51(c3) + 338: 31(fvec2) Load 33(c2) + 339: 31(fvec2) Load 33(c2) + 340: 10(float) Load 36(lodClamp) + 341: 16(ivec4) ImageSampleExplicitLod 336 337 Grad ConstOffset MinLod 338 339 310 340 + 342: 16(ivec4) Load 18(itexel) + 343: 16(ivec4) IAdd 342 341 + Store 18(itexel) 343 + 347: 6(int) Load 8(resident) + 349: 348(bool) ImageSparseTexelsResident 347 + SelectionMerge 351 None + BranchConditional 349 350 353 + 350: Label + 352: 11(fvec4) Load 13(texel) + Store 346 352 + Branch 351 + 353: Label + 354: 16(ivec4) Load 18(itexel) + 355: 11(fvec4) ConvertSToF 354 + 356: 21(ivec4) Load 23(utexel) + 357: 11(fvec4) ConvertUToF 356 + 358: 11(fvec4) FAdd 355 357 + Store 346 358 + Branch 351 + 351: Label + 359: 11(fvec4) Load 346 + Store 345(outColor) 359 + Return + FunctionEnd diff --git a/Test/spv.sparseTexture.frag b/Test/spv.sparseTexture.frag new file mode 100644 index 00000000..06c89e54 --- /dev/null +++ b/Test/spv.sparseTexture.frag @@ -0,0 +1,80 @@ +#version 450 +#extension GL_ARB_sparse_texture2: enable + +uniform sampler2D s2D; +uniform sampler3D s3D; +uniform sampler2DShadow s2DShadow; +uniform samplerCubeShadow sCubeShadow; +uniform sampler2DArrayShadow s2DArrayShadow; +uniform sampler2DRectShadow s2DRectShadow; +uniform samplerCubeArrayShadow sCubeArrayShadow; +uniform sampler2DMS s2DMS; + +uniform isamplerCube isCube; +uniform isampler2DArray is2DArray; + +uniform usamplerCubeArray usCubeArray; +uniform usampler2DRect us2DRect; + +uniform vec2 c2; +uniform vec3 c3; +uniform vec4 c4; + +uniform ivec2 offsets[4]; + +out vec4 outColor; + +void main() +{ + int resident = 0; + vec4 texel = vec4(0.0); + ivec4 itexel = ivec4(0); + uvec4 utexel = uvec4(0); + + resident |= sparseTextureARB(s2D, c2, texel); + resident |= sparseTextureARB(s3D, c3, texel, 2.0); + resident |= sparseTextureARB(isCube, c3, itexel); + resident |= sparseTextureARB(s2DShadow, c3, texel.x); + resident |= sparseTextureARB(sCubeArrayShadow, c4, 1.0, texel.x); + + resident |= sparseTextureLodARB(s2D, c2, 2.0, texel); + resident |= sparseTextureLodARB(usCubeArray, c4, 1.0, utexel); + resident |= sparseTextureLodARB(s2DShadow, c3, 2.0, texel.y); + + resident |= sparseTextureOffsetARB(s3D, c3, ivec3(2), texel, 2.0); + resident |= sparseTextureOffsetARB(us2DRect, c2, ivec2(3), utexel); + resident |= sparseTextureOffsetARB(s2DArrayShadow, c4, ivec2(5), texel.z); + + resident |= sparseTexelFetchARB(s2D, ivec2(c2), 2, texel); + resident |= sparseTexelFetchARB(us2DRect, ivec2(c2), utexel); + resident |= sparseTexelFetchARB(s2DMS, ivec2(c2), 4, texel); + + resident |= sparseTexelFetchOffsetARB(s3D, ivec3(c3), 2, ivec3(4), texel); + resident |= sparseTexelFetchOffsetARB(us2DRect, ivec2(c2), ivec2(3), utexel); + + resident |= sparseTextureLodOffsetARB(s2D, c2, 2.0, ivec2(5), texel); + resident |= sparseTextureLodOffsetARB(is2DArray, c3, 2.0, ivec2(6), itexel); + resident |= sparseTextureLodOffsetARB(s2DShadow, c3, 2.0, ivec2(7), texel.z); + + resident |= sparseTextureGradARB(s3D, c3, c3, c3, texel); + resident |= sparseTextureGradARB(sCubeShadow, c4, c3, c3, texel.y); + resident |= sparseTextureGradARB(usCubeArray, c4, c3, c3, utexel); + + resident |= sparseTextureGradOffsetARB(s2D, c2, c2, c2, ivec2(5), texel); + resident |= sparseTextureGradOffsetARB(s2DRectShadow, c3, c2, c2, ivec2(6), texel.w); + resident |= sparseTextureGradOffsetARB(is2DArray, c3, c2, c2, ivec2(2), itexel); + + resident |= sparseTextureGatherARB(s2D, c2, texel); + resident |= sparseTextureGatherARB(is2DArray, c3, itexel, 2); + resident |= sparseTextureGatherARB(s2DArrayShadow, c3, 2.0, texel); + + resident |= sparseTextureGatherOffsetARB(s2D, c2, ivec2(4), texel); + resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2); + resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel); + + resident |= sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel); + resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2); + resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel); + + outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel); +} \ No newline at end of file diff --git a/Test/spv.sparseTextureClamp.frag b/Test/spv.sparseTextureClamp.frag new file mode 100644 index 00000000..848d3774 --- /dev/null +++ b/Test/spv.sparseTextureClamp.frag @@ -0,0 +1,70 @@ +#version 450 +#extension GL_ARB_sparse_texture_clamp: enable + +uniform sampler2D s2D; +uniform sampler3D s3D; +uniform sampler2DShadow s2DShadow; +uniform samplerCubeShadow sCubeShadow; +uniform sampler2DArrayShadow s2DArrayShadow; +uniform sampler2DRectShadow s2DRectShadow; +uniform samplerCubeArrayShadow sCubeArrayShadow; + +uniform isamplerCube isCube; +uniform isampler2DArray is2DArray; + +uniform usamplerCubeArray usCubeArray; +uniform usampler2DRect us2DRect; + +uniform vec2 c2; +uniform vec3 c3; +uniform vec4 c4; + +uniform float lodClamp; + +out vec4 outColor; + +void main() +{ + int resident = 0; + vec4 texel = vec4(0.0); + ivec4 itexel = ivec4(0); + uvec4 utexel = uvec4(0); + + resident |= sparseTextureClampARB(s2D, c2, lodClamp, texel); + resident |= sparseTextureClampARB(s3D, c3, lodClamp, texel, 2.0); + resident |= sparseTextureClampARB(isCube, c3, lodClamp, itexel); + resident |= sparseTextureClampARB(s2DShadow, c3, lodClamp, texel.x); + resident |= sparseTextureClampARB(sCubeArrayShadow, c4, 1.0, lodClamp, texel.x); + + texel += textureClampARB(s2D, c2, lodClamp); + texel += textureClampARB(s3D, c3, lodClamp, 2.0); + itexel += textureClampARB(isCube, c3, lodClamp); + texel.x += textureClampARB(s2DShadow, c3, lodClamp); + texel.x += textureClampARB(sCubeArrayShadow, c4, 1.0, lodClamp); + + resident |= sparseTextureOffsetClampARB(s3D, c3, ivec3(2), lodClamp, texel, 2.0); + resident |= sparseTextureOffsetClampARB(us2DRect, c2, ivec2(3), lodClamp, utexel); + resident |= sparseTextureOffsetClampARB(s2DArrayShadow, c4, ivec2(5), lodClamp, texel.z); + + texel += textureOffsetClampARB(s3D, c3, ivec3(2), lodClamp, 2.0); + utexel += textureOffsetClampARB(us2DRect, c2, ivec2(3), lodClamp); + texel.z += textureOffsetClampARB(s2DArrayShadow, c4, ivec2(5), lodClamp); + + resident |= sparseTextureGradClampARB(s3D, c3, c3, c3, lodClamp, texel); + resident |= sparseTextureGradClampARB(sCubeShadow, c4, c3, c3, lodClamp, texel.y); + resident |= sparseTextureGradClampARB(usCubeArray, c4, c3, c3, lodClamp, utexel); + + texel += textureGradClampARB(s3D, c3, c3, c3, lodClamp); + texel.y += textureGradClampARB(sCubeShadow, c4, c3, c3, lodClamp); + utexel += textureGradClampARB(usCubeArray, c4, c3, c3, lodClamp); + + resident |= sparseTextureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp, texel); + resident |= sparseTextureGradOffsetClampARB(s2DRectShadow, c3, c2, c2, ivec2(6), lodClamp, texel.w); + resident |= sparseTextureGradOffsetClampARB(is2DArray, c3, c2, c2, ivec2(2), lodClamp, itexel); + + texel += textureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp); + texel.w += textureGradOffsetClampARB(s2DRectShadow, c3, c2, c2, ivec2(6), lodClamp); + itexel += textureGradOffsetClampARB(is2DArray, c3, c2, c2, ivec2(2), lodClamp); + + outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel); +} \ No newline at end of file diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 799148db..af962627 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -66,6 +66,8 @@ 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 diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 59955fcf..cf701776 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -369,6 +369,8 @@ enum TOperator { EOpImageAtomicExchange, EOpImageAtomicCompSwap, + EOpSparseImageLoad, + EOpImageGuardEnd, // @@ -398,6 +400,31 @@ enum TOperator { EOpTextureGather, EOpTextureGatherOffset, EOpTextureGatherOffsets, + EOpTextureClamp, + EOpTextureOffsetClamp, + EOpTextureGradClamp, + EOpTextureGradOffsetClamp, + + EOpSparseTextureGuardBegin, + + EOpSparseTexture, + EOpSparseTextureLod, + EOpSparseTextureOffset, + EOpSparseTextureFetch, + EOpSparseTextureFetchOffset, + EOpSparseTextureLodOffset, + EOpSparseTextureGrad, + EOpSparseTextureGradOffset, + EOpSparseTextureGather, + EOpSparseTextureGatherOffset, + EOpSparseTextureGatherOffsets, + EOpSparseTexelsResident, + EOpSparseTextureClamp, + EOpSparseTextureOffsetClamp, + EOpSparseTextureGradClamp, + EOpSparseTextureGradOffsetClamp, + + EOpSparseTextureGuardEnd, EOpTextureGuardEnd, @@ -622,6 +649,7 @@ struct TCrackedTextureOp { bool offsets; bool gather; bool grad; + bool lodClamp; }; // @@ -637,6 +665,8 @@ public: bool isConstructor() const; bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; } bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; } + bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; } + bool isSparseImage() const { return op == EOpSparseImageLoad; } // Crack the op into the individual dimensions of texturing operation. void crackTexture(TSampler sampler, TCrackedTextureOp& cracked) const @@ -649,6 +679,7 @@ public: cracked.offsets = false; cracked.gather = false; cracked.grad = false; + cracked.lodClamp = false; switch (op) { case EOpImageQuerySize: @@ -657,25 +688,40 @@ public: case EOpTextureQueryLod: case EOpTextureQueryLevels: case EOpTextureQuerySamples: + case EOpSparseTexelsResident: cracked.query = true; break; case EOpTexture: + case EOpSparseTexture: + break; + case EOpTextureClamp: + case EOpSparseTextureClamp: + cracked.lodClamp = true; break; case EOpTextureProj: cracked.proj = true; break; case EOpTextureLod: + case EOpSparseTextureLod: cracked.lod = true; break; case EOpTextureOffset: + case EOpSparseTextureOffset: cracked.offset = true; break; + case EOpTextureOffsetClamp: + case EOpSparseTextureOffsetClamp: + cracked.offset = true; + cracked.lodClamp = true; + break; case EOpTextureFetch: + case EOpSparseTextureFetch: cracked.fetch = true; if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D) cracked.lod = true; break; case EOpTextureFetchOffset: + case EOpSparseTextureFetchOffset: cracked.fetch = true; cracked.offset = true; if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D) @@ -686,6 +732,7 @@ public: cracked.proj = true; break; case EOpTextureLodOffset: + case EOpSparseTextureLodOffset: cracked.offset = true; cracked.lod = true; break; @@ -699,9 +746,16 @@ public: cracked.proj = true; break; case EOpTextureGrad: + case EOpSparseTextureGrad: cracked.grad = true; break; + case EOpTextureGradClamp: + case EOpSparseTextureGradClamp: + cracked.grad = true; + cracked.lodClamp = true; + break; case EOpTextureGradOffset: + case EOpSparseTextureGradOffset: cracked.grad = true; cracked.offset = true; break; @@ -714,14 +768,23 @@ public: cracked.offset = true; cracked.proj = true; break; + case EOpTextureGradOffsetClamp: + case EOpSparseTextureGradOffsetClamp: + cracked.grad = true; + cracked.offset = true; + cracked.lodClamp = true; + break; case EOpTextureGather: + case EOpSparseTextureGather: cracked.gather = true; break; case EOpTextureGatherOffset: + case EOpSparseTextureGatherOffset: cracked.gather = true; cracked.offset = true; break; case EOpTextureGatherOffsets: + case EOpSparseTextureGatherOffsets: cracked.gather = true; cracked.offsets = true; break; diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index c852d3cb..75e85661 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -1956,6 +1956,14 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, i } } } + + // + // sparseTexelsResidentARB() + // + + if (profile != EEsProfile && version >= 450) { + commonBuiltins.append("bool sparseTexelsResidentARB(int code);\n"); + } } // @@ -2069,6 +2077,15 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4);\n"); + if (sampler.dim != Esd1D && sampler.dim != EsdBuffer && profile != EEsProfile && version >= 450) { + commonBuiltins.append("int sparseImageLoadARB(readonly volatile coherent "); + commonBuiltins.append(imageParams); + commonBuiltins.append(", out "); + commonBuiltins.append(prefixes[sampler.type]); + commonBuiltins.append("vec4"); + commonBuiltins.append(");\n"); + } + if ( profile != EEsProfile || (profile == EEsProfile && version >= 310)) { if (sampler.type == EbtInt || sampler.type == EbtUint) { @@ -2123,7 +2140,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi // // Add all the texture lookup functions for the given type. // -void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int /*version*/, EProfile /*profile*/) +void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) { // // texturing @@ -2196,97 +2213,148 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int /* if (extraProj && (sampler.dim == Esd3D || sampler.shadow)) continue; - TString s; + for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) { // loop over "bool" lod clamp - // return type - if (sampler.shadow) - s.append("float "); - else { - s.append(prefixes[sampler.type]); - s.append("vec4 "); - } + if (lodClamp && (profile == EEsProfile || version < 450)) + continue; + if (lodClamp && (proj || lod || fetch)) + continue; - // name - if (fetch) - s.append("texel"); - else - s.append("texture"); - if (proj) - s.append("Proj"); - if (lod) - s.append("Lod"); - if (grad) - s.append("Grad"); - if (fetch) - s.append("Fetch"); - if (offset) - s.append("Offset"); - s.append("("); + for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not - // sampler type - s.append(typeName); + if (sparse && (profile == EEsProfile || version < 450)) + continue; + // Sparse sampling is not for 1D/1D array texture, buffer texture, and projective texture + if (sparse && (sampler.dim == Esd1D || sampler.dim == EsdBuffer || proj)) + continue; - // P coordinate - if (extraProj) - s.append(",vec4"); - else { - s.append(","); - TBasicType t = fetch ? EbtInt : EbtFloat; - if (totalDims == 1) - s.append(TType::getBasicString(t)); - else { - s.append(prefixes[t]); - s.append("vec"); - s.append(postfixes[totalDims]); + TString s; + + // return type + if (sparse) + s.append("int "); + else { + if (sampler.shadow) + s.append("float "); + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } + } + + // name + if (sparse) { + if (fetch) + s.append("sparseTexel"); + else + s.append("sparseTexture"); + } else { + if (fetch) + s.append("texel"); + else + s.append("texture"); + } + if (proj) + s.append("Proj"); + if (lod) + s.append("Lod"); + if (grad) + s.append("Grad"); + if (fetch) + s.append("Fetch"); + if (offset) + s.append("Offset"); + if (lodClamp) + s.append("Clamp"); + if (lodClamp || sparse) + s.append("ARB"); + s.append("("); + + // sampler type + s.append(typeName); + + // P coordinate + if (extraProj) + s.append(",vec4"); + else { + s.append(","); + TBasicType t = fetch ? EbtInt : EbtFloat; + if (totalDims == 1) + s.append(TType::getBasicString(t)); + else { + s.append(prefixes[t]); + s.append("vec"); + s.append(postfixes[totalDims]); + } + } + + if (bias && compare) + continue; + + // non-optional lod argument (lod that's not driven by lod loop) or sample + if ((fetch && sampler.dim != EsdBuffer && sampler.dim != EsdRect && !sampler.ms) || + (sampler.ms && fetch)) + s.append(",int"); + + // non-optional lod + if (lod) + s.append(",float"); + + // gradient arguments + if (grad) { + if (dimMap[sampler.dim] == 1) + s.append(",float,float"); + else { + s.append(",vec"); + s.append(postfixes[dimMap[sampler.dim]]); + s.append(",vec"); + s.append(postfixes[dimMap[sampler.dim]]); + } + } + + // offset + if (offset) { + if (dimMap[sampler.dim] == 1) + s.append(",int"); + else { + s.append(",ivec"); + s.append(postfixes[dimMap[sampler.dim]]); + } + } + + // non-optional compare + if (compare) + s.append(",float"); + + // lod clamp + if (lodClamp) + s.append(",float"); + + // texel out (for sparse texture) + if (sparse) { + s.append(",out "); + if (sampler.shadow) + s.append("float "); + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } + } + + // optional bias + if (bias) + s.append(",float"); + + s.append(");\n"); + + // Add to the per-language set of built-ins + + if (bias) + stageBuiltins[EShLangFragment].append(s); + else + commonBuiltins.append(s); } } - - if (bias && compare) - continue; - - // non-optional lod argument (lod that's not driven by lod loop) or sample - if ((fetch && sampler.dim != EsdBuffer && sampler.dim != EsdRect && !sampler.ms) || - (sampler.ms && fetch)) - s.append(",int"); - - // non-optional lod - if (lod) - s.append(",float"); - - // gradient arguments - if (grad) { - if (dimMap[sampler.dim] == 1) - s.append(",float,float"); - else { - s.append(",vec"); - s.append(postfixes[dimMap[sampler.dim]]); - s.append(",vec"); - s.append(postfixes[dimMap[sampler.dim]]); - } - } - - // offset - if (offset) { - if (dimMap[sampler.dim] == 1) - s.append(",int"); - else { - s.append(",ivec"); - s.append(postfixes[dimMap[sampler.dim]]); - } - } - - // optional bias or non-optional compare - if (bias || compare) - s.append(",float"); - - s.append(");\n"); - - // Add to the per-language set of built-ins - - if (bias) - stageBuiltins[EShLangFragment].append(s); - else - commonBuiltins.append(s); } } } @@ -2303,7 +2371,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int /* // // Add all the texture gather functions for the given type. // -void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int version, EProfile /* profile */) +void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) { switch (sampler.dim) { case Esd2D: @@ -2330,51 +2398,71 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers if (offset > 0 && sampler.dim == EsdCube) continue; - TString s; + for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not + if (sparse && (profile == EEsProfile || version < 450)) + continue; - // return type - s.append(prefixes[sampler.type]); - s.append("vec4 "); + TString s; - // name - s.append("textureGather"); - switch (offset) { - case 1: - s.append("Offset"); - break; - case 2: - s.append("Offsets"); - default: - break; + // return type + if (sparse) + s.append("int "); + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } + + // name + if (sparse) + s.append("sparseTextureGather"); + else + s.append("textureGather"); + switch (offset) { + case 1: + s.append("Offset"); + break; + case 2: + s.append("Offsets"); + default: + break; + } + if (sparse) + s.append("ARB"); + s.append("("); + + // sampler type argument + s.append(typeName); + + // P coordinate argument + s.append(",vec"); + int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); + s.append(postfixes[totalDims]); + + // refZ argument + if (sampler.shadow) + s.append(",float"); + + // offset argument + if (offset > 0) { + s.append(",ivec2"); + if (offset == 2) + s.append("[4]"); + } + + // texel out (for sparse texture) + if (sparse) { + s.append(",out "); + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } + + // comp argument + if (comp) + s.append(",int"); + + s.append(");\n"); + commonBuiltins.append(s); } - s.append("("); - - // sampler type argument - s.append(typeName); - - // P coordinate argument - s.append(",vec"); - int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); - s.append(postfixes[totalDims]); - - // refZ argument - if (sampler.shadow) - s.append(",float"); - - // offset argument - if (offset > 0) { - s.append(",ivec2"); - if (offset == 2) - s.append("[4]"); - } - - // comp argument - if (comp) - s.append(",int"); - - s.append(");\n"); - commonBuiltins.append(s); - //printf("%s", s.c_str()); } } } @@ -3164,6 +3252,37 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua symbolTable.setFunctionExtensions("fwidthCoarse", 1, &E_GL_ARB_derivative_control); } + // E_GL_ARB_sparse_texture2 + if (profile != EEsProfile) + { + symbolTable.setFunctionExtensions("sparseTextureARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureLodARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureOffsetARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTexelFetchARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTexelFetchOffsetARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureLodOffsetARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureGradARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureGradOffsetARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureGatherARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureGatherOffsetARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTextureGatherOffsetsARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseImageLoadARB", 1, &E_GL_ARB_sparse_texture2); + symbolTable.setFunctionExtensions("sparseTexelsResident", 1, &E_GL_ARB_sparse_texture2); + } + + // E_GL_ARB_sparse_texture_clamp + if (profile != EEsProfile) + { + symbolTable.setFunctionExtensions("sparseTextureClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("sparseTextureOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("sparseTextureGradClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("sparseTextureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("textureClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("textureOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("textureGradClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + symbolTable.setFunctionExtensions("textureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); + } + symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth); if (profile == EEsProfile) { @@ -3423,6 +3542,32 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua symbolTable.relateToOperator("shadow1DProjLod", EOpTextureProjLod); symbolTable.relateToOperator("shadow2DProjLod", EOpTextureProjLod); } + + if (profile != EEsProfile) + { + symbolTable.relateToOperator("sparseTextureARB", EOpSparseTexture); + symbolTable.relateToOperator("sparseTextureLodARB", EOpSparseTextureLod); + symbolTable.relateToOperator("sparseTextureOffsetARB", EOpSparseTextureOffset); + symbolTable.relateToOperator("sparseTexelFetchARB", EOpSparseTextureFetch); + symbolTable.relateToOperator("sparseTexelFetchOffsetARB", EOpSparseTextureFetchOffset); + symbolTable.relateToOperator("sparseTextureLodOffsetARB", EOpSparseTextureLodOffset); + symbolTable.relateToOperator("sparseTextureGradARB", EOpSparseTextureGrad); + symbolTable.relateToOperator("sparseTextureGradOffsetARB", EOpSparseTextureGradOffset); + symbolTable.relateToOperator("sparseTextureGatherARB", EOpSparseTextureGather); + symbolTable.relateToOperator("sparseTextureGatherOffsetARB", EOpSparseTextureGatherOffset); + symbolTable.relateToOperator("sparseTextureGatherOffsetsARB", EOpSparseTextureGatherOffsets); + symbolTable.relateToOperator("sparseImageLoadARB", EOpSparseImageLoad); + symbolTable.relateToOperator("sparseTexelsResidentARB", EOpSparseTexelsResident); + + symbolTable.relateToOperator("sparseTextureClampARB", EOpSparseTextureClamp); + symbolTable.relateToOperator("sparseTextureOffsetClampARB", EOpSparseTextureOffsetClamp); + symbolTable.relateToOperator("sparseTextureGradClampARB", EOpSparseTextureGradClamp); + symbolTable.relateToOperator("sparseTextureGradOffsetClampARB", EOpSparseTextureGradOffsetClamp); + symbolTable.relateToOperator("textureClampARB", EOpTextureClamp); + symbolTable.relateToOperator("textureOffsetClampARB", EOpTextureOffsetClamp); + symbolTable.relateToOperator("textureGradClampARB", EOpTextureGradClamp); + symbolTable.relateToOperator("textureGradOffsetClampARB", EOpTextureGradOffsetClamp); + } } switch(language) { diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index 89534988..fb11f1be 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -173,6 +173,8 @@ void TParseContext::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_derivative_control] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_image_samples] = EBhDisable; extensionBehavior[E_GL_ARB_viewport_array] = EBhDisable; + extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable; + extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable; // extensionBehavior[E_GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members // #line and #include @@ -274,6 +276,8 @@ const char* TParseContext::getPreamble() "#define GL_ARB_derivative_control 1\n" "#define GL_ARB_shader_texture_image_samples 1\n" "#define GL_ARB_viewport_array 1\n" + "#define GL_ARB_sparse_texture2 1\n" + "#define GL_ARB_sparse_texture_clamp 1\n" "#define GL_GOOGLE_cpp_style_line_directive 1\n" "#define GL_GOOGLE_include_directive 1\n" diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h index a30ea7a6..0d79fab4 100644 --- a/glslang/MachineIndependent/Versions.h +++ b/glslang/MachineIndependent/Versions.h @@ -111,6 +111,8 @@ const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_pa const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_control"; const char* const E_GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples"; const char* const E_GL_ARB_viewport_array = "GL_ARB_viewport_array"; +const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2"; +const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp"; //const char* const E_GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members // #line and #include From 364c21c8c05d01690acc6b5b38788895487aa9dd Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Wed, 6 Jan 2016 13:41:02 -0500 Subject: [PATCH 02/84] Fix several build warnings/error encountered with VS2013 This also fixes the newlines for spirv.hpp to be consistent with the rest of the files. --- SPIRV/GlslangToSpv.cpp | 2 +- SPIRV/SpvBuilder.cpp | 2 +- SPIRV/spirv.hpp | 1756 +++++++++++++-------------- glslang/MachineIndependent/Scan.cpp | 2 +- 4 files changed, 881 insertions(+), 881 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 964ff09e..43cc03a4 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -2954,7 +2954,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: spv::Op opCode = spv::OpNop; int libCall = -1; - int consumedOperands = operands.size(); + size_t consumedOperands = operands.size(); spv::Id typeId0 = 0; if (consumedOperands > 0) typeId0 = builder.getTypeId(operands[0]); diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 3915b66e..969a6d7c 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1365,7 +1365,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter case OpImageQuerySize: case OpImageQuerySizeLod: { - int numComponents; + int numComponents = 0; switch (getTypeDimensionality(getImageType(parameters.sampler))) { case Dim1D: case DimBuffer: diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp index f3d42a93..0cc43aa4 100755 --- a/SPIRV/spirv.hpp +++ b/SPIRV/spirv.hpp @@ -1,878 +1,878 @@ -// Copyright (c) 2014-2015 The Khronos Group Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and/or associated documentation files (the "Materials"), -// to deal in the Materials without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Materials, and to permit persons to whom the -// Materials are furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Materials. -// -// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS -// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// -// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS -// IN THE MATERIALS. - -// This header is automatically generated by the same tool that creates -// the Binary Section of the SPIR-V specification. - -// Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python -// -// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL -// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL -// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL -// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] -// -// Some tokens act like mask values, which can be OR'd together, -// while others are mutually exclusive. The mask-like ones have -// "Mask" in their name, and a parallel enum that has the shift -// amount (1 << x) for each corresponding enumerant. - -#ifndef spirv_H -#define spirv_H - -namespace spv { - -typedef unsigned int Id; - -#define SPV_VERSION 10000 -#define SPV_REVISION 2 - -static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010000; -static const unsigned int Revision = 2; -static const unsigned int OpCodeMask = 0xffff; -static const unsigned int WordCountShift = 16; - -enum SourceLanguage { - SourceLanguageUnknown = 0, - SourceLanguageESSL = 1, - SourceLanguageGLSL = 2, - SourceLanguageOpenCL_C = 3, - SourceLanguageOpenCL_CPP = 4, -}; - -enum ExecutionModel { - ExecutionModelVertex = 0, - ExecutionModelTessellationControl = 1, - ExecutionModelTessellationEvaluation = 2, - ExecutionModelGeometry = 3, - ExecutionModelFragment = 4, - ExecutionModelGLCompute = 5, - ExecutionModelKernel = 6, -}; - -enum AddressingModel { - AddressingModelLogical = 0, - AddressingModelPhysical32 = 1, - AddressingModelPhysical64 = 2, -}; - -enum MemoryModel { - MemoryModelSimple = 0, - MemoryModelGLSL450 = 1, - MemoryModelOpenCL = 2, -}; - -enum ExecutionMode { - ExecutionModeInvocations = 0, - ExecutionModeSpacingEqual = 1, - ExecutionModeSpacingFractionalEven = 2, - ExecutionModeSpacingFractionalOdd = 3, - ExecutionModeVertexOrderCw = 4, - ExecutionModeVertexOrderCcw = 5, - ExecutionModePixelCenterInteger = 6, - ExecutionModeOriginUpperLeft = 7, - ExecutionModeOriginLowerLeft = 8, - ExecutionModeEarlyFragmentTests = 9, - ExecutionModePointMode = 10, - ExecutionModeXfb = 11, - ExecutionModeDepthReplacing = 12, - ExecutionModeDepthGreater = 14, - ExecutionModeDepthLess = 15, - ExecutionModeDepthUnchanged = 16, - ExecutionModeLocalSize = 17, - ExecutionModeLocalSizeHint = 18, - ExecutionModeInputPoints = 19, - ExecutionModeInputLines = 20, - ExecutionModeInputLinesAdjacency = 21, - ExecutionModeTriangles = 22, - ExecutionModeInputTrianglesAdjacency = 23, - ExecutionModeQuads = 24, - ExecutionModeIsolines = 25, - ExecutionModeOutputVertices = 26, - ExecutionModeOutputPoints = 27, - ExecutionModeOutputLineStrip = 28, - ExecutionModeOutputTriangleStrip = 29, - ExecutionModeVecTypeHint = 30, - ExecutionModeContractionOff = 31, -}; - -enum StorageClass { - StorageClassUniformConstant = 0, - StorageClassInput = 1, - StorageClassUniform = 2, - StorageClassOutput = 3, - StorageClassWorkgroup = 4, - StorageClassCrossWorkgroup = 5, - StorageClassPrivate = 6, - StorageClassFunction = 7, - StorageClassGeneric = 8, - StorageClassPushConstant = 9, - StorageClassAtomicCounter = 10, - StorageClassImage = 11, -}; - -enum Dim { - Dim1D = 0, - Dim2D = 1, - Dim3D = 2, - DimCube = 3, - DimRect = 4, - DimBuffer = 5, - DimSubpassData = 6, -}; - -enum SamplerAddressingMode { - SamplerAddressingModeNone = 0, - SamplerAddressingModeClampToEdge = 1, - SamplerAddressingModeClamp = 2, - SamplerAddressingModeRepeat = 3, - SamplerAddressingModeRepeatMirrored = 4, -}; - -enum SamplerFilterMode { - SamplerFilterModeNearest = 0, - SamplerFilterModeLinear = 1, -}; - -enum ImageFormat { - ImageFormatUnknown = 0, - ImageFormatRgba32f = 1, - ImageFormatRgba16f = 2, - ImageFormatR32f = 3, - ImageFormatRgba8 = 4, - ImageFormatRgba8Snorm = 5, - ImageFormatRg32f = 6, - ImageFormatRg16f = 7, - ImageFormatR11fG11fB10f = 8, - ImageFormatR16f = 9, - ImageFormatRgba16 = 10, - ImageFormatRgb10A2 = 11, - ImageFormatRg16 = 12, - ImageFormatRg8 = 13, - ImageFormatR16 = 14, - ImageFormatR8 = 15, - ImageFormatRgba16Snorm = 16, - ImageFormatRg16Snorm = 17, - ImageFormatRg8Snorm = 18, - ImageFormatR16Snorm = 19, - ImageFormatR8Snorm = 20, - ImageFormatRgba32i = 21, - ImageFormatRgba16i = 22, - ImageFormatRgba8i = 23, - ImageFormatR32i = 24, - ImageFormatRg32i = 25, - ImageFormatRg16i = 26, - ImageFormatRg8i = 27, - ImageFormatR16i = 28, - ImageFormatR8i = 29, - ImageFormatRgba32ui = 30, - ImageFormatRgba16ui = 31, - ImageFormatRgba8ui = 32, - ImageFormatR32ui = 33, - ImageFormatRgb10a2ui = 34, - ImageFormatRg32ui = 35, - ImageFormatRg16ui = 36, - ImageFormatRg8ui = 37, - ImageFormatR16ui = 38, - ImageFormatR8ui = 39, -}; - -enum ImageChannelOrder { - ImageChannelOrderR = 0, - ImageChannelOrderA = 1, - ImageChannelOrderRG = 2, - ImageChannelOrderRA = 3, - ImageChannelOrderRGB = 4, - ImageChannelOrderRGBA = 5, - ImageChannelOrderBGRA = 6, - ImageChannelOrderARGB = 7, - ImageChannelOrderIntensity = 8, - ImageChannelOrderLuminance = 9, - ImageChannelOrderRx = 10, - ImageChannelOrderRGx = 11, - ImageChannelOrderRGBx = 12, - ImageChannelOrderDepth = 13, - ImageChannelOrderDepthStencil = 14, - ImageChannelOrdersRGB = 15, - ImageChannelOrdersRGBx = 16, - ImageChannelOrdersRGBA = 17, - ImageChannelOrdersBGRA = 18, -}; - -enum ImageChannelDataType { - ImageChannelDataTypeSnormInt8 = 0, - ImageChannelDataTypeSnormInt16 = 1, - ImageChannelDataTypeUnormInt8 = 2, - ImageChannelDataTypeUnormInt16 = 3, - ImageChannelDataTypeUnormShort565 = 4, - ImageChannelDataTypeUnormShort555 = 5, - ImageChannelDataTypeUnormInt101010 = 6, - ImageChannelDataTypeSignedInt8 = 7, - ImageChannelDataTypeSignedInt16 = 8, - ImageChannelDataTypeSignedInt32 = 9, - ImageChannelDataTypeUnsignedInt8 = 10, - ImageChannelDataTypeUnsignedInt16 = 11, - ImageChannelDataTypeUnsignedInt32 = 12, - ImageChannelDataTypeHalfFloat = 13, - ImageChannelDataTypeFloat = 14, - ImageChannelDataTypeUnormInt24 = 15, - ImageChannelDataTypeUnormInt101010_2 = 16, -}; - -enum ImageOperandsShift { - ImageOperandsBiasShift = 0, - ImageOperandsLodShift = 1, - ImageOperandsGradShift = 2, - ImageOperandsConstOffsetShift = 3, - ImageOperandsOffsetShift = 4, - ImageOperandsConstOffsetsShift = 5, - ImageOperandsSampleShift = 6, - ImageOperandsMinLodShift = 7, -}; - -enum ImageOperandsMask { - ImageOperandsMaskNone = 0, - ImageOperandsBiasMask = 0x00000001, - ImageOperandsLodMask = 0x00000002, - ImageOperandsGradMask = 0x00000004, - ImageOperandsConstOffsetMask = 0x00000008, - ImageOperandsOffsetMask = 0x00000010, - ImageOperandsConstOffsetsMask = 0x00000020, - ImageOperandsSampleMask = 0x00000040, - ImageOperandsMinLodMask = 0x00000080, -}; - -enum FPFastMathModeShift { - FPFastMathModeNotNaNShift = 0, - FPFastMathModeNotInfShift = 1, - FPFastMathModeNSZShift = 2, - FPFastMathModeAllowRecipShift = 3, - FPFastMathModeFastShift = 4, -}; - -enum FPFastMathModeMask { - FPFastMathModeMaskNone = 0, - FPFastMathModeNotNaNMask = 0x00000001, - FPFastMathModeNotInfMask = 0x00000002, - FPFastMathModeNSZMask = 0x00000004, - FPFastMathModeAllowRecipMask = 0x00000008, - FPFastMathModeFastMask = 0x00000010, -}; - -enum FPRoundingMode { - FPRoundingModeRTE = 0, - FPRoundingModeRTZ = 1, - FPRoundingModeRTP = 2, - FPRoundingModeRTN = 3, -}; - -enum LinkageType { - LinkageTypeExport = 0, - LinkageTypeImport = 1, -}; - -enum AccessQualifier { - AccessQualifierReadOnly = 0, - AccessQualifierWriteOnly = 1, - AccessQualifierReadWrite = 2, -}; - -enum FunctionParameterAttribute { - FunctionParameterAttributeZext = 0, - FunctionParameterAttributeSext = 1, - FunctionParameterAttributeByVal = 2, - FunctionParameterAttributeSret = 3, - FunctionParameterAttributeNoAlias = 4, - FunctionParameterAttributeNoCapture = 5, - FunctionParameterAttributeNoWrite = 6, - FunctionParameterAttributeNoReadWrite = 7, -}; - -enum Decoration { - DecorationRelaxedPrecision = 0, - DecorationSpecId = 1, - DecorationBlock = 2, - DecorationBufferBlock = 3, - DecorationRowMajor = 4, - DecorationColMajor = 5, - DecorationArrayStride = 6, - DecorationMatrixStride = 7, - DecorationGLSLShared = 8, - DecorationGLSLPacked = 9, - DecorationCPacked = 10, - DecorationBuiltIn = 11, - DecorationNoPerspective = 13, - DecorationFlat = 14, - DecorationPatch = 15, - DecorationCentroid = 16, - DecorationSample = 17, - DecorationInvariant = 18, - DecorationRestrict = 19, - DecorationAliased = 20, - DecorationVolatile = 21, - DecorationConstant = 22, - DecorationCoherent = 23, - DecorationNonWritable = 24, - DecorationNonReadable = 25, - DecorationUniform = 26, - DecorationSaturatedConversion = 28, - DecorationStream = 29, - DecorationLocation = 30, - DecorationComponent = 31, - DecorationIndex = 32, - DecorationBinding = 33, - DecorationDescriptorSet = 34, - DecorationOffset = 35, - DecorationXfbBuffer = 36, - DecorationXfbStride = 37, - DecorationFuncParamAttr = 38, - DecorationFPRoundingMode = 39, - DecorationFPFastMathMode = 40, - DecorationLinkageAttributes = 41, - DecorationNoContraction = 42, - DecorationInputAttachmentIndex = 43, - DecorationAlignment = 44, -}; - -enum BuiltIn { - BuiltInPosition = 0, - BuiltInPointSize = 1, - BuiltInClipDistance = 3, - BuiltInCullDistance = 4, - BuiltInVertexId = 5, - BuiltInInstanceId = 6, - BuiltInPrimitiveId = 7, - BuiltInInvocationId = 8, - BuiltInLayer = 9, - BuiltInViewportIndex = 10, - BuiltInTessLevelOuter = 11, - BuiltInTessLevelInner = 12, - BuiltInTessCoord = 13, - BuiltInPatchVertices = 14, - BuiltInFragCoord = 15, - BuiltInPointCoord = 16, - BuiltInFrontFacing = 17, - BuiltInSampleId = 18, - BuiltInSamplePosition = 19, - BuiltInSampleMask = 20, - BuiltInFragDepth = 22, - BuiltInHelperInvocation = 23, - BuiltInNumWorkgroups = 24, - BuiltInWorkgroupSize = 25, - BuiltInWorkgroupId = 26, - BuiltInLocalInvocationId = 27, - BuiltInGlobalInvocationId = 28, - BuiltInLocalInvocationIndex = 29, - BuiltInWorkDim = 30, - BuiltInGlobalSize = 31, - BuiltInEnqueuedWorkgroupSize = 32, - BuiltInGlobalOffset = 33, - BuiltInGlobalLinearId = 34, - BuiltInSubgroupSize = 36, - BuiltInSubgroupMaxSize = 37, - BuiltInNumSubgroups = 38, - BuiltInNumEnqueuedSubgroups = 39, - BuiltInSubgroupId = 40, - BuiltInSubgroupLocalInvocationId = 41, - BuiltInVertexIndex = 42, - BuiltInInstanceIndex = 43, -}; - -enum SelectionControlShift { - SelectionControlFlattenShift = 0, - SelectionControlDontFlattenShift = 1, -}; - -enum SelectionControlMask { - SelectionControlMaskNone = 0, - SelectionControlFlattenMask = 0x00000001, - SelectionControlDontFlattenMask = 0x00000002, -}; - -enum LoopControlShift { - LoopControlUnrollShift = 0, - LoopControlDontUnrollShift = 1, -}; - -enum LoopControlMask { - LoopControlMaskNone = 0, - LoopControlUnrollMask = 0x00000001, - LoopControlDontUnrollMask = 0x00000002, -}; - -enum FunctionControlShift { - FunctionControlInlineShift = 0, - FunctionControlDontInlineShift = 1, - FunctionControlPureShift = 2, - FunctionControlConstShift = 3, -}; - -enum FunctionControlMask { - FunctionControlMaskNone = 0, - FunctionControlInlineMask = 0x00000001, - FunctionControlDontInlineMask = 0x00000002, - FunctionControlPureMask = 0x00000004, - FunctionControlConstMask = 0x00000008, -}; - -enum MemorySemanticsShift { - MemorySemanticsAcquireShift = 1, - MemorySemanticsReleaseShift = 2, - MemorySemanticsAcquireReleaseShift = 3, - MemorySemanticsSequentiallyConsistentShift = 4, - MemorySemanticsUniformMemoryShift = 6, - MemorySemanticsSubgroupMemoryShift = 7, - MemorySemanticsWorkgroupMemoryShift = 8, - MemorySemanticsCrossWorkgroupMemoryShift = 9, - MemorySemanticsAtomicCounterMemoryShift = 10, - MemorySemanticsImageMemoryShift = 11, -}; - -enum MemorySemanticsMask { - MemorySemanticsMaskNone = 0, - MemorySemanticsAcquireMask = 0x00000002, - MemorySemanticsReleaseMask = 0x00000004, - MemorySemanticsAcquireReleaseMask = 0x00000008, - MemorySemanticsSequentiallyConsistentMask = 0x00000010, - MemorySemanticsUniformMemoryMask = 0x00000040, - MemorySemanticsSubgroupMemoryMask = 0x00000080, - MemorySemanticsWorkgroupMemoryMask = 0x00000100, - MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, - MemorySemanticsAtomicCounterMemoryMask = 0x00000400, - MemorySemanticsImageMemoryMask = 0x00000800, -}; - -enum MemoryAccessShift { - MemoryAccessVolatileShift = 0, - MemoryAccessAlignedShift = 1, - MemoryAccessNontemporalShift = 2, -}; - -enum MemoryAccessMask { - MemoryAccessMaskNone = 0, - MemoryAccessVolatileMask = 0x00000001, - MemoryAccessAlignedMask = 0x00000002, - MemoryAccessNontemporalMask = 0x00000004, -}; - -enum Scope { - ScopeCrossDevice = 0, - ScopeDevice = 1, - ScopeWorkgroup = 2, - ScopeSubgroup = 3, - ScopeInvocation = 4, -}; - -enum GroupOperation { - GroupOperationReduce = 0, - GroupOperationInclusiveScan = 1, - GroupOperationExclusiveScan = 2, -}; - -enum KernelEnqueueFlags { - KernelEnqueueFlagsNoWait = 0, - KernelEnqueueFlagsWaitKernel = 1, - KernelEnqueueFlagsWaitWorkGroup = 2, -}; - -enum KernelProfilingInfoShift { - KernelProfilingInfoCmdExecTimeShift = 0, -}; - -enum KernelProfilingInfoMask { - KernelProfilingInfoMaskNone = 0, - KernelProfilingInfoCmdExecTimeMask = 0x00000001, -}; - -enum Capability { - CapabilityMatrix = 0, - CapabilityShader = 1, - CapabilityGeometry = 2, - CapabilityTessellation = 3, - CapabilityAddresses = 4, - CapabilityLinkage = 5, - CapabilityKernel = 6, - CapabilityVector16 = 7, - CapabilityFloat16Buffer = 8, - CapabilityFloat16 = 9, - CapabilityFloat64 = 10, - CapabilityInt64 = 11, - CapabilityInt64Atomics = 12, - CapabilityImageBasic = 13, - CapabilityImageReadWrite = 14, - CapabilityImageMipmap = 15, - CapabilityPipes = 17, - CapabilityGroups = 18, - CapabilityDeviceEnqueue = 19, - CapabilityLiteralSampler = 20, - CapabilityAtomicStorage = 21, - CapabilityInt16 = 22, - CapabilityTessellationPointSize = 23, - CapabilityGeometryPointSize = 24, - CapabilityImageGatherExtended = 25, - CapabilityStorageImageMultisample = 27, - CapabilityUniformBufferArrayDynamicIndexing = 28, - CapabilitySampledImageArrayDynamicIndexing = 29, - CapabilityStorageBufferArrayDynamicIndexing = 30, - CapabilityStorageImageArrayDynamicIndexing = 31, - CapabilityClipDistance = 32, - CapabilityCullDistance = 33, - CapabilityImageCubeArray = 34, - CapabilitySampleRateShading = 35, - CapabilityImageRect = 36, - CapabilitySampledRect = 37, - CapabilityGenericPointer = 38, - CapabilityInt8 = 39, - CapabilityInputAttachment = 40, - CapabilitySparseResidency = 41, - CapabilityMinLod = 42, - CapabilitySampled1D = 43, - CapabilityImage1D = 44, - CapabilitySampledCubeArray = 45, - CapabilitySampledBuffer = 46, - CapabilityImageBuffer = 47, - CapabilityImageMSArray = 48, - CapabilityStorageImageExtendedFormats = 49, - CapabilityImageQuery = 50, - CapabilityDerivativeControl = 51, - CapabilityInterpolationFunction = 52, - CapabilityTransformFeedback = 53, - CapabilityGeometryStreams = 54, - CapabilityStorageImageReadWithoutFormat = 55, - CapabilityStorageImageWriteWithoutFormat = 56, -}; - -enum Op { - OpNop = 0, - OpUndef = 1, - OpSourceContinued = 2, - OpSource = 3, - OpSourceExtension = 4, - OpName = 5, - OpMemberName = 6, - OpString = 7, - OpLine = 8, - OpExtension = 10, - OpExtInstImport = 11, - OpExtInst = 12, - OpMemoryModel = 14, - OpEntryPoint = 15, - OpExecutionMode = 16, - OpCapability = 17, - OpTypeVoid = 19, - OpTypeBool = 20, - OpTypeInt = 21, - OpTypeFloat = 22, - OpTypeVector = 23, - OpTypeMatrix = 24, - OpTypeImage = 25, - OpTypeSampler = 26, - OpTypeSampledImage = 27, - OpTypeArray = 28, - OpTypeRuntimeArray = 29, - OpTypeStruct = 30, - OpTypeOpaque = 31, - OpTypePointer = 32, - OpTypeFunction = 33, - OpTypeEvent = 34, - OpTypeDeviceEvent = 35, - OpTypeReserveId = 36, - OpTypeQueue = 37, - OpTypePipe = 38, - OpTypeForwardPointer = 39, - OpConstantTrue = 41, - OpConstantFalse = 42, - OpConstant = 43, - OpConstantComposite = 44, - OpConstantSampler = 45, - OpConstantNull = 46, - OpSpecConstantTrue = 48, - OpSpecConstantFalse = 49, - OpSpecConstant = 50, - OpSpecConstantComposite = 51, - OpSpecConstantOp = 52, - OpFunction = 54, - OpFunctionParameter = 55, - OpFunctionEnd = 56, - OpFunctionCall = 57, - OpVariable = 59, - OpImageTexelPointer = 60, - OpLoad = 61, - OpStore = 62, - OpCopyMemory = 63, - OpCopyMemorySized = 64, - OpAccessChain = 65, - OpInBoundsAccessChain = 66, - OpPtrAccessChain = 67, - OpArrayLength = 68, - OpGenericPtrMemSemantics = 69, - OpInBoundsPtrAccessChain = 70, - OpDecorate = 71, - OpMemberDecorate = 72, - OpDecorationGroup = 73, - OpGroupDecorate = 74, - OpGroupMemberDecorate = 75, - OpVectorExtractDynamic = 77, - OpVectorInsertDynamic = 78, - OpVectorShuffle = 79, - OpCompositeConstruct = 80, - OpCompositeExtract = 81, - OpCompositeInsert = 82, - OpCopyObject = 83, - OpTranspose = 84, - OpSampledImage = 86, - OpImageSampleImplicitLod = 87, - OpImageSampleExplicitLod = 88, - OpImageSampleDrefImplicitLod = 89, - OpImageSampleDrefExplicitLod = 90, - OpImageSampleProjImplicitLod = 91, - OpImageSampleProjExplicitLod = 92, - OpImageSampleProjDrefImplicitLod = 93, - OpImageSampleProjDrefExplicitLod = 94, - OpImageFetch = 95, - OpImageGather = 96, - OpImageDrefGather = 97, - OpImageRead = 98, - OpImageWrite = 99, - OpImage = 100, - OpImageQueryFormat = 101, - OpImageQueryOrder = 102, - OpImageQuerySizeLod = 103, - OpImageQuerySize = 104, - OpImageQueryLod = 105, - OpImageQueryLevels = 106, - OpImageQuerySamples = 107, - OpConvertFToU = 109, - OpConvertFToS = 110, - OpConvertSToF = 111, - OpConvertUToF = 112, - OpUConvert = 113, - OpSConvert = 114, - OpFConvert = 115, - OpQuantizeToF16 = 116, - OpConvertPtrToU = 117, - OpSatConvertSToU = 118, - OpSatConvertUToS = 119, - OpConvertUToPtr = 120, - OpPtrCastToGeneric = 121, - OpGenericCastToPtr = 122, - OpGenericCastToPtrExplicit = 123, - OpBitcast = 124, - OpSNegate = 126, - OpFNegate = 127, - OpIAdd = 128, - OpFAdd = 129, - OpISub = 130, - OpFSub = 131, - OpIMul = 132, - OpFMul = 133, - OpUDiv = 134, - OpSDiv = 135, - OpFDiv = 136, - OpUMod = 137, - OpSRem = 138, - OpSMod = 139, - OpFRem = 140, - OpFMod = 141, - OpVectorTimesScalar = 142, - OpMatrixTimesScalar = 143, - OpVectorTimesMatrix = 144, - OpMatrixTimesVector = 145, - OpMatrixTimesMatrix = 146, - OpOuterProduct = 147, - OpDot = 148, - OpIAddCarry = 149, - OpISubBorrow = 150, - OpUMulExtended = 151, - OpSMulExtended = 152, - OpAny = 154, - OpAll = 155, - OpIsNan = 156, - OpIsInf = 157, - OpIsFinite = 158, - OpIsNormal = 159, - OpSignBitSet = 160, - OpLessOrGreater = 161, - OpOrdered = 162, - OpUnordered = 163, - OpLogicalEqual = 164, - OpLogicalNotEqual = 165, - OpLogicalOr = 166, - OpLogicalAnd = 167, - OpLogicalNot = 168, - OpSelect = 169, - OpIEqual = 170, - OpINotEqual = 171, - OpUGreaterThan = 172, - OpSGreaterThan = 173, - OpUGreaterThanEqual = 174, - OpSGreaterThanEqual = 175, - OpULessThan = 176, - OpSLessThan = 177, - OpULessThanEqual = 178, - OpSLessThanEqual = 179, - OpFOrdEqual = 180, - OpFUnordEqual = 181, - OpFOrdNotEqual = 182, - OpFUnordNotEqual = 183, - OpFOrdLessThan = 184, - OpFUnordLessThan = 185, - OpFOrdGreaterThan = 186, - OpFUnordGreaterThan = 187, - OpFOrdLessThanEqual = 188, - OpFUnordLessThanEqual = 189, - OpFOrdGreaterThanEqual = 190, - OpFUnordGreaterThanEqual = 191, - OpShiftRightLogical = 194, - OpShiftRightArithmetic = 195, - OpShiftLeftLogical = 196, - OpBitwiseOr = 197, - OpBitwiseXor = 198, - OpBitwiseAnd = 199, - OpNot = 200, - OpBitFieldInsert = 201, - OpBitFieldSExtract = 202, - OpBitFieldUExtract = 203, - OpBitReverse = 204, - OpBitCount = 205, - OpDPdx = 207, - OpDPdy = 208, - OpFwidth = 209, - OpDPdxFine = 210, - OpDPdyFine = 211, - OpFwidthFine = 212, - OpDPdxCoarse = 213, - OpDPdyCoarse = 214, - OpFwidthCoarse = 215, - OpEmitVertex = 218, - OpEndPrimitive = 219, - OpEmitStreamVertex = 220, - OpEndStreamPrimitive = 221, - OpControlBarrier = 224, - OpMemoryBarrier = 225, - OpAtomicLoad = 227, - OpAtomicStore = 228, - OpAtomicExchange = 229, - OpAtomicCompareExchange = 230, - OpAtomicCompareExchangeWeak = 231, - OpAtomicIIncrement = 232, - OpAtomicIDecrement = 233, - OpAtomicIAdd = 234, - OpAtomicISub = 235, - OpAtomicSMin = 236, - OpAtomicUMin = 237, - OpAtomicSMax = 238, - OpAtomicUMax = 239, - OpAtomicAnd = 240, - OpAtomicOr = 241, - OpAtomicXor = 242, - OpPhi = 245, - OpLoopMerge = 246, - OpSelectionMerge = 247, - OpLabel = 248, - OpBranch = 249, - OpBranchConditional = 250, - OpSwitch = 251, - OpKill = 252, - OpReturn = 253, - OpReturnValue = 254, - OpUnreachable = 255, - OpLifetimeStart = 256, - OpLifetimeStop = 257, - OpGroupAsyncCopy = 259, - OpGroupWaitEvents = 260, - OpGroupAll = 261, - OpGroupAny = 262, - OpGroupBroadcast = 263, - OpGroupIAdd = 264, - OpGroupFAdd = 265, - OpGroupFMin = 266, - OpGroupUMin = 267, - OpGroupSMin = 268, - OpGroupFMax = 269, - OpGroupUMax = 270, - OpGroupSMax = 271, - OpReadPipe = 274, - OpWritePipe = 275, - OpReservedReadPipe = 276, - OpReservedWritePipe = 277, - OpReserveReadPipePackets = 278, - OpReserveWritePipePackets = 279, - OpCommitReadPipe = 280, - OpCommitWritePipe = 281, - OpIsValidReserveId = 282, - OpGetNumPipePackets = 283, - OpGetMaxPipePackets = 284, - OpGroupReserveReadPipePackets = 285, - OpGroupReserveWritePipePackets = 286, - OpGroupCommitReadPipe = 287, - OpGroupCommitWritePipe = 288, - OpEnqueueMarker = 291, - OpEnqueueKernel = 292, - OpGetKernelNDrangeSubGroupCount = 293, - OpGetKernelNDrangeMaxSubGroupSize = 294, - OpGetKernelWorkGroupSize = 295, - OpGetKernelPreferredWorkGroupSizeMultiple = 296, - OpRetainEvent = 297, - OpReleaseEvent = 298, - OpCreateUserEvent = 299, - OpIsValidEvent = 300, - OpSetUserEventStatus = 301, - OpCaptureEventProfilingInfo = 302, - OpGetDefaultQueue = 303, - OpBuildNDRange = 304, - OpImageSparseSampleImplicitLod = 305, - OpImageSparseSampleExplicitLod = 306, - OpImageSparseSampleDrefImplicitLod = 307, - OpImageSparseSampleDrefExplicitLod = 308, - OpImageSparseSampleProjImplicitLod = 309, - OpImageSparseSampleProjExplicitLod = 310, - OpImageSparseSampleProjDrefImplicitLod = 311, - OpImageSparseSampleProjDrefExplicitLod = 312, - OpImageSparseFetch = 313, - OpImageSparseGather = 314, - OpImageSparseDrefGather = 315, - OpImageSparseTexelsResident = 316, - OpNoLine = 317, - OpAtomicFlagTestAndSet = 318, - OpAtomicFlagClear = 319, -}; - -// Overload operator| for mask bit combining - -inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } -inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } -inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } -inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } -inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } -inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } -inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } -inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } - -} // end namespace spv - -#endif // #ifndef spirv_H - +// Copyright (c) 2014-2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +#ifndef spirv_H +#define spirv_H + +namespace spv { + +typedef unsigned int Id; + +#define SPV_VERSION 10000 +#define SPV_REVISION 2 + +static const unsigned int MagicNumber = 0x07230203; +static const unsigned int Version = 0x00010000; +static const unsigned int Revision = 2; +static const unsigned int OpCodeMask = 0xffff; +static const unsigned int WordCountShift = 16; + +enum SourceLanguage { + SourceLanguageUnknown = 0, + SourceLanguageESSL = 1, + SourceLanguageGLSL = 2, + SourceLanguageOpenCL_C = 3, + SourceLanguageOpenCL_CPP = 4, +}; + +enum ExecutionModel { + ExecutionModelVertex = 0, + ExecutionModelTessellationControl = 1, + ExecutionModelTessellationEvaluation = 2, + ExecutionModelGeometry = 3, + ExecutionModelFragment = 4, + ExecutionModelGLCompute = 5, + ExecutionModelKernel = 6, +}; + +enum AddressingModel { + AddressingModelLogical = 0, + AddressingModelPhysical32 = 1, + AddressingModelPhysical64 = 2, +}; + +enum MemoryModel { + MemoryModelSimple = 0, + MemoryModelGLSL450 = 1, + MemoryModelOpenCL = 2, +}; + +enum ExecutionMode { + ExecutionModeInvocations = 0, + ExecutionModeSpacingEqual = 1, + ExecutionModeSpacingFractionalEven = 2, + ExecutionModeSpacingFractionalOdd = 3, + ExecutionModeVertexOrderCw = 4, + ExecutionModeVertexOrderCcw = 5, + ExecutionModePixelCenterInteger = 6, + ExecutionModeOriginUpperLeft = 7, + ExecutionModeOriginLowerLeft = 8, + ExecutionModeEarlyFragmentTests = 9, + ExecutionModePointMode = 10, + ExecutionModeXfb = 11, + ExecutionModeDepthReplacing = 12, + ExecutionModeDepthGreater = 14, + ExecutionModeDepthLess = 15, + ExecutionModeDepthUnchanged = 16, + ExecutionModeLocalSize = 17, + ExecutionModeLocalSizeHint = 18, + ExecutionModeInputPoints = 19, + ExecutionModeInputLines = 20, + ExecutionModeInputLinesAdjacency = 21, + ExecutionModeTriangles = 22, + ExecutionModeInputTrianglesAdjacency = 23, + ExecutionModeQuads = 24, + ExecutionModeIsolines = 25, + ExecutionModeOutputVertices = 26, + ExecutionModeOutputPoints = 27, + ExecutionModeOutputLineStrip = 28, + ExecutionModeOutputTriangleStrip = 29, + ExecutionModeVecTypeHint = 30, + ExecutionModeContractionOff = 31, +}; + +enum StorageClass { + StorageClassUniformConstant = 0, + StorageClassInput = 1, + StorageClassUniform = 2, + StorageClassOutput = 3, + StorageClassWorkgroup = 4, + StorageClassCrossWorkgroup = 5, + StorageClassPrivate = 6, + StorageClassFunction = 7, + StorageClassGeneric = 8, + StorageClassPushConstant = 9, + StorageClassAtomicCounter = 10, + StorageClassImage = 11, +}; + +enum Dim { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + DimCube = 3, + DimRect = 4, + DimBuffer = 5, + DimSubpassData = 6, +}; + +enum SamplerAddressingMode { + SamplerAddressingModeNone = 0, + SamplerAddressingModeClampToEdge = 1, + SamplerAddressingModeClamp = 2, + SamplerAddressingModeRepeat = 3, + SamplerAddressingModeRepeatMirrored = 4, +}; + +enum SamplerFilterMode { + SamplerFilterModeNearest = 0, + SamplerFilterModeLinear = 1, +}; + +enum ImageFormat { + ImageFormatUnknown = 0, + ImageFormatRgba32f = 1, + ImageFormatRgba16f = 2, + ImageFormatR32f = 3, + ImageFormatRgba8 = 4, + ImageFormatRgba8Snorm = 5, + ImageFormatRg32f = 6, + ImageFormatRg16f = 7, + ImageFormatR11fG11fB10f = 8, + ImageFormatR16f = 9, + ImageFormatRgba16 = 10, + ImageFormatRgb10A2 = 11, + ImageFormatRg16 = 12, + ImageFormatRg8 = 13, + ImageFormatR16 = 14, + ImageFormatR8 = 15, + ImageFormatRgba16Snorm = 16, + ImageFormatRg16Snorm = 17, + ImageFormatRg8Snorm = 18, + ImageFormatR16Snorm = 19, + ImageFormatR8Snorm = 20, + ImageFormatRgba32i = 21, + ImageFormatRgba16i = 22, + ImageFormatRgba8i = 23, + ImageFormatR32i = 24, + ImageFormatRg32i = 25, + ImageFormatRg16i = 26, + ImageFormatRg8i = 27, + ImageFormatR16i = 28, + ImageFormatR8i = 29, + ImageFormatRgba32ui = 30, + ImageFormatRgba16ui = 31, + ImageFormatRgba8ui = 32, + ImageFormatR32ui = 33, + ImageFormatRgb10a2ui = 34, + ImageFormatRg32ui = 35, + ImageFormatRg16ui = 36, + ImageFormatRg8ui = 37, + ImageFormatR16ui = 38, + ImageFormatR8ui = 39, +}; + +enum ImageChannelOrder { + ImageChannelOrderR = 0, + ImageChannelOrderA = 1, + ImageChannelOrderRG = 2, + ImageChannelOrderRA = 3, + ImageChannelOrderRGB = 4, + ImageChannelOrderRGBA = 5, + ImageChannelOrderBGRA = 6, + ImageChannelOrderARGB = 7, + ImageChannelOrderIntensity = 8, + ImageChannelOrderLuminance = 9, + ImageChannelOrderRx = 10, + ImageChannelOrderRGx = 11, + ImageChannelOrderRGBx = 12, + ImageChannelOrderDepth = 13, + ImageChannelOrderDepthStencil = 14, + ImageChannelOrdersRGB = 15, + ImageChannelOrdersRGBx = 16, + ImageChannelOrdersRGBA = 17, + ImageChannelOrdersBGRA = 18, +}; + +enum ImageChannelDataType { + ImageChannelDataTypeSnormInt8 = 0, + ImageChannelDataTypeSnormInt16 = 1, + ImageChannelDataTypeUnormInt8 = 2, + ImageChannelDataTypeUnormInt16 = 3, + ImageChannelDataTypeUnormShort565 = 4, + ImageChannelDataTypeUnormShort555 = 5, + ImageChannelDataTypeUnormInt101010 = 6, + ImageChannelDataTypeSignedInt8 = 7, + ImageChannelDataTypeSignedInt16 = 8, + ImageChannelDataTypeSignedInt32 = 9, + ImageChannelDataTypeUnsignedInt8 = 10, + ImageChannelDataTypeUnsignedInt16 = 11, + ImageChannelDataTypeUnsignedInt32 = 12, + ImageChannelDataTypeHalfFloat = 13, + ImageChannelDataTypeFloat = 14, + ImageChannelDataTypeUnormInt24 = 15, + ImageChannelDataTypeUnormInt101010_2 = 16, +}; + +enum ImageOperandsShift { + ImageOperandsBiasShift = 0, + ImageOperandsLodShift = 1, + ImageOperandsGradShift = 2, + ImageOperandsConstOffsetShift = 3, + ImageOperandsOffsetShift = 4, + ImageOperandsConstOffsetsShift = 5, + ImageOperandsSampleShift = 6, + ImageOperandsMinLodShift = 7, +}; + +enum ImageOperandsMask { + ImageOperandsMaskNone = 0, + ImageOperandsBiasMask = 0x00000001, + ImageOperandsLodMask = 0x00000002, + ImageOperandsGradMask = 0x00000004, + ImageOperandsConstOffsetMask = 0x00000008, + ImageOperandsOffsetMask = 0x00000010, + ImageOperandsConstOffsetsMask = 0x00000020, + ImageOperandsSampleMask = 0x00000040, + ImageOperandsMinLodMask = 0x00000080, +}; + +enum FPFastMathModeShift { + FPFastMathModeNotNaNShift = 0, + FPFastMathModeNotInfShift = 1, + FPFastMathModeNSZShift = 2, + FPFastMathModeAllowRecipShift = 3, + FPFastMathModeFastShift = 4, +}; + +enum FPFastMathModeMask { + FPFastMathModeMaskNone = 0, + FPFastMathModeNotNaNMask = 0x00000001, + FPFastMathModeNotInfMask = 0x00000002, + FPFastMathModeNSZMask = 0x00000004, + FPFastMathModeAllowRecipMask = 0x00000008, + FPFastMathModeFastMask = 0x00000010, +}; + +enum FPRoundingMode { + FPRoundingModeRTE = 0, + FPRoundingModeRTZ = 1, + FPRoundingModeRTP = 2, + FPRoundingModeRTN = 3, +}; + +enum LinkageType { + LinkageTypeExport = 0, + LinkageTypeImport = 1, +}; + +enum AccessQualifier { + AccessQualifierReadOnly = 0, + AccessQualifierWriteOnly = 1, + AccessQualifierReadWrite = 2, +}; + +enum FunctionParameterAttribute { + FunctionParameterAttributeZext = 0, + FunctionParameterAttributeSext = 1, + FunctionParameterAttributeByVal = 2, + FunctionParameterAttributeSret = 3, + FunctionParameterAttributeNoAlias = 4, + FunctionParameterAttributeNoCapture = 5, + FunctionParameterAttributeNoWrite = 6, + FunctionParameterAttributeNoReadWrite = 7, +}; + +enum Decoration { + DecorationRelaxedPrecision = 0, + DecorationSpecId = 1, + DecorationBlock = 2, + DecorationBufferBlock = 3, + DecorationRowMajor = 4, + DecorationColMajor = 5, + DecorationArrayStride = 6, + DecorationMatrixStride = 7, + DecorationGLSLShared = 8, + DecorationGLSLPacked = 9, + DecorationCPacked = 10, + DecorationBuiltIn = 11, + DecorationNoPerspective = 13, + DecorationFlat = 14, + DecorationPatch = 15, + DecorationCentroid = 16, + DecorationSample = 17, + DecorationInvariant = 18, + DecorationRestrict = 19, + DecorationAliased = 20, + DecorationVolatile = 21, + DecorationConstant = 22, + DecorationCoherent = 23, + DecorationNonWritable = 24, + DecorationNonReadable = 25, + DecorationUniform = 26, + DecorationSaturatedConversion = 28, + DecorationStream = 29, + DecorationLocation = 30, + DecorationComponent = 31, + DecorationIndex = 32, + DecorationBinding = 33, + DecorationDescriptorSet = 34, + DecorationOffset = 35, + DecorationXfbBuffer = 36, + DecorationXfbStride = 37, + DecorationFuncParamAttr = 38, + DecorationFPRoundingMode = 39, + DecorationFPFastMathMode = 40, + DecorationLinkageAttributes = 41, + DecorationNoContraction = 42, + DecorationInputAttachmentIndex = 43, + DecorationAlignment = 44, +}; + +enum BuiltIn { + BuiltInPosition = 0, + BuiltInPointSize = 1, + BuiltInClipDistance = 3, + BuiltInCullDistance = 4, + BuiltInVertexId = 5, + BuiltInInstanceId = 6, + BuiltInPrimitiveId = 7, + BuiltInInvocationId = 8, + BuiltInLayer = 9, + BuiltInViewportIndex = 10, + BuiltInTessLevelOuter = 11, + BuiltInTessLevelInner = 12, + BuiltInTessCoord = 13, + BuiltInPatchVertices = 14, + BuiltInFragCoord = 15, + BuiltInPointCoord = 16, + BuiltInFrontFacing = 17, + BuiltInSampleId = 18, + BuiltInSamplePosition = 19, + BuiltInSampleMask = 20, + BuiltInFragDepth = 22, + BuiltInHelperInvocation = 23, + BuiltInNumWorkgroups = 24, + BuiltInWorkgroupSize = 25, + BuiltInWorkgroupId = 26, + BuiltInLocalInvocationId = 27, + BuiltInGlobalInvocationId = 28, + BuiltInLocalInvocationIndex = 29, + BuiltInWorkDim = 30, + BuiltInGlobalSize = 31, + BuiltInEnqueuedWorkgroupSize = 32, + BuiltInGlobalOffset = 33, + BuiltInGlobalLinearId = 34, + BuiltInSubgroupSize = 36, + BuiltInSubgroupMaxSize = 37, + BuiltInNumSubgroups = 38, + BuiltInNumEnqueuedSubgroups = 39, + BuiltInSubgroupId = 40, + BuiltInSubgroupLocalInvocationId = 41, + BuiltInVertexIndex = 42, + BuiltInInstanceIndex = 43, +}; + +enum SelectionControlShift { + SelectionControlFlattenShift = 0, + SelectionControlDontFlattenShift = 1, +}; + +enum SelectionControlMask { + SelectionControlMaskNone = 0, + SelectionControlFlattenMask = 0x00000001, + SelectionControlDontFlattenMask = 0x00000002, +}; + +enum LoopControlShift { + LoopControlUnrollShift = 0, + LoopControlDontUnrollShift = 1, +}; + +enum LoopControlMask { + LoopControlMaskNone = 0, + LoopControlUnrollMask = 0x00000001, + LoopControlDontUnrollMask = 0x00000002, +}; + +enum FunctionControlShift { + FunctionControlInlineShift = 0, + FunctionControlDontInlineShift = 1, + FunctionControlPureShift = 2, + FunctionControlConstShift = 3, +}; + +enum FunctionControlMask { + FunctionControlMaskNone = 0, + FunctionControlInlineMask = 0x00000001, + FunctionControlDontInlineMask = 0x00000002, + FunctionControlPureMask = 0x00000004, + FunctionControlConstMask = 0x00000008, +}; + +enum MemorySemanticsShift { + MemorySemanticsAcquireShift = 1, + MemorySemanticsReleaseShift = 2, + MemorySemanticsAcquireReleaseShift = 3, + MemorySemanticsSequentiallyConsistentShift = 4, + MemorySemanticsUniformMemoryShift = 6, + MemorySemanticsSubgroupMemoryShift = 7, + MemorySemanticsWorkgroupMemoryShift = 8, + MemorySemanticsCrossWorkgroupMemoryShift = 9, + MemorySemanticsAtomicCounterMemoryShift = 10, + MemorySemanticsImageMemoryShift = 11, +}; + +enum MemorySemanticsMask { + MemorySemanticsMaskNone = 0, + MemorySemanticsAcquireMask = 0x00000002, + MemorySemanticsReleaseMask = 0x00000004, + MemorySemanticsAcquireReleaseMask = 0x00000008, + MemorySemanticsSequentiallyConsistentMask = 0x00000010, + MemorySemanticsUniformMemoryMask = 0x00000040, + MemorySemanticsSubgroupMemoryMask = 0x00000080, + MemorySemanticsWorkgroupMemoryMask = 0x00000100, + MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, + MemorySemanticsAtomicCounterMemoryMask = 0x00000400, + MemorySemanticsImageMemoryMask = 0x00000800, +}; + +enum MemoryAccessShift { + MemoryAccessVolatileShift = 0, + MemoryAccessAlignedShift = 1, + MemoryAccessNontemporalShift = 2, +}; + +enum MemoryAccessMask { + MemoryAccessMaskNone = 0, + MemoryAccessVolatileMask = 0x00000001, + MemoryAccessAlignedMask = 0x00000002, + MemoryAccessNontemporalMask = 0x00000004, +}; + +enum Scope { + ScopeCrossDevice = 0, + ScopeDevice = 1, + ScopeWorkgroup = 2, + ScopeSubgroup = 3, + ScopeInvocation = 4, +}; + +enum GroupOperation { + GroupOperationReduce = 0, + GroupOperationInclusiveScan = 1, + GroupOperationExclusiveScan = 2, +}; + +enum KernelEnqueueFlags { + KernelEnqueueFlagsNoWait = 0, + KernelEnqueueFlagsWaitKernel = 1, + KernelEnqueueFlagsWaitWorkGroup = 2, +}; + +enum KernelProfilingInfoShift { + KernelProfilingInfoCmdExecTimeShift = 0, +}; + +enum KernelProfilingInfoMask { + KernelProfilingInfoMaskNone = 0, + KernelProfilingInfoCmdExecTimeMask = 0x00000001, +}; + +enum Capability { + CapabilityMatrix = 0, + CapabilityShader = 1, + CapabilityGeometry = 2, + CapabilityTessellation = 3, + CapabilityAddresses = 4, + CapabilityLinkage = 5, + CapabilityKernel = 6, + CapabilityVector16 = 7, + CapabilityFloat16Buffer = 8, + CapabilityFloat16 = 9, + CapabilityFloat64 = 10, + CapabilityInt64 = 11, + CapabilityInt64Atomics = 12, + CapabilityImageBasic = 13, + CapabilityImageReadWrite = 14, + CapabilityImageMipmap = 15, + CapabilityPipes = 17, + CapabilityGroups = 18, + CapabilityDeviceEnqueue = 19, + CapabilityLiteralSampler = 20, + CapabilityAtomicStorage = 21, + CapabilityInt16 = 22, + CapabilityTessellationPointSize = 23, + CapabilityGeometryPointSize = 24, + CapabilityImageGatherExtended = 25, + CapabilityStorageImageMultisample = 27, + CapabilityUniformBufferArrayDynamicIndexing = 28, + CapabilitySampledImageArrayDynamicIndexing = 29, + CapabilityStorageBufferArrayDynamicIndexing = 30, + CapabilityStorageImageArrayDynamicIndexing = 31, + CapabilityClipDistance = 32, + CapabilityCullDistance = 33, + CapabilityImageCubeArray = 34, + CapabilitySampleRateShading = 35, + CapabilityImageRect = 36, + CapabilitySampledRect = 37, + CapabilityGenericPointer = 38, + CapabilityInt8 = 39, + CapabilityInputAttachment = 40, + CapabilitySparseResidency = 41, + CapabilityMinLod = 42, + CapabilitySampled1D = 43, + CapabilityImage1D = 44, + CapabilitySampledCubeArray = 45, + CapabilitySampledBuffer = 46, + CapabilityImageBuffer = 47, + CapabilityImageMSArray = 48, + CapabilityStorageImageExtendedFormats = 49, + CapabilityImageQuery = 50, + CapabilityDerivativeControl = 51, + CapabilityInterpolationFunction = 52, + CapabilityTransformFeedback = 53, + CapabilityGeometryStreams = 54, + CapabilityStorageImageReadWithoutFormat = 55, + CapabilityStorageImageWriteWithoutFormat = 56, +}; + +enum Op { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, +}; + +// Overload operator| for mask bit combining + +inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } + +} // end namespace spv + +#endif // #ifndef spirv_H + diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index 25e55d90..80a077ce 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -309,7 +309,7 @@ struct str_hash unsigned long hash = 5381; int c; - while ((c = *str++)) + while ((c = *str++) != 0) hash = ((hash << 5) + hash) + c; return hash; From 9c6734c8dfc2708cbb7311b68fc7c6040681486b Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Sun, 10 Jan 2016 12:15:13 -0500 Subject: [PATCH 03/84] First cut at new loop codegen. Change-Id: Id3bdf8b7a5606e7ce5d856ef225d5ddbe59a584b --- SPIRV/GlslangToSpv.cpp | 62 +++++++++++++++--------- SPIRV/SpvBuilder.cpp | 13 +++++ SPIRV/SpvBuilder.h | 16 ++++-- Test/baseResults/spv.for-simple.vert.out | 54 +++++++++++---------- 4 files changed, 93 insertions(+), 52 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 0fff30e9..769cf50b 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1342,33 +1342,51 @@ void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* n bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIntermLoop* node) { - // body emission needs to know what the for-loop terminal is when it sees a "continue" - loopTerminal.push(node->getTerminal()); + auto blocks = builder.makeNewLoop(); + if (node->testFirst() && node->getTest()) { + spv::Block& head = builder.makeNewBlock(); + builder.createBranch(&head); - builder.makeNewLoop(node->testFirst()); - - if (node->getTest()) { + builder.setBuildPoint(&head); node->getTest()->traverse(this); - // the AST only contained the test computation, not the branch, we have to add it - spv::Id condition = builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); - builder.createLoopTestBranch(condition); + spv::Id condition = + builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); + builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); + builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); + + builder.setBuildPoint(&blocks.body); + if (node->getBody()) + node->getBody()->traverse(this); // continue->cont, break->exit + builder.createBranch(&blocks.continue_target); + + builder.setBuildPoint(&blocks.continue_target); + if (node->getTerminal()) + node->getTerminal()->traverse(this); + builder.createBranch(&head); } else { - builder.createBranchToBody(); + builder.createBranch(&blocks.body); + + builder.setBuildPoint(&blocks.body); + if (node->getBody()) + node->getBody()->traverse(this); // continue->cont, break->exit + builder.createBranch(&blocks.continue_target); + + builder.setBuildPoint(&blocks.continue_target); + if (node->getTerminal()) + node->getTerminal()->traverse(this); + if (node->getTest()) { + node->getTest()->traverse(this); + spv::Id condition = + builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); + builder.createLoopMerge(&blocks.merge, &blocks.continue_target, + spv::LoopControlMaskNone); + builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); + } else { + builder.createBranch(&blocks.body); + } } - if (node->getBody()) { - breakForLoop.push(true); - node->getBody()->traverse(this); - breakForLoop.pop(); - } - - if (loopTerminal.top()) - loopTerminal.top()->traverse(this); - - builder.closeLoop(); - - loopTerminal.pop(); - + builder.setBuildPoint(&blocks.merge); return false; } diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index a46c924b..57e27e0d 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1753,6 +1753,19 @@ void Builder::endSwitch(std::vector& /*segmentBlock*/) switchMerges.pop(); } +Block& Builder::makeNewBlock() +{ + Function& function = buildPoint->getParent(); + auto block = new Block(getUniqueId(), function); + function.addBlock(block); + return *block; +} + +Builder::LoopBlocks Builder::makeNewLoop() +{ + return {makeNewBlock(), makeNewBlock(), makeNewBlock()}; +} + // Comments in header void Builder::makeNewLoop(bool loopTestFirst) { diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 5750b00f..d3e7ad98 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -378,6 +378,13 @@ public: // The loopTestFirst parameter is true when the loop test executes before // the body. (It is false for do-while loops.) void makeNewLoop(bool loopTestFirst); + struct LoopBlocks { + Block &body, &merge, &continue_target; + }; + LoopBlocks makeNewLoop(); + + // Create a new block in the function containing the build point. + Block& makeNewBlock(); // Add the branch for the loop test, based on the given condition. // The true branch goes to the first block in the loop body, and @@ -494,7 +501,11 @@ public: void dump(std::vector&) const; -protected: + void createBranch(Block* block); + void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); + void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control); + + protected: Id makeIntConstant(Id typeId, unsigned value, bool specConstant); Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const; Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const; @@ -503,10 +514,7 @@ protected: void transferAccessChainSwizzle(bool dynamic); void simplifyAccessChainSwizzle(); void createAndSetNoPredecessorBlock(const char*); - void createBranch(Block* block); void createSelectionMerge(Block* mergeBlock, unsigned int control); - void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control); - void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); void dumpInstructions(std::vector&, const std::vector&) const; struct Loop; // Defined below. diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index 95ca758d..3dd4fc36 100755 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -5,49 +5,51 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 25 +// Id's are bound by 26 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 23 24 + EntryPoint Vertex 4 "main" 24 25 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 17 "j" - Name 23 "gl_VertexID" - Name 24 "gl_InstanceID" - Decorate 23(gl_VertexID) BuiltIn VertexId - Decorate 24(gl_InstanceID) BuiltIn InstanceId + Name 18 "j" + Name 24 "gl_VertexID" + Name 25 "gl_InstanceID" + Decorate 24(gl_VertexID) BuiltIn VertexId + Decorate 25(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 14: 6(int) Constant 10 - 15: TypeBool - 18: 6(int) Constant 12 - 20: 6(int) Constant 1 - 22: TypePointer Input 6(int) - 23(gl_VertexID): 22(ptr) Variable Input -24(gl_InstanceID): 22(ptr) Variable Input + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 12 + 21: 6(int) Constant 1 + 23: TypePointer Input 6(int) + 24(gl_VertexID): 23(ptr) Variable Input +25(gl_InstanceID): 23(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function - 17(j): 7(ptr) Variable Function + 18(j): 7(ptr) Variable Function Store 8(i) 9 - Branch 10 + Branch 13 10: Label - 13: 6(int) Load 8(i) - 16: 15(bool) SLessThan 13 14 - LoopMerge 11 10 None - BranchConditional 16 12 11 - 12: Label - Store 17(j) 18 - 19: 6(int) Load 8(i) - 21: 6(int) IAdd 19 20 - Store 8(i) 21 - Branch 10 + Store 18(j) 19 + Branch 12 11: Label Return + 12: Label + 20: 6(int) Load 8(i) + 22: 6(int) IAdd 20 21 + Store 8(i) 22 + Branch 13 + 13: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 11 12 None + BranchConditional 17 10 11 FunctionEnd From e537b8b48840be891c12d7ab8c7c4f3b98eefde5 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Sun, 10 Jan 2016 19:37:00 -0500 Subject: [PATCH 04/84] Fix unreachable-block removal. Add a test for loop without a condition. Change-Id: Idd7fc462218a84b1e745207e2975a3f2897d30a0 --- SPIRV/GlslangToSpv.cpp | 4 +- SPIRV/SpvBuilder.cpp | 2 +- SPIRV/spvIR.h | 9 ++++- Test/baseResults/spv.for-notest.vert.out | 50 ++++++++++++++++++++++++ Test/spv.for-notest.vert | 6 +++ 5 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 Test/baseResults/spv.for-notest.vert.out create mode 100644 Test/spv.for-notest.vert diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 769cf50b..06ab0948 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1356,7 +1356,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.setBuildPoint(&blocks.body); if (node->getBody()) - node->getBody()->traverse(this); // continue->cont, break->exit + node->getBody()->traverse(this); builder.createBranch(&blocks.continue_target); builder.setBuildPoint(&blocks.continue_target); @@ -1368,7 +1368,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.setBuildPoint(&blocks.body); if (node->getBody()) - node->getBody()->traverse(this); // continue->cont, break->exit + node->getBody()->traverse(this); builder.createBranch(&blocks.continue_target); builder.setBuildPoint(&blocks.continue_target); diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 57e27e0d..8e023ea1 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -852,7 +852,7 @@ void Builder::leaveFunction() if (unreachable) { // Given that this block is at the end of a function, it must be right after an // explicit return, just remove it. - function.popBlock(block); + function.removeBlock(block); } else { // We'll add a return instruction at the end of the current block, // which for a non-void function is really error recovery (?), as the source diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 6736a13c..70f27f75 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -52,6 +52,7 @@ #include "spirv.hpp" +#include #include #include #include @@ -235,7 +236,13 @@ public: Id getParamId(int p) { return parameterInstructions[p]->getResultId(); } void addBlock(Block* block) { blocks.push_back(block); } - void popBlock(Block*) { blocks.pop_back(); } + void removeBlock(Block* block) + { + auto found = find(blocks.begin(), blocks.end(), block); + assert(found != blocks.end()); + blocks.erase(found); + delete block; + } Module& getParent() const { return parent; } Block* getEntryBlock() const { return blocks.front(); } diff --git a/Test/baseResults/spv.for-notest.vert.out b/Test/baseResults/spv.for-notest.vert.out new file mode 100644 index 00000000..e55ef9b6 --- /dev/null +++ b/Test/baseResults/spv.for-notest.vert.out @@ -0,0 +1,50 @@ +spv.for-notest.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 22 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 14 20 21 + Source GLSL 450 + Name 4 "main" + Name 8 "i" + Name 14 "r" + Name 20 "gl_VertexID" + Name 21 "gl_InstanceID" + Decorate 14(r) Location 0 + Decorate 20(gl_VertexID) BuiltIn VertexId + Decorate 21(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 13: TypePointer Output 6(int) + 14(r): 13(ptr) Variable Output + 17: 6(int) Constant 1 + 19: TypePointer Input 6(int) + 20(gl_VertexID): 19(ptr) Variable Input +21(gl_InstanceID): 19(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + 15: 6(int) Load 8(i) + Store 14(r) 15 + Branch 12 + 12: Label + 16: 6(int) Load 8(i) + 18: 6(int) IAdd 16 17 + Store 8(i) 18 + Branch 10 + FunctionEnd diff --git a/Test/spv.for-notest.vert b/Test/spv.for-notest.vert new file mode 100644 index 00000000..f40e6664 --- /dev/null +++ b/Test/spv.for-notest.vert @@ -0,0 +1,6 @@ +#version 450 +layout(location=0) out highp int r; +void main() { + int i; + for (i=0; ; i++) { r = i; } +} From 13228243b2be30ebc6377ddbbc59f0cc8d5da12a Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Sun, 10 Jan 2016 23:15:08 -0500 Subject: [PATCH 05/84] Test a for loop with no body. Change-Id: I5b53cc008349afad94b14500506fcab4d6e64d2e --- Test/baseResults/spv.for-nobody.vert.out | 59 ++++++++++++++++++++++++ Test/spv.for-nobody.vert | 7 +++ 2 files changed, 66 insertions(+) create mode 100644 Test/baseResults/spv.for-nobody.vert.out create mode 100644 Test/spv.for-nobody.vert diff --git a/Test/baseResults/spv.for-nobody.vert.out b/Test/baseResults/spv.for-nobody.vert.out new file mode 100644 index 00000000..1645c66a --- /dev/null +++ b/Test/baseResults/spv.for-nobody.vert.out @@ -0,0 +1,59 @@ +spv.for-nobody.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 27 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 22 25 26 + Source GLSL 450 + Name 4 "main" + Name 8 "i" + Name 22 "r" + Name 25 "gl_VertexID" + Name 26 "gl_InstanceID" + Decorate 22(r) Location 0 + Decorate 25(gl_VertexID) BuiltIn VertexId + Decorate 26(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 1 + 21: TypePointer Output 6(int) + 22(r): 21(ptr) Variable Output + 24: TypePointer Input 6(int) + 25(gl_VertexID): 24(ptr) Variable Input +26(gl_InstanceID): 24(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 13 + 10: Label + Branch 12 + 11: Label + 23: 6(int) Load 8(i) + Store 22(r) 23 + Return + 12: Label + 18: 6(int) Load 8(i) + 20: 6(int) IAdd 18 19 + Store 8(i) 20 + Branch 13 + 13: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 11 12 None + BranchConditional 17 10 11 + FunctionEnd diff --git a/Test/spv.for-nobody.vert b/Test/spv.for-nobody.vert new file mode 100644 index 00000000..99634761 --- /dev/null +++ b/Test/spv.for-nobody.vert @@ -0,0 +1,7 @@ +#version 450 +layout(location=0) out highp int r; +void main() { + int i; + for (i=0; i<10; i++); + r = i; +} From 7819bee82c5caafba1f2fdae2b8f1a9a9419bd67 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 11 Jan 2016 09:35:22 -0500 Subject: [PATCH 06/84] Switch loops stack to use LoopBlocks. Also remove dead code. Change-Id: I2c0177d8cab48b7d6f9442715aecb7951597f3c8 --- SPIRV/SpvBuilder.cpp | 154 ++----------------------------------------- SPIRV/SpvBuilder.h | 75 ++++----------------- 2 files changed, 16 insertions(+), 213 deletions(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 8e023ea1..eb8c4d37 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1761,155 +1761,31 @@ Block& Builder::makeNewBlock() return *block; } -Builder::LoopBlocks Builder::makeNewLoop() +Builder::LoopBlocks& Builder::makeNewLoop() { - return {makeNewBlock(), makeNewBlock(), makeNewBlock()}; -} - -// Comments in header -void Builder::makeNewLoop(bool loopTestFirst) -{ - loops.push(Loop(*this, loopTestFirst)); - const Loop& loop = loops.top(); - - // The loop test is always emitted before the loop body. - // But if the loop test executes at the bottom of the loop, then - // execute the test only on the second and subsequent iterations. - - // Remember the block that branches to the loop header. This - // is required for the test-after-body case. - Block* preheader = getBuildPoint(); - - // Branch into the loop - createBranch(loop.header); - - // Set ourselves inside the loop - loop.function->addBlock(loop.header); - setBuildPoint(loop.header); - - if (!loopTestFirst) { - // Generate code to defer the loop test until the second and - // subsequent iterations. - - // It's always the first iteration when coming from the preheader. - // All other branches to this loop header will need to indicate "false", - // but we don't yet know where they will come from. - loop.isFirstIteration->addIdOperand(makeBoolConstant(true)); - loop.isFirstIteration->addIdOperand(preheader->getId()); - getBuildPoint()->addInstruction(loop.isFirstIteration); - - // Mark the end of the structured loop. This must exist in the loop header block. - createLoopMerge(loop.merge, loop.header, LoopControlMaskNone); - - // Generate code to see if this is the first iteration of the loop. - // It needs to be in its own block, since the loop merge and - // the selection merge instructions can't both be in the same - // (header) block. - Block* firstIterationCheck = new Block(getUniqueId(), *loop.function); - createBranch(firstIterationCheck); - loop.function->addBlock(firstIterationCheck); - setBuildPoint(firstIterationCheck); - - // Control flow after this "if" normally reconverges at the loop body. - // However, the loop test has a "break branch" out of this selection - // construct because it can transfer control to the loop merge block. - createSelectionMerge(loop.body, SelectionControlMaskNone); - - Block* loopTest = new Block(getUniqueId(), *loop.function); - createConditionalBranch(loop.isFirstIteration->getResultId(), loop.body, loopTest); - - loop.function->addBlock(loopTest); - setBuildPoint(loopTest); - } -} - -void Builder::createLoopTestBranch(Id condition) -{ - const Loop& loop = loops.top(); - - // Generate the merge instruction. If the loop test executes before - // the body, then this is a loop merge. Otherwise the loop merge - // has already been generated and this is a conditional merge. - if (loop.testFirst) { - createLoopMerge(loop.merge, loop.header, LoopControlMaskNone); - // Branching to the "body" block will keep control inside - // the loop. - createConditionalBranch(condition, loop.body, loop.merge); - loop.function->addBlock(loop.body); - setBuildPoint(loop.body); - } else { - // The branch to the loop merge block is the allowed exception - // to the structured control flow. Otherwise, control flow will - // continue to loop.body block. Since that is already the target - // of a merge instruction, and a block can't be the target of more - // than one merge instruction, we need to make an intermediate block. - Block* stayInLoopBlock = new Block(getUniqueId(), *loop.function); - createSelectionMerge(stayInLoopBlock, SelectionControlMaskNone); - - // This is the loop test. - createConditionalBranch(condition, stayInLoopBlock, loop.merge); - - // The dummy block just branches to the real loop body. - loop.function->addBlock(stayInLoopBlock); - setBuildPoint(stayInLoopBlock); - createBranchToBody(); - } -} - -void Builder::createBranchToBody() -{ - const Loop& loop = loops.top(); - assert(loop.body); - - // This is a reconvergence of control flow, so no merge instruction - // is required. - createBranch(loop.body); - loop.function->addBlock(loop.body); - setBuildPoint(loop.body); + loops.push({makeNewBlock(), makeNewBlock(), makeNewBlock()}); + return loops.top(); } void Builder::createLoopContinue() { - createBranchToLoopHeaderFromInside(loops.top()); + createBranch(&loops.top().continue_target); // Set up a block for dead code. createAndSetNoPredecessorBlock("post-loop-continue"); } -// Add an exit (e.g. "break") for the innermost loop that you're in void Builder::createLoopExit() { - createBranch(loops.top().merge); + createBranch(&loops.top().merge); // Set up a block for dead code. createAndSetNoPredecessorBlock("post-loop-break"); } -// Close the innermost loop void Builder::closeLoop() { - const Loop& loop = loops.top(); - - // Branch back to the top - createBranchToLoopHeaderFromInside(loop); - - // Add the merge block and set the build point to it - loop.function->addBlock(loop.merge); - setBuildPoint(loop.merge); - loops.pop(); } -// Create a branch to the header of the given loop, from inside -// the loop body. -// Adjusts the phi node for the first-iteration value if needeed. -void Builder::createBranchToLoopHeaderFromInside(const Loop& loop) -{ - createBranch(loop.header); - if (loop.isFirstIteration) { - loop.isFirstIteration->addIdOperand(makeBoolConstant(false)); - loop.isFirstIteration->addIdOperand(getBuildPoint()->getId()); - } -} - void Builder::clearAccessChain() { accessChain.base = NoResult; @@ -2273,24 +2149,4 @@ void MissingFunctionality(const char* fun) exit(1); } -Builder::Loop::Loop(Builder& builder, bool testFirstArg) - : function(&builder.getBuildPoint()->getParent()), - header(new Block(builder.getUniqueId(), *function)), - merge(new Block(builder.getUniqueId(), *function)), - body(new Block(builder.getUniqueId(), *function)), - testFirst(testFirstArg), - isFirstIteration(nullptr) -{ - if (!testFirst) - { -// You may be tempted to rewrite this as -// new Instruction(builder.getUniqueId(), builder.makeBoolType(), OpPhi); -// This will cause subtle test failures because builder.getUniqueId(), -// and builder.makeBoolType() can then get run in a compiler-specific -// order making tests fail for certain configurations. - Id instructionId = builder.getUniqueId(); - isFirstIteration = new Instruction(instructionId, builder.makeBoolType(), OpPhi); - } -} - }; // end spv namespace diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index d3e7ad98..a1ed84ca 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -373,35 +373,24 @@ public: // Finish off the innermost switch. void endSwitch(std::vector& segmentBB); - // Start the beginning of a new loop, and prepare the builder to - // generate code for the loop test. - // The loopTestFirst parameter is true when the loop test executes before - // the body. (It is false for do-while loops.) - void makeNewLoop(bool loopTestFirst); struct LoopBlocks { Block &body, &merge, &continue_target; }; - LoopBlocks makeNewLoop(); - // Create a new block in the function containing the build point. + // Start a new loop and prepare the builder to generate code for it. Until + // closeLoop() is called for this loop, createLoopContinue() and + // createLoopExit() will target its corresponding blocks. + LoopBlocks& makeNewLoop(); + + // Create a new block in the function containing the build point. Memory is + // owned by the function object. Block& makeNewBlock(); - // Add the branch for the loop test, based on the given condition. - // The true branch goes to the first block in the loop body, and - // the false branch goes to the loop's merge block. The builder insertion - // point will be placed at the start of the body. - void createLoopTestBranch(Id condition); - - // Generate an unconditional branch to the loop body. The builder insertion - // point will be placed at the start of the body. Use this when there is - // no loop test. - void createBranchToBody(); - - // Add a branch to the test of the current (innermost) loop. - // The way we generate code, that's also the loop header. + // Add a branch to the continue_target of the current (innermost) loop. void createLoopContinue(); - // Add an exit (e.g. "break") for the innermost loop that you're in + // Add an exit (e.g. "break") from the innermost loop that we're currently + // in. void createLoopExit(); // Close the innermost loop that you're in @@ -517,9 +506,6 @@ public: void createSelectionMerge(Block* mergeBlock, unsigned int control); void dumpInstructions(std::vector&, const std::vector&) const; - struct Loop; // Defined below. - void createBranchToLoopHeaderFromInside(const Loop& loop); - SourceLanguage source; int sourceVersion; std::vector extensions; @@ -550,47 +536,8 @@ public: // stack of switches std::stack switchMerges; - // Data that needs to be kept in order to properly handle loops. - struct Loop { - // Constructs a default Loop structure containing new header, merge, and - // body blocks for the current function. - // The testFirst argument indicates whether the loop test executes at - // the top of the loop rather than at the bottom. In the latter case, - // also create a phi instruction whose value indicates whether we're on - // the first iteration of the loop. The phi instruction is initialized - // with no values or predecessor operands. - Loop(Builder& builder, bool testFirst); - - // The function containing the loop. - Function* const function; - // The header is the first block generated for the loop. - // It dominates all the blocks in the loop, i.e. it is always - // executed before any others. - // If the loop test is executed before the body (as in "while" and - // "for" loops), then the header begins with the test code. - // Otherwise, the loop is a "do-while" loop and the header contains the - // start of the body of the loop (if the body exists). - Block* const header; - // The merge block marks the end of the loop. Control is transferred - // to the merge block when either the loop test fails, or when a - // nested "break" is encountered. - Block* const merge; - // The body block is the first basic block in the body of the loop, i.e. - // the code that is to be repeatedly executed, aside from loop control. - // This member is null until we generate code that references the loop - // body block. - Block* const body; - // True when the loop test executes before the body. - const bool testFirst; - // When the test executes after the body, this is defined as the phi - // instruction that tells us whether we are on the first iteration of - // the loop. Otherwise this is null. This is non-const because - // it has to be initialized outside of the initializer-list. - Instruction* isFirstIteration; - }; - // Our loop stack. - std::stack loops; + std::stack loops; }; // end Builder class // Use for non-fatal notes about what's not complete From c8fbbab419a68975d221562f96f8f6ae734f8004 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 11 Jan 2016 14:48:36 -0500 Subject: [PATCH 07/84] Update .out files with new loop SPIR-V. Also update breakForLoop and call builder.closeLoop() in code generation. Remove dead code. Change-Id: Ic8ce5b208530f8787989ef45a2efa405f1b45310 --- SPIRV/GlslangToSpv.cpp | 8 +- Test/baseResults/spv.dataOutIndirect.vert.out | 144 +- Test/baseResults/spv.do-simple.vert.out | 55 +- .../spv.do-while-continue-break.vert.out | 197 +- Test/baseResults/spv.doWhileLoop.frag.out | 135 +- .../spv.for-continue-break.vert.out | 193 +- Test/baseResults/spv.forLoop.frag.out | 398 +-- Test/baseResults/spv.localAggregates.frag.out | 432 ++-- Test/baseResults/spv.loops.frag.out | 2184 ++++++++--------- Test/baseResults/spv.loopsArtificial.frag.out | 607 +++-- Test/baseResults/spv.switch.frag.out | 804 +++--- .../spv.while-continue-break.vert.out | 174 +- Test/baseResults/spv.while-simple.vert.out | 100 +- Test/baseResults/spv.whileLoop.frag.out | 126 +- Test/test-spirv-list | 2 + 15 files changed, 2766 insertions(+), 2793 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 06ab0948..e5e2169b 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -142,7 +142,6 @@ protected: std::unordered_map structMap; std::unordered_map > memberRemapper; // for mapping glslang block indices to spv indices (e.g., due to hidden members) std::stack breakForLoop; // false means break for switch - std::stack loopTerminal; // code from the last part of a for loop: for(...; ...; terminal), needed for e.g., continue }; }; // @@ -1354,10 +1353,12 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); + breakForLoop.push(true); builder.setBuildPoint(&blocks.body); if (node->getBody()) node->getBody()->traverse(this); builder.createBranch(&blocks.continue_target); + breakForLoop.pop(); builder.setBuildPoint(&blocks.continue_target); if (node->getTerminal()) @@ -1366,10 +1367,12 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn } else { builder.createBranch(&blocks.body); + breakForLoop.push(true); builder.setBuildPoint(&blocks.body); if (node->getBody()) node->getBody()->traverse(this); builder.createBranch(&blocks.continue_target); + breakForLoop.pop(); builder.setBuildPoint(&blocks.continue_target); if (node->getTerminal()) @@ -1387,6 +1390,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn } builder.setBuildPoint(&blocks.merge); + builder.closeLoop(); return false; } @@ -1406,8 +1410,6 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T builder.addSwitchBreak(); break; case glslang::EOpContinue: - if (loopTerminal.top()) - loopTerminal.top()->traverse(this); builder.createLoopContinue(); break; case glslang::EOpReturn: diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index 0b24b624..0efe6568 100755 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -1,71 +1,73 @@ -spv.dataOutIndirect.vert -WARNING: 0:3: attribute deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 38 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 26 23 37 - Source GLSL 130 - Name 4 "main" - Name 8 "i" - Name 23 "colorOut" - Name 26 "color" - Name 32 "gl_Position" - Name 37 "gl_VertexID" - Decorate 32(gl_Position) BuiltIn Position - Decorate 37(gl_VertexID) BuiltIn VertexId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 1 - 14: 6(int) Constant 5 - 15: TypeBool - 17: TypeFloat 32 - 18: TypeVector 17(float) 4 - 19: TypeInt 32 0 - 20: 19(int) Constant 6 - 21: TypeArray 18(fvec4) 20 - 22: TypePointer Output 21 - 23(colorOut): 22(ptr) Variable Output - 25: TypePointer Input 18(fvec4) - 26(color): 25(ptr) Variable Input - 28: TypePointer Output 18(fvec4) - 32(gl_Position): 28(ptr) Variable Output - 33: 6(int) Constant 2 - 36: TypePointer Input 6(int) - 37(gl_VertexID): 36(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 13: 6(int) Load 8(i) - 16: 15(bool) SLessThan 13 14 - LoopMerge 11 10 None - BranchConditional 16 12 11 - 12: Label - 24: 6(int) Load 8(i) - 27: 18(fvec4) Load 26(color) - 29: 28(ptr) AccessChain 23(colorOut) 24 - Store 29 27 - 30: 6(int) Load 8(i) - 31: 6(int) IAdd 30 9 - Store 8(i) 31 - Branch 10 - 11: Label - 34: 28(ptr) AccessChain 23(colorOut) 33 - 35: 18(fvec4) Load 34 - Store 32(gl_Position) 35 - Return - FunctionEnd +spv.dataOutIndirect.vert +WARNING: 0:3: attribute deprecated in version 130; may be removed in future release +WARNING: 0:4: varying deprecated in version 130; may be removed in future release + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 39 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 27 24 38 + Source GLSL 130 + Name 4 "main" + Name 8 "i" + Name 24 "colorOut" + Name 27 "color" + Name 33 "gl_Position" + Name 38 "gl_VertexID" + Decorate 33(gl_Position) BuiltIn Position + Decorate 38(gl_VertexID) BuiltIn VertexId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 1 + 15: 6(int) Constant 5 + 16: TypeBool + 18: TypeFloat 32 + 19: TypeVector 18(float) 4 + 20: TypeInt 32 0 + 21: 20(int) Constant 6 + 22: TypeArray 19(fvec4) 21 + 23: TypePointer Output 22 + 24(colorOut): 23(ptr) Variable Output + 26: TypePointer Input 19(fvec4) + 27(color): 26(ptr) Variable Input + 29: TypePointer Output 19(fvec4) + 33(gl_Position): 29(ptr) Variable Output + 34: 6(int) Constant 2 + 37: TypePointer Input 6(int) + 38(gl_VertexID): 37(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 13 + 10: Label + 25: 6(int) Load 8(i) + 28: 19(fvec4) Load 27(color) + 30: 29(ptr) AccessChain 24(colorOut) 25 + Store 30 28 + Branch 12 + 11: Label + 35: 29(ptr) AccessChain 24(colorOut) 34 + 36: 19(fvec4) Load 35 + Store 33(gl_Position) 36 + Return + 12: Label + 31: 6(int) Load 8(i) + 32: 6(int) IAdd 31 9 + Store 8(i) 32 + Branch 13 + 13: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 11 12 None + BranchConditional 17 10 11 + FunctionEnd diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out index 5da88276..694da83a 100755 --- a/Test/baseResults/spv.do-simple.vert.out +++ b/Test/baseResults/spv.do-simple.vert.out @@ -5,56 +5,45 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 29 +// Id's are bound by 23 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 27 28 + EntryPoint Vertex 4 "main" 21 22 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 27 "gl_VertexID" - Name 28 "gl_InstanceID" - Decorate 27(gl_VertexID) BuiltIn VertexId - Decorate 28(gl_InstanceID) BuiltIn InstanceId + Name 21 "gl_VertexID" + Name 22 "gl_InstanceID" + Decorate 21(gl_VertexID) BuiltIn VertexId + Decorate 22(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 14: TypeBool - 15: 14(bool) ConstantTrue - 19: 6(int) Constant 10 - 23: 6(int) Constant 1 - 25: 14(bool) ConstantFalse - 26: TypePointer Input 6(int) - 27(gl_VertexID): 26(ptr) Variable Input -28(gl_InstanceID): 26(ptr) Variable Input + 14: 6(int) Constant 1 + 17: 6(int) Constant 10 + 18: TypeBool + 20: TypePointer Input 6(int) + 21(gl_VertexID): 20(ptr) Variable Input +22(gl_InstanceID): 20(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 13: 14(bool) Phi 15 5 25 12 - LoopMerge 11 10 None - Branch 16 - 16: Label - SelectionMerge 12 None - BranchConditional 13 12 17 - 17: Label - 18: 6(int) Load 8(i) - 20: 14(bool) SLessThan 18 19 - SelectionMerge 21 None - BranchConditional 20 21 11 - 21: Label - Branch 12 - 12: Label - 22: 6(int) Load 8(i) - 24: 6(int) IAdd 22 23 - Store 8(i) 24 - Branch 10 + 13: 6(int) Load 8(i) + 15: 6(int) IAdd 13 14 + Store 8(i) 15 + Branch 12 11: Label Return - FunctionEnd + 12: Label + 16: 6(int) Load 8(i) + 19: 18(bool) SLessThan 16 17 + LoopMerge 11 12 None + BranchConditional 19 10 11 + FunctionEnd diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index f148d51d..c70c28da 100755 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -1,104 +1,93 @@ -spv.do-while-continue-break.vert - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 51 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 49 50 - Source ESSL 300 - Name 4 "main" - Name 8 "i" - Name 24 "A" - Name 30 "B" - Name 33 "C" - Name 39 "D" - Name 42 "E" - Name 44 "F" - Name 46 "G" - Name 49 "gl_VertexID" - Name 50 "gl_InstanceID" - Decorate 49(gl_VertexID) BuiltIn VertexId - Decorate 50(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 14: TypeBool - 15: 14(bool) ConstantTrue - 19: 6(int) Constant 1 - 21: 6(int) Constant 19 - 26: 6(int) Constant 2 - 31: 14(bool) ConstantFalse - 35: 6(int) Constant 5 - 40: 6(int) Constant 3 - 43: 6(int) Constant 42 - 45: 6(int) Constant 99 - 47: 6(int) Constant 12 - 48: TypePointer Input 6(int) - 49(gl_VertexID): 48(ptr) Variable Input -50(gl_InstanceID): 48(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - 24(A): 7(ptr) Variable Function - 30(B): 7(ptr) Variable Function - 33(C): 7(ptr) Variable Function - 39(D): 7(ptr) Variable Function - 42(E): 7(ptr) Variable Function - 44(F): 7(ptr) Variable Function - 46(G): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 13: 14(bool) Phi 15 5 31 28 31 38 - LoopMerge 11 10 None - Branch 16 - 16: Label - SelectionMerge 12 None - BranchConditional 13 12 17 - 17: Label - 18: 6(int) Load 8(i) - 20: 6(int) IAdd 18 19 - Store 8(i) 20 - 22: 14(bool) SLessThan 20 21 - SelectionMerge 23 None - BranchConditional 22 23 11 - 23: Label - Branch 12 - 12: Label - Store 24(A) 9 - 25: 6(int) Load 8(i) - 27: 14(bool) IEqual 25 26 - SelectionMerge 29 None - BranchConditional 27 28 29 - 28: Label - Store 30(B) 19 - Branch 10 - 32: Label - Store 33(C) 26 - Branch 29 - 29: Label - 34: 6(int) Load 8(i) - 36: 14(bool) IEqual 34 35 - SelectionMerge 38 None - BranchConditional 36 37 38 - 37: Label - Store 39(D) 40 - Branch 11 - 41: Label - Store 42(E) 43 - Branch 38 - 38: Label - Store 44(F) 45 - Branch 10 - 11: Label - Store 46(G) 47 - Return - FunctionEnd +spv.do-while-continue-break.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 45 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 43 44 + Source ESSL 300 + Name 4 "main" + Name 8 "i" + Name 13 "A" + Name 20 "B" + Name 23 "C" + Name 29 "D" + Name 32 "E" + Name 34 "F" + Name 40 "G" + Name 43 "gl_VertexID" + Name 44 "gl_InstanceID" + Decorate 43(gl_VertexID) BuiltIn VertexId + Decorate 44(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 2 + 16: TypeBool + 21: 6(int) Constant 1 + 25: 6(int) Constant 5 + 30: 6(int) Constant 3 + 33: 6(int) Constant 42 + 35: 6(int) Constant 99 + 38: 6(int) Constant 19 + 41: 6(int) Constant 12 + 42: TypePointer Input 6(int) + 43(gl_VertexID): 42(ptr) Variable Input +44(gl_InstanceID): 42(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + 13(A): 7(ptr) Variable Function + 20(B): 7(ptr) Variable Function + 23(C): 7(ptr) Variable Function + 29(D): 7(ptr) Variable Function + 32(E): 7(ptr) Variable Function + 34(F): 7(ptr) Variable Function + 40(G): 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + Store 13(A) 9 + 14: 6(int) Load 8(i) + 17: 16(bool) IEqual 14 15 + SelectionMerge 19 None + BranchConditional 17 18 19 + 11: Label + Store 40(G) 41 + Return + 12: Label + 36: 6(int) Load 8(i) + 37: 6(int) IAdd 36 21 + Store 8(i) 37 + 39: 16(bool) SLessThan 37 38 + LoopMerge 11 12 None + BranchConditional 39 10 11 + 18: Label + Store 20(B) 21 + Branch 12 + 22: Label + Store 23(C) 15 + Branch 19 + 19: Label + 24: 6(int) Load 8(i) + 26: 16(bool) IEqual 24 25 + SelectionMerge 28 None + BranchConditional 26 27 28 + 27: Label + Store 29(D) 30 + Branch 11 + 31: Label + Store 32(E) 33 + Branch 28 + 28: Label + Store 34(F) 35 + Branch 12 + FunctionEnd diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out index d33fb8b1..64d05813 100755 --- a/Test/baseResults/spv.doWhileLoop.frag.out +++ b/Test/baseResults/spv.doWhileLoop.frag.out @@ -1,73 +1,62 @@ -spv.doWhileLoop.frag - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 40 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 - ExecutionMode 4 OriginLowerLeft - Source GLSL 110 - Name 4 "main" - Name 9 "color" - Name 11 "BaseColor" - Name 27 "d" - Name 32 "bigColor" - Name 38 "gl_FragColor" - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 10: TypePointer Input 7(fvec4) - 11(BaseColor): 10(ptr) Variable Input - 17: TypeBool - 18: 17(bool) ConstantTrue - 21: TypeInt 32 0 - 22: 21(int) Constant 0 - 23: TypePointer Function 6(float) - 26: TypePointer UniformConstant 6(float) - 27(d): 26(ptr) Variable UniformConstant - 31: TypePointer UniformConstant 7(fvec4) - 32(bigColor): 31(ptr) Variable UniformConstant - 36: 17(bool) ConstantFalse - 37: TypePointer Output 7(fvec4) -38(gl_FragColor): 37(ptr) Variable Output - 4(main): 2 Function None 3 - 5: Label - 9(color): 8(ptr) Variable Function - 12: 7(fvec4) Load 11(BaseColor) - Store 9(color) 12 - Branch 13 - 13: Label - 16: 17(bool) Phi 18 5 36 15 - LoopMerge 14 13 None - Branch 19 - 19: Label - SelectionMerge 15 None - BranchConditional 16 15 20 - 20: Label - 24: 23(ptr) AccessChain 9(color) 22 - 25: 6(float) Load 24 - 28: 6(float) Load 27(d) - 29: 17(bool) FOrdLessThan 25 28 - SelectionMerge 30 None - BranchConditional 29 30 14 - 30: Label - Branch 15 - 15: Label - 33: 7(fvec4) Load 32(bigColor) - 34: 7(fvec4) Load 9(color) - 35: 7(fvec4) FAdd 34 33 - Store 9(color) 35 - Branch 13 - 14: Label - 39: 7(fvec4) Load 9(color) - Store 38(gl_FragColor) 39 - Return - FunctionEnd +spv.doWhileLoop.frag + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 34 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 11 + ExecutionMode 4 OriginLowerLeft + Source GLSL 110 + Name 4 "main" + Name 9 "color" + Name 11 "BaseColor" + Name 17 "bigColor" + Name 27 "d" + Name 32 "gl_FragColor" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 10: TypePointer Input 7(fvec4) + 11(BaseColor): 10(ptr) Variable Input + 16: TypePointer UniformConstant 7(fvec4) + 17(bigColor): 16(ptr) Variable UniformConstant + 21: TypeInt 32 0 + 22: 21(int) Constant 0 + 23: TypePointer Function 6(float) + 26: TypePointer UniformConstant 6(float) + 27(d): 26(ptr) Variable UniformConstant + 29: TypeBool + 31: TypePointer Output 7(fvec4) +32(gl_FragColor): 31(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 9(color): 8(ptr) Variable Function + 12: 7(fvec4) Load 11(BaseColor) + Store 9(color) 12 + Branch 13 + 13: Label + 18: 7(fvec4) Load 17(bigColor) + 19: 7(fvec4) Load 9(color) + 20: 7(fvec4) FAdd 19 18 + Store 9(color) 20 + Branch 15 + 14: Label + 33: 7(fvec4) Load 9(color) + Store 32(gl_FragColor) 33 + Return + 15: Label + 24: 23(ptr) AccessChain 9(color) 22 + 25: 6(float) Load 24 + 28: 6(float) Load 27(d) + 30: 29(bool) FOrdLessThan 25 28 + LoopMerge 14 15 None + BranchConditional 30 13 14 + FunctionEnd diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index eac3ddb8..df2acab4 100755 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -1,97 +1,96 @@ -spv.for-continue-break.vert - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 48 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 46 47 - Source ESSL 300 - Name 4 "main" - Name 8 "i" - Name 17 "A" - Name 25 "B" - Name 29 "C" - Name 36 "D" - Name 38 "E" - Name 39 "F" - Name 43 "G" - Name 46 "gl_VertexID" - Name 47 "gl_InstanceID" - Decorate 46(gl_VertexID) BuiltIn VertexId - Decorate 47(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 14: 6(int) Constant 10 - 15: TypeBool - 18: 6(int) Constant 1 - 20: 6(int) Constant 2 - 31: 6(int) Constant 3 - 40: 6(int) Constant 12 - 44: 6(int) Constant 99 - 45: TypePointer Input 6(int) - 46(gl_VertexID): 45(ptr) Variable Input -47(gl_InstanceID): 45(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - 17(A): 7(ptr) Variable Function - 25(B): 7(ptr) Variable Function - 29(C): 7(ptr) Variable Function - 36(D): 7(ptr) Variable Function - 38(E): 7(ptr) Variable Function - 39(F): 7(ptr) Variable Function - 43(G): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 13: 6(int) Load 8(i) - 16: 15(bool) SLessThan 13 14 - LoopMerge 11 10 None - BranchConditional 16 12 11 - 12: Label - Store 17(A) 18 - 19: 6(int) Load 8(i) - 21: 6(int) SMod 19 20 - 22: 15(bool) IEqual 21 9 - SelectionMerge 24 None - BranchConditional 22 23 24 - 23: Label - Store 25(B) 18 - 26: 6(int) Load 8(i) - 27: 6(int) IAdd 26 18 - Store 8(i) 27 - Branch 10 - 28: Label - Store 29(C) 18 - Branch 24 - 24: Label - 30: 6(int) Load 8(i) - 32: 6(int) SMod 30 31 - 33: 15(bool) IEqual 32 9 - SelectionMerge 35 None - BranchConditional 33 34 35 - 34: Label - Store 36(D) 18 - Branch 11 - 37: Label - Store 38(E) 18 - Branch 35 - 35: Label - Store 39(F) 40 - 41: 6(int) Load 8(i) - 42: 6(int) IAdd 41 18 - Store 8(i) 42 - Branch 10 - 11: Label - Store 43(G) 44 - Return - FunctionEnd +spv.for-continue-break.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 47 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 45 46 + Source ESSL 300 + Name 4 "main" + Name 8 "i" + Name 18 "A" + Name 26 "B" + Name 28 "C" + Name 35 "D" + Name 37 "E" + Name 38 "F" + Name 42 "G" + Name 45 "gl_VertexID" + Name 46 "gl_InstanceID" + Decorate 45(gl_VertexID) BuiltIn VertexId + Decorate 46(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 1 + 21: 6(int) Constant 2 + 30: 6(int) Constant 3 + 39: 6(int) Constant 12 + 43: 6(int) Constant 99 + 44: TypePointer Input 6(int) + 45(gl_VertexID): 44(ptr) Variable Input +46(gl_InstanceID): 44(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + 18(A): 7(ptr) Variable Function + 26(B): 7(ptr) Variable Function + 28(C): 7(ptr) Variable Function + 35(D): 7(ptr) Variable Function + 37(E): 7(ptr) Variable Function + 38(F): 7(ptr) Variable Function + 42(G): 7(ptr) Variable Function + Store 8(i) 9 + Branch 13 + 10: Label + Store 18(A) 19 + 20: 6(int) Load 8(i) + 22: 6(int) SMod 20 21 + 23: 16(bool) IEqual 22 9 + SelectionMerge 25 None + BranchConditional 23 24 25 + 11: Label + Store 42(G) 43 + Return + 12: Label + 40: 6(int) Load 8(i) + 41: 6(int) IAdd 40 19 + Store 8(i) 41 + Branch 13 + 13: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 11 12 None + BranchConditional 17 10 11 + 24: Label + Store 26(B) 19 + Branch 12 + 27: Label + Store 28(C) 19 + Branch 25 + 25: Label + 29: 6(int) Load 8(i) + 31: 6(int) SMod 29 30 + 32: 16(bool) IEqual 31 9 + SelectionMerge 34 None + BranchConditional 32 33 34 + 33: Label + Store 35(D) 19 + Branch 11 + 36: Label + Store 37(E) 19 + Branch 34 + 34: Label + Store 38(F) 39 + Branch 12 + FunctionEnd diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 1be209b4..3e4cb28a 100755 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -1,194 +1,204 @@ -spv.forLoop.frag - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 122 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 97 - ExecutionMode 4 OriginLowerLeft - Source GLSL 130 - Name 4 "main" - Name 9 "color" - Name 11 "BaseColor" - Name 15 "i" - Name 22 "Count" - Name 27 "bigColor" - Name 35 "gl_FragColor" - Name 38 "sum" - Name 40 "i" - Name 50 "v4" - Name 60 "i" - Name 66 "tv4" - Name 83 "r" - Name 89 "i" - Name 97 "f" - Name 110 "i" - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 10: TypePointer Input 7(fvec4) - 11(BaseColor): 10(ptr) Variable Input - 13: TypeInt 32 1 - 14: TypePointer Function 13(int) - 16: 13(int) Constant 0 - 21: TypePointer UniformConstant 13(int) - 22(Count): 21(ptr) Variable UniformConstant - 24: TypeBool - 26: TypePointer UniformConstant 7(fvec4) - 27(bigColor): 26(ptr) Variable UniformConstant - 32: 13(int) Constant 1 - 34: TypePointer Output 7(fvec4) -35(gl_FragColor): 34(ptr) Variable Output - 37: TypePointer Function 6(float) - 39: 6(float) Constant 0 - 45: 13(int) Constant 4 - 47: TypeInt 32 0 - 48: TypeVector 47(int) 4 - 49: TypePointer UniformConstant 48(ivec4) - 50(v4): 49(ptr) Variable UniformConstant - 52: TypePointer UniformConstant 47(int) - 71: 47(int) Constant 4 - 84: TypeVector 6(float) 3 - 96: TypePointer Input 6(float) - 97(f): 96(ptr) Variable Input - 99: 47(int) Constant 3 - 115: 13(int) Constant 16 - 4(main): 2 Function None 3 - 5: Label - 9(color): 8(ptr) Variable Function - 15(i): 14(ptr) Variable Function - 38(sum): 37(ptr) Variable Function - 40(i): 14(ptr) Variable Function - 60(i): 14(ptr) Variable Function - 66(tv4): 8(ptr) Variable Function - 83(r): 8(ptr) Variable Function - 89(i): 14(ptr) Variable Function - 110(i): 14(ptr) Variable Function - 12: 7(fvec4) Load 11(BaseColor) - Store 9(color) 12 - Store 15(i) 16 - Branch 17 - 17: Label - 20: 13(int) Load 15(i) - 23: 13(int) Load 22(Count) - 25: 24(bool) SLessThan 20 23 - LoopMerge 18 17 None - BranchConditional 25 19 18 - 19: Label - 28: 7(fvec4) Load 27(bigColor) - 29: 7(fvec4) Load 9(color) - 30: 7(fvec4) FAdd 29 28 - Store 9(color) 30 - 31: 13(int) Load 15(i) - 33: 13(int) IAdd 31 32 - Store 15(i) 33 - Branch 17 - 18: Label - 36: 7(fvec4) Load 9(color) - Store 35(gl_FragColor) 36 - Store 38(sum) 39 - Store 40(i) 16 - Branch 41 - 41: Label - 44: 13(int) Load 40(i) - 46: 24(bool) SLessThan 44 45 - LoopMerge 42 41 None - BranchConditional 46 43 42 - 43: Label - 51: 13(int) Load 40(i) - 53: 52(ptr) AccessChain 50(v4) 51 - 54: 47(int) Load 53 - 55: 6(float) ConvertUToF 54 - 56: 6(float) Load 38(sum) - 57: 6(float) FAdd 56 55 - Store 38(sum) 57 - 58: 13(int) Load 40(i) - 59: 13(int) IAdd 58 32 - Store 40(i) 59 - Branch 41 - 42: Label - Store 60(i) 16 - Branch 61 - 61: Label - 64: 13(int) Load 60(i) - 65: 24(bool) SLessThan 64 45 - LoopMerge 62 61 None - BranchConditional 65 63 62 - 63: Label - 67: 13(int) Load 60(i) - 68: 13(int) Load 60(i) - 69: 52(ptr) AccessChain 50(v4) 68 - 70: 47(int) Load 69 - 72: 47(int) IMul 70 71 - 73: 6(float) ConvertUToF 72 - 74: 37(ptr) AccessChain 66(tv4) 67 - Store 74 73 - 75: 13(int) Load 60(i) - 76: 13(int) IAdd 75 32 - Store 60(i) 76 - Branch 61 - 62: Label - 77: 6(float) Load 38(sum) - 78: 7(fvec4) CompositeConstruct 77 77 77 77 - 79: 7(fvec4) Load 66(tv4) - 80: 7(fvec4) FAdd 78 79 - 81: 7(fvec4) Load 35(gl_FragColor) - 82: 7(fvec4) FAdd 81 80 - Store 35(gl_FragColor) 82 - 85: 7(fvec4) Load 11(BaseColor) - 86: 84(fvec3) VectorShuffle 85 85 0 1 2 - 87: 7(fvec4) Load 83(r) - 88: 7(fvec4) VectorShuffle 87 86 4 5 6 3 - Store 83(r) 88 - Store 89(i) 16 - Branch 90 - 90: Label - 93: 13(int) Load 89(i) - 94: 13(int) Load 22(Count) - 95: 24(bool) SLessThan 93 94 - LoopMerge 91 90 None - BranchConditional 95 92 91 - 92: Label - 98: 6(float) Load 97(f) - 100: 37(ptr) AccessChain 83(r) 99 - Store 100 98 - 101: 13(int) Load 89(i) - 102: 13(int) IAdd 101 32 - Store 89(i) 102 - Branch 90 - 91: Label - 103: 7(fvec4) Load 83(r) - 104: 84(fvec3) VectorShuffle 103 103 0 1 2 - 105: 7(fvec4) Load 35(gl_FragColor) - 106: 84(fvec3) VectorShuffle 105 105 0 1 2 - 107: 84(fvec3) FAdd 106 104 - 108: 7(fvec4) Load 35(gl_FragColor) - 109: 7(fvec4) VectorShuffle 108 107 4 5 6 3 - Store 35(gl_FragColor) 109 - Store 110(i) 16 - Branch 111 - 111: Label - 114: 13(int) Load 110(i) - 116: 24(bool) SLessThan 114 115 - LoopMerge 112 111 None - BranchConditional 116 113 112 - 113: Label - 117: 6(float) Load 97(f) - 118: 7(fvec4) Load 35(gl_FragColor) - 119: 7(fvec4) VectorTimesScalar 118 117 - Store 35(gl_FragColor) 119 - 120: 13(int) Load 110(i) - 121: 13(int) IAdd 120 45 - Store 110(i) 121 - Branch 111 - 112: Label - Return - FunctionEnd +spv.forLoop.frag + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 127 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 11 101 + ExecutionMode 4 OriginLowerLeft + Source GLSL 130 + Name 4 "main" + Name 9 "color" + Name 11 "BaseColor" + Name 15 "i" + Name 23 "Count" + Name 28 "bigColor" + Name 36 "gl_FragColor" + Name 39 "sum" + Name 41 "i" + Name 52 "v4" + Name 62 "i" + Name 69 "tv4" + Name 86 "r" + Name 92 "i" + Name 101 "f" + Name 114 "i" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 10: TypePointer Input 7(fvec4) + 11(BaseColor): 10(ptr) Variable Input + 13: TypeInt 32 1 + 14: TypePointer Function 13(int) + 16: 13(int) Constant 0 + 22: TypePointer UniformConstant 13(int) + 23(Count): 22(ptr) Variable UniformConstant + 25: TypeBool + 27: TypePointer UniformConstant 7(fvec4) + 28(bigColor): 27(ptr) Variable UniformConstant + 33: 13(int) Constant 1 + 35: TypePointer Output 7(fvec4) +36(gl_FragColor): 35(ptr) Variable Output + 38: TypePointer Function 6(float) + 40: 6(float) Constant 0 + 47: 13(int) Constant 4 + 49: TypeInt 32 0 + 50: TypeVector 49(int) 4 + 51: TypePointer UniformConstant 50(ivec4) + 52(v4): 51(ptr) Variable UniformConstant + 54: TypePointer UniformConstant 49(int) + 74: 49(int) Constant 4 + 87: TypeVector 6(float) 3 + 100: TypePointer Input 6(float) + 101(f): 100(ptr) Variable Input + 103: 49(int) Constant 3 + 120: 13(int) Constant 16 + 4(main): 2 Function None 3 + 5: Label + 9(color): 8(ptr) Variable Function + 15(i): 14(ptr) Variable Function + 39(sum): 38(ptr) Variable Function + 41(i): 14(ptr) Variable Function + 62(i): 14(ptr) Variable Function + 69(tv4): 8(ptr) Variable Function + 86(r): 8(ptr) Variable Function + 92(i): 14(ptr) Variable Function + 114(i): 14(ptr) Variable Function + 12: 7(fvec4) Load 11(BaseColor) + Store 9(color) 12 + Store 15(i) 16 + Branch 20 + 17: Label + 29: 7(fvec4) Load 28(bigColor) + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 + Branch 19 + 18: Label + 37: 7(fvec4) Load 9(color) + Store 36(gl_FragColor) 37 + Store 39(sum) 40 + Store 41(i) 16 + Branch 45 + 19: Label + 32: 13(int) Load 15(i) + 34: 13(int) IAdd 32 33 + Store 15(i) 34 + Branch 20 + 20: Label + 21: 13(int) Load 15(i) + 24: 13(int) Load 23(Count) + 26: 25(bool) SLessThan 21 24 + LoopMerge 18 19 None + BranchConditional 26 17 18 + 42: Label + 53: 13(int) Load 41(i) + 55: 54(ptr) AccessChain 52(v4) 53 + 56: 49(int) Load 55 + 57: 6(float) ConvertUToF 56 + 58: 6(float) Load 39(sum) + 59: 6(float) FAdd 58 57 + Store 39(sum) 59 + Branch 44 + 43: Label + Store 62(i) 16 + Branch 66 + 44: Label + 60: 13(int) Load 41(i) + 61: 13(int) IAdd 60 33 + Store 41(i) 61 + Branch 45 + 45: Label + 46: 13(int) Load 41(i) + 48: 25(bool) SLessThan 46 47 + LoopMerge 43 44 None + BranchConditional 48 42 43 + 63: Label + 70: 13(int) Load 62(i) + 71: 13(int) Load 62(i) + 72: 54(ptr) AccessChain 52(v4) 71 + 73: 49(int) Load 72 + 75: 49(int) IMul 73 74 + 76: 6(float) ConvertUToF 75 + 77: 38(ptr) AccessChain 69(tv4) 70 + Store 77 76 + Branch 65 + 64: Label + 80: 6(float) Load 39(sum) + 81: 7(fvec4) CompositeConstruct 80 80 80 80 + 82: 7(fvec4) Load 69(tv4) + 83: 7(fvec4) FAdd 81 82 + 84: 7(fvec4) Load 36(gl_FragColor) + 85: 7(fvec4) FAdd 84 83 + Store 36(gl_FragColor) 85 + 88: 7(fvec4) Load 11(BaseColor) + 89: 87(fvec3) VectorShuffle 88 88 0 1 2 + 90: 7(fvec4) Load 86(r) + 91: 7(fvec4) VectorShuffle 90 89 4 5 6 3 + Store 86(r) 91 + Store 92(i) 16 + Branch 96 + 65: Label + 78: 13(int) Load 62(i) + 79: 13(int) IAdd 78 33 + Store 62(i) 79 + Branch 66 + 66: Label + 67: 13(int) Load 62(i) + 68: 25(bool) SLessThan 67 47 + LoopMerge 64 65 None + BranchConditional 68 63 64 + 93: Label + 102: 6(float) Load 101(f) + 104: 38(ptr) AccessChain 86(r) 103 + Store 104 102 + Branch 95 + 94: Label + 107: 7(fvec4) Load 86(r) + 108: 87(fvec3) VectorShuffle 107 107 0 1 2 + 109: 7(fvec4) Load 36(gl_FragColor) + 110: 87(fvec3) VectorShuffle 109 109 0 1 2 + 111: 87(fvec3) FAdd 110 108 + 112: 7(fvec4) Load 36(gl_FragColor) + 113: 7(fvec4) VectorShuffle 112 111 4 5 6 3 + Store 36(gl_FragColor) 113 + Store 114(i) 16 + Branch 118 + 95: Label + 105: 13(int) Load 92(i) + 106: 13(int) IAdd 105 33 + Store 92(i) 106 + Branch 96 + 96: Label + 97: 13(int) Load 92(i) + 98: 13(int) Load 23(Count) + 99: 25(bool) SLessThan 97 98 + LoopMerge 94 95 None + BranchConditional 99 93 94 + 115: Label + 122: 6(float) Load 101(f) + 123: 7(fvec4) Load 36(gl_FragColor) + 124: 7(fvec4) VectorTimesScalar 123 122 + Store 36(gl_FragColor) 124 + Branch 117 + 116: Label + Return + 117: Label + 125: 13(int) Load 114(i) + 126: 13(int) IAdd 125 47 + Store 114(i) 126 + Branch 118 + 118: Label + 119: 13(int) Load 114(i) + 121: 25(bool) SLessThan 119 120 + LoopMerge 116 117 None + BranchConditional 121 115 116 + FunctionEnd diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index 721b5a8c..1f9cbce6 100755 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -1,215 +1,217 @@ -spv.localAggregates.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:5: varying deprecated in version 130; may be removed in future release - - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 136 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 40 96 - ExecutionMode 4 OriginLowerLeft - Source GLSL 130 - Name 4 "main" - Name 8 "s1" - MemberName 8(s1) 0 "i" - MemberName 8(s1) 1 "f" - Name 10 "s2" - MemberName 10(s2) 0 "i" - MemberName 10(s2) 1 "f" - MemberName 10(s2) 2 "s1_1" - MemberName 10(s2) 3 "bleh" - Name 12 "locals2" - Name 13 "s3" - MemberName 13(s3) 0 "s2_1" - MemberName 13(s3) 1 "i" - MemberName 13(s3) 2 "f" - MemberName 13(s3) 3 "s1_1" - Name 15 "foo3" - Name 36 "localFArray" - Name 40 "coord" - Name 49 "localIArray" - Name 68 "x" - Name 70 "localArray" - Name 75 "i" - Name 82 "a" - Name 88 "condition" - Name 96 "color" - Name 106 "gl_FragColor" - Name 126 "samp2D" - Name 132 "foo" - Name 133 "foo2" - Name 135 "uFloatArray" - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypeFloat 32 - 8(s1): TypeStruct 6(int) 7(float) - 9: TypeVector 7(float) 4 - 10(s2): TypeStruct 6(int) 7(float) 8(s1) 9(fvec4) - 11: TypePointer Function 10(s2) - 13(s3): TypeStruct 10(s2) 6(int) 7(float) 8(s1) - 14: TypePointer UniformConstant 13(s3) - 15(foo3): 14(ptr) Variable UniformConstant - 16: 6(int) Constant 0 - 17: TypePointer UniformConstant 10(s2) - 20: TypePointer UniformConstant 6(int) - 23: TypeBool - 27: 6(int) Constant 2 - 28: 6(int) Constant 1 - 29: 7(float) Constant 1065353216 - 30: TypePointer Function 7(float) - 32: TypeInt 32 0 - 33: 32(int) Constant 16 - 34: TypeArray 7(float) 33 - 35: TypePointer Function 34 - 37: 6(int) Constant 4 - 38: TypeVector 7(float) 2 - 39: TypePointer Input 38(fvec2) - 40(coord): 39(ptr) Variable Input - 41: 32(int) Constant 0 - 42: TypePointer Input 7(float) - 46: 32(int) Constant 8 - 47: TypeArray 6(int) 46 - 48: TypePointer Function 47 - 52: TypePointer Function 6(int) - 69: 6(int) Constant 5 - 80: 6(int) Constant 16 - 84: 7(float) Constant 0 - 88(condition): 20(ptr) Variable UniformConstant - 94: 6(int) Constant 3 - 95: TypePointer Input 9(fvec4) - 96(color): 95(ptr) Variable Input - 98: TypePointer Function 9(fvec4) - 100: 32(int) Constant 1 - 103: 32(int) Constant 2 - 105: TypePointer Output 9(fvec4) -106(gl_FragColor): 105(ptr) Variable Output - 123: TypeImage 7(float) 2D sampled format:Unknown - 124: TypeSampledImage 123 - 125: TypePointer UniformConstant 124 - 126(samp2D): 125(ptr) Variable UniformConstant - 131: TypePointer UniformConstant 8(s1) - 132(foo): 131(ptr) Variable UniformConstant - 133(foo2): 17(ptr) Variable UniformConstant - 134: TypePointer UniformConstant 34 -135(uFloatArray): 134(ptr) Variable UniformConstant - 4(main): 2 Function None 3 - 5: Label - 12(locals2): 11(ptr) Variable Function - 36(localFArray): 35(ptr) Variable Function - 49(localIArray): 48(ptr) Variable Function - 68(x): 52(ptr) Variable Function - 70(localArray): 35(ptr) Variable Function - 75(i): 52(ptr) Variable Function - 82(a): 35(ptr) Variable Function - 18: 17(ptr) AccessChain 15(foo3) 16 - 19: 10(s2) Load 18 - Store 12(locals2) 19 - 21: 20(ptr) AccessChain 15(foo3) 16 16 - 22: 6(int) Load 21 - 24: 23(bool) SGreaterThan 22 16 - SelectionMerge 26 None - BranchConditional 24 25 54 - 25: Label - 31: 30(ptr) AccessChain 12(locals2) 27 28 - Store 31 29 - 43: 42(ptr) AccessChain 40(coord) 41 - 44: 7(float) Load 43 - 45: 30(ptr) AccessChain 36(localFArray) 37 - Store 45 44 - 50: 20(ptr) AccessChain 15(foo3) 16 16 - 51: 6(int) Load 50 - 53: 52(ptr) AccessChain 49(localIArray) 27 - Store 53 51 - Branch 26 - 54: Label - 55: 42(ptr) AccessChain 40(coord) 41 - 56: 7(float) Load 55 - 57: 30(ptr) AccessChain 12(locals2) 27 28 - Store 57 56 - 58: 30(ptr) AccessChain 36(localFArray) 37 - Store 58 29 - 59: 52(ptr) AccessChain 49(localIArray) 27 - Store 59 16 - Branch 26 - 26: Label - 60: 52(ptr) AccessChain 49(localIArray) 27 - 61: 6(int) Load 60 - 62: 23(bool) IEqual 61 16 - SelectionMerge 64 None - BranchConditional 62 63 64 - 63: Label - 65: 30(ptr) AccessChain 36(localFArray) 37 - 66: 7(float) Load 65 - 67: 7(float) FAdd 66 29 - Store 65 67 - Branch 64 - 64: Label - Store 68(x) 69 - 71: 6(int) Load 68(x) - 72: 42(ptr) AccessChain 40(coord) 41 - 73: 7(float) Load 72 - 74: 30(ptr) AccessChain 70(localArray) 71 - Store 74 73 - Store 75(i) 16 - Branch 76 - 76: Label - 79: 6(int) Load 75(i) - 81: 23(bool) SLessThan 79 80 - LoopMerge 77 76 None - BranchConditional 81 78 77 - 78: Label - 83: 6(int) Load 75(i) - 85: 30(ptr) AccessChain 82(a) 83 - Store 85 84 - 86: 6(int) Load 75(i) - 87: 6(int) IAdd 86 28 - Store 75(i) 87 - Branch 76 - 77: Label - 89: 6(int) Load 88(condition) - 90: 23(bool) IEqual 89 28 - SelectionMerge 92 None - BranchConditional 90 91 92 - 91: Label - 93: 34 Load 70(localArray) - Store 82(a) 93 - Branch 92 - 92: Label - 97: 9(fvec4) Load 96(color) - 99: 98(ptr) AccessChain 12(locals2) 94 - Store 99 97 - 101: 42(ptr) AccessChain 40(coord) 100 - 102: 7(float) Load 101 - 104: 30(ptr) AccessChain 12(locals2) 94 103 - Store 104 102 - 107: 98(ptr) AccessChain 12(locals2) 94 - 108: 9(fvec4) Load 107 - 109: 30(ptr) AccessChain 36(localFArray) 37 - 110: 7(float) Load 109 - 111: 30(ptr) AccessChain 12(locals2) 27 28 - 112: 7(float) Load 111 - 113: 7(float) FAdd 110 112 - 114: 6(int) Load 68(x) - 115: 30(ptr) AccessChain 70(localArray) 114 - 116: 7(float) Load 115 - 117: 7(float) FAdd 113 116 - 118: 6(int) Load 68(x) - 119: 30(ptr) AccessChain 82(a) 118 - 120: 7(float) Load 119 - 121: 7(float) FAdd 117 120 - 122: 9(fvec4) VectorTimesScalar 108 121 - 127: 124 Load 126(samp2D) - 128: 38(fvec2) Load 40(coord) - 129: 9(fvec4) ImageSampleImplicitLod 127 128 - 130: 9(fvec4) FMul 122 129 - Store 106(gl_FragColor) 130 - Return - FunctionEnd +spv.localAggregates.frag +WARNING: 0:4: varying deprecated in version 130; may be removed in future release +WARNING: 0:5: varying deprecated in version 130; may be removed in future release + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 137 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 40 97 + ExecutionMode 4 OriginLowerLeft + Source GLSL 130 + Name 4 "main" + Name 8 "s1" + MemberName 8(s1) 0 "i" + MemberName 8(s1) 1 "f" + Name 10 "s2" + MemberName 10(s2) 0 "i" + MemberName 10(s2) 1 "f" + MemberName 10(s2) 2 "s1_1" + MemberName 10(s2) 3 "bleh" + Name 12 "locals2" + Name 13 "s3" + MemberName 13(s3) 0 "s2_1" + MemberName 13(s3) 1 "i" + MemberName 13(s3) 2 "f" + MemberName 13(s3) 3 "s1_1" + Name 15 "foo3" + Name 36 "localFArray" + Name 40 "coord" + Name 49 "localIArray" + Name 68 "x" + Name 70 "localArray" + Name 75 "i" + Name 83 "a" + Name 89 "condition" + Name 97 "color" + Name 107 "gl_FragColor" + Name 127 "samp2D" + Name 133 "foo" + Name 134 "foo2" + Name 136 "uFloatArray" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypeFloat 32 + 8(s1): TypeStruct 6(int) 7(float) + 9: TypeVector 7(float) 4 + 10(s2): TypeStruct 6(int) 7(float) 8(s1) 9(fvec4) + 11: TypePointer Function 10(s2) + 13(s3): TypeStruct 10(s2) 6(int) 7(float) 8(s1) + 14: TypePointer UniformConstant 13(s3) + 15(foo3): 14(ptr) Variable UniformConstant + 16: 6(int) Constant 0 + 17: TypePointer UniformConstant 10(s2) + 20: TypePointer UniformConstant 6(int) + 23: TypeBool + 27: 6(int) Constant 2 + 28: 6(int) Constant 1 + 29: 7(float) Constant 1065353216 + 30: TypePointer Function 7(float) + 32: TypeInt 32 0 + 33: 32(int) Constant 16 + 34: TypeArray 7(float) 33 + 35: TypePointer Function 34 + 37: 6(int) Constant 4 + 38: TypeVector 7(float) 2 + 39: TypePointer Input 38(fvec2) + 40(coord): 39(ptr) Variable Input + 41: 32(int) Constant 0 + 42: TypePointer Input 7(float) + 46: 32(int) Constant 8 + 47: TypeArray 6(int) 46 + 48: TypePointer Function 47 + 52: TypePointer Function 6(int) + 69: 6(int) Constant 5 + 81: 6(int) Constant 16 + 85: 7(float) Constant 0 + 89(condition): 20(ptr) Variable UniformConstant + 95: 6(int) Constant 3 + 96: TypePointer Input 9(fvec4) + 97(color): 96(ptr) Variable Input + 99: TypePointer Function 9(fvec4) + 101: 32(int) Constant 1 + 104: 32(int) Constant 2 + 106: TypePointer Output 9(fvec4) +107(gl_FragColor): 106(ptr) Variable Output + 124: TypeImage 7(float) 2D sampled format:Unknown + 125: TypeSampledImage 124 + 126: TypePointer UniformConstant 125 + 127(samp2D): 126(ptr) Variable UniformConstant + 132: TypePointer UniformConstant 8(s1) + 133(foo): 132(ptr) Variable UniformConstant + 134(foo2): 17(ptr) Variable UniformConstant + 135: TypePointer UniformConstant 34 +136(uFloatArray): 135(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 12(locals2): 11(ptr) Variable Function + 36(localFArray): 35(ptr) Variable Function + 49(localIArray): 48(ptr) Variable Function + 68(x): 52(ptr) Variable Function + 70(localArray): 35(ptr) Variable Function + 75(i): 52(ptr) Variable Function + 83(a): 35(ptr) Variable Function + 18: 17(ptr) AccessChain 15(foo3) 16 + 19: 10(s2) Load 18 + Store 12(locals2) 19 + 21: 20(ptr) AccessChain 15(foo3) 16 16 + 22: 6(int) Load 21 + 24: 23(bool) SGreaterThan 22 16 + SelectionMerge 26 None + BranchConditional 24 25 54 + 25: Label + 31: 30(ptr) AccessChain 12(locals2) 27 28 + Store 31 29 + 43: 42(ptr) AccessChain 40(coord) 41 + 44: 7(float) Load 43 + 45: 30(ptr) AccessChain 36(localFArray) 37 + Store 45 44 + 50: 20(ptr) AccessChain 15(foo3) 16 16 + 51: 6(int) Load 50 + 53: 52(ptr) AccessChain 49(localIArray) 27 + Store 53 51 + Branch 26 + 54: Label + 55: 42(ptr) AccessChain 40(coord) 41 + 56: 7(float) Load 55 + 57: 30(ptr) AccessChain 12(locals2) 27 28 + Store 57 56 + 58: 30(ptr) AccessChain 36(localFArray) 37 + Store 58 29 + 59: 52(ptr) AccessChain 49(localIArray) 27 + Store 59 16 + Branch 26 + 26: Label + 60: 52(ptr) AccessChain 49(localIArray) 27 + 61: 6(int) Load 60 + 62: 23(bool) IEqual 61 16 + SelectionMerge 64 None + BranchConditional 62 63 64 + 63: Label + 65: 30(ptr) AccessChain 36(localFArray) 37 + 66: 7(float) Load 65 + 67: 7(float) FAdd 66 29 + Store 65 67 + Branch 64 + 64: Label + Store 68(x) 69 + 71: 6(int) Load 68(x) + 72: 42(ptr) AccessChain 40(coord) 41 + 73: 7(float) Load 72 + 74: 30(ptr) AccessChain 70(localArray) 71 + Store 74 73 + Store 75(i) 16 + Branch 79 + 76: Label + 84: 6(int) Load 75(i) + 86: 30(ptr) AccessChain 83(a) 84 + Store 86 85 + Branch 78 + 77: Label + 90: 6(int) Load 89(condition) + 91: 23(bool) IEqual 90 28 + SelectionMerge 93 None + BranchConditional 91 92 93 + 78: Label + 87: 6(int) Load 75(i) + 88: 6(int) IAdd 87 28 + Store 75(i) 88 + Branch 79 + 79: Label + 80: 6(int) Load 75(i) + 82: 23(bool) SLessThan 80 81 + LoopMerge 77 78 None + BranchConditional 82 76 77 + 92: Label + 94: 34 Load 70(localArray) + Store 83(a) 94 + Branch 93 + 93: Label + 98: 9(fvec4) Load 97(color) + 100: 99(ptr) AccessChain 12(locals2) 95 + Store 100 98 + 102: 42(ptr) AccessChain 40(coord) 101 + 103: 7(float) Load 102 + 105: 30(ptr) AccessChain 12(locals2) 95 104 + Store 105 103 + 108: 99(ptr) AccessChain 12(locals2) 95 + 109: 9(fvec4) Load 108 + 110: 30(ptr) AccessChain 36(localFArray) 37 + 111: 7(float) Load 110 + 112: 30(ptr) AccessChain 12(locals2) 27 28 + 113: 7(float) Load 112 + 114: 7(float) FAdd 111 113 + 115: 6(int) Load 68(x) + 116: 30(ptr) AccessChain 70(localArray) 115 + 117: 7(float) Load 116 + 118: 7(float) FAdd 114 117 + 119: 6(int) Load 68(x) + 120: 30(ptr) AccessChain 83(a) 119 + 121: 7(float) Load 120 + 122: 7(float) FAdd 118 121 + 123: 9(fvec4) VectorTimesScalar 109 122 + 128: 125 Load 127(samp2D) + 129: 38(fvec2) Load 40(coord) + 130: 9(fvec4) ImageSampleImplicitLod 128 129 + 131: 9(fvec4) FMul 123 130 + Store 107(gl_FragColor) 131 + Return + FunctionEnd diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index 5602e080..d6ec0a99 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -1,1098 +1,1086 @@ -spv.loops.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release - - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 718 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 - ExecutionMode 4 OriginLowerLeft - Source GLSL 130 - Name 4 "main" - Name 9 "color" - Name 11 "BaseColor" - Name 50 "d" - Name 54 "bigColor" - Name 66 "bigColor1_1" - Name 97 "d2" - Name 105 "d3" - Name 109 "bigColor1_2" - Name 120 "bigColor1_3" - Name 126 "d4" - Name 137 "i" - Name 144 "Count" - Name 147 "bigColor2" - Name 165 "bigColor3" - Name 170 "i" - Name 184 "i" - Name 218 "i" - Name 239 "i" - Name 264 "i" - Name 298 "bigColor4" - Name 334 "d5" - Name 338 "bigColor5" - Name 355 "d6" - Name 367 "bigColor6" - Name 401 "d7" - Name 434 "bigColor7" - Name 457 "d8" - Name 497 "d9" - Name 527 "d10" - Name 535 "d11" - Name 545 "d12" - Name 569 "bigColor8" - Name 596 "gl_FragColor" - Name 603 "d14" - Name 608 "d15" - Name 626 "d16" - Name 664 "d17" - Name 670 "d18" - Name 701 "d13" - Name 702 "d19" - Name 703 "d20" - Name 704 "d21" - Name 705 "d22" - Name 706 "d23" - Name 707 "d24" - Name 708 "d25" - Name 709 "d26" - Name 710 "d27" - Name 711 "d28" - Name 712 "d29" - Name 713 "d30" - Name 714 "d31" - Name 715 "d32" - Name 716 "d33" - Name 717 "d34" - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 10: TypePointer Input 7(fvec4) - 11(BaseColor): 10(ptr) Variable Input - 16: TypeBool - 17: 16(bool) ConstantTrue - 18: TypeInt 32 0 - 19: 18(int) Constant 0 - 20: TypePointer Function 6(float) - 23: 6(float) Constant 1051260355 - 27: 7(fvec4) ConstantComposite 23 23 23 23 - 33: 6(float) Constant 1059648963 - 37: 7(fvec4) ConstantComposite 33 33 33 33 - 49: TypePointer UniformConstant 6(float) - 50(d): 49(ptr) Variable UniformConstant - 53: TypePointer UniformConstant 7(fvec4) - 54(bigColor): 53(ptr) Variable UniformConstant - 61: 18(int) Constant 2 - 66(bigColor1_1): 53(ptr) Variable UniformConstant - 70: 18(int) Constant 3 - 86: 6(float) Constant 1109917696 - 89: 6(float) Constant 1065353216 - 97(d2): 49(ptr) Variable UniformConstant - 102: 18(int) Constant 1 - 105(d3): 49(ptr) Variable UniformConstant -109(bigColor1_2): 53(ptr) Variable UniformConstant -120(bigColor1_3): 53(ptr) Variable UniformConstant - 126(d4): 49(ptr) Variable UniformConstant - 135: TypeInt 32 1 - 136: TypePointer Function 135(int) - 138: 135(int) Constant 0 - 143: TypePointer UniformConstant 135(int) - 144(Count): 143(ptr) Variable UniformConstant - 147(bigColor2): 53(ptr) Variable UniformConstant - 152: 135(int) Constant 1 - 165(bigColor3): 53(ptr) Variable UniformConstant - 169: 16(bool) ConstantFalse - 175: 135(int) Constant 42 - 189: 135(int) Constant 100 - 193: 6(float) Constant 1101004800 - 223: 135(int) Constant 120 - 298(bigColor4): 53(ptr) Variable UniformConstant - 334(d5): 49(ptr) Variable UniformConstant - 338(bigColor5): 53(ptr) Variable UniformConstant - 355(d6): 49(ptr) Variable UniformConstant - 367(bigColor6): 53(ptr) Variable UniformConstant - 401(d7): 49(ptr) Variable UniformConstant - 429: 6(float) Constant 0 - 434(bigColor7): 53(ptr) Variable UniformConstant - 457(d8): 49(ptr) Variable UniformConstant - 477: 6(float) Constant 1073741824 - 497(d9): 49(ptr) Variable UniformConstant - 513: 6(float) Constant 1084227584 - 527(d10): 49(ptr) Variable UniformConstant - 535(d11): 49(ptr) Variable UniformConstant - 545(d12): 49(ptr) Variable UniformConstant - 567: 6(float) Constant 1092616192 - 569(bigColor8): 53(ptr) Variable UniformConstant - 595: TypePointer Output 7(fvec4) -596(gl_FragColor): 595(ptr) Variable Output - 603(d14): 49(ptr) Variable UniformConstant - 608(d15): 49(ptr) Variable UniformConstant - 626(d16): 49(ptr) Variable UniformConstant - 664(d17): 49(ptr) Variable UniformConstant - 670(d18): 49(ptr) Variable UniformConstant - 701(d13): 49(ptr) Variable UniformConstant - 702(d19): 49(ptr) Variable UniformConstant - 703(d20): 49(ptr) Variable UniformConstant - 704(d21): 49(ptr) Variable UniformConstant - 705(d22): 49(ptr) Variable UniformConstant - 706(d23): 49(ptr) Variable UniformConstant - 707(d24): 49(ptr) Variable UniformConstant - 708(d25): 49(ptr) Variable UniformConstant - 709(d26): 49(ptr) Variable UniformConstant - 710(d27): 49(ptr) Variable UniformConstant - 711(d28): 49(ptr) Variable UniformConstant - 712(d29): 49(ptr) Variable UniformConstant - 713(d30): 49(ptr) Variable UniformConstant - 714(d31): 49(ptr) Variable UniformConstant - 715(d32): 49(ptr) Variable UniformConstant - 716(d33): 49(ptr) Variable UniformConstant - 717(d34): 49(ptr) Variable UniformConstant - 4(main): 2 Function None 3 - 5: Label - 9(color): 8(ptr) Variable Function - 137(i): 136(ptr) Variable Function - 170(i): 136(ptr) Variable Function - 184(i): 136(ptr) Variable Function - 218(i): 136(ptr) Variable Function - 239(i): 136(ptr) Variable Function - 264(i): 136(ptr) Variable Function - 12: 7(fvec4) Load 11(BaseColor) - Store 9(color) 12 - Branch 13 - 13: Label - LoopMerge 14 13 None - BranchConditional 17 15 14 - 15: Label - 21: 20(ptr) AccessChain 9(color) 19 - 22: 6(float) Load 21 - 24: 16(bool) FOrdLessThan 22 23 - SelectionMerge 26 None - BranchConditional 24 25 26 - 25: Label - 28: 7(fvec4) Load 9(color) - 29: 7(fvec4) FAdd 28 27 - Store 9(color) 29 - Branch 14 - 26: Label - 31: 20(ptr) AccessChain 9(color) 19 - 32: 6(float) Load 31 - 34: 16(bool) FOrdLessThan 32 33 - SelectionMerge 36 None - BranchConditional 34 35 36 - 35: Label - 38: 7(fvec4) Load 9(color) - 39: 7(fvec4) FAdd 38 37 - Store 9(color) 39 - Branch 14 - 36: Label - 41: 7(fvec4) Load 9(color) - 42: 7(fvec4) FAdd 41 27 - Store 9(color) 42 - Branch 14 - 14: Label - Branch 44 - 44: Label - 47: 20(ptr) AccessChain 9(color) 19 - 48: 6(float) Load 47 - 51: 6(float) Load 50(d) - 52: 16(bool) FOrdLessThan 48 51 - LoopMerge 45 44 None - BranchConditional 52 46 45 - 46: Label - 55: 7(fvec4) Load 54(bigColor) - 56: 7(fvec4) Load 9(color) - 57: 7(fvec4) FAdd 56 55 - Store 9(color) 57 - Branch 44 - 45: Label - Branch 58 - 58: Label - 62: 20(ptr) AccessChain 9(color) 61 - 63: 6(float) Load 62 - 64: 6(float) Load 50(d) - 65: 16(bool) FOrdLessThan 63 64 - LoopMerge 59 58 None - BranchConditional 65 60 59 - 60: Label - 67: 7(fvec4) Load 66(bigColor1_1) - 68: 7(fvec4) Load 9(color) - 69: 7(fvec4) FAdd 68 67 - Store 9(color) 69 - 71: 20(ptr) AccessChain 9(color) 70 - 72: 6(float) Load 71 - 73: 6(float) Load 50(d) - 74: 16(bool) FOrdLessThan 72 73 - SelectionMerge 76 None - BranchConditional 74 75 76 - 75: Label - Branch 58 - 76: Label - 78: 7(fvec4) Load 66(bigColor1_1) - 79: 7(fvec4) Load 9(color) - 80: 7(fvec4) FAdd 79 78 - Store 9(color) 80 - Branch 58 - 59: Label - Branch 81 - 81: Label - 84: 20(ptr) AccessChain 9(color) 19 - 85: 6(float) Load 84 - 87: 16(bool) FOrdLessThan 85 86 - LoopMerge 82 81 None - BranchConditional 87 83 82 - 83: Label - 88: 7(fvec4) Load 9(color) - 90: 7(fvec4) CompositeConstruct 89 89 89 89 - 91: 7(fvec4) FAdd 88 90 - Store 9(color) 91 - Branch 81 - 82: Label - Branch 92 - 92: Label - 95: 20(ptr) AccessChain 9(color) 70 - 96: 6(float) Load 95 - 98: 6(float) Load 97(d2) - 99: 16(bool) FOrdLessThan 96 98 - SelectionMerge 101 None - BranchConditional 99 100 101 - 100: Label - 103: 20(ptr) AccessChain 9(color) 102 - 104: 6(float) Load 103 - 106: 6(float) Load 105(d3) - 107: 16(bool) FOrdLessThan 104 106 - Branch 101 - 101: Label - 108: 16(bool) Phi 99 92 107 100 - LoopMerge 93 92 None - BranchConditional 108 94 93 - 94: Label - 110: 7(fvec4) Load 109(bigColor1_2) - 111: 7(fvec4) Load 9(color) - 112: 7(fvec4) FAdd 111 110 - Store 9(color) 112 - Branch 92 - 93: Label - Branch 113 - 113: Label - 116: 20(ptr) AccessChain 9(color) 61 - 117: 6(float) Load 116 - 118: 6(float) Load 105(d3) - 119: 16(bool) FOrdLessThan 117 118 - LoopMerge 114 113 None - BranchConditional 119 115 114 - 115: Label - 121: 7(fvec4) Load 120(bigColor1_3) - 122: 7(fvec4) Load 9(color) - 123: 7(fvec4) FAdd 122 121 - Store 9(color) 123 - 124: 20(ptr) AccessChain 9(color) 102 - 125: 6(float) Load 124 - 127: 6(float) Load 126(d4) - 128: 16(bool) FOrdLessThan 125 127 - SelectionMerge 130 None - BranchConditional 128 129 130 - 129: Label - Branch 114 - 130: Label - 132: 7(fvec4) Load 120(bigColor1_3) - 133: 7(fvec4) Load 9(color) - 134: 7(fvec4) FAdd 133 132 - Store 9(color) 134 - Branch 113 - 114: Label - Store 137(i) 138 - Branch 139 - 139: Label - 142: 135(int) Load 137(i) - 145: 135(int) Load 144(Count) - 146: 16(bool) SLessThan 142 145 - LoopMerge 140 139 None - BranchConditional 146 141 140 - 141: Label - 148: 7(fvec4) Load 147(bigColor2) - 149: 7(fvec4) Load 9(color) - 150: 7(fvec4) FAdd 149 148 - Store 9(color) 150 - 151: 135(int) Load 137(i) - 153: 135(int) IAdd 151 152 - Store 137(i) 153 - Branch 139 - 140: Label - Branch 154 - 154: Label - 157: 16(bool) Phi 17 140 169 156 - LoopMerge 155 154 None - Branch 158 - 158: Label - SelectionMerge 156 None - BranchConditional 157 156 159 - 159: Label - 160: 20(ptr) AccessChain 9(color) 19 - 161: 6(float) Load 160 - 162: 6(float) Load 97(d2) - 163: 16(bool) FOrdLessThan 161 162 - SelectionMerge 164 None - BranchConditional 163 164 155 - 164: Label - Branch 156 - 156: Label - 166: 7(fvec4) Load 165(bigColor3) - 167: 7(fvec4) Load 9(color) - 168: 7(fvec4) FAdd 167 166 - Store 9(color) 168 - Branch 154 - 155: Label - Store 170(i) 138 - Branch 171 - 171: Label - 174: 135(int) Load 170(i) - 176: 16(bool) SLessThan 174 175 - LoopMerge 172 171 None - BranchConditional 176 173 172 - 173: Label - 177: 6(float) Load 105(d3) - 178: 20(ptr) AccessChain 9(color) 61 - 179: 6(float) Load 178 - 180: 6(float) FAdd 179 177 - 181: 20(ptr) AccessChain 9(color) 61 - Store 181 180 - 182: 135(int) Load 170(i) - 183: 135(int) IAdd 182 152 - Store 170(i) 183 - Branch 171 - 172: Label - Store 184(i) 138 - Branch 185 - 185: Label - 188: 135(int) Load 184(i) - 190: 16(bool) SLessThan 188 189 - LoopMerge 186 185 None - BranchConditional 190 187 186 - 187: Label - 191: 20(ptr) AccessChain 9(color) 61 - 192: 6(float) Load 191 - 194: 16(bool) FOrdLessThan 192 193 - SelectionMerge 196 None - BranchConditional 194 195 200 - 195: Label - 197: 20(ptr) AccessChain 9(color) 19 - 198: 6(float) Load 197 - 199: 6(float) FAdd 198 89 - Store 197 199 - Branch 196 - 200: Label - 201: 20(ptr) AccessChain 9(color) 102 - 202: 6(float) Load 201 - 203: 6(float) FAdd 202 89 - Store 201 203 - Branch 196 - 196: Label - 204: 20(ptr) AccessChain 9(color) 70 - 205: 6(float) Load 204 - 206: 16(bool) FOrdLessThan 205 193 - SelectionMerge 208 None - BranchConditional 206 207 208 - 207: Label - 209: 20(ptr) AccessChain 9(color) 61 - 210: 6(float) Load 209 - 211: 20(ptr) AccessChain 9(color) 102 - 212: 6(float) Load 211 - 213: 16(bool) FOrdGreaterThan 210 212 - SelectionMerge 215 None - BranchConditional 213 214 215 - 214: Label - Branch 215 - 215: Label - Branch 208 - 208: Label - 216: 135(int) Load 184(i) - 217: 135(int) IAdd 216 152 - Store 184(i) 217 - Branch 185 - 186: Label - Store 218(i) 138 - Branch 219 - 219: Label - 222: 135(int) Load 218(i) - 224: 16(bool) SLessThan 222 223 - LoopMerge 220 219 None - BranchConditional 224 221 220 - 221: Label - 225: 20(ptr) AccessChain 9(color) 61 - 226: 6(float) Load 225 - 227: 16(bool) FOrdLessThan 226 193 - SelectionMerge 229 None - BranchConditional 227 228 233 - 228: Label - 230: 20(ptr) AccessChain 9(color) 19 - 231: 6(float) Load 230 - 232: 6(float) FAdd 231 89 - Store 230 232 - Branch 229 - 233: Label - 234: 20(ptr) AccessChain 9(color) 102 - 235: 6(float) Load 234 - 236: 6(float) FAdd 235 89 - Store 234 236 - Branch 229 - 229: Label - 237: 135(int) Load 218(i) - 238: 135(int) IAdd 237 152 - Store 218(i) 238 - Branch 219 - 220: Label - Store 239(i) 138 - Branch 240 - 240: Label - 243: 135(int) Load 239(i) - 244: 16(bool) SLessThan 243 175 - LoopMerge 241 240 None - BranchConditional 244 242 241 - 242: Label - 245: 6(float) Load 105(d3) - 246: 20(ptr) AccessChain 9(color) 61 - 247: 6(float) Load 246 - 248: 6(float) FAdd 247 245 - 249: 20(ptr) AccessChain 9(color) 61 - Store 249 248 - 250: 20(ptr) AccessChain 9(color) 19 - 251: 6(float) Load 250 - 252: 6(float) Load 126(d4) - 253: 16(bool) FOrdLessThan 251 252 - SelectionMerge 255 None - BranchConditional 253 254 255 - 254: Label - 256: 135(int) Load 239(i) - 257: 135(int) IAdd 256 152 - Store 239(i) 257 - Branch 240 - 255: Label - 259: 20(ptr) AccessChain 9(color) 70 - 260: 6(float) Load 259 - 261: 6(float) FAdd 260 89 - Store 259 261 - 262: 135(int) Load 239(i) - 263: 135(int) IAdd 262 152 - Store 239(i) 263 - Branch 240 - 241: Label - Store 264(i) 138 - Branch 265 - 265: Label - 268: 135(int) Load 264(i) - 269: 16(bool) SLessThan 268 175 - LoopMerge 266 265 None - BranchConditional 269 267 266 - 267: Label - 270: 6(float) Load 105(d3) - 271: 20(ptr) AccessChain 9(color) 61 - 272: 6(float) Load 271 - 273: 6(float) FAdd 272 270 - 274: 20(ptr) AccessChain 9(color) 61 - Store 274 273 - 275: 20(ptr) AccessChain 9(color) 19 - 276: 6(float) Load 275 - 277: 6(float) Load 126(d4) - 278: 16(bool) FOrdLessThan 276 277 - SelectionMerge 280 None - BranchConditional 278 279 280 - 279: Label - Branch 266 - 280: Label - 282: 20(ptr) AccessChain 9(color) 70 - 283: 6(float) Load 282 - 284: 6(float) FAdd 283 89 - Store 282 284 - 285: 135(int) Load 264(i) - 286: 135(int) IAdd 285 152 - Store 264(i) 286 - Branch 265 - 266: Label - Branch 287 - 287: Label - 290: 16(bool) Phi 17 266 169 306 169 314 - LoopMerge 288 287 None - Branch 291 - 291: Label - SelectionMerge 289 None - BranchConditional 290 289 292 - 292: Label - 293: 20(ptr) AccessChain 9(color) 61 - 294: 6(float) Load 293 - 295: 6(float) Load 126(d4) - 296: 16(bool) FOrdLessThan 294 295 - SelectionMerge 297 None - BranchConditional 296 297 288 - 297: Label - Branch 289 - 289: Label - 299: 7(fvec4) Load 298(bigColor4) - 300: 7(fvec4) Load 9(color) - 301: 7(fvec4) FAdd 300 299 - Store 9(color) 301 - 302: 20(ptr) AccessChain 9(color) 19 - 303: 6(float) Load 302 - 304: 6(float) Load 126(d4) - 305: 16(bool) FOrdLessThan 303 304 - SelectionMerge 307 None - BranchConditional 305 306 307 - 306: Label - Branch 287 - 307: Label - 309: 20(ptr) AccessChain 9(color) 102 - 310: 6(float) Load 309 - 311: 6(float) Load 126(d4) - 312: 16(bool) FOrdLessThan 310 311 - SelectionMerge 314 None - BranchConditional 312 313 320 - 313: Label - 315: 6(float) Load 126(d4) - 316: 20(ptr) AccessChain 9(color) 102 - 317: 6(float) Load 316 - 318: 6(float) FAdd 317 315 - 319: 20(ptr) AccessChain 9(color) 102 - Store 319 318 - Branch 314 - 320: Label - 321: 6(float) Load 126(d4) - 322: 20(ptr) AccessChain 9(color) 19 - 323: 6(float) Load 322 - 324: 6(float) FAdd 323 321 - 325: 20(ptr) AccessChain 9(color) 19 - Store 325 324 - Branch 314 - 314: Label - Branch 287 - 288: Label - Branch 326 - 326: Label - 329: 16(bool) Phi 17 288 169 347 - LoopMerge 327 326 None - Branch 330 - 330: Label - SelectionMerge 328 None - BranchConditional 329 328 331 - 331: Label - 332: 20(ptr) AccessChain 9(color) 19 - 333: 6(float) Load 332 - 335: 6(float) Load 334(d5) - 336: 16(bool) FOrdLessThan 333 335 - SelectionMerge 337 None - BranchConditional 336 337 327 - 337: Label - Branch 328 - 328: Label - 339: 7(fvec4) Load 338(bigColor5) - 340: 7(fvec4) Load 9(color) - 341: 7(fvec4) FAdd 340 339 - Store 9(color) 341 - 342: 20(ptr) AccessChain 9(color) 102 - 343: 6(float) Load 342 - 344: 6(float) Load 334(d5) - 345: 16(bool) FOrdLessThan 343 344 - SelectionMerge 347 None - BranchConditional 345 346 347 - 346: Label - 348: 6(float) Load 334(d5) - 349: 20(ptr) AccessChain 9(color) 102 - 350: 6(float) Load 349 - 351: 6(float) FAdd 350 348 - 352: 20(ptr) AccessChain 9(color) 102 - Store 352 351 - Branch 347 - 347: Label - Branch 326 - 327: Label - 353: 20(ptr) AccessChain 9(color) 19 - 354: 6(float) Load 353 - 356: 6(float) Load 355(d6) - 357: 16(bool) FOrdLessThan 354 356 - SelectionMerge 359 None - BranchConditional 357 358 371 - 358: Label - Branch 360 - 360: Label - 363: 20(ptr) AccessChain 9(color) 102 - 364: 6(float) Load 363 - 365: 6(float) Load 355(d6) - 366: 16(bool) FOrdLessThan 364 365 - LoopMerge 361 360 None - BranchConditional 366 362 361 - 362: Label - 368: 7(fvec4) Load 367(bigColor6) - 369: 7(fvec4) Load 9(color) - 370: 7(fvec4) FAdd 369 368 - Store 9(color) 370 - Branch 360 - 361: Label - Branch 359 - 371: Label - Branch 372 - 372: Label - 375: 20(ptr) AccessChain 9(color) 61 - 376: 6(float) Load 375 - 377: 6(float) Load 355(d6) - 378: 16(bool) FOrdLessThan 376 377 - LoopMerge 373 372 None - BranchConditional 378 374 373 - 374: Label - 379: 49(ptr) AccessChain 367(bigColor6) 61 - 380: 6(float) Load 379 - 381: 20(ptr) AccessChain 9(color) 61 - 382: 6(float) Load 381 - 383: 6(float) FAdd 382 380 - 384: 20(ptr) AccessChain 9(color) 61 - Store 384 383 - Branch 372 - 373: Label - Branch 359 - 359: Label - 385: 20(ptr) AccessChain 9(color) 19 - 386: 6(float) Load 385 - 387: 6(float) Load 355(d6) - 388: 16(bool) FOrdLessThan 386 387 - SelectionMerge 390 None - BranchConditional 388 389 407 - 389: Label - Branch 391 - 391: Label - 394: 20(ptr) AccessChain 9(color) 102 - 395: 6(float) Load 394 - 396: 6(float) Load 355(d6) - 397: 16(bool) FOrdLessThan 395 396 - LoopMerge 392 391 None - BranchConditional 397 393 392 - 393: Label - 398: 7(fvec4) Load 367(bigColor6) - 399: 7(fvec4) Load 9(color) - 400: 7(fvec4) FAdd 399 398 - Store 9(color) 400 - 402: 6(float) Load 401(d7) - 403: 16(bool) FOrdLessThan 402 89 - SelectionMerge 405 None - BranchConditional 403 404 405 - 404: Label - Branch 392 - 405: Label - Branch 391 - 392: Label - Branch 390 - 407: Label - Branch 408 - 408: Label - 411: 20(ptr) AccessChain 9(color) 61 - 412: 6(float) Load 411 - 413: 6(float) Load 355(d6) - 414: 16(bool) FOrdLessThan 412 413 - LoopMerge 409 408 None - BranchConditional 414 410 409 - 410: Label - 415: 49(ptr) AccessChain 367(bigColor6) 61 - 416: 6(float) Load 415 - 417: 20(ptr) AccessChain 9(color) 61 - 418: 6(float) Load 417 - 419: 6(float) FAdd 418 416 - 420: 20(ptr) AccessChain 9(color) 61 - Store 420 419 - Branch 408 - 409: Label - Branch 390 - 390: Label - Branch 421 - 421: Label - 424: 16(bool) Phi 17 390 169 441 - LoopMerge 422 421 None - Branch 425 - 425: Label - SelectionMerge 423 None - BranchConditional 424 423 426 - 426: Label - SelectionMerge 427 None - BranchConditional 17 427 422 - 427: Label - Branch 423 - 423: Label - 428: 6(float) Load 401(d7) - 430: 16(bool) FOrdLessThan 428 429 - SelectionMerge 432 None - BranchConditional 430 431 432 - 431: Label - Branch 422 - 432: Label - 435: 7(fvec4) Load 434(bigColor7) - 436: 7(fvec4) Load 9(color) - 437: 7(fvec4) FAdd 436 435 - Store 9(color) 437 - 438: 6(float) Load 401(d7) - 439: 16(bool) FOrdLessThan 438 89 - SelectionMerge 441 None - BranchConditional 439 440 441 - 440: Label - 442: 20(ptr) AccessChain 9(color) 61 - 443: 6(float) Load 442 - 444: 6(float) FAdd 443 89 - Store 442 444 - Branch 422 - 441: Label - 446: 7(fvec4) Load 11(BaseColor) - 447: 7(fvec4) Load 9(color) - 448: 7(fvec4) FAdd 447 446 - Store 9(color) 448 - Branch 421 - 422: Label - Branch 449 - 449: Label - 452: 16(bool) Phi 17 422 169 472 - LoopMerge 450 449 None - Branch 453 - 453: Label - SelectionMerge 451 None - BranchConditional 452 451 454 - 454: Label - 455: 20(ptr) AccessChain 9(color) 61 - 456: 6(float) Load 455 - 458: 6(float) Load 457(d8) - 459: 16(bool) FOrdLessThan 456 458 - SelectionMerge 460 None - BranchConditional 459 460 450 - 460: Label - Branch 451 - 451: Label - 461: 6(float) Load 457(d8) - 462: 16(bool) FOrdLessThan 461 429 - SelectionMerge 464 None - BranchConditional 462 463 464 - 463: Label - Branch 450 - 464: Label - 466: 7(fvec4) Load 434(bigColor7) - 467: 7(fvec4) Load 9(color) - 468: 7(fvec4) FAdd 467 466 - Store 9(color) 468 - 469: 6(float) Load 457(d8) - 470: 16(bool) FOrdLessThan 469 89 - SelectionMerge 472 None - BranchConditional 470 471 472 - 471: Label - 473: 20(ptr) AccessChain 9(color) 61 - 474: 6(float) Load 473 - 475: 6(float) FAdd 474 89 - Store 473 475 - 476: 6(float) Load 457(d8) - 478: 16(bool) FOrdLessThan 476 477 - SelectionMerge 480 None - BranchConditional 478 479 484 - 479: Label - 481: 20(ptr) AccessChain 9(color) 102 - 482: 6(float) Load 481 - 483: 6(float) FAdd 482 89 - Store 481 483 - Branch 480 - 484: Label - 485: 20(ptr) AccessChain 9(color) 19 - 486: 6(float) Load 485 - 487: 6(float) FAdd 486 89 - Store 485 487 - Branch 480 - 480: Label - Branch 450 - 472: Label - 489: 7(fvec4) Load 11(BaseColor) - 490: 7(fvec4) Load 9(color) - 491: 7(fvec4) FAdd 490 489 - Store 9(color) 491 - Branch 449 - 450: Label - Branch 492 - 492: Label - 495: 20(ptr) AccessChain 9(color) 70 - 496: 6(float) Load 495 - 498: 6(float) Load 497(d9) - 499: 16(bool) FOrdLessThan 496 498 - LoopMerge 493 492 None - BranchConditional 499 494 493 - 494: Label - 500: 6(float) Load 497(d9) - 501: 6(float) Load 457(d8) - 502: 16(bool) FOrdGreaterThan 500 501 - SelectionMerge 504 None - BranchConditional 502 503 504 - 503: Label - 505: 20(ptr) AccessChain 9(color) 19 - 506: 6(float) Load 505 - 507: 6(float) Load 401(d7) - 508: 16(bool) FOrdLessThanEqual 506 507 - SelectionMerge 510 None - BranchConditional 508 509 510 - 509: Label - 511: 20(ptr) AccessChain 9(color) 61 - 512: 6(float) Load 511 - 514: 16(bool) FOrdEqual 512 513 - SelectionMerge 516 None - BranchConditional 514 515 520 - 515: Label - 517: 20(ptr) AccessChain 9(color) 70 - 518: 6(float) Load 517 - 519: 6(float) FAdd 518 89 - Store 517 519 - Branch 516 - 520: Label - Branch 493 - 516: Label - Branch 510 - 510: Label - Branch 504 - 504: Label - Branch 492 - 493: Label - Branch 522 - 522: Label - 525: 20(ptr) AccessChain 9(color) 61 - 526: 6(float) Load 525 - 528: 6(float) Load 527(d10) - 529: 16(bool) FOrdLessThan 526 528 - LoopMerge 523 522 None - BranchConditional 529 524 523 - 524: Label - 530: 20(ptr) AccessChain 9(color) 102 - 531: 6(float) Load 530 - 532: 6(float) FAdd 531 89 - Store 530 532 - 533: 20(ptr) AccessChain 9(color) 102 - 534: 6(float) Load 533 - 536: 6(float) Load 535(d11) - 537: 16(bool) FOrdLessThan 534 536 - SelectionMerge 539 None - BranchConditional 537 538 539 - 538: Label - 540: 20(ptr) AccessChain 9(color) 61 - 541: 6(float) Load 540 - 542: 6(float) FAdd 541 89 - Store 540 542 - 543: 20(ptr) AccessChain 9(color) 70 - 544: 6(float) Load 543 - 546: 6(float) Load 545(d12) - 547: 16(bool) FOrdLessThan 544 546 - SelectionMerge 549 None - BranchConditional 547 548 553 - 548: Label - 550: 20(ptr) AccessChain 9(color) 70 - 551: 6(float) Load 550 - 552: 6(float) FAdd 551 89 - Store 550 552 - Branch 549 - 553: Label - 554: 20(ptr) AccessChain 9(color) 19 - 555: 6(float) Load 554 - 556: 6(float) FAdd 555 89 - Store 554 556 - Branch 549 - 549: Label - Branch 522 - 539: Label - 558: 7(fvec4) Load 9(color) - 559: 7(fvec4) CompositeConstruct 89 89 89 89 - 560: 7(fvec4) FAdd 558 559 - Store 9(color) 560 - Branch 523 - 523: Label - Branch 562 - 562: Label - 565: 20(ptr) AccessChain 9(color) 19 - 566: 6(float) Load 565 - 568: 16(bool) FOrdLessThan 566 567 - LoopMerge 563 562 None - BranchConditional 568 564 563 - 564: Label - 570: 7(fvec4) Load 569(bigColor8) - 571: 7(fvec4) Load 9(color) - 572: 7(fvec4) FAdd 571 570 - Store 9(color) 572 - 573: 20(ptr) AccessChain 9(color) 61 - 574: 6(float) Load 573 - 575: 6(float) Load 457(d8) - 576: 16(bool) FOrdLessThan 574 575 - SelectionMerge 578 None - BranchConditional 576 577 578 - 577: Label - 579: 20(ptr) AccessChain 9(color) 70 - 580: 6(float) Load 579 - 581: 6(float) Load 355(d6) - 582: 16(bool) FOrdLessThan 580 581 - SelectionMerge 584 None - BranchConditional 582 583 584 - 583: Label - Branch 562 - 584: Label - Branch 578 - 578: Label - 586: 49(ptr) AccessChain 569(bigColor8) 19 - 587: 6(float) Load 586 - 588: 20(ptr) AccessChain 9(color) 102 - 589: 6(float) Load 588 - 590: 6(float) FAdd 589 587 - 591: 20(ptr) AccessChain 9(color) 102 - Store 591 590 - Branch 562 - 563: Label - 592: 7(fvec4) Load 9(color) - 593: 7(fvec4) CompositeConstruct 89 89 89 89 - 594: 7(fvec4) FAdd 592 593 - Store 9(color) 594 - 597: 7(fvec4) Load 9(color) - Store 596(gl_FragColor) 597 - Branch 598 - 598: Label - 601: 20(ptr) AccessChain 9(color) 19 - 602: 6(float) Load 601 - 604: 6(float) Load 603(d14) - 605: 16(bool) FOrdLessThan 602 604 - LoopMerge 599 598 None - BranchConditional 605 600 599 - 600: Label - 606: 20(ptr) AccessChain 9(color) 102 - 607: 6(float) Load 606 - 609: 6(float) Load 608(d15) - 610: 16(bool) FOrdLessThan 607 609 - SelectionMerge 612 None - BranchConditional 610 611 614 - 611: Label - Return - 614: Label - 615: 7(fvec4) Load 9(color) - 616: 7(fvec4) CompositeConstruct 89 89 89 89 - 617: 7(fvec4) FAdd 615 616 - Store 9(color) 617 - Branch 612 - 612: Label - Branch 598 - 599: Label - 618: 7(fvec4) Load 9(color) - 619: 7(fvec4) CompositeConstruct 89 89 89 89 - 620: 7(fvec4) FAdd 618 619 - Store 9(color) 620 - Branch 621 - 621: Label - 624: 20(ptr) AccessChain 9(color) 70 - 625: 6(float) Load 624 - 627: 6(float) Load 626(d16) - 628: 16(bool) FOrdLessThan 625 627 - LoopMerge 622 621 None - BranchConditional 628 623 622 - 623: Label - 629: 20(ptr) AccessChain 9(color) 70 - 630: 6(float) Load 629 - 631: 6(float) FAdd 630 89 - Store 629 631 - Branch 621 - 622: Label - Branch 632 - 632: Label - 635: 20(ptr) AccessChain 9(color) 70 - 636: 6(float) Load 635 - 637: 6(float) Load 97(d2) - 638: 16(bool) FOrdLessThan 636 637 - SelectionMerge 640 None - BranchConditional 638 639 640 - 639: Label - 641: 20(ptr) AccessChain 9(color) 102 - 642: 6(float) Load 641 - 643: 6(float) Load 105(d3) - 644: 16(bool) FOrdLessThan 642 643 - Branch 640 - 640: Label - 645: 16(bool) Phi 638 632 644 639 - LoopMerge 633 632 None - BranchConditional 645 634 633 - 634: Label - 646: 7(fvec4) Load 109(bigColor1_2) - 647: 7(fvec4) Load 9(color) - 648: 7(fvec4) FAdd 647 646 - Store 9(color) 648 - 649: 20(ptr) AccessChain 9(color) 61 - 650: 6(float) Load 649 - 651: 6(float) Load 105(d3) - 652: 16(bool) FOrdLessThan 650 651 - SelectionMerge 654 None - BranchConditional 652 653 654 - 653: Label - Return - 654: Label - Branch 632 - 633: Label - Branch 656 - 656: Label - 659: 16(bool) Phi 17 633 169 674 - LoopMerge 657 656 None - Branch 660 - 660: Label - SelectionMerge 658 None - BranchConditional 659 658 661 - 661: Label - 662: 20(ptr) AccessChain 9(color) 19 - 663: 6(float) Load 662 - 665: 6(float) Load 664(d17) - 666: 16(bool) FOrdLessThan 663 665 - SelectionMerge 667 None - BranchConditional 666 667 657 - 667: Label - Branch 658 - 658: Label - 668: 20(ptr) AccessChain 9(color) 102 - 669: 6(float) Load 668 - 671: 6(float) Load 670(d18) - 672: 16(bool) FOrdLessThan 669 671 - SelectionMerge 674 None - BranchConditional 672 673 674 - 673: Label - Return - 674: Label - 676: 7(fvec4) Load 9(color) - 677: 7(fvec4) CompositeConstruct 89 89 89 89 - 678: 7(fvec4) FAdd 676 677 - Store 9(color) 678 - Branch 656 - 657: Label - Branch 679 - 679: Label - 682: 20(ptr) AccessChain 9(color) 102 - 683: 6(float) Load 682 - 684: 6(float) Load 626(d16) - 685: 16(bool) FOrdLessThan 683 684 - LoopMerge 680 679 None - BranchConditional 685 681 680 - 681: Label - 686: 20(ptr) AccessChain 9(color) 70 - 687: 6(float) Load 686 - 688: 6(float) Load 626(d16) - 689: 16(bool) FOrdLessThan 687 688 - SelectionMerge 691 None - BranchConditional 689 690 693 - 690: Label - Kill - 693: Label - 694: 7(fvec4) Load 9(color) - 695: 7(fvec4) CompositeConstruct 89 89 89 89 - 696: 7(fvec4) FAdd 694 695 - Store 9(color) 696 - Branch 691 - 691: Label - Branch 679 - 680: Label - 697: 7(fvec4) Load 9(color) - 698: 7(fvec4) CompositeConstruct 89 89 89 89 - 699: 7(fvec4) FAdd 697 698 - Store 9(color) 699 - 700: 7(fvec4) Load 9(color) - Store 596(gl_FragColor) 700 - Return - FunctionEnd +spv.loops.frag +WARNING: 0:14: varying deprecated in version 130; may be removed in future release + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 714 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 11 + ExecutionMode 4 OriginLowerLeft + Source GLSL 130 + Name 4 "main" + Name 9 "color" + Name 11 "BaseColor" + Name 52 "d" + Name 56 "bigColor" + Name 69 "bigColor1_1" + Name 102 "d2" + Name 110 "d3" + Name 114 "bigColor1_2" + Name 126 "bigColor1_3" + Name 132 "d4" + Name 143 "i" + Name 151 "Count" + Name 154 "bigColor2" + Name 164 "bigColor3" + Name 172 "i" + Name 187 "i" + Name 222 "i" + Name 244 "i" + Name 268 "i" + Name 295 "bigColor4" + Name 330 "bigColor5" + Name 336 "d5" + Name 352 "d6" + Name 365 "bigColor6" + Name 401 "d7" + Name 431 "bigColor7" + Name 449 "d8" + Name 491 "d9" + Name 522 "d10" + Name 530 "d11" + Name 540 "d12" + Name 565 "bigColor8" + Name 592 "gl_FragColor" + Name 600 "d14" + Name 605 "d15" + Name 624 "d16" + Name 660 "d18" + Name 671 "d17" + Name 697 "d13" + Name 698 "d19" + Name 699 "d20" + Name 700 "d21" + Name 701 "d22" + Name 702 "d23" + Name 703 "d24" + Name 704 "d25" + Name 705 "d26" + Name 706 "d27" + Name 707 "d28" + Name 708 "d29" + Name 709 "d30" + Name 710 "d31" + Name 711 "d32" + Name 712 "d33" + Name 713 "d34" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 10: TypePointer Input 7(fvec4) + 11(BaseColor): 10(ptr) Variable Input + 17: TypeBool + 18: 17(bool) ConstantTrue + 19: TypeInt 32 0 + 20: 19(int) Constant 0 + 21: TypePointer Function 6(float) + 24: 6(float) Constant 1051260355 + 28: 7(fvec4) ConstantComposite 24 24 24 24 + 34: 6(float) Constant 1059648963 + 38: 7(fvec4) ConstantComposite 34 34 34 34 + 51: TypePointer UniformConstant 6(float) + 52(d): 51(ptr) Variable UniformConstant + 55: TypePointer UniformConstant 7(fvec4) + 56(bigColor): 55(ptr) Variable UniformConstant + 64: 19(int) Constant 2 + 69(bigColor1_1): 55(ptr) Variable UniformConstant + 73: 19(int) Constant 3 + 90: 6(float) Constant 1109917696 + 93: 6(float) Constant 1065353216 + 102(d2): 51(ptr) Variable UniformConstant + 107: 19(int) Constant 1 + 110(d3): 51(ptr) Variable UniformConstant +114(bigColor1_2): 55(ptr) Variable UniformConstant +126(bigColor1_3): 55(ptr) Variable UniformConstant + 132(d4): 51(ptr) Variable UniformConstant + 141: TypeInt 32 1 + 142: TypePointer Function 141(int) + 144: 141(int) Constant 0 + 150: TypePointer UniformConstant 141(int) + 151(Count): 150(ptr) Variable UniformConstant + 154(bigColor2): 55(ptr) Variable UniformConstant + 159: 141(int) Constant 1 + 164(bigColor3): 55(ptr) Variable UniformConstant + 178: 141(int) Constant 42 + 193: 141(int) Constant 100 + 197: 6(float) Constant 1101004800 + 228: 141(int) Constant 120 + 295(bigColor4): 55(ptr) Variable UniformConstant + 330(bigColor5): 55(ptr) Variable UniformConstant + 336(d5): 51(ptr) Variable UniformConstant + 352(d6): 51(ptr) Variable UniformConstant + 365(bigColor6): 55(ptr) Variable UniformConstant + 401(d7): 51(ptr) Variable UniformConstant + 426: 6(float) Constant 0 + 431(bigColor7): 55(ptr) Variable UniformConstant + 449(d8): 51(ptr) Variable UniformConstant + 466: 6(float) Constant 1073741824 + 491(d9): 51(ptr) Variable UniformConstant + 507: 6(float) Constant 1084227584 + 522(d10): 51(ptr) Variable UniformConstant + 530(d11): 51(ptr) Variable UniformConstant + 540(d12): 51(ptr) Variable UniformConstant + 563: 6(float) Constant 1092616192 + 565(bigColor8): 55(ptr) Variable UniformConstant + 591: TypePointer Output 7(fvec4) +592(gl_FragColor): 591(ptr) Variable Output + 600(d14): 51(ptr) Variable UniformConstant + 605(d15): 51(ptr) Variable UniformConstant + 624(d16): 51(ptr) Variable UniformConstant + 660(d18): 51(ptr) Variable UniformConstant + 671(d17): 51(ptr) Variable UniformConstant + 697(d13): 51(ptr) Variable UniformConstant + 698(d19): 51(ptr) Variable UniformConstant + 699(d20): 51(ptr) Variable UniformConstant + 700(d21): 51(ptr) Variable UniformConstant + 701(d22): 51(ptr) Variable UniformConstant + 702(d23): 51(ptr) Variable UniformConstant + 703(d24): 51(ptr) Variable UniformConstant + 704(d25): 51(ptr) Variable UniformConstant + 705(d26): 51(ptr) Variable UniformConstant + 706(d27): 51(ptr) Variable UniformConstant + 707(d28): 51(ptr) Variable UniformConstant + 708(d29): 51(ptr) Variable UniformConstant + 709(d30): 51(ptr) Variable UniformConstant + 710(d31): 51(ptr) Variable UniformConstant + 711(d32): 51(ptr) Variable UniformConstant + 712(d33): 51(ptr) Variable UniformConstant + 713(d34): 51(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(color): 8(ptr) Variable Function + 143(i): 142(ptr) Variable Function + 172(i): 142(ptr) Variable Function + 187(i): 142(ptr) Variable Function + 222(i): 142(ptr) Variable Function + 244(i): 142(ptr) Variable Function + 268(i): 142(ptr) Variable Function + 12: 7(fvec4) Load 11(BaseColor) + Store 9(color) 12 + Branch 16 + 13: Label + 22: 21(ptr) AccessChain 9(color) 20 + 23: 6(float) Load 22 + 25: 17(bool) FOrdLessThan 23 24 + SelectionMerge 27 None + BranchConditional 25 26 27 + 14: Label + Branch 48 + 15: Label + Branch 16 + 16: Label + LoopMerge 14 15 None + BranchConditional 18 13 14 + 26: Label + 29: 7(fvec4) Load 9(color) + 30: 7(fvec4) FAdd 29 28 + Store 9(color) 30 + Branch 14 + 27: Label + 32: 21(ptr) AccessChain 9(color) 20 + 33: 6(float) Load 32 + 35: 17(bool) FOrdLessThan 33 34 + SelectionMerge 37 None + BranchConditional 35 36 37 + 36: Label + 39: 7(fvec4) Load 9(color) + 40: 7(fvec4) FAdd 39 38 + Store 9(color) 40 + Branch 14 + 37: Label + 42: 7(fvec4) Load 9(color) + 43: 7(fvec4) FAdd 42 28 + Store 9(color) 43 + Branch 14 + 45: Label + 57: 7(fvec4) Load 56(bigColor) + 58: 7(fvec4) Load 9(color) + 59: 7(fvec4) FAdd 58 57 + Store 9(color) 59 + Branch 47 + 46: Label + Branch 63 + 47: Label + Branch 48 + 48: Label + 49: 21(ptr) AccessChain 9(color) 20 + 50: 6(float) Load 49 + 53: 6(float) Load 52(d) + 54: 17(bool) FOrdLessThan 50 53 + LoopMerge 46 47 None + BranchConditional 54 45 46 + 60: Label + 70: 7(fvec4) Load 69(bigColor1_1) + 71: 7(fvec4) Load 9(color) + 72: 7(fvec4) FAdd 71 70 + Store 9(color) 72 + 74: 21(ptr) AccessChain 9(color) 73 + 75: 6(float) Load 74 + 76: 6(float) Load 52(d) + 77: 17(bool) FOrdLessThan 75 76 + SelectionMerge 79 None + BranchConditional 77 78 79 + 61: Label + Branch 87 + 62: Label + Branch 63 + 63: Label + 65: 21(ptr) AccessChain 9(color) 64 + 66: 6(float) Load 65 + 67: 6(float) Load 52(d) + 68: 17(bool) FOrdLessThan 66 67 + LoopMerge 61 62 None + BranchConditional 68 60 61 + 78: Label + Branch 62 + 79: Label + 81: 7(fvec4) Load 69(bigColor1_1) + 82: 7(fvec4) Load 9(color) + 83: 7(fvec4) FAdd 82 81 + Store 9(color) 83 + Branch 62 + 84: Label + 92: 7(fvec4) Load 9(color) + 94: 7(fvec4) CompositeConstruct 93 93 93 93 + 95: 7(fvec4) FAdd 92 94 + Store 9(color) 95 + Branch 86 + 85: Label + Branch 99 + 86: Label + Branch 87 + 87: Label + 88: 21(ptr) AccessChain 9(color) 20 + 89: 6(float) Load 88 + 91: 17(bool) FOrdLessThan 89 90 + LoopMerge 85 86 None + BranchConditional 91 84 85 + 96: Label + 115: 7(fvec4) Load 114(bigColor1_2) + 116: 7(fvec4) Load 9(color) + 117: 7(fvec4) FAdd 116 115 + Store 9(color) 117 + Branch 98 + 97: Label + Branch 121 + 98: Label + Branch 99 + 99: Label + 100: 21(ptr) AccessChain 9(color) 73 + 101: 6(float) Load 100 + 103: 6(float) Load 102(d2) + 104: 17(bool) FOrdLessThan 101 103 + SelectionMerge 106 None + BranchConditional 104 105 106 + 105: Label + 108: 21(ptr) AccessChain 9(color) 107 + 109: 6(float) Load 108 + 111: 6(float) Load 110(d3) + 112: 17(bool) FOrdLessThan 109 111 + Branch 106 + 106: Label + 113: 17(bool) Phi 104 99 112 105 + LoopMerge 97 98 None + BranchConditional 113 96 97 + 118: Label + 127: 7(fvec4) Load 126(bigColor1_3) + 128: 7(fvec4) Load 9(color) + 129: 7(fvec4) FAdd 128 127 + Store 9(color) 129 + 130: 21(ptr) AccessChain 9(color) 107 + 131: 6(float) Load 130 + 133: 6(float) Load 132(d4) + 134: 17(bool) FOrdLessThan 131 133 + SelectionMerge 136 None + BranchConditional 134 135 136 + 119: Label + Store 143(i) 144 + Branch 148 + 120: Label + Branch 121 + 121: Label + 122: 21(ptr) AccessChain 9(color) 64 + 123: 6(float) Load 122 + 124: 6(float) Load 110(d3) + 125: 17(bool) FOrdLessThan 123 124 + LoopMerge 119 120 None + BranchConditional 125 118 119 + 135: Label + Branch 119 + 136: Label + 138: 7(fvec4) Load 126(bigColor1_3) + 139: 7(fvec4) Load 9(color) + 140: 7(fvec4) FAdd 139 138 + Store 9(color) 140 + Branch 120 + 145: Label + 155: 7(fvec4) Load 154(bigColor2) + 156: 7(fvec4) Load 9(color) + 157: 7(fvec4) FAdd 156 155 + Store 9(color) 157 + Branch 147 + 146: Label + Branch 161 + 147: Label + 158: 141(int) Load 143(i) + 160: 141(int) IAdd 158 159 + Store 143(i) 160 + Branch 148 + 148: Label + 149: 141(int) Load 143(i) + 152: 141(int) Load 151(Count) + 153: 17(bool) SLessThan 149 152 + LoopMerge 146 147 None + BranchConditional 153 145 146 + 161: Label + 165: 7(fvec4) Load 164(bigColor3) + 166: 7(fvec4) Load 9(color) + 167: 7(fvec4) FAdd 166 165 + Store 9(color) 167 + Branch 163 + 162: Label + Store 172(i) 144 + Branch 176 + 163: Label + 168: 21(ptr) AccessChain 9(color) 20 + 169: 6(float) Load 168 + 170: 6(float) Load 102(d2) + 171: 17(bool) FOrdLessThan 169 170 + LoopMerge 162 163 None + BranchConditional 171 161 162 + 173: Label + 180: 6(float) Load 110(d3) + 181: 21(ptr) AccessChain 9(color) 64 + 182: 6(float) Load 181 + 183: 6(float) FAdd 182 180 + 184: 21(ptr) AccessChain 9(color) 64 + Store 184 183 + Branch 175 + 174: Label + Store 187(i) 144 + Branch 191 + 175: Label + 185: 141(int) Load 172(i) + 186: 141(int) IAdd 185 159 + Store 172(i) 186 + Branch 176 + 176: Label + 177: 141(int) Load 172(i) + 179: 17(bool) SLessThan 177 178 + LoopMerge 174 175 None + BranchConditional 179 173 174 + 188: Label + 195: 21(ptr) AccessChain 9(color) 64 + 196: 6(float) Load 195 + 198: 17(bool) FOrdLessThan 196 197 + SelectionMerge 200 None + BranchConditional 198 199 204 + 189: Label + Store 222(i) 144 + Branch 226 + 190: Label + 220: 141(int) Load 187(i) + 221: 141(int) IAdd 220 159 + Store 187(i) 221 + Branch 191 + 191: Label + 192: 141(int) Load 187(i) + 194: 17(bool) SLessThan 192 193 + LoopMerge 189 190 None + BranchConditional 194 188 189 + 199: Label + 201: 21(ptr) AccessChain 9(color) 20 + 202: 6(float) Load 201 + 203: 6(float) FAdd 202 93 + Store 201 203 + Branch 200 + 204: Label + 205: 21(ptr) AccessChain 9(color) 107 + 206: 6(float) Load 205 + 207: 6(float) FAdd 206 93 + Store 205 207 + Branch 200 + 200: Label + 208: 21(ptr) AccessChain 9(color) 73 + 209: 6(float) Load 208 + 210: 17(bool) FOrdLessThan 209 197 + SelectionMerge 212 None + BranchConditional 210 211 212 + 211: Label + 213: 21(ptr) AccessChain 9(color) 64 + 214: 6(float) Load 213 + 215: 21(ptr) AccessChain 9(color) 107 + 216: 6(float) Load 215 + 217: 17(bool) FOrdGreaterThan 214 216 + SelectionMerge 219 None + BranchConditional 217 218 219 + 218: Label + Branch 219 + 219: Label + Branch 212 + 212: Label + Branch 190 + 223: Label + 230: 21(ptr) AccessChain 9(color) 64 + 231: 6(float) Load 230 + 232: 17(bool) FOrdLessThan 231 197 + SelectionMerge 234 None + BranchConditional 232 233 238 + 224: Label + Store 244(i) 144 + Branch 248 + 225: Label + 242: 141(int) Load 222(i) + 243: 141(int) IAdd 242 159 + Store 222(i) 243 + Branch 226 + 226: Label + 227: 141(int) Load 222(i) + 229: 17(bool) SLessThan 227 228 + LoopMerge 224 225 None + BranchConditional 229 223 224 + 233: Label + 235: 21(ptr) AccessChain 9(color) 20 + 236: 6(float) Load 235 + 237: 6(float) FAdd 236 93 + Store 235 237 + Branch 234 + 238: Label + 239: 21(ptr) AccessChain 9(color) 107 + 240: 6(float) Load 239 + 241: 6(float) FAdd 240 93 + Store 239 241 + Branch 234 + 234: Label + Branch 225 + 245: Label + 251: 6(float) Load 110(d3) + 252: 21(ptr) AccessChain 9(color) 64 + 253: 6(float) Load 252 + 254: 6(float) FAdd 253 251 + 255: 21(ptr) AccessChain 9(color) 64 + Store 255 254 + 256: 21(ptr) AccessChain 9(color) 20 + 257: 6(float) Load 256 + 258: 6(float) Load 132(d4) + 259: 17(bool) FOrdLessThan 257 258 + SelectionMerge 261 None + BranchConditional 259 260 261 + 246: Label + Store 268(i) 144 + Branch 272 + 247: Label + 266: 141(int) Load 244(i) + 267: 141(int) IAdd 266 159 + Store 244(i) 267 + Branch 248 + 248: Label + 249: 141(int) Load 244(i) + 250: 17(bool) SLessThan 249 178 + LoopMerge 246 247 None + BranchConditional 250 245 246 + 260: Label + Branch 247 + 261: Label + 263: 21(ptr) AccessChain 9(color) 73 + 264: 6(float) Load 263 + 265: 6(float) FAdd 264 93 + Store 263 265 + Branch 247 + 269: Label + 275: 6(float) Load 110(d3) + 276: 21(ptr) AccessChain 9(color) 64 + 277: 6(float) Load 276 + 278: 6(float) FAdd 277 275 + 279: 21(ptr) AccessChain 9(color) 64 + Store 279 278 + 280: 21(ptr) AccessChain 9(color) 20 + 281: 6(float) Load 280 + 282: 6(float) Load 132(d4) + 283: 17(bool) FOrdLessThan 281 282 + SelectionMerge 285 None + BranchConditional 283 284 285 + 270: Label + Branch 292 + 271: Label + 290: 141(int) Load 268(i) + 291: 141(int) IAdd 290 159 + Store 268(i) 291 + Branch 272 + 272: Label + 273: 141(int) Load 268(i) + 274: 17(bool) SLessThan 273 178 + LoopMerge 270 271 None + BranchConditional 274 269 270 + 284: Label + Branch 270 + 285: Label + 287: 21(ptr) AccessChain 9(color) 73 + 288: 6(float) Load 287 + 289: 6(float) FAdd 288 93 + Store 287 289 + Branch 271 + 292: Label + 296: 7(fvec4) Load 295(bigColor4) + 297: 7(fvec4) Load 9(color) + 298: 7(fvec4) FAdd 297 296 + Store 9(color) 298 + 299: 21(ptr) AccessChain 9(color) 20 + 300: 6(float) Load 299 + 301: 6(float) Load 132(d4) + 302: 17(bool) FOrdLessThan 300 301 + SelectionMerge 304 None + BranchConditional 302 303 304 + 293: Label + Branch 327 + 294: Label + 323: 21(ptr) AccessChain 9(color) 64 + 324: 6(float) Load 323 + 325: 6(float) Load 132(d4) + 326: 17(bool) FOrdLessThan 324 325 + LoopMerge 293 294 None + BranchConditional 326 292 293 + 303: Label + Branch 294 + 304: Label + 306: 21(ptr) AccessChain 9(color) 107 + 307: 6(float) Load 306 + 308: 6(float) Load 132(d4) + 309: 17(bool) FOrdLessThan 307 308 + SelectionMerge 311 None + BranchConditional 309 310 317 + 310: Label + 312: 6(float) Load 132(d4) + 313: 21(ptr) AccessChain 9(color) 107 + 314: 6(float) Load 313 + 315: 6(float) FAdd 314 312 + 316: 21(ptr) AccessChain 9(color) 107 + Store 316 315 + Branch 311 + 317: Label + 318: 6(float) Load 132(d4) + 319: 21(ptr) AccessChain 9(color) 20 + 320: 6(float) Load 319 + 321: 6(float) FAdd 320 318 + 322: 21(ptr) AccessChain 9(color) 20 + Store 322 321 + Branch 311 + 311: Label + Branch 294 + 327: Label + 331: 7(fvec4) Load 330(bigColor5) + 332: 7(fvec4) Load 9(color) + 333: 7(fvec4) FAdd 332 331 + Store 9(color) 333 + 334: 21(ptr) AccessChain 9(color) 107 + 335: 6(float) Load 334 + 337: 6(float) Load 336(d5) + 338: 17(bool) FOrdLessThan 335 337 + SelectionMerge 340 None + BranchConditional 338 339 340 + 328: Label + 350: 21(ptr) AccessChain 9(color) 20 + 351: 6(float) Load 350 + 353: 6(float) Load 352(d6) + 354: 17(bool) FOrdLessThan 351 353 + SelectionMerge 356 None + BranchConditional 354 355 369 + 329: Label + 346: 21(ptr) AccessChain 9(color) 20 + 347: 6(float) Load 346 + 348: 6(float) Load 336(d5) + 349: 17(bool) FOrdLessThan 347 348 + LoopMerge 328 329 None + BranchConditional 349 327 328 + 339: Label + 341: 6(float) Load 336(d5) + 342: 21(ptr) AccessChain 9(color) 107 + 343: 6(float) Load 342 + 344: 6(float) FAdd 343 341 + 345: 21(ptr) AccessChain 9(color) 107 + Store 345 344 + Branch 340 + 340: Label + Branch 329 + 355: Label + Branch 360 + 357: Label + 366: 7(fvec4) Load 365(bigColor6) + 367: 7(fvec4) Load 9(color) + 368: 7(fvec4) FAdd 367 366 + Store 9(color) 368 + Branch 359 + 358: Label + Branch 356 + 359: Label + Branch 360 + 360: Label + 361: 21(ptr) AccessChain 9(color) 107 + 362: 6(float) Load 361 + 363: 6(float) Load 352(d6) + 364: 17(bool) FOrdLessThan 362 363 + LoopMerge 358 359 None + BranchConditional 364 357 358 + 369: Label + Branch 373 + 370: Label + 378: 51(ptr) AccessChain 365(bigColor6) 64 + 379: 6(float) Load 378 + 380: 21(ptr) AccessChain 9(color) 64 + 381: 6(float) Load 380 + 382: 6(float) FAdd 381 379 + 383: 21(ptr) AccessChain 9(color) 64 + Store 383 382 + Branch 372 + 371: Label + Branch 356 + 372: Label + Branch 373 + 373: Label + 374: 21(ptr) AccessChain 9(color) 64 + 375: 6(float) Load 374 + 376: 6(float) Load 352(d6) + 377: 17(bool) FOrdLessThan 375 376 + LoopMerge 371 372 None + BranchConditional 377 370 371 + 356: Label + 384: 21(ptr) AccessChain 9(color) 20 + 385: 6(float) Load 384 + 386: 6(float) Load 352(d6) + 387: 17(bool) FOrdLessThan 385 386 + SelectionMerge 389 None + BranchConditional 387 388 407 + 388: Label + Branch 393 + 390: Label + 398: 7(fvec4) Load 365(bigColor6) + 399: 7(fvec4) Load 9(color) + 400: 7(fvec4) FAdd 399 398 + Store 9(color) 400 + 402: 6(float) Load 401(d7) + 403: 17(bool) FOrdLessThan 402 93 + SelectionMerge 405 None + BranchConditional 403 404 405 + 391: Label + Branch 389 + 392: Label + Branch 393 + 393: Label + 394: 21(ptr) AccessChain 9(color) 107 + 395: 6(float) Load 394 + 396: 6(float) Load 352(d6) + 397: 17(bool) FOrdLessThan 395 396 + LoopMerge 391 392 None + BranchConditional 397 390 391 + 404: Label + Branch 391 + 405: Label + Branch 392 + 407: Label + Branch 411 + 408: Label + 416: 51(ptr) AccessChain 365(bigColor6) 64 + 417: 6(float) Load 416 + 418: 21(ptr) AccessChain 9(color) 64 + 419: 6(float) Load 418 + 420: 6(float) FAdd 419 417 + 421: 21(ptr) AccessChain 9(color) 64 + Store 421 420 + Branch 410 + 409: Label + Branch 389 + 410: Label + Branch 411 + 411: Label + 412: 21(ptr) AccessChain 9(color) 64 + 413: 6(float) Load 412 + 414: 6(float) Load 352(d6) + 415: 17(bool) FOrdLessThan 413 414 + LoopMerge 409 410 None + BranchConditional 415 408 409 + 389: Label + Branch 422 + 422: Label + 425: 6(float) Load 401(d7) + 427: 17(bool) FOrdLessThan 425 426 + SelectionMerge 429 None + BranchConditional 427 428 429 + 423: Label + Branch 446 + 424: Label + LoopMerge 423 424 None + BranchConditional 18 422 423 + 428: Label + Branch 423 + 429: Label + 432: 7(fvec4) Load 431(bigColor7) + 433: 7(fvec4) Load 9(color) + 434: 7(fvec4) FAdd 433 432 + Store 9(color) 434 + 435: 6(float) Load 401(d7) + 436: 17(bool) FOrdLessThan 435 93 + SelectionMerge 438 None + BranchConditional 436 437 438 + 437: Label + 439: 21(ptr) AccessChain 9(color) 64 + 440: 6(float) Load 439 + 441: 6(float) FAdd 440 93 + Store 439 441 + Branch 423 + 438: Label + 443: 7(fvec4) Load 11(BaseColor) + 444: 7(fvec4) Load 9(color) + 445: 7(fvec4) FAdd 444 443 + Store 9(color) 445 + Branch 424 + 446: Label + 450: 6(float) Load 449(d8) + 451: 17(bool) FOrdLessThan 450 426 + SelectionMerge 453 None + BranchConditional 451 452 453 + 447: Label + Branch 488 + 448: Label + 481: 21(ptr) AccessChain 9(color) 64 + 482: 6(float) Load 481 + 483: 6(float) Load 449(d8) + 484: 17(bool) FOrdLessThan 482 483 + LoopMerge 447 448 None + BranchConditional 484 446 447 + 452: Label + Branch 447 + 453: Label + 455: 7(fvec4) Load 431(bigColor7) + 456: 7(fvec4) Load 9(color) + 457: 7(fvec4) FAdd 456 455 + Store 9(color) 457 + 458: 6(float) Load 449(d8) + 459: 17(bool) FOrdLessThan 458 93 + SelectionMerge 461 None + BranchConditional 459 460 461 + 460: Label + 462: 21(ptr) AccessChain 9(color) 64 + 463: 6(float) Load 462 + 464: 6(float) FAdd 463 93 + Store 462 464 + 465: 6(float) Load 449(d8) + 467: 17(bool) FOrdLessThan 465 466 + SelectionMerge 469 None + BranchConditional 467 468 473 + 468: Label + 470: 21(ptr) AccessChain 9(color) 107 + 471: 6(float) Load 470 + 472: 6(float) FAdd 471 93 + Store 470 472 + Branch 469 + 473: Label + 474: 21(ptr) AccessChain 9(color) 20 + 475: 6(float) Load 474 + 476: 6(float) FAdd 475 93 + Store 474 476 + Branch 469 + 469: Label + Branch 447 + 461: Label + 478: 7(fvec4) Load 11(BaseColor) + 479: 7(fvec4) Load 9(color) + 480: 7(fvec4) FAdd 479 478 + Store 9(color) 480 + Branch 448 + 485: Label + 494: 6(float) Load 491(d9) + 495: 6(float) Load 449(d8) + 496: 17(bool) FOrdGreaterThan 494 495 + SelectionMerge 498 None + BranchConditional 496 497 498 + 486: Label + Branch 519 + 487: Label + Branch 488 + 488: Label + 489: 21(ptr) AccessChain 9(color) 73 + 490: 6(float) Load 489 + 492: 6(float) Load 491(d9) + 493: 17(bool) FOrdLessThan 490 492 + LoopMerge 486 487 None + BranchConditional 493 485 486 + 497: Label + 499: 21(ptr) AccessChain 9(color) 20 + 500: 6(float) Load 499 + 501: 6(float) Load 401(d7) + 502: 17(bool) FOrdLessThanEqual 500 501 + SelectionMerge 504 None + BranchConditional 502 503 504 + 503: Label + 505: 21(ptr) AccessChain 9(color) 64 + 506: 6(float) Load 505 + 508: 17(bool) FOrdEqual 506 507 + SelectionMerge 510 None + BranchConditional 508 509 514 + 509: Label + 511: 21(ptr) AccessChain 9(color) 73 + 512: 6(float) Load 511 + 513: 6(float) FAdd 512 93 + Store 511 513 + Branch 510 + 514: Label + Branch 486 + 510: Label + Branch 504 + 504: Label + Branch 498 + 498: Label + Branch 487 + 516: Label + 525: 21(ptr) AccessChain 9(color) 107 + 526: 6(float) Load 525 + 527: 6(float) FAdd 526 93 + Store 525 527 + 528: 21(ptr) AccessChain 9(color) 107 + 529: 6(float) Load 528 + 531: 6(float) Load 530(d11) + 532: 17(bool) FOrdLessThan 529 531 + SelectionMerge 534 None + BranchConditional 532 533 534 + 517: Label + Branch 560 + 518: Label + Branch 519 + 519: Label + 520: 21(ptr) AccessChain 9(color) 64 + 521: 6(float) Load 520 + 523: 6(float) Load 522(d10) + 524: 17(bool) FOrdLessThan 521 523 + LoopMerge 517 518 None + BranchConditional 524 516 517 + 533: Label + 535: 21(ptr) AccessChain 9(color) 64 + 536: 6(float) Load 535 + 537: 6(float) FAdd 536 93 + Store 535 537 + 538: 21(ptr) AccessChain 9(color) 73 + 539: 6(float) Load 538 + 541: 6(float) Load 540(d12) + 542: 17(bool) FOrdLessThan 539 541 + SelectionMerge 544 None + BranchConditional 542 543 548 + 543: Label + 545: 21(ptr) AccessChain 9(color) 73 + 546: 6(float) Load 545 + 547: 6(float) FAdd 546 93 + Store 545 547 + Branch 544 + 548: Label + 549: 21(ptr) AccessChain 9(color) 20 + 550: 6(float) Load 549 + 551: 6(float) FAdd 550 93 + Store 549 551 + Branch 544 + 544: Label + Branch 518 + 534: Label + 553: 7(fvec4) Load 9(color) + 554: 7(fvec4) CompositeConstruct 93 93 93 93 + 555: 7(fvec4) FAdd 553 554 + Store 9(color) 555 + Branch 517 + 557: Label + 566: 7(fvec4) Load 565(bigColor8) + 567: 7(fvec4) Load 9(color) + 568: 7(fvec4) FAdd 567 566 + Store 9(color) 568 + 569: 21(ptr) AccessChain 9(color) 64 + 570: 6(float) Load 569 + 571: 6(float) Load 449(d8) + 572: 17(bool) FOrdLessThan 570 571 + SelectionMerge 574 None + BranchConditional 572 573 574 + 558: Label + 588: 7(fvec4) Load 9(color) + 589: 7(fvec4) CompositeConstruct 93 93 93 93 + 590: 7(fvec4) FAdd 588 589 + Store 9(color) 590 + 593: 7(fvec4) Load 9(color) + Store 592(gl_FragColor) 593 + Branch 597 + 559: Label + Branch 560 + 560: Label + 561: 21(ptr) AccessChain 9(color) 20 + 562: 6(float) Load 561 + 564: 17(bool) FOrdLessThan 562 563 + LoopMerge 558 559 None + BranchConditional 564 557 558 + 573: Label + 575: 21(ptr) AccessChain 9(color) 73 + 576: 6(float) Load 575 + 577: 6(float) Load 352(d6) + 578: 17(bool) FOrdLessThan 576 577 + SelectionMerge 580 None + BranchConditional 578 579 580 + 579: Label + Branch 559 + 580: Label + Branch 574 + 574: Label + 582: 51(ptr) AccessChain 565(bigColor8) 20 + 583: 6(float) Load 582 + 584: 21(ptr) AccessChain 9(color) 107 + 585: 6(float) Load 584 + 586: 6(float) FAdd 585 583 + 587: 21(ptr) AccessChain 9(color) 107 + Store 587 586 + Branch 559 + 594: Label + 603: 21(ptr) AccessChain 9(color) 107 + 604: 6(float) Load 603 + 606: 6(float) Load 605(d15) + 607: 17(bool) FOrdLessThan 604 606 + SelectionMerge 609 None + BranchConditional 607 608 611 + 595: Label + 615: 7(fvec4) Load 9(color) + 616: 7(fvec4) CompositeConstruct 93 93 93 93 + 617: 7(fvec4) FAdd 615 616 + Store 9(color) 617 + Branch 621 + 596: Label + Branch 597 + 597: Label + 598: 21(ptr) AccessChain 9(color) 20 + 599: 6(float) Load 598 + 601: 6(float) Load 600(d14) + 602: 17(bool) FOrdLessThan 599 601 + LoopMerge 595 596 None + BranchConditional 602 594 595 + 608: Label + Return + 611: Label + 612: 7(fvec4) Load 9(color) + 613: 7(fvec4) CompositeConstruct 93 93 93 93 + 614: 7(fvec4) FAdd 612 613 + Store 9(color) 614 + Branch 609 + 609: Label + Branch 596 + 618: Label + 627: 21(ptr) AccessChain 9(color) 73 + 628: 6(float) Load 627 + 629: 6(float) FAdd 628 93 + Store 627 629 + Branch 620 + 619: Label + Branch 633 + 620: Label + Branch 621 + 621: Label + 622: 21(ptr) AccessChain 9(color) 73 + 623: 6(float) Load 622 + 625: 6(float) Load 624(d16) + 626: 17(bool) FOrdLessThan 623 625 + LoopMerge 619 620 None + BranchConditional 626 618 619 + 630: Label + 645: 7(fvec4) Load 114(bigColor1_2) + 646: 7(fvec4) Load 9(color) + 647: 7(fvec4) FAdd 646 645 + Store 9(color) 647 + 648: 21(ptr) AccessChain 9(color) 64 + 649: 6(float) Load 648 + 650: 6(float) Load 110(d3) + 651: 17(bool) FOrdLessThan 649 650 + SelectionMerge 653 None + BranchConditional 651 652 653 + 631: Label + Branch 655 + 632: Label + Branch 633 + 633: Label + 634: 21(ptr) AccessChain 9(color) 73 + 635: 6(float) Load 634 + 636: 6(float) Load 102(d2) + 637: 17(bool) FOrdLessThan 635 636 + SelectionMerge 639 None + BranchConditional 637 638 639 + 638: Label + 640: 21(ptr) AccessChain 9(color) 107 + 641: 6(float) Load 640 + 642: 6(float) Load 110(d3) + 643: 17(bool) FOrdLessThan 641 642 + Branch 639 + 639: Label + 644: 17(bool) Phi 637 633 643 638 + LoopMerge 631 632 None + BranchConditional 644 630 631 + 652: Label + Return + 653: Label + Branch 632 + 655: Label + 658: 21(ptr) AccessChain 9(color) 107 + 659: 6(float) Load 658 + 661: 6(float) Load 660(d18) + 662: 17(bool) FOrdLessThan 659 661 + SelectionMerge 664 None + BranchConditional 662 663 664 + 656: Label + Branch 677 + 657: Label + 669: 21(ptr) AccessChain 9(color) 20 + 670: 6(float) Load 669 + 672: 6(float) Load 671(d17) + 673: 17(bool) FOrdLessThan 670 672 + LoopMerge 656 657 None + BranchConditional 673 655 656 + 663: Label + Return + 664: Label + 666: 7(fvec4) Load 9(color) + 667: 7(fvec4) CompositeConstruct 93 93 93 93 + 668: 7(fvec4) FAdd 666 667 + Store 9(color) 668 + Branch 657 + 674: Label + 682: 21(ptr) AccessChain 9(color) 73 + 683: 6(float) Load 682 + 684: 6(float) Load 624(d16) + 685: 17(bool) FOrdLessThan 683 684 + SelectionMerge 687 None + BranchConditional 685 686 689 + 675: Label + 693: 7(fvec4) Load 9(color) + 694: 7(fvec4) CompositeConstruct 93 93 93 93 + 695: 7(fvec4) FAdd 693 694 + Store 9(color) 695 + 696: 7(fvec4) Load 9(color) + Store 592(gl_FragColor) 696 + Return + 676: Label + Branch 677 + 677: Label + 678: 21(ptr) AccessChain 9(color) 107 + 679: 6(float) Load 678 + 680: 6(float) Load 624(d16) + 681: 17(bool) FOrdLessThan 679 680 + LoopMerge 675 676 None + BranchConditional 681 674 675 + 686: Label + Kill + 689: Label + 690: 7(fvec4) Load 9(color) + 691: 7(fvec4) CompositeConstruct 93 93 93 93 + 692: 7(fvec4) FAdd 690 691 + Store 9(color) 692 + Branch 687 + 687: Label + Branch 676 + FunctionEnd diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index 314a9691..ff7a8f2f 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -1,308 +1,299 @@ -spv.loopsArtificial.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release - - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 191 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 - ExecutionMode 4 OriginLowerLeft - Source GLSL 130 - Name 4 "main" - Name 9 "color" - Name 11 "BaseColor" - Name 27 "d4" - Name 32 "bigColor4" - Name 84 "d13" - Name 144 "gl_FragColor" - Name 146 "bigColor" - Name 147 "bigColor1_1" - Name 148 "bigColor1_2" - Name 149 "bigColor1_3" - Name 150 "bigColor2" - Name 151 "bigColor3" - Name 152 "bigColor5" - Name 153 "bigColor6" - Name 154 "bigColor7" - Name 155 "bigColor8" - Name 156 "d" - Name 157 "d2" - Name 158 "d3" - Name 159 "d5" - Name 160 "d6" - Name 161 "d7" - Name 162 "d8" - Name 163 "d9" - Name 164 "d10" - Name 165 "d11" - Name 166 "d12" - Name 167 "d14" - Name 168 "d15" - Name 169 "d16" - Name 170 "d17" - Name 171 "d18" - Name 172 "d19" - Name 173 "d20" - Name 174 "d21" - Name 175 "d22" - Name 176 "d23" - Name 177 "d24" - Name 178 "d25" - Name 179 "d26" - Name 180 "d27" - Name 181 "d28" - Name 182 "d29" - Name 183 "d30" - Name 184 "d31" - Name 185 "d32" - Name 186 "d33" - Name 187 "d34" - Name 190 "Count" - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 10: TypePointer Input 7(fvec4) - 11(BaseColor): 10(ptr) Variable Input - 17: TypeBool - 18: 17(bool) ConstantTrue - 21: TypeInt 32 0 - 22: 21(int) Constant 2 - 23: TypePointer Function 6(float) - 26: TypePointer UniformConstant 6(float) - 27(d4): 26(ptr) Variable UniformConstant - 31: TypePointer UniformConstant 7(fvec4) - 32(bigColor4): 31(ptr) Variable UniformConstant - 36: 21(int) Constant 0 - 43: 6(float) Constant 1073741824 - 56: 6(float) Constant 1065353216 - 58: 17(bool) ConstantFalse - 60: 21(int) Constant 1 - 81: 21(int) Constant 3 - 84(d13): 26(ptr) Variable UniformConstant - 143: TypePointer Output 7(fvec4) -144(gl_FragColor): 143(ptr) Variable Output - 146(bigColor): 31(ptr) Variable UniformConstant -147(bigColor1_1): 31(ptr) Variable UniformConstant -148(bigColor1_2): 31(ptr) Variable UniformConstant -149(bigColor1_3): 31(ptr) Variable UniformConstant - 150(bigColor2): 31(ptr) Variable UniformConstant - 151(bigColor3): 31(ptr) Variable UniformConstant - 152(bigColor5): 31(ptr) Variable UniformConstant - 153(bigColor6): 31(ptr) Variable UniformConstant - 154(bigColor7): 31(ptr) Variable UniformConstant - 155(bigColor8): 31(ptr) Variable UniformConstant - 156(d): 26(ptr) Variable UniformConstant - 157(d2): 26(ptr) Variable UniformConstant - 158(d3): 26(ptr) Variable UniformConstant - 159(d5): 26(ptr) Variable UniformConstant - 160(d6): 26(ptr) Variable UniformConstant - 161(d7): 26(ptr) Variable UniformConstant - 162(d8): 26(ptr) Variable UniformConstant - 163(d9): 26(ptr) Variable UniformConstant - 164(d10): 26(ptr) Variable UniformConstant - 165(d11): 26(ptr) Variable UniformConstant - 166(d12): 26(ptr) Variable UniformConstant - 167(d14): 26(ptr) Variable UniformConstant - 168(d15): 26(ptr) Variable UniformConstant - 169(d16): 26(ptr) Variable UniformConstant - 170(d17): 26(ptr) Variable UniformConstant - 171(d18): 26(ptr) Variable UniformConstant - 172(d19): 26(ptr) Variable UniformConstant - 173(d20): 26(ptr) Variable UniformConstant - 174(d21): 26(ptr) Variable UniformConstant - 175(d22): 26(ptr) Variable UniformConstant - 176(d23): 26(ptr) Variable UniformConstant - 177(d24): 26(ptr) Variable UniformConstant - 178(d25): 26(ptr) Variable UniformConstant - 179(d26): 26(ptr) Variable UniformConstant - 180(d27): 26(ptr) Variable UniformConstant - 181(d28): 26(ptr) Variable UniformConstant - 182(d29): 26(ptr) Variable UniformConstant - 183(d30): 26(ptr) Variable UniformConstant - 184(d31): 26(ptr) Variable UniformConstant - 185(d32): 26(ptr) Variable UniformConstant - 186(d33): 26(ptr) Variable UniformConstant - 187(d34): 26(ptr) Variable UniformConstant - 188: TypeInt 32 1 - 189: TypePointer UniformConstant 188(int) - 190(Count): 189(ptr) Variable UniformConstant - 4(main): 2 Function None 3 - 5: Label - 9(color): 8(ptr) Variable Function - 12: 7(fvec4) Load 11(BaseColor) - Store 9(color) 12 - Branch 13 - 13: Label - 16: 17(bool) Phi 18 5 58 52 58 66 - LoopMerge 14 13 None - Branch 19 - 19: Label - SelectionMerge 15 None - BranchConditional 16 15 20 - 20: Label - 24: 23(ptr) AccessChain 9(color) 22 - 25: 6(float) Load 24 - 28: 6(float) Load 27(d4) - 29: 17(bool) FOrdLessThan 25 28 - SelectionMerge 30 None - BranchConditional 29 30 14 - 30: Label - Branch 15 - 15: Label - 33: 7(fvec4) Load 32(bigColor4) - 34: 7(fvec4) Load 9(color) - 35: 7(fvec4) FAdd 34 33 - Store 9(color) 35 - 37: 23(ptr) AccessChain 9(color) 36 - 38: 6(float) Load 37 - 39: 6(float) Load 27(d4) - 40: 17(bool) FOrdLessThan 38 39 - SelectionMerge 42 None - BranchConditional 40 41 42 - 41: Label - 44: 23(ptr) AccessChain 9(color) 22 - 45: 6(float) Load 44 - 46: 6(float) FAdd 45 43 - 47: 23(ptr) AccessChain 9(color) 22 - Store 47 46 - 48: 23(ptr) AccessChain 9(color) 22 - 49: 6(float) Load 48 - 50: 6(float) Load 27(d4) - 51: 17(bool) FOrdLessThan 49 50 - SelectionMerge 53 None - BranchConditional 51 52 53 - 52: Label - 54: 23(ptr) AccessChain 9(color) 36 - 55: 6(float) Load 54 - 57: 6(float) FAdd 55 56 - Store 54 57 - Branch 13 - 53: Label - Branch 42 - 42: Label - 61: 23(ptr) AccessChain 9(color) 60 - 62: 6(float) Load 61 - 63: 6(float) Load 27(d4) - 64: 17(bool) FOrdLessThan 62 63 - SelectionMerge 66 None - BranchConditional 64 65 72 - 65: Label - 67: 6(float) Load 27(d4) - 68: 23(ptr) AccessChain 9(color) 60 - 69: 6(float) Load 68 - 70: 6(float) FAdd 69 67 - 71: 23(ptr) AccessChain 9(color) 60 - Store 71 70 - Branch 66 - 72: Label - 73: 6(float) Load 27(d4) - 74: 23(ptr) AccessChain 9(color) 36 - 75: 6(float) Load 74 - 76: 6(float) FAdd 75 73 - 77: 23(ptr) AccessChain 9(color) 36 - Store 77 76 - Branch 66 - 66: Label - Branch 13 - 14: Label - Branch 78 - 78: Label - 82: 23(ptr) AccessChain 9(color) 81 - 83: 6(float) Load 82 - 85: 6(float) Load 84(d13) - 86: 17(bool) FOrdLessThan 83 85 - LoopMerge 79 78 None - BranchConditional 86 80 79 - 80: Label - 87: 23(ptr) AccessChain 9(color) 22 - 88: 6(float) Load 87 - 89: 6(float) Load 84(d13) - 90: 17(bool) FOrdLessThan 88 89 - SelectionMerge 92 None - BranchConditional 90 91 96 - 91: Label - 93: 7(fvec4) Load 9(color) - 94: 7(fvec4) CompositeConstruct 56 56 56 56 - 95: 7(fvec4) FAdd 93 94 - Store 9(color) 95 - Branch 92 - 96: Label - 97: 7(fvec4) Load 9(color) - 98: 7(fvec4) CompositeConstruct 56 56 56 56 - 99: 7(fvec4) FSub 97 98 - Store 9(color) 99 - Branch 92 - 92: Label - 100: 7(fvec4) Load 32(bigColor4) - 101: 7(fvec4) Load 9(color) - 102: 7(fvec4) FAdd 101 100 - Store 9(color) 102 - 103: 23(ptr) AccessChain 9(color) 36 - 104: 6(float) Load 103 - 105: 6(float) Load 27(d4) - 106: 17(bool) FOrdLessThan 104 105 - SelectionMerge 108 None - BranchConditional 106 107 108 - 107: Label - 109: 23(ptr) AccessChain 9(color) 22 - 110: 6(float) Load 109 - 111: 6(float) FAdd 110 43 - 112: 23(ptr) AccessChain 9(color) 22 - Store 112 111 - 113: 23(ptr) AccessChain 9(color) 22 - 114: 6(float) Load 113 - 115: 6(float) Load 27(d4) - 116: 17(bool) FOrdLessThan 114 115 - SelectionMerge 118 None - BranchConditional 116 117 118 - 117: Label - 119: 23(ptr) AccessChain 9(color) 36 - 120: 6(float) Load 119 - 121: 6(float) FAdd 120 56 - Store 119 121 - Branch 78 - 118: Label - Branch 108 - 108: Label - 123: 23(ptr) AccessChain 9(color) 60 - 124: 6(float) Load 123 - 125: 6(float) Load 27(d4) - 126: 17(bool) FOrdLessThan 124 125 - SelectionMerge 128 None - BranchConditional 126 127 134 - 127: Label - 129: 6(float) Load 27(d4) - 130: 23(ptr) AccessChain 9(color) 60 - 131: 6(float) Load 130 - 132: 6(float) FAdd 131 129 - 133: 23(ptr) AccessChain 9(color) 60 - Store 133 132 - Branch 128 - 134: Label - 135: 6(float) Load 27(d4) - 136: 23(ptr) AccessChain 9(color) 36 - 137: 6(float) Load 136 - 138: 6(float) FAdd 137 135 - 139: 23(ptr) AccessChain 9(color) 36 - Store 139 138 - Branch 128 - 128: Label - Branch 78 - 79: Label - 140: 7(fvec4) Load 9(color) - 141: 7(fvec4) CompositeConstruct 56 56 56 56 - 142: 7(fvec4) FAdd 140 141 - Store 9(color) 142 - 145: 7(fvec4) Load 9(color) - Store 144(gl_FragColor) 145 - Return - FunctionEnd +spv.loopsArtificial.frag +WARNING: 0:14: varying deprecated in version 130; may be removed in future release + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 186 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 11 + ExecutionMode 4 OriginLowerLeft + Source GLSL 130 + Name 4 "main" + Name 9 "color" + Name 11 "BaseColor" + Name 17 "bigColor4" + Name 27 "d4" + Name 79 "d13" + Name 139 "gl_FragColor" + Name 141 "bigColor" + Name 142 "bigColor1_1" + Name 143 "bigColor1_2" + Name 144 "bigColor1_3" + Name 145 "bigColor2" + Name 146 "bigColor3" + Name 147 "bigColor5" + Name 148 "bigColor6" + Name 149 "bigColor7" + Name 150 "bigColor8" + Name 151 "d" + Name 152 "d2" + Name 153 "d3" + Name 154 "d5" + Name 155 "d6" + Name 156 "d7" + Name 157 "d8" + Name 158 "d9" + Name 159 "d10" + Name 160 "d11" + Name 161 "d12" + Name 162 "d14" + Name 163 "d15" + Name 164 "d16" + Name 165 "d17" + Name 166 "d18" + Name 167 "d19" + Name 168 "d20" + Name 169 "d21" + Name 170 "d22" + Name 171 "d23" + Name 172 "d24" + Name 173 "d25" + Name 174 "d26" + Name 175 "d27" + Name 176 "d28" + Name 177 "d29" + Name 178 "d30" + Name 179 "d31" + Name 180 "d32" + Name 181 "d33" + Name 182 "d34" + Name 185 "Count" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 10: TypePointer Input 7(fvec4) + 11(BaseColor): 10(ptr) Variable Input + 16: TypePointer UniformConstant 7(fvec4) + 17(bigColor4): 16(ptr) Variable UniformConstant + 21: TypeInt 32 0 + 22: 21(int) Constant 0 + 23: TypePointer Function 6(float) + 26: TypePointer UniformConstant 6(float) + 27(d4): 26(ptr) Variable UniformConstant + 29: TypeBool + 33: 6(float) Constant 1073741824 + 34: 21(int) Constant 2 + 47: 6(float) Constant 1065353216 + 50: 21(int) Constant 1 + 76: 21(int) Constant 3 + 79(d13): 26(ptr) Variable UniformConstant + 138: TypePointer Output 7(fvec4) +139(gl_FragColor): 138(ptr) Variable Output + 141(bigColor): 16(ptr) Variable UniformConstant +142(bigColor1_1): 16(ptr) Variable UniformConstant +143(bigColor1_2): 16(ptr) Variable UniformConstant +144(bigColor1_3): 16(ptr) Variable UniformConstant + 145(bigColor2): 16(ptr) Variable UniformConstant + 146(bigColor3): 16(ptr) Variable UniformConstant + 147(bigColor5): 16(ptr) Variable UniformConstant + 148(bigColor6): 16(ptr) Variable UniformConstant + 149(bigColor7): 16(ptr) Variable UniformConstant + 150(bigColor8): 16(ptr) Variable UniformConstant + 151(d): 26(ptr) Variable UniformConstant + 152(d2): 26(ptr) Variable UniformConstant + 153(d3): 26(ptr) Variable UniformConstant + 154(d5): 26(ptr) Variable UniformConstant + 155(d6): 26(ptr) Variable UniformConstant + 156(d7): 26(ptr) Variable UniformConstant + 157(d8): 26(ptr) Variable UniformConstant + 158(d9): 26(ptr) Variable UniformConstant + 159(d10): 26(ptr) Variable UniformConstant + 160(d11): 26(ptr) Variable UniformConstant + 161(d12): 26(ptr) Variable UniformConstant + 162(d14): 26(ptr) Variable UniformConstant + 163(d15): 26(ptr) Variable UniformConstant + 164(d16): 26(ptr) Variable UniformConstant + 165(d17): 26(ptr) Variable UniformConstant + 166(d18): 26(ptr) Variable UniformConstant + 167(d19): 26(ptr) Variable UniformConstant + 168(d20): 26(ptr) Variable UniformConstant + 169(d21): 26(ptr) Variable UniformConstant + 170(d22): 26(ptr) Variable UniformConstant + 171(d23): 26(ptr) Variable UniformConstant + 172(d24): 26(ptr) Variable UniformConstant + 173(d25): 26(ptr) Variable UniformConstant + 174(d26): 26(ptr) Variable UniformConstant + 175(d27): 26(ptr) Variable UniformConstant + 176(d28): 26(ptr) Variable UniformConstant + 177(d29): 26(ptr) Variable UniformConstant + 178(d30): 26(ptr) Variable UniformConstant + 179(d31): 26(ptr) Variable UniformConstant + 180(d32): 26(ptr) Variable UniformConstant + 181(d33): 26(ptr) Variable UniformConstant + 182(d34): 26(ptr) Variable UniformConstant + 183: TypeInt 32 1 + 184: TypePointer UniformConstant 183(int) + 185(Count): 184(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(color): 8(ptr) Variable Function + 12: 7(fvec4) Load 11(BaseColor) + Store 9(color) 12 + Branch 13 + 13: Label + 18: 7(fvec4) Load 17(bigColor4) + 19: 7(fvec4) Load 9(color) + 20: 7(fvec4) FAdd 19 18 + Store 9(color) 20 + 24: 23(ptr) AccessChain 9(color) 22 + 25: 6(float) Load 24 + 28: 6(float) Load 27(d4) + 30: 29(bool) FOrdLessThan 25 28 + SelectionMerge 32 None + BranchConditional 30 31 32 + 14: Label + Branch 75 + 15: Label + 68: 23(ptr) AccessChain 9(color) 34 + 69: 6(float) Load 68 + 70: 6(float) Load 27(d4) + 71: 29(bool) FOrdLessThan 69 70 + LoopMerge 14 15 None + BranchConditional 71 13 14 + 31: Label + 35: 23(ptr) AccessChain 9(color) 34 + 36: 6(float) Load 35 + 37: 6(float) FAdd 36 33 + 38: 23(ptr) AccessChain 9(color) 34 + Store 38 37 + 39: 23(ptr) AccessChain 9(color) 34 + 40: 6(float) Load 39 + 41: 6(float) Load 27(d4) + 42: 29(bool) FOrdLessThan 40 41 + SelectionMerge 44 None + BranchConditional 42 43 44 + 43: Label + 45: 23(ptr) AccessChain 9(color) 22 + 46: 6(float) Load 45 + 48: 6(float) FAdd 46 47 + Store 45 48 + Branch 15 + 44: Label + Branch 32 + 32: Label + 51: 23(ptr) AccessChain 9(color) 50 + 52: 6(float) Load 51 + 53: 6(float) Load 27(d4) + 54: 29(bool) FOrdLessThan 52 53 + SelectionMerge 56 None + BranchConditional 54 55 62 + 55: Label + 57: 6(float) Load 27(d4) + 58: 23(ptr) AccessChain 9(color) 50 + 59: 6(float) Load 58 + 60: 6(float) FAdd 59 57 + 61: 23(ptr) AccessChain 9(color) 50 + Store 61 60 + Branch 56 + 62: Label + 63: 6(float) Load 27(d4) + 64: 23(ptr) AccessChain 9(color) 22 + 65: 6(float) Load 64 + 66: 6(float) FAdd 65 63 + 67: 23(ptr) AccessChain 9(color) 22 + Store 67 66 + Branch 56 + 56: Label + Branch 15 + 72: Label + 82: 23(ptr) AccessChain 9(color) 34 + 83: 6(float) Load 82 + 84: 6(float) Load 79(d13) + 85: 29(bool) FOrdLessThan 83 84 + SelectionMerge 87 None + BranchConditional 85 86 91 + 73: Label + 135: 7(fvec4) Load 9(color) + 136: 7(fvec4) CompositeConstruct 47 47 47 47 + 137: 7(fvec4) FAdd 135 136 + Store 9(color) 137 + 140: 7(fvec4) Load 9(color) + Store 139(gl_FragColor) 140 + Return + 74: Label + Branch 75 + 75: Label + 77: 23(ptr) AccessChain 9(color) 76 + 78: 6(float) Load 77 + 80: 6(float) Load 79(d13) + 81: 29(bool) FOrdLessThan 78 80 + LoopMerge 73 74 None + BranchConditional 81 72 73 + 86: Label + 88: 7(fvec4) Load 9(color) + 89: 7(fvec4) CompositeConstruct 47 47 47 47 + 90: 7(fvec4) FAdd 88 89 + Store 9(color) 90 + Branch 87 + 91: Label + 92: 7(fvec4) Load 9(color) + 93: 7(fvec4) CompositeConstruct 47 47 47 47 + 94: 7(fvec4) FSub 92 93 + Store 9(color) 94 + Branch 87 + 87: Label + 95: 7(fvec4) Load 17(bigColor4) + 96: 7(fvec4) Load 9(color) + 97: 7(fvec4) FAdd 96 95 + Store 9(color) 97 + 98: 23(ptr) AccessChain 9(color) 22 + 99: 6(float) Load 98 + 100: 6(float) Load 27(d4) + 101: 29(bool) FOrdLessThan 99 100 + SelectionMerge 103 None + BranchConditional 101 102 103 + 102: Label + 104: 23(ptr) AccessChain 9(color) 34 + 105: 6(float) Load 104 + 106: 6(float) FAdd 105 33 + 107: 23(ptr) AccessChain 9(color) 34 + Store 107 106 + 108: 23(ptr) AccessChain 9(color) 34 + 109: 6(float) Load 108 + 110: 6(float) Load 27(d4) + 111: 29(bool) FOrdLessThan 109 110 + SelectionMerge 113 None + BranchConditional 111 112 113 + 112: Label + 114: 23(ptr) AccessChain 9(color) 22 + 115: 6(float) Load 114 + 116: 6(float) FAdd 115 47 + Store 114 116 + Branch 74 + 113: Label + Branch 103 + 103: Label + 118: 23(ptr) AccessChain 9(color) 50 + 119: 6(float) Load 118 + 120: 6(float) Load 27(d4) + 121: 29(bool) FOrdLessThan 119 120 + SelectionMerge 123 None + BranchConditional 121 122 129 + 122: Label + 124: 6(float) Load 27(d4) + 125: 23(ptr) AccessChain 9(color) 50 + 126: 6(float) Load 125 + 127: 6(float) FAdd 126 124 + 128: 23(ptr) AccessChain 9(color) 50 + Store 128 127 + Branch 123 + 129: Label + 130: 6(float) Load 27(d4) + 131: 23(ptr) AccessChain 9(color) 22 + 132: 6(float) Load 131 + 133: 6(float) FAdd 132 130 + 134: 23(ptr) AccessChain 9(color) 22 + Store 134 133 + Branch 123 + 123: Label + Branch 74 + FunctionEnd diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index 97cbcf91..bc91acc5 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -1,400 +1,404 @@ -spv.switch.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. -WARNING: 0:121: 'switch' : last case/default label not followed by statements -WARNING: 0:134: 'switch' : last case/default label not followed by statements -WARNING: 0:139: 'switch' : last case/default label not followed by statements - - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 263 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 73 221 - ExecutionMode 4 OriginLowerLeft - Source ESSL 310 - Name 4 "main" - Name 15 "foo1(vf4;vf4;i1;" - Name 12 "v1" - Name 13 "v2" - Name 14 "i1" - Name 20 "foo2(vf4;vf4;i1;" - Name 17 "v1" - Name 18 "v2" - Name 19 "i1" - Name 58 "local" - Name 60 "c" - Name 71 "f" - Name 73 "x" - Name 127 "d" - Name 153 "i" - Name 171 "j" - Name 221 "color" - Name 227 "v" - Name 228 "param" - Name 230 "param" - Name 232 "param" - Name 240 "param" - Name 242 "param" - Name 244 "param" - Decorate 58(local) RelaxedPrecision - Decorate 60(c) RelaxedPrecision - Decorate 71(f) RelaxedPrecision - Decorate 73(x) RelaxedPrecision - Decorate 127(d) RelaxedPrecision - Decorate 153(i) RelaxedPrecision - Decorate 171(j) RelaxedPrecision - Decorate 221(color) RelaxedPrecision - Decorate 227(v) RelaxedPrecision - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 9: TypeInt 32 1 - 10: TypePointer Function 9(int) - 11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr) - 36: 6(float) Constant 0 - 37: 7(fvec4) ConstantComposite 36 36 36 36 - 47: 6(float) Constant 1065353216 - 48: 7(fvec4) ConstantComposite 47 47 47 47 - 59: TypePointer UniformConstant 9(int) - 60(c): 59(ptr) Variable UniformConstant - 63: 9(int) Constant 1 - 70: TypePointer Function 6(float) - 72: TypePointer Input 6(float) - 73(x): 72(ptr) Variable Input - 127(d): 59(ptr) Variable UniformConstant - 154: 9(int) Constant 0 - 159: 9(int) Constant 10 - 160: TypeBool - 172: 9(int) Constant 20 - 177: 9(int) Constant 30 - 182: 6(float) Constant 1120429670 - 202: 6(float) Constant 1079739679 - 220: TypePointer Output 6(float) - 221(color): 220(ptr) Variable Output - 226: TypePointer UniformConstant 7(fvec4) - 227(v): 226(ptr) Variable UniformConstant - 235: TypeInt 32 0 - 236: 235(int) Constant 1 - 247: 235(int) Constant 2 - 4(main): 2 Function None 3 - 5: Label - 58(local): 10(ptr) Variable Function - 71(f): 70(ptr) Variable Function - 153(i): 10(ptr) Variable Function - 171(j): 10(ptr) Variable Function - 228(param): 8(ptr) Variable Function - 230(param): 8(ptr) Variable Function - 232(param): 10(ptr) Variable Function - 240(param): 8(ptr) Variable Function - 242(param): 8(ptr) Variable Function - 244(param): 10(ptr) Variable Function - 61: 9(int) Load 60(c) - Store 58(local) 61 - 62: 9(int) Load 58(local) - 64: 9(int) IAdd 62 63 - Store 58(local) 64 - 65: 9(int) Load 60(c) - SelectionMerge 69 None - Switch 65 68 - case 1: 66 - case 2: 67 - 66: Label - 74: 6(float) Load 73(x) - 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74 - Store 71(f) 75 - Branch 69 - 67: Label - 77: 6(float) Load 73(x) - 78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77 - Store 71(f) 78 - Branch 69 - 68: Label - 80: 6(float) Load 73(x) - 81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80 - Store 71(f) 81 - Branch 69 - 69: Label - 83: 9(int) Load 60(c) - SelectionMerge 87 None - Switch 83 86 - case 1: 84 - case 2: 85 - 84: Label - 88: 6(float) Load 73(x) - 89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88 - 90: 6(float) Load 71(f) - 91: 6(float) FAdd 90 89 - Store 71(f) 91 - Branch 85 - 85: Label - 92: 6(float) Load 73(x) - 93: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 92 - 94: 6(float) Load 71(f) - 95: 6(float) FAdd 94 93 - Store 71(f) 95 - Branch 87 - 86: Label - 97: 6(float) Load 73(x) - 98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97 - 99: 6(float) Load 71(f) - 100: 6(float) FAdd 99 98 - Store 71(f) 100 - Branch 87 - 87: Label - 102: 9(int) Load 60(c) - SelectionMerge 105 None - Switch 102 105 - case 1: 103 - case 2: 104 - 103: Label - 106: 6(float) Load 73(x) - 107: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 106 - 108: 6(float) Load 71(f) - 109: 6(float) FAdd 108 107 - Store 71(f) 109 - Branch 105 - 104: Label - 111: 6(float) Load 73(x) - 112: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 111 - 113: 6(float) Load 71(f) - 114: 6(float) FAdd 113 112 - Store 71(f) 114 - Branch 105 - 105: Label - 117: 9(int) Load 60(c) - SelectionMerge 121 None - Switch 117 120 - case 1: 118 - case 2: 119 - 118: Label - 122: 6(float) Load 73(x) - 123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122 - 124: 6(float) Load 71(f) - 125: 6(float) FAdd 124 123 - Store 71(f) 125 - Branch 121 - 119: Label - 128: 9(int) Load 127(d) - SelectionMerge 131 None - Switch 128 131 - case 1: 129 - case 2: 130 - 129: Label - 132: 6(float) Load 73(x) - 133: 6(float) Load 73(x) - 134: 6(float) FMul 132 133 - 135: 6(float) Load 73(x) - 136: 6(float) FMul 134 135 - 137: 6(float) Load 71(f) - 138: 6(float) FAdd 137 136 - Store 71(f) 138 - Branch 131 - 130: Label - 140: 6(float) Load 73(x) - 141: 6(float) Load 73(x) - 142: 6(float) FMul 140 141 - 143: 6(float) Load 71(f) - 144: 6(float) FAdd 143 142 - Store 71(f) 144 - Branch 131 - 131: Label - Branch 121 - 120: Label - 148: 6(float) Load 73(x) - 149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148 - 150: 6(float) Load 71(f) - 151: 6(float) FAdd 150 149 - Store 71(f) 151 - Branch 121 - 121: Label - Store 153(i) 154 - Branch 155 - 155: Label - 158: 9(int) Load 153(i) - 161: 160(bool) SLessThan 158 159 - LoopMerge 156 155 None - BranchConditional 161 157 156 - 157: Label - 162: 9(int) Load 60(c) - SelectionMerge 166 None - Switch 162 165 - case 1: 163 - case 2: 164 - 163: Label - 167: 6(float) Load 73(x) - 168: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 167 - 169: 6(float) Load 71(f) - 170: 6(float) FAdd 169 168 - Store 71(f) 170 - Store 171(j) 172 - Branch 173 - 173: Label - 176: 9(int) Load 171(j) - 178: 160(bool) SLessThan 176 177 - LoopMerge 174 173 None - BranchConditional 178 175 174 - 175: Label - 179: 6(float) Load 71(f) - 180: 6(float) FAdd 179 47 - Store 71(f) 180 - 181: 6(float) Load 71(f) - 183: 160(bool) FOrdLessThan 181 182 - SelectionMerge 185 None - BranchConditional 183 184 185 - 184: Label - Branch 174 - 185: Label - 187: 9(int) Load 171(j) - 188: 9(int) IAdd 187 63 - Store 171(j) 188 - Branch 173 - 174: Label - Branch 166 - 164: Label - 190: 6(float) Load 73(x) - 191: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 190 - 192: 6(float) Load 71(f) - 193: 6(float) FAdd 192 191 - Store 71(f) 193 - Branch 166 - 165: Label - 196: 6(float) Load 73(x) - 197: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 196 - 198: 6(float) Load 71(f) - 199: 6(float) FAdd 198 197 - Store 71(f) 199 - Branch 166 - 166: Label - 201: 6(float) Load 71(f) - 203: 160(bool) FOrdLessThan 201 202 - SelectionMerge 205 None - BranchConditional 203 204 205 - 204: Label - Branch 156 - 205: Label - 207: 9(int) Load 153(i) - 208: 9(int) IAdd 207 63 - Store 153(i) 208 - Branch 155 - 156: Label - 209: 9(int) Load 60(c) - SelectionMerge 212 None - Switch 209 212 - case 1: 210 - case 2: 211 - 210: Label - 213: 6(float) Load 73(x) - 214: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 213 - 215: 6(float) Load 71(f) - 216: 6(float) FAdd 215 214 - Store 71(f) 216 - Branch 212 - 211: Label - Branch 212 - 212: Label - 222: 6(float) Load 71(f) - 223: 9(int) Load 58(local) - 224: 6(float) ConvertSToF 223 - 225: 6(float) FAdd 222 224 - Store 221(color) 225 - 229: 7(fvec4) Load 227(v) - Store 228(param) 229 - 231: 7(fvec4) Load 227(v) - Store 230(param) 231 - 233: 9(int) Load 60(c) - Store 232(param) 233 - 234: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 228(param) 230(param) 232(param) - 237: 6(float) CompositeExtract 234 1 - 238: 6(float) Load 221(color) - 239: 6(float) FAdd 238 237 - Store 221(color) 239 - 241: 7(fvec4) Load 227(v) - Store 240(param) 241 - 243: 7(fvec4) Load 227(v) - Store 242(param) 243 - 245: 9(int) Load 60(c) - Store 244(param) 245 - 246: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 240(param) 242(param) 244(param) - 248: 6(float) CompositeExtract 246 2 - 249: 6(float) Load 221(color) - 250: 6(float) FAdd 249 248 - Store 221(color) 250 - 251: 9(int) Load 60(c) - SelectionMerge 254 None - Switch 251 253 - case 0: 252 - 252: Label - Branch 254 - 253: Label - Branch 254 - 254: Label - 258: 9(int) Load 60(c) - SelectionMerge 260 None - Switch 258 259 - 259: Label - Branch 260 - 260: Label - Return - FunctionEnd -15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 - 12(v1): 8(ptr) FunctionParameter - 13(v2): 8(ptr) FunctionParameter - 14(i1): 10(ptr) FunctionParameter - 16: Label - 22: 9(int) Load 14(i1) - SelectionMerge 26 None - Switch 22 26 - case 0: 23 - case 2: 24 - case 1: 24 - case 3: 25 - 23: Label - 27: 7(fvec4) Load 12(v1) - ReturnValue 27 - 24: Label - 29: 7(fvec4) Load 13(v2) - ReturnValue 29 - 25: Label - 31: 7(fvec4) Load 12(v1) - 32: 7(fvec4) Load 13(v2) - 33: 7(fvec4) FMul 31 32 - ReturnValue 33 - 26: Label - ReturnValue 37 - FunctionEnd -20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11 - 17(v1): 8(ptr) FunctionParameter - 18(v2): 8(ptr) FunctionParameter - 19(i1): 10(ptr) FunctionParameter - 21: Label - 39: 9(int) Load 19(i1) - SelectionMerge 44 None - Switch 39 44 - case 0: 40 - case 2: 41 - case 1: 42 - case 3: 43 - 40: Label - 45: 7(fvec4) Load 17(v1) - ReturnValue 45 - 41: Label - ReturnValue 48 - 42: Label - 50: 7(fvec4) Load 18(v2) - ReturnValue 50 - 43: Label - 52: 7(fvec4) Load 17(v1) - 53: 7(fvec4) Load 18(v2) - 54: 7(fvec4) FMul 52 53 - ReturnValue 54 - 44: Label - ReturnValue 37 - FunctionEnd +spv.switch.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. +WARNING: 0:121: 'switch' : last case/default label not followed by statements +WARNING: 0:134: 'switch' : last case/default label not followed by statements +WARNING: 0:139: 'switch' : last case/default label not followed by statements + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 265 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 73 223 + ExecutionMode 4 OriginLowerLeft + Source ESSL 310 + Name 4 "main" + Name 15 "foo1(vf4;vf4;i1;" + Name 12 "v1" + Name 13 "v2" + Name 14 "i1" + Name 20 "foo2(vf4;vf4;i1;" + Name 17 "v1" + Name 18 "v2" + Name 19 "i1" + Name 58 "local" + Name 60 "c" + Name 71 "f" + Name 73 "x" + Name 127 "d" + Name 153 "i" + Name 172 "j" + Name 223 "color" + Name 229 "v" + Name 230 "param" + Name 232 "param" + Name 234 "param" + Name 242 "param" + Name 244 "param" + Name 246 "param" + Decorate 58(local) RelaxedPrecision + Decorate 60(c) RelaxedPrecision + Decorate 71(f) RelaxedPrecision + Decorate 73(x) RelaxedPrecision + Decorate 127(d) RelaxedPrecision + Decorate 153(i) RelaxedPrecision + Decorate 172(j) RelaxedPrecision + Decorate 223(color) RelaxedPrecision + Decorate 229(v) RelaxedPrecision + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 9: TypeInt 32 1 + 10: TypePointer Function 9(int) + 11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr) + 36: 6(float) Constant 0 + 37: 7(fvec4) ConstantComposite 36 36 36 36 + 47: 6(float) Constant 1065353216 + 48: 7(fvec4) ConstantComposite 47 47 47 47 + 59: TypePointer UniformConstant 9(int) + 60(c): 59(ptr) Variable UniformConstant + 63: 9(int) Constant 1 + 70: TypePointer Function 6(float) + 72: TypePointer Input 6(float) + 73(x): 72(ptr) Variable Input + 127(d): 59(ptr) Variable UniformConstant + 154: 9(int) Constant 0 + 160: 9(int) Constant 10 + 161: TypeBool + 173: 9(int) Constant 20 + 179: 9(int) Constant 30 + 184: 6(float) Constant 1120429670 + 204: 6(float) Constant 1079739679 + 222: TypePointer Output 6(float) + 223(color): 222(ptr) Variable Output + 228: TypePointer UniformConstant 7(fvec4) + 229(v): 228(ptr) Variable UniformConstant + 237: TypeInt 32 0 + 238: 237(int) Constant 1 + 249: 237(int) Constant 2 + 4(main): 2 Function None 3 + 5: Label + 58(local): 10(ptr) Variable Function + 71(f): 70(ptr) Variable Function + 153(i): 10(ptr) Variable Function + 172(j): 10(ptr) Variable Function + 230(param): 8(ptr) Variable Function + 232(param): 8(ptr) Variable Function + 234(param): 10(ptr) Variable Function + 242(param): 8(ptr) Variable Function + 244(param): 8(ptr) Variable Function + 246(param): 10(ptr) Variable Function + 61: 9(int) Load 60(c) + Store 58(local) 61 + 62: 9(int) Load 58(local) + 64: 9(int) IAdd 62 63 + Store 58(local) 64 + 65: 9(int) Load 60(c) + SelectionMerge 69 None + Switch 65 68 + case 1: 66 + case 2: 67 + 66: Label + 74: 6(float) Load 73(x) + 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74 + Store 71(f) 75 + Branch 69 + 67: Label + 77: 6(float) Load 73(x) + 78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77 + Store 71(f) 78 + Branch 69 + 68: Label + 80: 6(float) Load 73(x) + 81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80 + Store 71(f) 81 + Branch 69 + 69: Label + 83: 9(int) Load 60(c) + SelectionMerge 87 None + Switch 83 86 + case 1: 84 + case 2: 85 + 84: Label + 88: 6(float) Load 73(x) + 89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88 + 90: 6(float) Load 71(f) + 91: 6(float) FAdd 90 89 + Store 71(f) 91 + Branch 85 + 85: Label + 92: 6(float) Load 73(x) + 93: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 92 + 94: 6(float) Load 71(f) + 95: 6(float) FAdd 94 93 + Store 71(f) 95 + Branch 87 + 86: Label + 97: 6(float) Load 73(x) + 98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97 + 99: 6(float) Load 71(f) + 100: 6(float) FAdd 99 98 + Store 71(f) 100 + Branch 87 + 87: Label + 102: 9(int) Load 60(c) + SelectionMerge 105 None + Switch 102 105 + case 1: 103 + case 2: 104 + 103: Label + 106: 6(float) Load 73(x) + 107: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 106 + 108: 6(float) Load 71(f) + 109: 6(float) FAdd 108 107 + Store 71(f) 109 + Branch 105 + 104: Label + 111: 6(float) Load 73(x) + 112: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 111 + 113: 6(float) Load 71(f) + 114: 6(float) FAdd 113 112 + Store 71(f) 114 + Branch 105 + 105: Label + 117: 9(int) Load 60(c) + SelectionMerge 121 None + Switch 117 120 + case 1: 118 + case 2: 119 + 118: Label + 122: 6(float) Load 73(x) + 123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122 + 124: 6(float) Load 71(f) + 125: 6(float) FAdd 124 123 + Store 71(f) 125 + Branch 121 + 119: Label + 128: 9(int) Load 127(d) + SelectionMerge 131 None + Switch 128 131 + case 1: 129 + case 2: 130 + 129: Label + 132: 6(float) Load 73(x) + 133: 6(float) Load 73(x) + 134: 6(float) FMul 132 133 + 135: 6(float) Load 73(x) + 136: 6(float) FMul 134 135 + 137: 6(float) Load 71(f) + 138: 6(float) FAdd 137 136 + Store 71(f) 138 + Branch 131 + 130: Label + 140: 6(float) Load 73(x) + 141: 6(float) Load 73(x) + 142: 6(float) FMul 140 141 + 143: 6(float) Load 71(f) + 144: 6(float) FAdd 143 142 + Store 71(f) 144 + Branch 131 + 131: Label + Branch 121 + 120: Label + 148: 6(float) Load 73(x) + 149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148 + 150: 6(float) Load 71(f) + 151: 6(float) FAdd 150 149 + Store 71(f) 151 + Branch 121 + 121: Label + Store 153(i) 154 + Branch 158 + 155: Label + 163: 9(int) Load 60(c) + SelectionMerge 167 None + Switch 163 166 + case 1: 164 + case 2: 165 + 156: Label + 211: 9(int) Load 60(c) + SelectionMerge 214 None + Switch 211 214 + case 1: 212 + case 2: 213 + 157: Label + 209: 9(int) Load 153(i) + 210: 9(int) IAdd 209 63 + Store 153(i) 210 + Branch 158 + 158: Label + 159: 9(int) Load 153(i) + 162: 161(bool) SLessThan 159 160 + LoopMerge 156 157 None + BranchConditional 162 155 156 + 164: Label + 168: 6(float) Load 73(x) + 169: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 168 + 170: 6(float) Load 71(f) + 171: 6(float) FAdd 170 169 + Store 71(f) 171 + Store 172(j) 173 + Branch 177 + 174: Label + 181: 6(float) Load 71(f) + 182: 6(float) FAdd 181 47 + Store 71(f) 182 + 183: 6(float) Load 71(f) + 185: 161(bool) FOrdLessThan 183 184 + SelectionMerge 187 None + BranchConditional 185 186 187 + 175: Label + Branch 167 + 176: Label + 189: 9(int) Load 172(j) + 190: 9(int) IAdd 189 63 + Store 172(j) 190 + Branch 177 + 177: Label + 178: 9(int) Load 172(j) + 180: 161(bool) SLessThan 178 179 + LoopMerge 175 176 None + BranchConditional 180 174 175 + 186: Label + Branch 175 + 187: Label + Branch 176 + 165: Label + 192: 6(float) Load 73(x) + 193: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 192 + 194: 6(float) Load 71(f) + 195: 6(float) FAdd 194 193 + Store 71(f) 195 + Branch 167 + 166: Label + 198: 6(float) Load 73(x) + 199: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 198 + 200: 6(float) Load 71(f) + 201: 6(float) FAdd 200 199 + Store 71(f) 201 + Branch 167 + 167: Label + 203: 6(float) Load 71(f) + 205: 161(bool) FOrdLessThan 203 204 + SelectionMerge 207 None + BranchConditional 205 206 207 + 206: Label + Branch 156 + 207: Label + Branch 157 + 212: Label + 215: 6(float) Load 73(x) + 216: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 215 + 217: 6(float) Load 71(f) + 218: 6(float) FAdd 217 216 + Store 71(f) 218 + Branch 214 + 213: Label + Branch 214 + 214: Label + 224: 6(float) Load 71(f) + 225: 9(int) Load 58(local) + 226: 6(float) ConvertSToF 225 + 227: 6(float) FAdd 224 226 + Store 223(color) 227 + 231: 7(fvec4) Load 229(v) + Store 230(param) 231 + 233: 7(fvec4) Load 229(v) + Store 232(param) 233 + 235: 9(int) Load 60(c) + Store 234(param) 235 + 236: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param) + 239: 6(float) CompositeExtract 236 1 + 240: 6(float) Load 223(color) + 241: 6(float) FAdd 240 239 + Store 223(color) 241 + 243: 7(fvec4) Load 229(v) + Store 242(param) 243 + 245: 7(fvec4) Load 229(v) + Store 244(param) 245 + 247: 9(int) Load 60(c) + Store 246(param) 247 + 248: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param) + 250: 6(float) CompositeExtract 248 2 + 251: 6(float) Load 223(color) + 252: 6(float) FAdd 251 250 + Store 223(color) 252 + 253: 9(int) Load 60(c) + SelectionMerge 256 None + Switch 253 255 + case 0: 254 + 254: Label + Branch 256 + 255: Label + Branch 256 + 256: Label + 260: 9(int) Load 60(c) + SelectionMerge 262 None + Switch 260 261 + 261: Label + Branch 262 + 262: Label + Return + FunctionEnd +15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 + 12(v1): 8(ptr) FunctionParameter + 13(v2): 8(ptr) FunctionParameter + 14(i1): 10(ptr) FunctionParameter + 16: Label + 22: 9(int) Load 14(i1) + SelectionMerge 26 None + Switch 22 26 + case 0: 23 + case 2: 24 + case 1: 24 + case 3: 25 + 23: Label + 27: 7(fvec4) Load 12(v1) + ReturnValue 27 + 24: Label + 29: 7(fvec4) Load 13(v2) + ReturnValue 29 + 25: Label + 31: 7(fvec4) Load 12(v1) + 32: 7(fvec4) Load 13(v2) + 33: 7(fvec4) FMul 31 32 + ReturnValue 33 + 26: Label + ReturnValue 37 + FunctionEnd +20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11 + 17(v1): 8(ptr) FunctionParameter + 18(v2): 8(ptr) FunctionParameter + 19(i1): 10(ptr) FunctionParameter + 21: Label + 39: 9(int) Load 19(i1) + SelectionMerge 44 None + Switch 39 44 + case 0: 40 + case 2: 41 + case 1: 42 + case 3: 43 + 40: Label + 45: 7(fvec4) Load 17(v1) + ReturnValue 45 + 41: Label + ReturnValue 48 + 42: Label + 50: 7(fvec4) Load 18(v2) + ReturnValue 50 + 43: Label + 52: 7(fvec4) Load 17(v1) + 53: 7(fvec4) Load 18(v2) + 54: 7(fvec4) FMul 52 53 + ReturnValue 54 + 44: Label + ReturnValue 37 + FunctionEnd diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index 5305b987..0938db43 100755 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -1,86 +1,88 @@ -spv.while-continue-break.vert - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 42 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 40 41 - Source ESSL 300 - Name 4 "main" - Name 8 "i" - Name 17 "A" - Name 25 "B" - Name 27 "C" - Name 37 "D" - Name 40 "gl_VertexID" - Name 41 "gl_InstanceID" - Decorate 40(gl_VertexID) BuiltIn VertexId - Decorate 41(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 14: 6(int) Constant 10 - 15: TypeBool - 18: 6(int) Constant 1 - 20: 6(int) Constant 2 - 29: 6(int) Constant 5 - 38: 6(int) Constant 3 - 39: TypePointer Input 6(int) - 40(gl_VertexID): 39(ptr) Variable Input -41(gl_InstanceID): 39(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - 17(A): 7(ptr) Variable Function - 25(B): 7(ptr) Variable Function - 27(C): 7(ptr) Variable Function - 37(D): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 13: 6(int) Load 8(i) - 16: 15(bool) SLessThan 13 14 - LoopMerge 11 10 None - BranchConditional 16 12 11 - 12: Label - Store 17(A) 18 - 19: 6(int) Load 8(i) - 21: 6(int) SMod 19 20 - 22: 15(bool) IEqual 21 9 - SelectionMerge 24 None - BranchConditional 22 23 24 - 23: Label - Store 25(B) 20 - Branch 10 - 26: Label - Store 27(C) 20 - Branch 24 - 24: Label - 28: 6(int) Load 8(i) - 30: 6(int) SMod 28 29 - 31: 15(bool) IEqual 30 9 - SelectionMerge 33 None - BranchConditional 31 32 33 - 32: Label - Store 25(B) 20 - Branch 11 - 34: Label - Store 27(C) 20 - Branch 33 - 33: Label - 35: 6(int) Load 8(i) - 36: 6(int) IAdd 35 18 - Store 8(i) 36 - Branch 10 - 11: Label - Store 37(D) 38 - Return - FunctionEnd +spv.while-continue-break.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 43 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 41 42 + Source ESSL 300 + Name 4 "main" + Name 8 "i" + Name 18 "A" + Name 26 "B" + Name 28 "C" + Name 38 "D" + Name 41 "gl_VertexID" + Name 42 "gl_InstanceID" + Decorate 41(gl_VertexID) BuiltIn VertexId + Decorate 42(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 1 + 21: 6(int) Constant 2 + 30: 6(int) Constant 5 + 39: 6(int) Constant 3 + 40: TypePointer Input 6(int) + 41(gl_VertexID): 40(ptr) Variable Input +42(gl_InstanceID): 40(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + 18(A): 7(ptr) Variable Function + 26(B): 7(ptr) Variable Function + 28(C): 7(ptr) Variable Function + 38(D): 7(ptr) Variable Function + Store 8(i) 9 + Branch 13 + 10: Label + Store 18(A) 19 + 20: 6(int) Load 8(i) + 22: 6(int) SMod 20 21 + 23: 16(bool) IEqual 22 9 + SelectionMerge 25 None + BranchConditional 23 24 25 + 11: Label + Store 38(D) 39 + Return + 12: Label + Branch 13 + 13: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 11 12 None + BranchConditional 17 10 11 + 24: Label + Store 26(B) 21 + Branch 12 + 27: Label + Store 28(C) 21 + Branch 25 + 25: Label + 29: 6(int) Load 8(i) + 31: 6(int) SMod 29 30 + 32: 16(bool) IEqual 31 9 + SelectionMerge 34 None + BranchConditional 32 33 34 + 33: Label + Store 26(B) 21 + Branch 11 + 35: Label + Store 28(C) 21 + Branch 34 + 34: Label + 36: 6(int) Load 8(i) + 37: 6(int) IAdd 36 19 + Store 8(i) 37 + Branch 12 + FunctionEnd diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index 14d46dd3..3684101c 100755 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -1,49 +1,51 @@ -spv.while-simple.vert - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 23 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 21 22 - Source ESSL 300 - Name 4 "main" - Name 8 "i" - Name 21 "gl_VertexID" - Name 22 "gl_InstanceID" - Decorate 21(gl_VertexID) BuiltIn VertexId - Decorate 22(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 14: 6(int) Constant 10 - 15: TypeBool - 18: 6(int) Constant 1 - 20: TypePointer Input 6(int) - 21(gl_VertexID): 20(ptr) Variable Input -22(gl_InstanceID): 20(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 13: 6(int) Load 8(i) - 16: 15(bool) SLessThan 13 14 - LoopMerge 11 10 None - BranchConditional 16 12 11 - 12: Label - 17: 6(int) Load 8(i) - 19: 6(int) IAdd 17 18 - Store 8(i) 19 - Branch 10 - 11: Label - Return - FunctionEnd +spv.while-simple.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 24 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 22 23 + Source ESSL 300 + Name 4 "main" + Name 8 "i" + Name 22 "gl_VertexID" + Name 23 "gl_InstanceID" + Decorate 22(gl_VertexID) BuiltIn VertexId + Decorate 23(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 1 + 21: TypePointer Input 6(int) + 22(gl_VertexID): 21(ptr) Variable Input +23(gl_InstanceID): 21(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 13 + 10: Label + 18: 6(int) Load 8(i) + 20: 6(int) IAdd 18 19 + Store 8(i) 20 + Branch 12 + 11: Label + Return + 12: Label + Branch 13 + 13: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 11 12 None + BranchConditional 17 10 11 + FunctionEnd diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index 591129cd..62279827 100755 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -1,62 +1,64 @@ -spv.whileLoop.frag - -Linked fragment stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 34 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 - ExecutionMode 4 OriginLowerLeft - Source GLSL 110 - Name 4 "main" - Name 9 "color" - Name 11 "BaseColor" - Name 22 "d" - Name 27 "bigColor" - Name 32 "gl_FragColor" - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 10: TypePointer Input 7(fvec4) - 11(BaseColor): 10(ptr) Variable Input - 16: TypeInt 32 0 - 17: 16(int) Constant 0 - 18: TypePointer Function 6(float) - 21: TypePointer UniformConstant 6(float) - 22(d): 21(ptr) Variable UniformConstant - 24: TypeBool - 26: TypePointer UniformConstant 7(fvec4) - 27(bigColor): 26(ptr) Variable UniformConstant - 31: TypePointer Output 7(fvec4) -32(gl_FragColor): 31(ptr) Variable Output - 4(main): 2 Function None 3 - 5: Label - 9(color): 8(ptr) Variable Function - 12: 7(fvec4) Load 11(BaseColor) - Store 9(color) 12 - Branch 13 - 13: Label - 19: 18(ptr) AccessChain 9(color) 17 - 20: 6(float) Load 19 - 23: 6(float) Load 22(d) - 25: 24(bool) FOrdLessThan 20 23 - LoopMerge 14 13 None - BranchConditional 25 15 14 - 15: Label - 28: 7(fvec4) Load 27(bigColor) - 29: 7(fvec4) Load 9(color) - 30: 7(fvec4) FAdd 29 28 - Store 9(color) 30 - Branch 13 - 14: Label - 33: 7(fvec4) Load 9(color) - Store 32(gl_FragColor) 33 - Return - FunctionEnd +spv.whileLoop.frag + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 35 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 11 + ExecutionMode 4 OriginLowerLeft + Source GLSL 110 + Name 4 "main" + Name 9 "color" + Name 11 "BaseColor" + Name 23 "d" + Name 28 "bigColor" + Name 33 "gl_FragColor" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 10: TypePointer Input 7(fvec4) + 11(BaseColor): 10(ptr) Variable Input + 17: TypeInt 32 0 + 18: 17(int) Constant 0 + 19: TypePointer Function 6(float) + 22: TypePointer UniformConstant 6(float) + 23(d): 22(ptr) Variable UniformConstant + 25: TypeBool + 27: TypePointer UniformConstant 7(fvec4) + 28(bigColor): 27(ptr) Variable UniformConstant + 32: TypePointer Output 7(fvec4) +33(gl_FragColor): 32(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 9(color): 8(ptr) Variable Function + 12: 7(fvec4) Load 11(BaseColor) + Store 9(color) 12 + Branch 16 + 13: Label + 29: 7(fvec4) Load 28(bigColor) + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 + Branch 15 + 14: Label + 34: 7(fvec4) Load 9(color) + Store 33(gl_FragColor) 34 + Return + 15: Label + Branch 16 + 16: Label + 20: 19(ptr) AccessChain 9(color) 18 + 21: 6(float) Load 20 + 24: 6(float) Load 23(d) + 26: 25(bool) FOrdLessThan 21 24 + LoopMerge 14 15 None + BranchConditional 26 13 14 + FunctionEnd diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 1efcfcb3..504ee6d3 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -5,6 +5,8 @@ spv.do-simple.vert spv.do-while-continue-break.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 From 832c65c33b39a7b95d12fb569949241859469d6e Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 11 Jan 2016 15:57:11 -0500 Subject: [PATCH 08/84] Fix back-branch target for do-while loops. To ensure back branches always go to a header block, create a header block even for !testFirst loops. Then unify common code between the testFirst/!testFirst cases. Generate the header-block code first, so update golden files. Realize that certain infinite loops generate invalid SPIR-V, so put a TODO to instead abort code generation in such cases. Change-Id: I1e173c8f73daad186cfc666b7d72bd563ed7665d --- SPIRV/GlslangToSpv.cpp | 29 +- SPIRV/SpvBuilder.cpp | 2 +- SPIRV/SpvBuilder.h | 2 +- Test/baseResults/spv.dataOutIndirect.vert.out | 30 +- Test/baseResults/spv.do-simple.vert.out | 100 +- .../spv.do-while-continue-break.vert.out | 136 +- Test/baseResults/spv.doWhileLoop.frag.out | 58 +- .../spv.for-continue-break.vert.out | 70 +- Test/baseResults/spv.for-nobody.vert.out | 118 +- Test/baseResults/spv.for-notest.vert.out | 103 +- Test/baseResults/spv.for-simple.vert.out | 110 +- Test/baseResults/spv.forLoop.frag.out | 222 +- Test/baseResults/spv.localAggregates.frag.out | 96 +- Test/baseResults/spv.loops.frag.out | 2014 +++++++++-------- Test/baseResults/spv.loopsArtificial.frag.out | 530 ++--- Test/baseResults/spv.switch.frag.out | 342 +-- .../spv.while-continue-break.vert.out | 68 +- Test/baseResults/spv.while-simple.vert.out | 26 +- Test/baseResults/spv.whileLoop.frag.out | 32 +- Test/spv.for-notest.vert | 3 + 20 files changed, 2062 insertions(+), 2029 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index e5e2169b..00369d21 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1342,19 +1342,17 @@ void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* n bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIntermLoop* node) { auto blocks = builder.makeNewLoop(); + builder.createBranch(&blocks.head); if (node->testFirst() && node->getTest()) { - spv::Block& head = builder.makeNewBlock(); - builder.createBranch(&head); - - builder.setBuildPoint(&head); + builder.setBuildPoint(&blocks.head); node->getTest()->traverse(this); spv::Id condition = builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); - breakForLoop.push(true); builder.setBuildPoint(&blocks.body); + breakForLoop.push(true); if (node->getBody()) node->getBody()->traverse(this); builder.createBranch(&blocks.continue_target); @@ -1363,8 +1361,14 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.setBuildPoint(&blocks.continue_target); if (node->getTerminal()) node->getTerminal()->traverse(this); - builder.createBranch(&head); + builder.createBranch(&blocks.head); } else { + // Spec requires back edges to target header blocks, and every header + // block must dominate its merge block. Create an empty header block + // here to ensure these conditions are met even when body contains + // non-trivial control flow. + builder.setBuildPoint(&blocks.head); + builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); builder.createBranch(&blocks.body); breakForLoop.push(true); @@ -1381,14 +1385,17 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn node->getTest()->traverse(this); spv::Id condition = builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); - builder.createLoopMerge(&blocks.merge, &blocks.continue_target, - spv::LoopControlMaskNone); - builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); + builder.createConditionalBranch(condition, &blocks.head, &blocks.merge); } else { - builder.createBranch(&blocks.body); + // TODO: unless there was a break instruction somewhere in the body, + // this is an infinite loop, so we should abort code generation with + // a warning. As it stands now, nothing will jump to the merge + // block, and it may be dropped as unreachable by the SPIR-V dumper. + // That, in turn, will result in a non-existing %ID in the LoopMerge + // above. + builder.createBranch(&blocks.head); } } - builder.setBuildPoint(&blocks.merge); builder.closeLoop(); return false; diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index eb8c4d37..f9c4ae6c 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1763,7 +1763,7 @@ Block& Builder::makeNewBlock() Builder::LoopBlocks& Builder::makeNewLoop() { - loops.push({makeNewBlock(), makeNewBlock(), makeNewBlock()}); + loops.push({makeNewBlock(), makeNewBlock(), makeNewBlock(), makeNewBlock()}); return loops.top(); } diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index a1ed84ca..fa3600b6 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -374,7 +374,7 @@ public: void endSwitch(std::vector& segmentBB); struct LoopBlocks { - Block &body, &merge, &continue_target; + Block &head, &body, &merge, &continue_target; }; // Start a new loop and prepare the builder to generate code for it. Until diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index 0efe6568..5cccee1d 100755 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -48,26 +48,26 @@ Linked vertex stage: 5: Label 8(i): 7(ptr) Variable Function Store 8(i) 9 - Branch 13 + Branch 10 10: Label - 25: 6(int) Load 8(i) - 28: 19(fvec4) Load 27(color) - 30: 29(ptr) AccessChain 24(colorOut) 25 - Store 30 28 - Branch 12 - 11: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 12 13 None + BranchConditional 17 11 12 + 11: Label + 25: 6(int) Load 8(i) + 28: 19(fvec4) Load 27(color) + 30: 29(ptr) AccessChain 24(colorOut) 25 + Store 30 28 + Branch 13 + 12: Label 35: 29(ptr) AccessChain 24(colorOut) 34 36: 19(fvec4) Load 35 Store 33(gl_Position) 36 Return - 12: Label + 13: Label 31: 6(int) Load 8(i) 32: 6(int) IAdd 31 9 Store 8(i) 32 - Branch 13 - 13: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 - LoopMerge 11 12 None - BranchConditional 17 10 11 - FunctionEnd + Branch 10 + FunctionEnd diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out index 694da83a..e38c0f5a 100755 --- a/Test/baseResults/spv.do-simple.vert.out +++ b/Test/baseResults/spv.do-simple.vert.out @@ -1,49 +1,51 @@ -spv.do-simple.vert - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 23 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 21 22 - Source ESSL 300 - Name 4 "main" - Name 8 "i" - Name 21 "gl_VertexID" - Name 22 "gl_InstanceID" - Decorate 21(gl_VertexID) BuiltIn VertexId - Decorate 22(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 14: 6(int) Constant 1 - 17: 6(int) Constant 10 - 18: TypeBool - 20: TypePointer Input 6(int) - 21(gl_VertexID): 20(ptr) Variable Input -22(gl_InstanceID): 20(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 13: 6(int) Load 8(i) - 15: 6(int) IAdd 13 14 - Store 8(i) 15 - Branch 12 - 11: Label - Return - 12: Label - 16: 6(int) Load 8(i) - 19: 18(bool) SLessThan 16 17 - LoopMerge 11 12 None - BranchConditional 19 10 11 - FunctionEnd +spv.do-simple.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 24 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 22 23 + Source ESSL 300 + Name 4 "main" + Name 8 "i" + Name 22 "gl_VertexID" + Name 23 "gl_InstanceID" + Decorate 22(gl_VertexID) BuiltIn VertexId + Decorate 23(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 1 + 18: 6(int) Constant 10 + 19: TypeBool + 21: TypePointer Input 6(int) + 22(gl_VertexID): 21(ptr) Variable Input +23(gl_InstanceID): 21(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + LoopMerge 12 13 None + Branch 11 + 11: Label + 14: 6(int) Load 8(i) + 16: 6(int) IAdd 14 15 + Store 8(i) 16 + Branch 13 + 12: Label + Return + 13: Label + 17: 6(int) Load 8(i) + 20: 19(bool) SLessThan 17 18 + BranchConditional 20 10 12 + FunctionEnd diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index c70c28da..ec4d1009 100755 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -5,89 +5,91 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 45 +// Id's are bound by 46 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 43 44 + EntryPoint Vertex 4 "main" 44 45 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 13 "A" - Name 20 "B" - Name 23 "C" - Name 29 "D" - Name 32 "E" - Name 34 "F" - Name 40 "G" - Name 43 "gl_VertexID" - Name 44 "gl_InstanceID" - Decorate 43(gl_VertexID) BuiltIn VertexId - Decorate 44(gl_InstanceID) BuiltIn InstanceId + Name 14 "A" + Name 21 "B" + Name 24 "C" + Name 30 "D" + Name 33 "E" + Name 35 "F" + Name 41 "G" + Name 44 "gl_VertexID" + Name 45 "gl_InstanceID" + Decorate 44(gl_VertexID) BuiltIn VertexId + Decorate 45(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 15: 6(int) Constant 2 - 16: TypeBool - 21: 6(int) Constant 1 - 25: 6(int) Constant 5 - 30: 6(int) Constant 3 - 33: 6(int) Constant 42 - 35: 6(int) Constant 99 - 38: 6(int) Constant 19 - 41: 6(int) Constant 12 - 42: TypePointer Input 6(int) - 43(gl_VertexID): 42(ptr) Variable Input -44(gl_InstanceID): 42(ptr) Variable Input + 16: 6(int) Constant 2 + 17: TypeBool + 22: 6(int) Constant 1 + 26: 6(int) Constant 5 + 31: 6(int) Constant 3 + 34: 6(int) Constant 42 + 36: 6(int) Constant 99 + 39: 6(int) Constant 19 + 42: 6(int) Constant 12 + 43: TypePointer Input 6(int) + 44(gl_VertexID): 43(ptr) Variable Input +45(gl_InstanceID): 43(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function - 13(A): 7(ptr) Variable Function - 20(B): 7(ptr) Variable Function - 23(C): 7(ptr) Variable Function - 29(D): 7(ptr) Variable Function - 32(E): 7(ptr) Variable Function - 34(F): 7(ptr) Variable Function - 40(G): 7(ptr) Variable Function + 14(A): 7(ptr) Variable Function + 21(B): 7(ptr) Variable Function + 24(C): 7(ptr) Variable Function + 30(D): 7(ptr) Variable Function + 33(E): 7(ptr) Variable Function + 35(F): 7(ptr) Variable Function + 41(G): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - Store 13(A) 9 - 14: 6(int) Load 8(i) - 17: 16(bool) IEqual 14 15 - SelectionMerge 19 None - BranchConditional 17 18 19 - 11: Label - Store 40(G) 41 - Return + LoopMerge 12 13 None + Branch 11 + 11: Label + Store 14(A) 9 + 15: 6(int) Load 8(i) + 18: 17(bool) IEqual 15 16 + SelectionMerge 20 None + BranchConditional 18 19 20 12: Label - 36: 6(int) Load 8(i) - 37: 6(int) IAdd 36 21 - Store 8(i) 37 - 39: 16(bool) SLessThan 37 38 - LoopMerge 11 12 None - BranchConditional 39 10 11 - 18: Label - Store 20(B) 21 - Branch 12 - 22: Label - Store 23(C) 15 - Branch 19 - 19: Label - 24: 6(int) Load 8(i) - 26: 16(bool) IEqual 24 25 - SelectionMerge 28 None - BranchConditional 26 27 28 - 27: Label - Store 29(D) 30 - Branch 11 - 31: Label - Store 32(E) 33 - Branch 28 - 28: Label - Store 34(F) 35 - Branch 12 - FunctionEnd + Store 41(G) 42 + Return + 13: Label + 37: 6(int) Load 8(i) + 38: 6(int) IAdd 37 22 + Store 8(i) 38 + 40: 17(bool) SLessThan 38 39 + BranchConditional 40 10 12 + 19: Label + Store 21(B) 22 + Branch 13 + 23: Label + Store 24(C) 16 + Branch 20 + 20: Label + 25: 6(int) Load 8(i) + 27: 17(bool) IEqual 25 26 + SelectionMerge 29 None + BranchConditional 27 28 29 + 28: Label + Store 30(D) 31 + Branch 12 + 32: Label + Store 33(E) 34 + Branch 29 + 29: Label + Store 35(F) 36 + Branch 13 + FunctionEnd diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out index 64d05813..5e01fc67 100755 --- a/Test/baseResults/spv.doWhileLoop.frag.out +++ b/Test/baseResults/spv.doWhileLoop.frag.out @@ -5,7 +5,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 34 +// Id's are bound by 35 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -16,9 +16,9 @@ Linked fragment stage: Name 4 "main" Name 9 "color" Name 11 "BaseColor" - Name 17 "bigColor" - Name 27 "d" - Name 32 "gl_FragColor" + Name 18 "bigColor" + Name 28 "d" + Name 33 "gl_FragColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -26,16 +26,16 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 16: TypePointer UniformConstant 7(fvec4) - 17(bigColor): 16(ptr) Variable UniformConstant - 21: TypeInt 32 0 - 22: 21(int) Constant 0 - 23: TypePointer Function 6(float) - 26: TypePointer UniformConstant 6(float) - 27(d): 26(ptr) Variable UniformConstant - 29: TypeBool - 31: TypePointer Output 7(fvec4) -32(gl_FragColor): 31(ptr) Variable Output + 17: TypePointer UniformConstant 7(fvec4) + 18(bigColor): 17(ptr) Variable UniformConstant + 22: TypeInt 32 0 + 23: 22(int) Constant 0 + 24: TypePointer Function 6(float) + 27: TypePointer UniformConstant 6(float) + 28(d): 27(ptr) Variable UniformConstant + 30: TypeBool + 32: TypePointer Output 7(fvec4) +33(gl_FragColor): 32(ptr) Variable Output 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -43,20 +43,22 @@ Linked fragment stage: Store 9(color) 12 Branch 13 13: Label - 18: 7(fvec4) Load 17(bigColor) - 19: 7(fvec4) Load 9(color) - 20: 7(fvec4) FAdd 19 18 - Store 9(color) 20 - Branch 15 + LoopMerge 15 16 None + Branch 14 14: Label - 33: 7(fvec4) Load 9(color) - Store 32(gl_FragColor) 33 - Return + 19: 7(fvec4) Load 18(bigColor) + 20: 7(fvec4) Load 9(color) + 21: 7(fvec4) FAdd 20 19 + Store 9(color) 21 + Branch 16 15: Label - 24: 23(ptr) AccessChain 9(color) 22 - 25: 6(float) Load 24 - 28: 6(float) Load 27(d) - 30: 29(bool) FOrdLessThan 25 28 - LoopMerge 14 15 None - BranchConditional 30 13 14 + 34: 7(fvec4) Load 9(color) + Store 33(gl_FragColor) 34 + Return + 16: Label + 25: 24(ptr) AccessChain 9(color) 23 + 26: 6(float) Load 25 + 29: 6(float) Load 28(d) + 31: 30(bool) FOrdLessThan 26 29 + BranchConditional 31 13 15 FunctionEnd diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index df2acab4..139d6274 100755 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -51,46 +51,46 @@ Linked vertex stage: 38(F): 7(ptr) Variable Function 42(G): 7(ptr) Variable Function Store 8(i) 9 - Branch 13 + Branch 10 10: Label - Store 18(A) 19 - 20: 6(int) Load 8(i) - 22: 6(int) SMod 20 21 - 23: 16(bool) IEqual 22 9 - SelectionMerge 25 None - BranchConditional 23 24 25 + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 12 13 None + BranchConditional 17 11 12 11: Label - Store 42(G) 43 - Return - 12: Label - 40: 6(int) Load 8(i) - 41: 6(int) IAdd 40 19 - Store 8(i) 41 - Branch 13 - 13: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 - LoopMerge 11 12 None - BranchConditional 17 10 11 + Store 18(A) 19 + 20: 6(int) Load 8(i) + 22: 6(int) SMod 20 21 + 23: 16(bool) IEqual 22 9 + SelectionMerge 25 None + BranchConditional 23 24 25 + 12: Label + Store 42(G) 43 + Return + 13: Label + 40: 6(int) Load 8(i) + 41: 6(int) IAdd 40 19 + Store 8(i) 41 + Branch 10 24: Label Store 26(B) 19 - Branch 12 + Branch 13 27: Label Store 28(C) 19 Branch 25 - 25: Label - 29: 6(int) Load 8(i) - 31: 6(int) SMod 29 30 - 32: 16(bool) IEqual 31 9 - SelectionMerge 34 None - BranchConditional 32 33 34 - 33: Label - Store 35(D) 19 - Branch 11 - 36: Label - Store 37(E) 19 - Branch 34 - 34: Label - Store 38(F) 39 + 25: Label + 29: 6(int) Load 8(i) + 31: 6(int) SMod 29 30 + 32: 16(bool) IEqual 31 9 + SelectionMerge 34 None + BranchConditional 32 33 34 + 33: Label + Store 35(D) 19 Branch 12 - FunctionEnd + 36: Label + Store 37(E) 19 + Branch 34 + 34: Label + Store 38(F) 39 + Branch 13 + FunctionEnd diff --git a/Test/baseResults/spv.for-nobody.vert.out b/Test/baseResults/spv.for-nobody.vert.out index 1645c66a..3db2af64 100644 --- a/Test/baseResults/spv.for-nobody.vert.out +++ b/Test/baseResults/spv.for-nobody.vert.out @@ -1,59 +1,59 @@ -spv.for-nobody.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 27 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 22 25 26 - Source GLSL 450 - Name 4 "main" - Name 8 "i" - Name 22 "r" - Name 25 "gl_VertexID" - Name 26 "gl_InstanceID" - Decorate 22(r) Location 0 - Decorate 25(gl_VertexID) BuiltIn VertexId - Decorate 26(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 1 - 21: TypePointer Output 6(int) - 22(r): 21(ptr) Variable Output - 24: TypePointer Input 6(int) - 25(gl_VertexID): 24(ptr) Variable Input -26(gl_InstanceID): 24(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - Store 8(i) 9 - Branch 13 - 10: Label - Branch 12 - 11: Label - 23: 6(int) Load 8(i) - Store 22(r) 23 - Return - 12: Label - 18: 6(int) Load 8(i) - 20: 6(int) IAdd 18 19 - Store 8(i) 20 - Branch 13 - 13: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 - LoopMerge 11 12 None - BranchConditional 17 10 11 - FunctionEnd +spv.for-nobody.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 27 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 22 25 26 + Source GLSL 450 + Name 4 "main" + Name 8 "i" + Name 22 "r" + Name 25 "gl_VertexID" + Name 26 "gl_InstanceID" + Decorate 22(r) Location 0 + Decorate 25(gl_VertexID) BuiltIn VertexId + Decorate 26(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 1 + 21: TypePointer Output 6(int) + 22(r): 21(ptr) Variable Output + 24: TypePointer Input 6(int) + 25(gl_VertexID): 24(ptr) Variable Input +26(gl_InstanceID): 24(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 12 13 None + BranchConditional 17 11 12 + 11: Label + Branch 13 + 12: Label + 23: 6(int) Load 8(i) + Store 22(r) 23 + Return + 13: Label + 18: 6(int) Load 8(i) + 20: 6(int) IAdd 18 19 + Store 8(i) 20 + Branch 10 + FunctionEnd diff --git a/Test/baseResults/spv.for-notest.vert.out b/Test/baseResults/spv.for-notest.vert.out index e55ef9b6..0b77cb11 100644 --- a/Test/baseResults/spv.for-notest.vert.out +++ b/Test/baseResults/spv.for-notest.vert.out @@ -1,50 +1,53 @@ -spv.for-notest.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 22 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 14 20 21 - Source GLSL 450 - Name 4 "main" - Name 8 "i" - Name 14 "r" - Name 20 "gl_VertexID" - Name 21 "gl_InstanceID" - Decorate 14(r) Location 0 - Decorate 20(gl_VertexID) BuiltIn VertexId - Decorate 21(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 13: TypePointer Output 6(int) - 14(r): 13(ptr) Variable Output - 17: 6(int) Constant 1 - 19: TypePointer Input 6(int) - 20(gl_VertexID): 19(ptr) Variable Input -21(gl_InstanceID): 19(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - Store 8(i) 9 - Branch 10 - 10: Label - 15: 6(int) Load 8(i) - Store 14(r) 15 - Branch 12 - 12: Label - 16: 6(int) Load 8(i) - 18: 6(int) IAdd 16 17 - Store 8(i) 18 - Branch 10 - FunctionEnd +spv.for-notest.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 23 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 15 21 22 + Source GLSL 450 + Name 4 "main" + Name 8 "i" + Name 15 "r" + Name 21 "gl_VertexID" + Name 22 "gl_InstanceID" + Decorate 15(r) Location 0 + Decorate 21(gl_VertexID) BuiltIn VertexId + Decorate 22(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 14: TypePointer Output 6(int) + 15(r): 14(ptr) Variable Output + 18: 6(int) Constant 1 + 20: TypePointer Input 6(int) + 21(gl_VertexID): 20(ptr) Variable Input +22(gl_InstanceID): 20(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + LoopMerge 12 13 None + Branch 11 + 11: Label + 16: 6(int) Load 8(i) + Store 15(r) 16 + Branch 13 + 13: Label + 17: 6(int) Load 8(i) + 19: 6(int) IAdd 17 18 + Store 8(i) 19 + Branch 10 + FunctionEnd diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index 3dd4fc36..9f17ac1e 100755 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -1,55 +1,55 @@ -spv.for-simple.vert - -Linked vertex stage: - - -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 26 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 24 25 - Source ESSL 300 - Name 4 "main" - Name 8 "i" - Name 18 "j" - Name 24 "gl_VertexID" - Name 25 "gl_InstanceID" - Decorate 24(gl_VertexID) BuiltIn VertexId - Decorate 25(gl_InstanceID) BuiltIn InstanceId - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 12 - 21: 6(int) Constant 1 - 23: TypePointer Input 6(int) - 24(gl_VertexID): 23(ptr) Variable Input -25(gl_InstanceID): 23(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 8(i): 7(ptr) Variable Function - 18(j): 7(ptr) Variable Function - Store 8(i) 9 - Branch 13 - 10: Label - Store 18(j) 19 - Branch 12 - 11: Label - Return - 12: Label - 20: 6(int) Load 8(i) - 22: 6(int) IAdd 20 21 - Store 8(i) 22 - Branch 13 - 13: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 - LoopMerge 11 12 None - BranchConditional 17 10 11 - FunctionEnd +spv.for-simple.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 26 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 24 25 + Source ESSL 300 + Name 4 "main" + Name 8 "i" + Name 18 "j" + Name 24 "gl_VertexID" + Name 25 "gl_InstanceID" + Decorate 24(gl_VertexID) BuiltIn VertexId + Decorate 25(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 15: 6(int) Constant 10 + 16: TypeBool + 19: 6(int) Constant 12 + 21: 6(int) Constant 1 + 23: TypePointer Input 6(int) + 24(gl_VertexID): 23(ptr) Variable Input +25(gl_InstanceID): 23(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + 18(j): 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 12 13 None + BranchConditional 17 11 12 + 11: Label + Store 18(j) 19 + Branch 13 + 12: Label + Return + 13: Label + 20: 6(int) Load 8(i) + 22: 6(int) IAdd 20 21 + Store 8(i) 22 + Branch 10 + FunctionEnd diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 3e4cb28a..bba5fe0c 100755 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -75,31 +75,36 @@ Linked fragment stage: 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 Store 15(i) 16 - Branch 20 + Branch 17 17: Label - 29: 7(fvec4) Load 28(bigColor) - 30: 7(fvec4) Load 9(color) - 31: 7(fvec4) FAdd 30 29 - Store 9(color) 31 - Branch 19 - 18: Label + 21: 13(int) Load 15(i) + 24: 13(int) Load 23(Count) + 26: 25(bool) SLessThan 21 24 + LoopMerge 19 20 None + BranchConditional 26 18 19 + 18: Label + 29: 7(fvec4) Load 28(bigColor) + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 + Branch 20 + 19: Label 37: 7(fvec4) Load 9(color) Store 36(gl_FragColor) 37 Store 39(sum) 40 Store 41(i) 16 - Branch 45 - 19: Label + Branch 42 + 20: Label 32: 13(int) Load 15(i) 34: 13(int) IAdd 32 33 Store 15(i) 34 - Branch 20 - 20: Label - 21: 13(int) Load 15(i) - 24: 13(int) Load 23(Count) - 26: 25(bool) SLessThan 21 24 - LoopMerge 18 19 None - BranchConditional 26 17 18 - 42: Label + Branch 17 + 42: Label + 46: 13(int) Load 41(i) + 48: 25(bool) SLessThan 46 47 + LoopMerge 44 45 None + BranchConditional 48 43 44 + 43: Label 53: 13(int) Load 41(i) 55: 54(ptr) AccessChain 52(v4) 53 56: 49(int) Load 55 @@ -107,98 +112,93 @@ Linked fragment stage: 58: 6(float) Load 39(sum) 59: 6(float) FAdd 58 57 Store 39(sum) 59 - Branch 44 - 43: Label - Store 62(i) 16 - Branch 66 - 44: Label - 60: 13(int) Load 41(i) - 61: 13(int) IAdd 60 33 - Store 41(i) 61 Branch 45 - 45: Label - 46: 13(int) Load 41(i) - 48: 25(bool) SLessThan 46 47 - LoopMerge 43 44 None - BranchConditional 48 42 43 - 63: Label - 70: 13(int) Load 62(i) - 71: 13(int) Load 62(i) - 72: 54(ptr) AccessChain 52(v4) 71 - 73: 49(int) Load 72 - 75: 49(int) IMul 73 74 - 76: 6(float) ConvertUToF 75 - 77: 38(ptr) AccessChain 69(tv4) 70 - Store 77 76 - Branch 65 - 64: Label - 80: 6(float) Load 39(sum) - 81: 7(fvec4) CompositeConstruct 80 80 80 80 - 82: 7(fvec4) Load 69(tv4) - 83: 7(fvec4) FAdd 81 82 - 84: 7(fvec4) Load 36(gl_FragColor) - 85: 7(fvec4) FAdd 84 83 - Store 36(gl_FragColor) 85 - 88: 7(fvec4) Load 11(BaseColor) - 89: 87(fvec3) VectorShuffle 88 88 0 1 2 - 90: 7(fvec4) Load 86(r) - 91: 7(fvec4) VectorShuffle 90 89 4 5 6 3 - Store 86(r) 91 - Store 92(i) 16 - Branch 96 - 65: Label - 78: 13(int) Load 62(i) - 79: 13(int) IAdd 78 33 - Store 62(i) 79 - Branch 66 - 66: Label - 67: 13(int) Load 62(i) - 68: 25(bool) SLessThan 67 47 - LoopMerge 64 65 None - BranchConditional 68 63 64 - 93: Label - 102: 6(float) Load 101(f) - 104: 38(ptr) AccessChain 86(r) 103 - Store 104 102 - Branch 95 - 94: Label - 107: 7(fvec4) Load 86(r) - 108: 87(fvec3) VectorShuffle 107 107 0 1 2 - 109: 7(fvec4) Load 36(gl_FragColor) - 110: 87(fvec3) VectorShuffle 109 109 0 1 2 - 111: 87(fvec3) FAdd 110 108 - 112: 7(fvec4) Load 36(gl_FragColor) - 113: 7(fvec4) VectorShuffle 112 111 4 5 6 3 - Store 36(gl_FragColor) 113 - Store 114(i) 16 - Branch 118 - 95: Label - 105: 13(int) Load 92(i) - 106: 13(int) IAdd 105 33 - Store 92(i) 106 - Branch 96 - 96: Label - 97: 13(int) Load 92(i) - 98: 13(int) Load 23(Count) - 99: 25(bool) SLessThan 97 98 - LoopMerge 94 95 None - BranchConditional 99 93 94 - 115: Label - 122: 6(float) Load 101(f) - 123: 7(fvec4) Load 36(gl_FragColor) - 124: 7(fvec4) VectorTimesScalar 123 122 - Store 36(gl_FragColor) 124 - Branch 117 - 116: Label - Return - 117: Label - 125: 13(int) Load 114(i) - 126: 13(int) IAdd 125 47 - Store 114(i) 126 - Branch 118 - 118: Label - 119: 13(int) Load 114(i) - 121: 25(bool) SLessThan 119 120 - LoopMerge 116 117 None - BranchConditional 121 115 116 - FunctionEnd + 44: Label + Store 62(i) 16 + Branch 63 + 45: Label + 60: 13(int) Load 41(i) + 61: 13(int) IAdd 60 33 + Store 41(i) 61 + Branch 42 + 63: Label + 67: 13(int) Load 62(i) + 68: 25(bool) SLessThan 67 47 + LoopMerge 65 66 None + BranchConditional 68 64 65 + 64: Label + 70: 13(int) Load 62(i) + 71: 13(int) Load 62(i) + 72: 54(ptr) AccessChain 52(v4) 71 + 73: 49(int) Load 72 + 75: 49(int) IMul 73 74 + 76: 6(float) ConvertUToF 75 + 77: 38(ptr) AccessChain 69(tv4) 70 + Store 77 76 + Branch 66 + 65: Label + 80: 6(float) Load 39(sum) + 81: 7(fvec4) CompositeConstruct 80 80 80 80 + 82: 7(fvec4) Load 69(tv4) + 83: 7(fvec4) FAdd 81 82 + 84: 7(fvec4) Load 36(gl_FragColor) + 85: 7(fvec4) FAdd 84 83 + Store 36(gl_FragColor) 85 + 88: 7(fvec4) Load 11(BaseColor) + 89: 87(fvec3) VectorShuffle 88 88 0 1 2 + 90: 7(fvec4) Load 86(r) + 91: 7(fvec4) VectorShuffle 90 89 4 5 6 3 + Store 86(r) 91 + Store 92(i) 16 + Branch 93 + 66: Label + 78: 13(int) Load 62(i) + 79: 13(int) IAdd 78 33 + Store 62(i) 79 + Branch 63 + 93: Label + 97: 13(int) Load 92(i) + 98: 13(int) Load 23(Count) + 99: 25(bool) SLessThan 97 98 + LoopMerge 95 96 None + BranchConditional 99 94 95 + 94: Label + 102: 6(float) Load 101(f) + 104: 38(ptr) AccessChain 86(r) 103 + Store 104 102 + Branch 96 + 95: Label + 107: 7(fvec4) Load 86(r) + 108: 87(fvec3) VectorShuffle 107 107 0 1 2 + 109: 7(fvec4) Load 36(gl_FragColor) + 110: 87(fvec3) VectorShuffle 109 109 0 1 2 + 111: 87(fvec3) FAdd 110 108 + 112: 7(fvec4) Load 36(gl_FragColor) + 113: 7(fvec4) VectorShuffle 112 111 4 5 6 3 + Store 36(gl_FragColor) 113 + Store 114(i) 16 + Branch 115 + 96: Label + 105: 13(int) Load 92(i) + 106: 13(int) IAdd 105 33 + Store 92(i) 106 + Branch 93 + 115: Label + 119: 13(int) Load 114(i) + 121: 25(bool) SLessThan 119 120 + LoopMerge 117 118 None + BranchConditional 121 116 117 + 116: Label + 122: 6(float) Load 101(f) + 123: 7(fvec4) Load 36(gl_FragColor) + 124: 7(fvec4) VectorTimesScalar 123 122 + Store 36(gl_FragColor) 124 + Branch 118 + 117: Label + Return + 118: Label + 125: 13(int) Load 114(i) + 126: 13(int) IAdd 125 47 + Store 114(i) 126 + Branch 115 + FunctionEnd diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index 1f9cbce6..5e71aa2e 100755 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -159,59 +159,59 @@ Linked fragment stage: 74: 30(ptr) AccessChain 70(localArray) 71 Store 74 73 Store 75(i) 16 - Branch 79 + Branch 76 76: Label - 84: 6(int) Load 75(i) - 86: 30(ptr) AccessChain 83(a) 84 - Store 86 85 - Branch 78 - 77: Label + 80: 6(int) Load 75(i) + 82: 23(bool) SLessThan 80 81 + LoopMerge 78 79 None + BranchConditional 82 77 78 + 77: Label + 84: 6(int) Load 75(i) + 86: 30(ptr) AccessChain 83(a) 84 + Store 86 85 + Branch 79 + 78: Label 90: 6(int) Load 89(condition) 91: 23(bool) IEqual 90 28 SelectionMerge 93 None BranchConditional 91 92 93 - 78: Label + 79: Label 87: 6(int) Load 75(i) 88: 6(int) IAdd 87 28 Store 75(i) 88 - Branch 79 - 79: Label - 80: 6(int) Load 75(i) - 82: 23(bool) SLessThan 80 81 - LoopMerge 77 78 None - BranchConditional 82 76 77 - 92: Label - 94: 34 Load 70(localArray) - Store 83(a) 94 - Branch 93 - 93: Label - 98: 9(fvec4) Load 97(color) - 100: 99(ptr) AccessChain 12(locals2) 95 - Store 100 98 - 102: 42(ptr) AccessChain 40(coord) 101 - 103: 7(float) Load 102 - 105: 30(ptr) AccessChain 12(locals2) 95 104 - Store 105 103 - 108: 99(ptr) AccessChain 12(locals2) 95 - 109: 9(fvec4) Load 108 - 110: 30(ptr) AccessChain 36(localFArray) 37 - 111: 7(float) Load 110 - 112: 30(ptr) AccessChain 12(locals2) 27 28 - 113: 7(float) Load 112 - 114: 7(float) FAdd 111 113 - 115: 6(int) Load 68(x) - 116: 30(ptr) AccessChain 70(localArray) 115 - 117: 7(float) Load 116 - 118: 7(float) FAdd 114 117 - 119: 6(int) Load 68(x) - 120: 30(ptr) AccessChain 83(a) 119 - 121: 7(float) Load 120 - 122: 7(float) FAdd 118 121 - 123: 9(fvec4) VectorTimesScalar 109 122 - 128: 125 Load 127(samp2D) - 129: 38(fvec2) Load 40(coord) - 130: 9(fvec4) ImageSampleImplicitLod 128 129 - 131: 9(fvec4) FMul 123 130 - Store 107(gl_FragColor) 131 - Return - FunctionEnd + Branch 76 + 92: Label + 94: 34 Load 70(localArray) + Store 83(a) 94 + Branch 93 + 93: Label + 98: 9(fvec4) Load 97(color) + 100: 99(ptr) AccessChain 12(locals2) 95 + Store 100 98 + 102: 42(ptr) AccessChain 40(coord) 101 + 103: 7(float) Load 102 + 105: 30(ptr) AccessChain 12(locals2) 95 104 + Store 105 103 + 108: 99(ptr) AccessChain 12(locals2) 95 + 109: 9(fvec4) Load 108 + 110: 30(ptr) AccessChain 36(localFArray) 37 + 111: 7(float) Load 110 + 112: 30(ptr) AccessChain 12(locals2) 27 28 + 113: 7(float) Load 112 + 114: 7(float) FAdd 111 113 + 115: 6(int) Load 68(x) + 116: 30(ptr) AccessChain 70(localArray) 115 + 117: 7(float) Load 116 + 118: 7(float) FAdd 114 117 + 119: 6(int) Load 68(x) + 120: 30(ptr) AccessChain 83(a) 119 + 121: 7(float) Load 120 + 122: 7(float) FAdd 118 121 + 123: 9(fvec4) VectorTimesScalar 109 122 + 128: 125 Load 127(samp2D) + 129: 38(fvec2) Load 40(coord) + 130: 9(fvec4) ImageSampleImplicitLod 128 129 + 131: 9(fvec4) FMul 123 130 + Store 107(gl_FragColor) 131 + Return + FunctionEnd diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index d6ec0a99..5a8a7c2f 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -7,7 +7,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 714 +// Id's are bound by 720 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -29,48 +29,48 @@ Linked fragment stage: Name 143 "i" Name 151 "Count" Name 154 "bigColor2" - Name 164 "bigColor3" - Name 172 "i" - Name 187 "i" - Name 222 "i" - Name 244 "i" - Name 268 "i" - Name 295 "bigColor4" - Name 330 "bigColor5" - Name 336 "d5" - Name 352 "d6" - Name 365 "bigColor6" - Name 401 "d7" - Name 431 "bigColor7" - Name 449 "d8" - Name 491 "d9" - Name 522 "d10" - Name 530 "d11" - Name 540 "d12" - Name 565 "bigColor8" - Name 592 "gl_FragColor" - Name 600 "d14" - Name 605 "d15" - Name 624 "d16" - Name 660 "d18" - Name 671 "d17" - Name 697 "d13" - Name 698 "d19" - Name 699 "d20" - Name 700 "d21" - Name 701 "d22" - Name 702 "d23" - Name 703 "d24" - Name 704 "d25" - Name 705 "d26" - Name 706 "d27" - Name 707 "d28" - Name 708 "d29" - Name 709 "d30" - Name 710 "d31" - Name 711 "d32" - Name 712 "d33" - Name 713 "d34" + Name 165 "bigColor3" + Name 173 "i" + Name 188 "i" + Name 223 "i" + Name 245 "i" + Name 269 "i" + Name 297 "bigColor4" + Name 333 "bigColor5" + Name 339 "d5" + Name 355 "d6" + Name 368 "bigColor6" + Name 404 "d7" + Name 435 "bigColor7" + Name 454 "d8" + Name 496 "d9" + Name 527 "d10" + Name 535 "d11" + Name 545 "d12" + Name 570 "bigColor8" + Name 597 "gl_FragColor" + Name 605 "d14" + Name 610 "d15" + Name 629 "d16" + Name 666 "d18" + Name 677 "d17" + Name 703 "d13" + Name 704 "d19" + Name 705 "d20" + Name 706 "d21" + Name 707 "d22" + Name 708 "d23" + Name 709 "d24" + Name 710 "d25" + Name 711 "d26" + Name 712 "d27" + Name 713 "d28" + Name 714 "d29" + Name 715 "d30" + Name 716 "d31" + Name 717 "d32" + Name 718 "d33" + Name 719 "d34" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -109,978 +109,990 @@ Linked fragment stage: 151(Count): 150(ptr) Variable UniformConstant 154(bigColor2): 55(ptr) Variable UniformConstant 159: 141(int) Constant 1 - 164(bigColor3): 55(ptr) Variable UniformConstant - 178: 141(int) Constant 42 - 193: 141(int) Constant 100 - 197: 6(float) Constant 1101004800 - 228: 141(int) Constant 120 - 295(bigColor4): 55(ptr) Variable UniformConstant - 330(bigColor5): 55(ptr) Variable UniformConstant - 336(d5): 51(ptr) Variable UniformConstant - 352(d6): 51(ptr) Variable UniformConstant - 365(bigColor6): 55(ptr) Variable UniformConstant - 401(d7): 51(ptr) Variable UniformConstant - 426: 6(float) Constant 0 - 431(bigColor7): 55(ptr) Variable UniformConstant - 449(d8): 51(ptr) Variable UniformConstant - 466: 6(float) Constant 1073741824 - 491(d9): 51(ptr) Variable UniformConstant - 507: 6(float) Constant 1084227584 - 522(d10): 51(ptr) Variable UniformConstant - 530(d11): 51(ptr) Variable UniformConstant - 540(d12): 51(ptr) Variable UniformConstant - 563: 6(float) Constant 1092616192 - 565(bigColor8): 55(ptr) Variable UniformConstant - 591: TypePointer Output 7(fvec4) -592(gl_FragColor): 591(ptr) Variable Output - 600(d14): 51(ptr) Variable UniformConstant - 605(d15): 51(ptr) Variable UniformConstant - 624(d16): 51(ptr) Variable UniformConstant - 660(d18): 51(ptr) Variable UniformConstant - 671(d17): 51(ptr) Variable UniformConstant - 697(d13): 51(ptr) Variable UniformConstant - 698(d19): 51(ptr) Variable UniformConstant - 699(d20): 51(ptr) Variable UniformConstant - 700(d21): 51(ptr) Variable UniformConstant - 701(d22): 51(ptr) Variable UniformConstant - 702(d23): 51(ptr) Variable UniformConstant - 703(d24): 51(ptr) Variable UniformConstant - 704(d25): 51(ptr) Variable UniformConstant - 705(d26): 51(ptr) Variable UniformConstant - 706(d27): 51(ptr) Variable UniformConstant - 707(d28): 51(ptr) Variable UniformConstant - 708(d29): 51(ptr) Variable UniformConstant - 709(d30): 51(ptr) Variable UniformConstant - 710(d31): 51(ptr) Variable UniformConstant - 711(d32): 51(ptr) Variable UniformConstant - 712(d33): 51(ptr) Variable UniformConstant - 713(d34): 51(ptr) Variable UniformConstant + 165(bigColor3): 55(ptr) Variable UniformConstant + 179: 141(int) Constant 42 + 194: 141(int) Constant 100 + 198: 6(float) Constant 1101004800 + 229: 141(int) Constant 120 + 297(bigColor4): 55(ptr) Variable UniformConstant + 333(bigColor5): 55(ptr) Variable UniformConstant + 339(d5): 51(ptr) Variable UniformConstant + 355(d6): 51(ptr) Variable UniformConstant + 368(bigColor6): 55(ptr) Variable UniformConstant + 404(d7): 51(ptr) Variable UniformConstant + 430: 6(float) Constant 0 + 435(bigColor7): 55(ptr) Variable UniformConstant + 454(d8): 51(ptr) Variable UniformConstant + 471: 6(float) Constant 1073741824 + 496(d9): 51(ptr) Variable UniformConstant + 512: 6(float) Constant 1084227584 + 527(d10): 51(ptr) Variable UniformConstant + 535(d11): 51(ptr) Variable UniformConstant + 545(d12): 51(ptr) Variable UniformConstant + 568: 6(float) Constant 1092616192 + 570(bigColor8): 55(ptr) Variable UniformConstant + 596: TypePointer Output 7(fvec4) +597(gl_FragColor): 596(ptr) Variable Output + 605(d14): 51(ptr) Variable UniformConstant + 610(d15): 51(ptr) Variable UniformConstant + 629(d16): 51(ptr) Variable UniformConstant + 666(d18): 51(ptr) Variable UniformConstant + 677(d17): 51(ptr) Variable UniformConstant + 703(d13): 51(ptr) Variable UniformConstant + 704(d19): 51(ptr) Variable UniformConstant + 705(d20): 51(ptr) Variable UniformConstant + 706(d21): 51(ptr) Variable UniformConstant + 707(d22): 51(ptr) Variable UniformConstant + 708(d23): 51(ptr) Variable UniformConstant + 709(d24): 51(ptr) Variable UniformConstant + 710(d25): 51(ptr) Variable UniformConstant + 711(d26): 51(ptr) Variable UniformConstant + 712(d27): 51(ptr) Variable UniformConstant + 713(d28): 51(ptr) Variable UniformConstant + 714(d29): 51(ptr) Variable UniformConstant + 715(d30): 51(ptr) Variable UniformConstant + 716(d31): 51(ptr) Variable UniformConstant + 717(d32): 51(ptr) Variable UniformConstant + 718(d33): 51(ptr) Variable UniformConstant + 719(d34): 51(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function 143(i): 142(ptr) Variable Function - 172(i): 142(ptr) Variable Function - 187(i): 142(ptr) Variable Function - 222(i): 142(ptr) Variable Function - 244(i): 142(ptr) Variable Function - 268(i): 142(ptr) Variable Function + 173(i): 142(ptr) Variable Function + 188(i): 142(ptr) Variable Function + 223(i): 142(ptr) Variable Function + 245(i): 142(ptr) Variable Function + 269(i): 142(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 - Branch 16 + Branch 13 13: Label - 22: 21(ptr) AccessChain 9(color) 20 - 23: 6(float) Load 22 - 25: 17(bool) FOrdLessThan 23 24 - SelectionMerge 27 None - BranchConditional 25 26 27 + LoopMerge 15 16 None + BranchConditional 18 14 15 14: Label - Branch 48 - 15: Label - Branch 16 - 16: Label - LoopMerge 14 15 None - BranchConditional 18 13 14 + 22: 21(ptr) AccessChain 9(color) 20 + 23: 6(float) Load 22 + 25: 17(bool) FOrdLessThan 23 24 + SelectionMerge 27 None + BranchConditional 25 26 27 + 15: Label + Branch 45 + 16: Label + Branch 13 26: Label 29: 7(fvec4) Load 9(color) 30: 7(fvec4) FAdd 29 28 Store 9(color) 30 - Branch 14 - 27: Label - 32: 21(ptr) AccessChain 9(color) 20 - 33: 6(float) Load 32 - 35: 17(bool) FOrdLessThan 33 34 - SelectionMerge 37 None - BranchConditional 35 36 37 - 36: Label - 39: 7(fvec4) Load 9(color) - 40: 7(fvec4) FAdd 39 38 - Store 9(color) 40 - Branch 14 - 37: Label - 42: 7(fvec4) Load 9(color) - 43: 7(fvec4) FAdd 42 28 - Store 9(color) 43 - Branch 14 - 45: Label + Branch 15 + 27: Label + 32: 21(ptr) AccessChain 9(color) 20 + 33: 6(float) Load 32 + 35: 17(bool) FOrdLessThan 33 34 + SelectionMerge 37 None + BranchConditional 35 36 37 + 36: Label + 39: 7(fvec4) Load 9(color) + 40: 7(fvec4) FAdd 39 38 + Store 9(color) 40 + Branch 15 + 37: Label + 42: 7(fvec4) Load 9(color) + 43: 7(fvec4) FAdd 42 28 + Store 9(color) 43 + Branch 15 + 45: Label + 49: 21(ptr) AccessChain 9(color) 20 + 50: 6(float) Load 49 + 53: 6(float) Load 52(d) + 54: 17(bool) FOrdLessThan 50 53 + LoopMerge 47 48 None + BranchConditional 54 46 47 + 46: Label 57: 7(fvec4) Load 56(bigColor) 58: 7(fvec4) Load 9(color) 59: 7(fvec4) FAdd 58 57 Store 9(color) 59 - Branch 47 - 46: Label - Branch 63 - 47: Label Branch 48 - 48: Label - 49: 21(ptr) AccessChain 9(color) 20 - 50: 6(float) Load 49 - 53: 6(float) Load 52(d) - 54: 17(bool) FOrdLessThan 50 53 - LoopMerge 46 47 None - BranchConditional 54 45 46 - 60: Label - 70: 7(fvec4) Load 69(bigColor1_1) - 71: 7(fvec4) Load 9(color) - 72: 7(fvec4) FAdd 71 70 - Store 9(color) 72 - 74: 21(ptr) AccessChain 9(color) 73 - 75: 6(float) Load 74 - 76: 6(float) Load 52(d) - 77: 17(bool) FOrdLessThan 75 76 - SelectionMerge 79 None - BranchConditional 77 78 79 - 61: Label - Branch 87 - 62: Label - Branch 63 - 63: Label - 65: 21(ptr) AccessChain 9(color) 64 - 66: 6(float) Load 65 - 67: 6(float) Load 52(d) - 68: 17(bool) FOrdLessThan 66 67 - LoopMerge 61 62 None - BranchConditional 68 60 61 - 78: Label - Branch 62 - 79: Label - 81: 7(fvec4) Load 69(bigColor1_1) - 82: 7(fvec4) Load 9(color) - 83: 7(fvec4) FAdd 82 81 - Store 9(color) 83 - Branch 62 - 84: Label - 92: 7(fvec4) Load 9(color) - 94: 7(fvec4) CompositeConstruct 93 93 93 93 - 95: 7(fvec4) FAdd 92 94 - Store 9(color) 95 - Branch 86 - 85: Label - Branch 99 - 86: Label - Branch 87 - 87: Label - 88: 21(ptr) AccessChain 9(color) 20 - 89: 6(float) Load 88 - 91: 17(bool) FOrdLessThan 89 90 - LoopMerge 85 86 None - BranchConditional 91 84 85 - 96: Label - 115: 7(fvec4) Load 114(bigColor1_2) - 116: 7(fvec4) Load 9(color) - 117: 7(fvec4) FAdd 116 115 - Store 9(color) 117 - Branch 98 - 97: Label - Branch 121 - 98: Label - Branch 99 - 99: Label - 100: 21(ptr) AccessChain 9(color) 73 - 101: 6(float) Load 100 - 103: 6(float) Load 102(d2) - 104: 17(bool) FOrdLessThan 101 103 - SelectionMerge 106 None - BranchConditional 104 105 106 - 105: Label - 108: 21(ptr) AccessChain 9(color) 107 - 109: 6(float) Load 108 - 111: 6(float) Load 110(d3) - 112: 17(bool) FOrdLessThan 109 111 - Branch 106 - 106: Label - 113: 17(bool) Phi 104 99 112 105 - LoopMerge 97 98 None - BranchConditional 113 96 97 - 118: Label - 127: 7(fvec4) Load 126(bigColor1_3) - 128: 7(fvec4) Load 9(color) - 129: 7(fvec4) FAdd 128 127 - Store 9(color) 129 - 130: 21(ptr) AccessChain 9(color) 107 - 131: 6(float) Load 130 - 133: 6(float) Load 132(d4) - 134: 17(bool) FOrdLessThan 131 133 - SelectionMerge 136 None - BranchConditional 134 135 136 - 119: Label - Store 143(i) 144 - Branch 148 - 120: Label - Branch 121 - 121: Label - 122: 21(ptr) AccessChain 9(color) 64 - 123: 6(float) Load 122 - 124: 6(float) Load 110(d3) - 125: 17(bool) FOrdLessThan 123 124 - LoopMerge 119 120 None - BranchConditional 125 118 119 - 135: Label - Branch 119 - 136: Label - 138: 7(fvec4) Load 126(bigColor1_3) - 139: 7(fvec4) Load 9(color) - 140: 7(fvec4) FAdd 139 138 - Store 9(color) 140 - Branch 120 - 145: Label - 155: 7(fvec4) Load 154(bigColor2) - 156: 7(fvec4) Load 9(color) - 157: 7(fvec4) FAdd 156 155 - Store 9(color) 157 - Branch 147 - 146: Label - Branch 161 - 147: Label - 158: 141(int) Load 143(i) - 160: 141(int) IAdd 158 159 - Store 143(i) 160 - Branch 148 - 148: Label - 149: 141(int) Load 143(i) - 152: 141(int) Load 151(Count) - 153: 17(bool) SLessThan 149 152 - LoopMerge 146 147 None - BranchConditional 153 145 146 - 161: Label - 165: 7(fvec4) Load 164(bigColor3) - 166: 7(fvec4) Load 9(color) - 167: 7(fvec4) FAdd 166 165 - Store 9(color) 167 - Branch 163 - 162: Label - Store 172(i) 144 - Branch 176 - 163: Label - 168: 21(ptr) AccessChain 9(color) 20 - 169: 6(float) Load 168 - 170: 6(float) Load 102(d2) - 171: 17(bool) FOrdLessThan 169 170 - LoopMerge 162 163 None - BranchConditional 171 161 162 - 173: Label - 180: 6(float) Load 110(d3) - 181: 21(ptr) AccessChain 9(color) 64 - 182: 6(float) Load 181 - 183: 6(float) FAdd 182 180 - 184: 21(ptr) AccessChain 9(color) 64 - Store 184 183 - Branch 175 - 174: Label - Store 187(i) 144 - Branch 191 - 175: Label - 185: 141(int) Load 172(i) - 186: 141(int) IAdd 185 159 - Store 172(i) 186 - Branch 176 - 176: Label - 177: 141(int) Load 172(i) - 179: 17(bool) SLessThan 177 178 - LoopMerge 174 175 None - BranchConditional 179 173 174 - 188: Label - 195: 21(ptr) AccessChain 9(color) 64 - 196: 6(float) Load 195 - 198: 17(bool) FOrdLessThan 196 197 - SelectionMerge 200 None - BranchConditional 198 199 204 - 189: Label - Store 222(i) 144 - Branch 226 - 190: Label - 220: 141(int) Load 187(i) - 221: 141(int) IAdd 220 159 - Store 187(i) 221 - Branch 191 - 191: Label - 192: 141(int) Load 187(i) - 194: 17(bool) SLessThan 192 193 - LoopMerge 189 190 None - BranchConditional 194 188 189 - 199: Label - 201: 21(ptr) AccessChain 9(color) 20 - 202: 6(float) Load 201 - 203: 6(float) FAdd 202 93 - Store 201 203 - Branch 200 - 204: Label - 205: 21(ptr) AccessChain 9(color) 107 - 206: 6(float) Load 205 - 207: 6(float) FAdd 206 93 - Store 205 207 - Branch 200 - 200: Label - 208: 21(ptr) AccessChain 9(color) 73 - 209: 6(float) Load 208 - 210: 17(bool) FOrdLessThan 209 197 - SelectionMerge 212 None - BranchConditional 210 211 212 - 211: Label - 213: 21(ptr) AccessChain 9(color) 64 - 214: 6(float) Load 213 - 215: 21(ptr) AccessChain 9(color) 107 - 216: 6(float) Load 215 - 217: 17(bool) FOrdGreaterThan 214 216 - SelectionMerge 219 None - BranchConditional 217 218 219 - 218: Label - Branch 219 - 219: Label - Branch 212 - 212: Label - Branch 190 - 223: Label - 230: 21(ptr) AccessChain 9(color) 64 - 231: 6(float) Load 230 - 232: 17(bool) FOrdLessThan 231 197 - SelectionMerge 234 None - BranchConditional 232 233 238 - 224: Label - Store 244(i) 144 - Branch 248 - 225: Label - 242: 141(int) Load 222(i) - 243: 141(int) IAdd 242 159 - Store 222(i) 243 - Branch 226 - 226: Label - 227: 141(int) Load 222(i) - 229: 17(bool) SLessThan 227 228 - LoopMerge 224 225 None - BranchConditional 229 223 224 - 233: Label - 235: 21(ptr) AccessChain 9(color) 20 - 236: 6(float) Load 235 - 237: 6(float) FAdd 236 93 - Store 235 237 - Branch 234 - 238: Label - 239: 21(ptr) AccessChain 9(color) 107 - 240: 6(float) Load 239 - 241: 6(float) FAdd 240 93 - Store 239 241 - Branch 234 - 234: Label - Branch 225 - 245: Label - 251: 6(float) Load 110(d3) - 252: 21(ptr) AccessChain 9(color) 64 - 253: 6(float) Load 252 - 254: 6(float) FAdd 253 251 - 255: 21(ptr) AccessChain 9(color) 64 - Store 255 254 - 256: 21(ptr) AccessChain 9(color) 20 - 257: 6(float) Load 256 - 258: 6(float) Load 132(d4) - 259: 17(bool) FOrdLessThan 257 258 - SelectionMerge 261 None - BranchConditional 259 260 261 - 246: Label - Store 268(i) 144 - Branch 272 - 247: Label - 266: 141(int) Load 244(i) - 267: 141(int) IAdd 266 159 - Store 244(i) 267 - Branch 248 - 248: Label - 249: 141(int) Load 244(i) - 250: 17(bool) SLessThan 249 178 - LoopMerge 246 247 None - BranchConditional 250 245 246 - 260: Label - Branch 247 - 261: Label - 263: 21(ptr) AccessChain 9(color) 73 - 264: 6(float) Load 263 - 265: 6(float) FAdd 264 93 - Store 263 265 - Branch 247 - 269: Label - 275: 6(float) Load 110(d3) - 276: 21(ptr) AccessChain 9(color) 64 - 277: 6(float) Load 276 - 278: 6(float) FAdd 277 275 - 279: 21(ptr) AccessChain 9(color) 64 - Store 279 278 - 280: 21(ptr) AccessChain 9(color) 20 - 281: 6(float) Load 280 - 282: 6(float) Load 132(d4) - 283: 17(bool) FOrdLessThan 281 282 - SelectionMerge 285 None - BranchConditional 283 284 285 - 270: Label - Branch 292 - 271: Label - 290: 141(int) Load 268(i) - 291: 141(int) IAdd 290 159 - Store 268(i) 291 - Branch 272 - 272: Label - 273: 141(int) Load 268(i) - 274: 17(bool) SLessThan 273 178 - LoopMerge 270 271 None - BranchConditional 274 269 270 - 284: Label - Branch 270 - 285: Label - 287: 21(ptr) AccessChain 9(color) 73 - 288: 6(float) Load 287 - 289: 6(float) FAdd 288 93 - Store 287 289 - Branch 271 - 292: Label - 296: 7(fvec4) Load 295(bigColor4) - 297: 7(fvec4) Load 9(color) - 298: 7(fvec4) FAdd 297 296 - Store 9(color) 298 - 299: 21(ptr) AccessChain 9(color) 20 - 300: 6(float) Load 299 - 301: 6(float) Load 132(d4) - 302: 17(bool) FOrdLessThan 300 301 - SelectionMerge 304 None - BranchConditional 302 303 304 - 293: Label - Branch 327 - 294: Label - 323: 21(ptr) AccessChain 9(color) 64 - 324: 6(float) Load 323 - 325: 6(float) Load 132(d4) - 326: 17(bool) FOrdLessThan 324 325 - LoopMerge 293 294 None - BranchConditional 326 292 293 - 303: Label - Branch 294 - 304: Label - 306: 21(ptr) AccessChain 9(color) 107 - 307: 6(float) Load 306 - 308: 6(float) Load 132(d4) - 309: 17(bool) FOrdLessThan 307 308 - SelectionMerge 311 None - BranchConditional 309 310 317 - 310: Label - 312: 6(float) Load 132(d4) - 313: 21(ptr) AccessChain 9(color) 107 - 314: 6(float) Load 313 - 315: 6(float) FAdd 314 312 - 316: 21(ptr) AccessChain 9(color) 107 - Store 316 315 - Branch 311 - 317: Label - 318: 6(float) Load 132(d4) - 319: 21(ptr) AccessChain 9(color) 20 - 320: 6(float) Load 319 - 321: 6(float) FAdd 320 318 - 322: 21(ptr) AccessChain 9(color) 20 - Store 322 321 - Branch 311 - 311: Label - Branch 294 - 327: Label - 331: 7(fvec4) Load 330(bigColor5) - 332: 7(fvec4) Load 9(color) - 333: 7(fvec4) FAdd 332 331 - Store 9(color) 333 - 334: 21(ptr) AccessChain 9(color) 107 - 335: 6(float) Load 334 - 337: 6(float) Load 336(d5) - 338: 17(bool) FOrdLessThan 335 337 - SelectionMerge 340 None - BranchConditional 338 339 340 - 328: Label - 350: 21(ptr) AccessChain 9(color) 20 - 351: 6(float) Load 350 - 353: 6(float) Load 352(d6) - 354: 17(bool) FOrdLessThan 351 353 - SelectionMerge 356 None - BranchConditional 354 355 369 - 329: Label - 346: 21(ptr) AccessChain 9(color) 20 - 347: 6(float) Load 346 - 348: 6(float) Load 336(d5) - 349: 17(bool) FOrdLessThan 347 348 - LoopMerge 328 329 None - BranchConditional 349 327 328 - 339: Label - 341: 6(float) Load 336(d5) - 342: 21(ptr) AccessChain 9(color) 107 - 343: 6(float) Load 342 - 344: 6(float) FAdd 343 341 - 345: 21(ptr) AccessChain 9(color) 107 - Store 345 344 - Branch 340 - 340: Label - Branch 329 - 355: Label - Branch 360 - 357: Label - 366: 7(fvec4) Load 365(bigColor6) - 367: 7(fvec4) Load 9(color) - 368: 7(fvec4) FAdd 367 366 - Store 9(color) 368 - Branch 359 - 358: Label - Branch 356 - 359: Label - Branch 360 - 360: Label - 361: 21(ptr) AccessChain 9(color) 107 - 362: 6(float) Load 361 - 363: 6(float) Load 352(d6) - 364: 17(bool) FOrdLessThan 362 363 - LoopMerge 358 359 None - BranchConditional 364 357 358 - 369: Label - Branch 373 - 370: Label - 378: 51(ptr) AccessChain 365(bigColor6) 64 - 379: 6(float) Load 378 - 380: 21(ptr) AccessChain 9(color) 64 - 381: 6(float) Load 380 - 382: 6(float) FAdd 381 379 - 383: 21(ptr) AccessChain 9(color) 64 - Store 383 382 - Branch 372 - 371: Label - Branch 356 - 372: Label - Branch 373 - 373: Label - 374: 21(ptr) AccessChain 9(color) 64 - 375: 6(float) Load 374 - 376: 6(float) Load 352(d6) - 377: 17(bool) FOrdLessThan 375 376 - LoopMerge 371 372 None - BranchConditional 377 370 371 - 356: Label - 384: 21(ptr) AccessChain 9(color) 20 - 385: 6(float) Load 384 - 386: 6(float) Load 352(d6) - 387: 17(bool) FOrdLessThan 385 386 - SelectionMerge 389 None - BranchConditional 387 388 407 - 388: Label - Branch 393 - 390: Label - 398: 7(fvec4) Load 365(bigColor6) - 399: 7(fvec4) Load 9(color) - 400: 7(fvec4) FAdd 399 398 - Store 9(color) 400 - 402: 6(float) Load 401(d7) - 403: 17(bool) FOrdLessThan 402 93 - SelectionMerge 405 None - BranchConditional 403 404 405 - 391: Label - Branch 389 - 392: Label - Branch 393 - 393: Label - 394: 21(ptr) AccessChain 9(color) 107 - 395: 6(float) Load 394 - 396: 6(float) Load 352(d6) - 397: 17(bool) FOrdLessThan 395 396 - LoopMerge 391 392 None - BranchConditional 397 390 391 - 404: Label - Branch 391 - 405: Label - Branch 392 - 407: Label - Branch 411 - 408: Label - 416: 51(ptr) AccessChain 365(bigColor6) 64 - 417: 6(float) Load 416 - 418: 21(ptr) AccessChain 9(color) 64 - 419: 6(float) Load 418 - 420: 6(float) FAdd 419 417 - 421: 21(ptr) AccessChain 9(color) 64 - Store 421 420 - Branch 410 - 409: Label - Branch 389 - 410: Label - Branch 411 - 411: Label - 412: 21(ptr) AccessChain 9(color) 64 - 413: 6(float) Load 412 - 414: 6(float) Load 352(d6) - 415: 17(bool) FOrdLessThan 413 414 - LoopMerge 409 410 None - BranchConditional 415 408 409 - 389: Label - Branch 422 - 422: Label - 425: 6(float) Load 401(d7) - 427: 17(bool) FOrdLessThan 425 426 - SelectionMerge 429 None - BranchConditional 427 428 429 - 423: Label - Branch 446 - 424: Label - LoopMerge 423 424 None - BranchConditional 18 422 423 - 428: Label - Branch 423 - 429: Label - 432: 7(fvec4) Load 431(bigColor7) - 433: 7(fvec4) Load 9(color) - 434: 7(fvec4) FAdd 433 432 - Store 9(color) 434 - 435: 6(float) Load 401(d7) - 436: 17(bool) FOrdLessThan 435 93 - SelectionMerge 438 None - BranchConditional 436 437 438 - 437: Label - 439: 21(ptr) AccessChain 9(color) 64 - 440: 6(float) Load 439 - 441: 6(float) FAdd 440 93 - Store 439 441 - Branch 423 - 438: Label - 443: 7(fvec4) Load 11(BaseColor) - 444: 7(fvec4) Load 9(color) - 445: 7(fvec4) FAdd 444 443 - Store 9(color) 445 - Branch 424 - 446: Label - 450: 6(float) Load 449(d8) - 451: 17(bool) FOrdLessThan 450 426 - SelectionMerge 453 None - BranchConditional 451 452 453 - 447: Label - Branch 488 - 448: Label - 481: 21(ptr) AccessChain 9(color) 64 - 482: 6(float) Load 481 - 483: 6(float) Load 449(d8) - 484: 17(bool) FOrdLessThan 482 483 - LoopMerge 447 448 None - BranchConditional 484 446 447 - 452: Label - Branch 447 - 453: Label - 455: 7(fvec4) Load 431(bigColor7) - 456: 7(fvec4) Load 9(color) - 457: 7(fvec4) FAdd 456 455 - Store 9(color) 457 - 458: 6(float) Load 449(d8) - 459: 17(bool) FOrdLessThan 458 93 - SelectionMerge 461 None - BranchConditional 459 460 461 - 460: Label - 462: 21(ptr) AccessChain 9(color) 64 - 463: 6(float) Load 462 - 464: 6(float) FAdd 463 93 - Store 462 464 - 465: 6(float) Load 449(d8) - 467: 17(bool) FOrdLessThan 465 466 - SelectionMerge 469 None - BranchConditional 467 468 473 - 468: Label - 470: 21(ptr) AccessChain 9(color) 107 - 471: 6(float) Load 470 - 472: 6(float) FAdd 471 93 - Store 470 472 - Branch 469 - 473: Label - 474: 21(ptr) AccessChain 9(color) 20 - 475: 6(float) Load 474 - 476: 6(float) FAdd 475 93 - Store 474 476 - Branch 469 - 469: Label - Branch 447 - 461: Label - 478: 7(fvec4) Load 11(BaseColor) - 479: 7(fvec4) Load 9(color) - 480: 7(fvec4) FAdd 479 478 - Store 9(color) 480 - Branch 448 - 485: Label - 494: 6(float) Load 491(d9) - 495: 6(float) Load 449(d8) - 496: 17(bool) FOrdGreaterThan 494 495 - SelectionMerge 498 None - BranchConditional 496 497 498 - 486: Label - Branch 519 - 487: Label - Branch 488 - 488: Label - 489: 21(ptr) AccessChain 9(color) 73 - 490: 6(float) Load 489 - 492: 6(float) Load 491(d9) - 493: 17(bool) FOrdLessThan 490 492 - LoopMerge 486 487 None - BranchConditional 493 485 486 - 497: Label - 499: 21(ptr) AccessChain 9(color) 20 - 500: 6(float) Load 499 - 501: 6(float) Load 401(d7) - 502: 17(bool) FOrdLessThanEqual 500 501 - SelectionMerge 504 None - BranchConditional 502 503 504 - 503: Label - 505: 21(ptr) AccessChain 9(color) 64 - 506: 6(float) Load 505 - 508: 17(bool) FOrdEqual 506 507 - SelectionMerge 510 None - BranchConditional 508 509 514 - 509: Label - 511: 21(ptr) AccessChain 9(color) 73 - 512: 6(float) Load 511 - 513: 6(float) FAdd 512 93 - Store 511 513 - Branch 510 - 514: Label - Branch 486 - 510: Label - Branch 504 - 504: Label - Branch 498 - 498: Label - Branch 487 - 516: Label - 525: 21(ptr) AccessChain 9(color) 107 - 526: 6(float) Load 525 - 527: 6(float) FAdd 526 93 - Store 525 527 - 528: 21(ptr) AccessChain 9(color) 107 - 529: 6(float) Load 528 - 531: 6(float) Load 530(d11) - 532: 17(bool) FOrdLessThan 529 531 - SelectionMerge 534 None - BranchConditional 532 533 534 - 517: Label - Branch 560 - 518: Label - Branch 519 - 519: Label - 520: 21(ptr) AccessChain 9(color) 64 - 521: 6(float) Load 520 - 523: 6(float) Load 522(d10) - 524: 17(bool) FOrdLessThan 521 523 - LoopMerge 517 518 None - BranchConditional 524 516 517 - 533: Label - 535: 21(ptr) AccessChain 9(color) 64 - 536: 6(float) Load 535 - 537: 6(float) FAdd 536 93 - Store 535 537 - 538: 21(ptr) AccessChain 9(color) 73 - 539: 6(float) Load 538 - 541: 6(float) Load 540(d12) - 542: 17(bool) FOrdLessThan 539 541 - SelectionMerge 544 None - BranchConditional 542 543 548 - 543: Label - 545: 21(ptr) AccessChain 9(color) 73 - 546: 6(float) Load 545 - 547: 6(float) FAdd 546 93 - Store 545 547 - Branch 544 - 548: Label - 549: 21(ptr) AccessChain 9(color) 20 - 550: 6(float) Load 549 - 551: 6(float) FAdd 550 93 - Store 549 551 - Branch 544 - 544: Label - Branch 518 - 534: Label - 553: 7(fvec4) Load 9(color) - 554: 7(fvec4) CompositeConstruct 93 93 93 93 - 555: 7(fvec4) FAdd 553 554 - Store 9(color) 555 - Branch 517 - 557: Label - 566: 7(fvec4) Load 565(bigColor8) - 567: 7(fvec4) Load 9(color) - 568: 7(fvec4) FAdd 567 566 - Store 9(color) 568 - 569: 21(ptr) AccessChain 9(color) 64 - 570: 6(float) Load 569 - 571: 6(float) Load 449(d8) - 572: 17(bool) FOrdLessThan 570 571 - SelectionMerge 574 None - BranchConditional 572 573 574 - 558: Label - 588: 7(fvec4) Load 9(color) - 589: 7(fvec4) CompositeConstruct 93 93 93 93 - 590: 7(fvec4) FAdd 588 589 - Store 9(color) 590 - 593: 7(fvec4) Load 9(color) - Store 592(gl_FragColor) 593 - Branch 597 - 559: Label - Branch 560 - 560: Label - 561: 21(ptr) AccessChain 9(color) 20 - 562: 6(float) Load 561 - 564: 17(bool) FOrdLessThan 562 563 - LoopMerge 558 559 None - BranchConditional 564 557 558 - 573: Label - 575: 21(ptr) AccessChain 9(color) 73 - 576: 6(float) Load 575 - 577: 6(float) Load 352(d6) - 578: 17(bool) FOrdLessThan 576 577 - SelectionMerge 580 None - BranchConditional 578 579 580 - 579: Label - Branch 559 - 580: Label - Branch 574 - 574: Label - 582: 51(ptr) AccessChain 565(bigColor8) 20 - 583: 6(float) Load 582 - 584: 21(ptr) AccessChain 9(color) 107 - 585: 6(float) Load 584 - 586: 6(float) FAdd 585 583 - 587: 21(ptr) AccessChain 9(color) 107 - Store 587 586 - Branch 559 - 594: Label - 603: 21(ptr) AccessChain 9(color) 107 - 604: 6(float) Load 603 - 606: 6(float) Load 605(d15) - 607: 17(bool) FOrdLessThan 604 606 - SelectionMerge 609 None - BranchConditional 607 608 611 - 595: Label - 615: 7(fvec4) Load 9(color) - 616: 7(fvec4) CompositeConstruct 93 93 93 93 - 617: 7(fvec4) FAdd 615 616 - Store 9(color) 617 - Branch 621 - 596: Label - Branch 597 - 597: Label - 598: 21(ptr) AccessChain 9(color) 20 - 599: 6(float) Load 598 - 601: 6(float) Load 600(d14) - 602: 17(bool) FOrdLessThan 599 601 - LoopMerge 595 596 None - BranchConditional 602 594 595 - 608: Label - Return - 611: Label - 612: 7(fvec4) Load 9(color) - 613: 7(fvec4) CompositeConstruct 93 93 93 93 - 614: 7(fvec4) FAdd 612 613 - Store 9(color) 614 - Branch 609 - 609: Label - Branch 596 - 618: Label - 627: 21(ptr) AccessChain 9(color) 73 - 628: 6(float) Load 627 - 629: 6(float) FAdd 628 93 - Store 627 629 - Branch 620 - 619: Label - Branch 633 - 620: Label - Branch 621 - 621: Label - 622: 21(ptr) AccessChain 9(color) 73 - 623: 6(float) Load 622 - 625: 6(float) Load 624(d16) - 626: 17(bool) FOrdLessThan 623 625 - LoopMerge 619 620 None - BranchConditional 626 618 619 - 630: Label - 645: 7(fvec4) Load 114(bigColor1_2) - 646: 7(fvec4) Load 9(color) - 647: 7(fvec4) FAdd 646 645 - Store 9(color) 647 - 648: 21(ptr) AccessChain 9(color) 64 - 649: 6(float) Load 648 - 650: 6(float) Load 110(d3) - 651: 17(bool) FOrdLessThan 649 650 - SelectionMerge 653 None - BranchConditional 651 652 653 - 631: Label - Branch 655 - 632: Label - Branch 633 - 633: Label - 634: 21(ptr) AccessChain 9(color) 73 - 635: 6(float) Load 634 - 636: 6(float) Load 102(d2) - 637: 17(bool) FOrdLessThan 635 636 - SelectionMerge 639 None - BranchConditional 637 638 639 - 638: Label - 640: 21(ptr) AccessChain 9(color) 107 - 641: 6(float) Load 640 - 642: 6(float) Load 110(d3) - 643: 17(bool) FOrdLessThan 641 642 - Branch 639 - 639: Label - 644: 17(bool) Phi 637 633 643 638 - LoopMerge 631 632 None - BranchConditional 644 630 631 - 652: Label - Return - 653: Label - Branch 632 - 655: Label - 658: 21(ptr) AccessChain 9(color) 107 - 659: 6(float) Load 658 - 661: 6(float) Load 660(d18) - 662: 17(bool) FOrdLessThan 659 661 - SelectionMerge 664 None - BranchConditional 662 663 664 - 656: Label - Branch 677 - 657: Label - 669: 21(ptr) AccessChain 9(color) 20 - 670: 6(float) Load 669 - 672: 6(float) Load 671(d17) - 673: 17(bool) FOrdLessThan 670 672 - LoopMerge 656 657 None - BranchConditional 673 655 656 - 663: Label - Return - 664: Label - 666: 7(fvec4) Load 9(color) - 667: 7(fvec4) CompositeConstruct 93 93 93 93 - 668: 7(fvec4) FAdd 666 667 - Store 9(color) 668 - Branch 657 - 674: Label - 682: 21(ptr) AccessChain 9(color) 73 - 683: 6(float) Load 682 - 684: 6(float) Load 624(d16) - 685: 17(bool) FOrdLessThan 683 684 - SelectionMerge 687 None - BranchConditional 685 686 689 - 675: Label - 693: 7(fvec4) Load 9(color) - 694: 7(fvec4) CompositeConstruct 93 93 93 93 - 695: 7(fvec4) FAdd 693 694 - Store 9(color) 695 - 696: 7(fvec4) Load 9(color) - Store 592(gl_FragColor) 696 - Return - 676: Label - Branch 677 - 677: Label - 678: 21(ptr) AccessChain 9(color) 107 - 679: 6(float) Load 678 - 680: 6(float) Load 624(d16) - 681: 17(bool) FOrdLessThan 679 680 - LoopMerge 675 676 None - BranchConditional 681 674 675 - 686: Label - Kill - 689: Label - 690: 7(fvec4) Load 9(color) - 691: 7(fvec4) CompositeConstruct 93 93 93 93 - 692: 7(fvec4) FAdd 690 691 - Store 9(color) 692 - Branch 687 - 687: Label - Branch 676 - FunctionEnd + 47: Label + Branch 60 + 48: Label + Branch 45 + 60: Label + 65: 21(ptr) AccessChain 9(color) 64 + 66: 6(float) Load 65 + 67: 6(float) Load 52(d) + 68: 17(bool) FOrdLessThan 66 67 + LoopMerge 62 63 None + BranchConditional 68 61 62 + 61: Label + 70: 7(fvec4) Load 69(bigColor1_1) + 71: 7(fvec4) Load 9(color) + 72: 7(fvec4) FAdd 71 70 + Store 9(color) 72 + 74: 21(ptr) AccessChain 9(color) 73 + 75: 6(float) Load 74 + 76: 6(float) Load 52(d) + 77: 17(bool) FOrdLessThan 75 76 + SelectionMerge 79 None + BranchConditional 77 78 79 + 62: Label + Branch 84 + 63: Label + Branch 60 + 78: Label + Branch 63 + 79: Label + 81: 7(fvec4) Load 69(bigColor1_1) + 82: 7(fvec4) Load 9(color) + 83: 7(fvec4) FAdd 82 81 + Store 9(color) 83 + Branch 63 + 84: Label + 88: 21(ptr) AccessChain 9(color) 20 + 89: 6(float) Load 88 + 91: 17(bool) FOrdLessThan 89 90 + LoopMerge 86 87 None + BranchConditional 91 85 86 + 85: Label + 92: 7(fvec4) Load 9(color) + 94: 7(fvec4) CompositeConstruct 93 93 93 93 + 95: 7(fvec4) FAdd 92 94 + Store 9(color) 95 + Branch 87 + 86: Label + Branch 96 + 87: Label + Branch 84 + 96: Label + 100: 21(ptr) AccessChain 9(color) 73 + 101: 6(float) Load 100 + 103: 6(float) Load 102(d2) + 104: 17(bool) FOrdLessThan 101 103 + SelectionMerge 106 None + BranchConditional 104 105 106 + 97: Label + 115: 7(fvec4) Load 114(bigColor1_2) + 116: 7(fvec4) Load 9(color) + 117: 7(fvec4) FAdd 116 115 + Store 9(color) 117 + Branch 99 + 98: Label + Branch 118 + 99: Label + Branch 96 + 105: Label + 108: 21(ptr) AccessChain 9(color) 107 + 109: 6(float) Load 108 + 111: 6(float) Load 110(d3) + 112: 17(bool) FOrdLessThan 109 111 + Branch 106 + 106: Label + 113: 17(bool) Phi 104 96 112 105 + LoopMerge 98 99 None + BranchConditional 113 97 98 + 118: Label + 122: 21(ptr) AccessChain 9(color) 64 + 123: 6(float) Load 122 + 124: 6(float) Load 110(d3) + 125: 17(bool) FOrdLessThan 123 124 + LoopMerge 120 121 None + BranchConditional 125 119 120 + 119: Label + 127: 7(fvec4) Load 126(bigColor1_3) + 128: 7(fvec4) Load 9(color) + 129: 7(fvec4) FAdd 128 127 + Store 9(color) 129 + 130: 21(ptr) AccessChain 9(color) 107 + 131: 6(float) Load 130 + 133: 6(float) Load 132(d4) + 134: 17(bool) FOrdLessThan 131 133 + SelectionMerge 136 None + BranchConditional 134 135 136 + 120: Label + Store 143(i) 144 + Branch 145 + 121: Label + Branch 118 + 135: Label + Branch 120 + 136: Label + 138: 7(fvec4) Load 126(bigColor1_3) + 139: 7(fvec4) Load 9(color) + 140: 7(fvec4) FAdd 139 138 + Store 9(color) 140 + Branch 121 + 145: Label + 149: 141(int) Load 143(i) + 152: 141(int) Load 151(Count) + 153: 17(bool) SLessThan 149 152 + LoopMerge 147 148 None + BranchConditional 153 146 147 + 146: Label + 155: 7(fvec4) Load 154(bigColor2) + 156: 7(fvec4) Load 9(color) + 157: 7(fvec4) FAdd 156 155 + Store 9(color) 157 + Branch 148 + 147: Label + Branch 161 + 148: Label + 158: 141(int) Load 143(i) + 160: 141(int) IAdd 158 159 + Store 143(i) 160 + Branch 145 + 161: Label + LoopMerge 163 164 None + Branch 162 + 162: Label + 166: 7(fvec4) Load 165(bigColor3) + 167: 7(fvec4) Load 9(color) + 168: 7(fvec4) FAdd 167 166 + Store 9(color) 168 + Branch 164 + 163: Label + Store 173(i) 144 + Branch 174 + 164: Label + 169: 21(ptr) AccessChain 9(color) 20 + 170: 6(float) Load 169 + 171: 6(float) Load 102(d2) + 172: 17(bool) FOrdLessThan 170 171 + BranchConditional 172 161 163 + 174: Label + 178: 141(int) Load 173(i) + 180: 17(bool) SLessThan 178 179 + LoopMerge 176 177 None + BranchConditional 180 175 176 + 175: Label + 181: 6(float) Load 110(d3) + 182: 21(ptr) AccessChain 9(color) 64 + 183: 6(float) Load 182 + 184: 6(float) FAdd 183 181 + 185: 21(ptr) AccessChain 9(color) 64 + Store 185 184 + Branch 177 + 176: Label + Store 188(i) 144 + Branch 189 + 177: Label + 186: 141(int) Load 173(i) + 187: 141(int) IAdd 186 159 + Store 173(i) 187 + Branch 174 + 189: Label + 193: 141(int) Load 188(i) + 195: 17(bool) SLessThan 193 194 + LoopMerge 191 192 None + BranchConditional 195 190 191 + 190: Label + 196: 21(ptr) AccessChain 9(color) 64 + 197: 6(float) Load 196 + 199: 17(bool) FOrdLessThan 197 198 + SelectionMerge 201 None + BranchConditional 199 200 205 + 191: Label + Store 223(i) 144 + Branch 224 + 192: Label + 221: 141(int) Load 188(i) + 222: 141(int) IAdd 221 159 + Store 188(i) 222 + Branch 189 + 200: Label + 202: 21(ptr) AccessChain 9(color) 20 + 203: 6(float) Load 202 + 204: 6(float) FAdd 203 93 + Store 202 204 + Branch 201 + 205: Label + 206: 21(ptr) AccessChain 9(color) 107 + 207: 6(float) Load 206 + 208: 6(float) FAdd 207 93 + Store 206 208 + Branch 201 + 201: Label + 209: 21(ptr) AccessChain 9(color) 73 + 210: 6(float) Load 209 + 211: 17(bool) FOrdLessThan 210 198 + SelectionMerge 213 None + BranchConditional 211 212 213 + 212: Label + 214: 21(ptr) AccessChain 9(color) 64 + 215: 6(float) Load 214 + 216: 21(ptr) AccessChain 9(color) 107 + 217: 6(float) Load 216 + 218: 17(bool) FOrdGreaterThan 215 217 + SelectionMerge 220 None + BranchConditional 218 219 220 + 219: Label + Branch 220 + 220: Label + Branch 213 + 213: Label + Branch 192 + 224: Label + 228: 141(int) Load 223(i) + 230: 17(bool) SLessThan 228 229 + LoopMerge 226 227 None + BranchConditional 230 225 226 + 225: Label + 231: 21(ptr) AccessChain 9(color) 64 + 232: 6(float) Load 231 + 233: 17(bool) FOrdLessThan 232 198 + SelectionMerge 235 None + BranchConditional 233 234 239 + 226: Label + Store 245(i) 144 + Branch 246 + 227: Label + 243: 141(int) Load 223(i) + 244: 141(int) IAdd 243 159 + Store 223(i) 244 + Branch 224 + 234: Label + 236: 21(ptr) AccessChain 9(color) 20 + 237: 6(float) Load 236 + 238: 6(float) FAdd 237 93 + Store 236 238 + Branch 235 + 239: Label + 240: 21(ptr) AccessChain 9(color) 107 + 241: 6(float) Load 240 + 242: 6(float) FAdd 241 93 + Store 240 242 + Branch 235 + 235: Label + Branch 227 + 246: Label + 250: 141(int) Load 245(i) + 251: 17(bool) SLessThan 250 179 + LoopMerge 248 249 None + BranchConditional 251 247 248 + 247: Label + 252: 6(float) Load 110(d3) + 253: 21(ptr) AccessChain 9(color) 64 + 254: 6(float) Load 253 + 255: 6(float) FAdd 254 252 + 256: 21(ptr) AccessChain 9(color) 64 + Store 256 255 + 257: 21(ptr) AccessChain 9(color) 20 + 258: 6(float) Load 257 + 259: 6(float) Load 132(d4) + 260: 17(bool) FOrdLessThan 258 259 + SelectionMerge 262 None + BranchConditional 260 261 262 + 248: Label + Store 269(i) 144 + Branch 270 + 249: Label + 267: 141(int) Load 245(i) + 268: 141(int) IAdd 267 159 + Store 245(i) 268 + Branch 246 + 261: Label + Branch 249 + 262: Label + 264: 21(ptr) AccessChain 9(color) 73 + 265: 6(float) Load 264 + 266: 6(float) FAdd 265 93 + Store 264 266 + Branch 249 + 270: Label + 274: 141(int) Load 269(i) + 275: 17(bool) SLessThan 274 179 + LoopMerge 272 273 None + BranchConditional 275 271 272 + 271: Label + 276: 6(float) Load 110(d3) + 277: 21(ptr) AccessChain 9(color) 64 + 278: 6(float) Load 277 + 279: 6(float) FAdd 278 276 + 280: 21(ptr) AccessChain 9(color) 64 + Store 280 279 + 281: 21(ptr) AccessChain 9(color) 20 + 282: 6(float) Load 281 + 283: 6(float) Load 132(d4) + 284: 17(bool) FOrdLessThan 282 283 + SelectionMerge 286 None + BranchConditional 284 285 286 + 272: Label + Branch 293 + 273: Label + 291: 141(int) Load 269(i) + 292: 141(int) IAdd 291 159 + Store 269(i) 292 + Branch 270 + 285: Label + Branch 272 + 286: Label + 288: 21(ptr) AccessChain 9(color) 73 + 289: 6(float) Load 288 + 290: 6(float) FAdd 289 93 + Store 288 290 + Branch 273 + 293: Label + LoopMerge 295 296 None + Branch 294 + 294: Label + 298: 7(fvec4) Load 297(bigColor4) + 299: 7(fvec4) Load 9(color) + 300: 7(fvec4) FAdd 299 298 + Store 9(color) 300 + 301: 21(ptr) AccessChain 9(color) 20 + 302: 6(float) Load 301 + 303: 6(float) Load 132(d4) + 304: 17(bool) FOrdLessThan 302 303 + SelectionMerge 306 None + BranchConditional 304 305 306 + 295: Label + Branch 329 + 296: Label + 325: 21(ptr) AccessChain 9(color) 64 + 326: 6(float) Load 325 + 327: 6(float) Load 132(d4) + 328: 17(bool) FOrdLessThan 326 327 + BranchConditional 328 293 295 + 305: Label + Branch 296 + 306: Label + 308: 21(ptr) AccessChain 9(color) 107 + 309: 6(float) Load 308 + 310: 6(float) Load 132(d4) + 311: 17(bool) FOrdLessThan 309 310 + SelectionMerge 313 None + BranchConditional 311 312 319 + 312: Label + 314: 6(float) Load 132(d4) + 315: 21(ptr) AccessChain 9(color) 107 + 316: 6(float) Load 315 + 317: 6(float) FAdd 316 314 + 318: 21(ptr) AccessChain 9(color) 107 + Store 318 317 + Branch 313 + 319: Label + 320: 6(float) Load 132(d4) + 321: 21(ptr) AccessChain 9(color) 20 + 322: 6(float) Load 321 + 323: 6(float) FAdd 322 320 + 324: 21(ptr) AccessChain 9(color) 20 + Store 324 323 + Branch 313 + 313: Label + Branch 296 + 329: Label + LoopMerge 331 332 None + Branch 330 + 330: Label + 334: 7(fvec4) Load 333(bigColor5) + 335: 7(fvec4) Load 9(color) + 336: 7(fvec4) FAdd 335 334 + Store 9(color) 336 + 337: 21(ptr) AccessChain 9(color) 107 + 338: 6(float) Load 337 + 340: 6(float) Load 339(d5) + 341: 17(bool) FOrdLessThan 338 340 + SelectionMerge 343 None + BranchConditional 341 342 343 + 331: Label + 353: 21(ptr) AccessChain 9(color) 20 + 354: 6(float) Load 353 + 356: 6(float) Load 355(d6) + 357: 17(bool) FOrdLessThan 354 356 + SelectionMerge 359 None + BranchConditional 357 358 372 + 332: Label + 349: 21(ptr) AccessChain 9(color) 20 + 350: 6(float) Load 349 + 351: 6(float) Load 339(d5) + 352: 17(bool) FOrdLessThan 350 351 + BranchConditional 352 329 331 + 342: Label + 344: 6(float) Load 339(d5) + 345: 21(ptr) AccessChain 9(color) 107 + 346: 6(float) Load 345 + 347: 6(float) FAdd 346 344 + 348: 21(ptr) AccessChain 9(color) 107 + Store 348 347 + Branch 343 + 343: Label + Branch 332 + 358: Label + Branch 360 + 360: Label + 364: 21(ptr) AccessChain 9(color) 107 + 365: 6(float) Load 364 + 366: 6(float) Load 355(d6) + 367: 17(bool) FOrdLessThan 365 366 + LoopMerge 362 363 None + BranchConditional 367 361 362 + 361: Label + 369: 7(fvec4) Load 368(bigColor6) + 370: 7(fvec4) Load 9(color) + 371: 7(fvec4) FAdd 370 369 + Store 9(color) 371 + Branch 363 + 362: Label + Branch 359 + 363: Label + Branch 360 + 372: Label + Branch 373 + 373: Label + 377: 21(ptr) AccessChain 9(color) 64 + 378: 6(float) Load 377 + 379: 6(float) Load 355(d6) + 380: 17(bool) FOrdLessThan 378 379 + LoopMerge 375 376 None + BranchConditional 380 374 375 + 374: Label + 381: 51(ptr) AccessChain 368(bigColor6) 64 + 382: 6(float) Load 381 + 383: 21(ptr) AccessChain 9(color) 64 + 384: 6(float) Load 383 + 385: 6(float) FAdd 384 382 + 386: 21(ptr) AccessChain 9(color) 64 + Store 386 385 + Branch 376 + 375: Label + Branch 359 + 376: Label + Branch 373 + 359: Label + 387: 21(ptr) AccessChain 9(color) 20 + 388: 6(float) Load 387 + 389: 6(float) Load 355(d6) + 390: 17(bool) FOrdLessThan 388 389 + SelectionMerge 392 None + BranchConditional 390 391 410 + 391: Label + Branch 393 + 393: Label + 397: 21(ptr) AccessChain 9(color) 107 + 398: 6(float) Load 397 + 399: 6(float) Load 355(d6) + 400: 17(bool) FOrdLessThan 398 399 + LoopMerge 395 396 None + BranchConditional 400 394 395 + 394: Label + 401: 7(fvec4) Load 368(bigColor6) + 402: 7(fvec4) Load 9(color) + 403: 7(fvec4) FAdd 402 401 + Store 9(color) 403 + 405: 6(float) Load 404(d7) + 406: 17(bool) FOrdLessThan 405 93 + SelectionMerge 408 None + BranchConditional 406 407 408 + 395: Label + Branch 392 + 396: Label + Branch 393 + 407: Label + Branch 395 + 408: Label + Branch 396 + 410: Label + Branch 411 + 411: Label + 415: 21(ptr) AccessChain 9(color) 64 + 416: 6(float) Load 415 + 417: 6(float) Load 355(d6) + 418: 17(bool) FOrdLessThan 416 417 + LoopMerge 413 414 None + BranchConditional 418 412 413 + 412: Label + 419: 51(ptr) AccessChain 368(bigColor6) 64 + 420: 6(float) Load 419 + 421: 21(ptr) AccessChain 9(color) 64 + 422: 6(float) Load 421 + 423: 6(float) FAdd 422 420 + 424: 21(ptr) AccessChain 9(color) 64 + Store 424 423 + Branch 414 + 413: Label + Branch 392 + 414: Label + Branch 411 + 392: Label + Branch 425 + 425: Label + LoopMerge 427 428 None + Branch 426 + 426: Label + 429: 6(float) Load 404(d7) + 431: 17(bool) FOrdLessThan 429 430 + SelectionMerge 433 None + BranchConditional 431 432 433 + 427: Label + Branch 450 + 428: Label + BranchConditional 18 425 427 + 432: Label + Branch 427 + 433: Label + 436: 7(fvec4) Load 435(bigColor7) + 437: 7(fvec4) Load 9(color) + 438: 7(fvec4) FAdd 437 436 + Store 9(color) 438 + 439: 6(float) Load 404(d7) + 440: 17(bool) FOrdLessThan 439 93 + SelectionMerge 442 None + BranchConditional 440 441 442 + 441: Label + 443: 21(ptr) AccessChain 9(color) 64 + 444: 6(float) Load 443 + 445: 6(float) FAdd 444 93 + Store 443 445 + Branch 427 + 442: Label + 447: 7(fvec4) Load 11(BaseColor) + 448: 7(fvec4) Load 9(color) + 449: 7(fvec4) FAdd 448 447 + Store 9(color) 449 + Branch 428 + 450: Label + LoopMerge 452 453 None + Branch 451 + 451: Label + 455: 6(float) Load 454(d8) + 456: 17(bool) FOrdLessThan 455 430 + SelectionMerge 458 None + BranchConditional 456 457 458 + 452: Label + Branch 490 + 453: Label + 486: 21(ptr) AccessChain 9(color) 64 + 487: 6(float) Load 486 + 488: 6(float) Load 454(d8) + 489: 17(bool) FOrdLessThan 487 488 + BranchConditional 489 450 452 + 457: Label + Branch 452 + 458: Label + 460: 7(fvec4) Load 435(bigColor7) + 461: 7(fvec4) Load 9(color) + 462: 7(fvec4) FAdd 461 460 + Store 9(color) 462 + 463: 6(float) Load 454(d8) + 464: 17(bool) FOrdLessThan 463 93 + SelectionMerge 466 None + BranchConditional 464 465 466 + 465: Label + 467: 21(ptr) AccessChain 9(color) 64 + 468: 6(float) Load 467 + 469: 6(float) FAdd 468 93 + Store 467 469 + 470: 6(float) Load 454(d8) + 472: 17(bool) FOrdLessThan 470 471 + SelectionMerge 474 None + BranchConditional 472 473 478 + 473: Label + 475: 21(ptr) AccessChain 9(color) 107 + 476: 6(float) Load 475 + 477: 6(float) FAdd 476 93 + Store 475 477 + Branch 474 + 478: Label + 479: 21(ptr) AccessChain 9(color) 20 + 480: 6(float) Load 479 + 481: 6(float) FAdd 480 93 + Store 479 481 + Branch 474 + 474: Label + Branch 452 + 466: Label + 483: 7(fvec4) Load 11(BaseColor) + 484: 7(fvec4) Load 9(color) + 485: 7(fvec4) FAdd 484 483 + Store 9(color) 485 + Branch 453 + 490: Label + 494: 21(ptr) AccessChain 9(color) 73 + 495: 6(float) Load 494 + 497: 6(float) Load 496(d9) + 498: 17(bool) FOrdLessThan 495 497 + LoopMerge 492 493 None + BranchConditional 498 491 492 + 491: Label + 499: 6(float) Load 496(d9) + 500: 6(float) Load 454(d8) + 501: 17(bool) FOrdGreaterThan 499 500 + SelectionMerge 503 None + BranchConditional 501 502 503 + 492: Label + Branch 521 + 493: Label + Branch 490 + 502: Label + 504: 21(ptr) AccessChain 9(color) 20 + 505: 6(float) Load 504 + 506: 6(float) Load 404(d7) + 507: 17(bool) FOrdLessThanEqual 505 506 + SelectionMerge 509 None + BranchConditional 507 508 509 + 508: Label + 510: 21(ptr) AccessChain 9(color) 64 + 511: 6(float) Load 510 + 513: 17(bool) FOrdEqual 511 512 + SelectionMerge 515 None + BranchConditional 513 514 519 + 514: Label + 516: 21(ptr) AccessChain 9(color) 73 + 517: 6(float) Load 516 + 518: 6(float) FAdd 517 93 + Store 516 518 + Branch 515 + 519: Label + Branch 492 + 515: Label + Branch 509 + 509: Label + Branch 503 + 503: Label + Branch 493 + 521: Label + 525: 21(ptr) AccessChain 9(color) 64 + 526: 6(float) Load 525 + 528: 6(float) Load 527(d10) + 529: 17(bool) FOrdLessThan 526 528 + LoopMerge 523 524 None + BranchConditional 529 522 523 + 522: Label + 530: 21(ptr) AccessChain 9(color) 107 + 531: 6(float) Load 530 + 532: 6(float) FAdd 531 93 + Store 530 532 + 533: 21(ptr) AccessChain 9(color) 107 + 534: 6(float) Load 533 + 536: 6(float) Load 535(d11) + 537: 17(bool) FOrdLessThan 534 536 + SelectionMerge 539 None + BranchConditional 537 538 539 + 523: Label + Branch 562 + 524: Label + Branch 521 + 538: Label + 540: 21(ptr) AccessChain 9(color) 64 + 541: 6(float) Load 540 + 542: 6(float) FAdd 541 93 + Store 540 542 + 543: 21(ptr) AccessChain 9(color) 73 + 544: 6(float) Load 543 + 546: 6(float) Load 545(d12) + 547: 17(bool) FOrdLessThan 544 546 + SelectionMerge 549 None + BranchConditional 547 548 553 + 548: Label + 550: 21(ptr) AccessChain 9(color) 73 + 551: 6(float) Load 550 + 552: 6(float) FAdd 551 93 + Store 550 552 + Branch 549 + 553: Label + 554: 21(ptr) AccessChain 9(color) 20 + 555: 6(float) Load 554 + 556: 6(float) FAdd 555 93 + Store 554 556 + Branch 549 + 549: Label + Branch 524 + 539: Label + 558: 7(fvec4) Load 9(color) + 559: 7(fvec4) CompositeConstruct 93 93 93 93 + 560: 7(fvec4) FAdd 558 559 + Store 9(color) 560 + Branch 523 + 562: Label + 566: 21(ptr) AccessChain 9(color) 20 + 567: 6(float) Load 566 + 569: 17(bool) FOrdLessThan 567 568 + LoopMerge 564 565 None + BranchConditional 569 563 564 + 563: Label + 571: 7(fvec4) Load 570(bigColor8) + 572: 7(fvec4) Load 9(color) + 573: 7(fvec4) FAdd 572 571 + Store 9(color) 573 + 574: 21(ptr) AccessChain 9(color) 64 + 575: 6(float) Load 574 + 576: 6(float) Load 454(d8) + 577: 17(bool) FOrdLessThan 575 576 + SelectionMerge 579 None + BranchConditional 577 578 579 + 564: Label + 593: 7(fvec4) Load 9(color) + 594: 7(fvec4) CompositeConstruct 93 93 93 93 + 595: 7(fvec4) FAdd 593 594 + Store 9(color) 595 + 598: 7(fvec4) Load 9(color) + Store 597(gl_FragColor) 598 + Branch 599 + 565: Label + Branch 562 + 578: Label + 580: 21(ptr) AccessChain 9(color) 73 + 581: 6(float) Load 580 + 582: 6(float) Load 355(d6) + 583: 17(bool) FOrdLessThan 581 582 + SelectionMerge 585 None + BranchConditional 583 584 585 + 584: Label + Branch 565 + 585: Label + Branch 579 + 579: Label + 587: 51(ptr) AccessChain 570(bigColor8) 20 + 588: 6(float) Load 587 + 589: 21(ptr) AccessChain 9(color) 107 + 590: 6(float) Load 589 + 591: 6(float) FAdd 590 588 + 592: 21(ptr) AccessChain 9(color) 107 + Store 592 591 + Branch 565 + 599: Label + 603: 21(ptr) AccessChain 9(color) 20 + 604: 6(float) Load 603 + 606: 6(float) Load 605(d14) + 607: 17(bool) FOrdLessThan 604 606 + LoopMerge 601 602 None + BranchConditional 607 600 601 + 600: Label + 608: 21(ptr) AccessChain 9(color) 107 + 609: 6(float) Load 608 + 611: 6(float) Load 610(d15) + 612: 17(bool) FOrdLessThan 609 611 + SelectionMerge 614 None + BranchConditional 612 613 616 + 601: Label + 620: 7(fvec4) Load 9(color) + 621: 7(fvec4) CompositeConstruct 93 93 93 93 + 622: 7(fvec4) FAdd 620 621 + Store 9(color) 622 + Branch 623 + 602: Label + Branch 599 + 613: Label + Return + 616: Label + 617: 7(fvec4) Load 9(color) + 618: 7(fvec4) CompositeConstruct 93 93 93 93 + 619: 7(fvec4) FAdd 617 618 + Store 9(color) 619 + Branch 614 + 614: Label + Branch 602 + 623: Label + 627: 21(ptr) AccessChain 9(color) 73 + 628: 6(float) Load 627 + 630: 6(float) Load 629(d16) + 631: 17(bool) FOrdLessThan 628 630 + LoopMerge 625 626 None + BranchConditional 631 624 625 + 624: Label + 632: 21(ptr) AccessChain 9(color) 73 + 633: 6(float) Load 632 + 634: 6(float) FAdd 633 93 + Store 632 634 + Branch 626 + 625: Label + Branch 635 + 626: Label + Branch 623 + 635: Label + 639: 21(ptr) AccessChain 9(color) 73 + 640: 6(float) Load 639 + 641: 6(float) Load 102(d2) + 642: 17(bool) FOrdLessThan 640 641 + SelectionMerge 644 None + BranchConditional 642 643 644 + 636: Label + 650: 7(fvec4) Load 114(bigColor1_2) + 651: 7(fvec4) Load 9(color) + 652: 7(fvec4) FAdd 651 650 + Store 9(color) 652 + 653: 21(ptr) AccessChain 9(color) 64 + 654: 6(float) Load 653 + 655: 6(float) Load 110(d3) + 656: 17(bool) FOrdLessThan 654 655 + SelectionMerge 658 None + BranchConditional 656 657 658 + 637: Label + Branch 660 + 638: Label + Branch 635 + 643: Label + 645: 21(ptr) AccessChain 9(color) 107 + 646: 6(float) Load 645 + 647: 6(float) Load 110(d3) + 648: 17(bool) FOrdLessThan 646 647 + Branch 644 + 644: Label + 649: 17(bool) Phi 642 635 648 643 + LoopMerge 637 638 None + BranchConditional 649 636 637 + 657: Label + Return + 658: Label + Branch 638 + 660: Label + LoopMerge 662 663 None + Branch 661 + 661: Label + 664: 21(ptr) AccessChain 9(color) 107 + 665: 6(float) Load 664 + 667: 6(float) Load 666(d18) + 668: 17(bool) FOrdLessThan 665 667 + SelectionMerge 670 None + BranchConditional 668 669 670 + 662: Label + Branch 680 + 663: Label + 675: 21(ptr) AccessChain 9(color) 20 + 676: 6(float) Load 675 + 678: 6(float) Load 677(d17) + 679: 17(bool) FOrdLessThan 676 678 + BranchConditional 679 660 662 + 669: Label + Return + 670: Label + 672: 7(fvec4) Load 9(color) + 673: 7(fvec4) CompositeConstruct 93 93 93 93 + 674: 7(fvec4) FAdd 672 673 + Store 9(color) 674 + Branch 663 + 680: Label + 684: 21(ptr) AccessChain 9(color) 107 + 685: 6(float) Load 684 + 686: 6(float) Load 629(d16) + 687: 17(bool) FOrdLessThan 685 686 + LoopMerge 682 683 None + BranchConditional 687 681 682 + 681: Label + 688: 21(ptr) AccessChain 9(color) 73 + 689: 6(float) Load 688 + 690: 6(float) Load 629(d16) + 691: 17(bool) FOrdLessThan 689 690 + SelectionMerge 693 None + BranchConditional 691 692 695 + 682: Label + 699: 7(fvec4) Load 9(color) + 700: 7(fvec4) CompositeConstruct 93 93 93 93 + 701: 7(fvec4) FAdd 699 700 + Store 9(color) 701 + 702: 7(fvec4) Load 9(color) + Store 597(gl_FragColor) 702 + Return + 683: Label + Branch 680 + 692: Label + Kill + 695: Label + 696: 7(fvec4) Load 9(color) + 697: 7(fvec4) CompositeConstruct 93 93 93 93 + 698: 7(fvec4) FAdd 696 697 + Store 9(color) 698 + Branch 693 + 693: Label + Branch 683 + FunctionEnd diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index ff7a8f2f..fa7313e7 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -7,7 +7,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 186 +// Id's are bound by 187 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -18,53 +18,53 @@ Linked fragment stage: Name 4 "main" Name 9 "color" Name 11 "BaseColor" - Name 17 "bigColor4" - Name 27 "d4" - Name 79 "d13" - Name 139 "gl_FragColor" - Name 141 "bigColor" - Name 142 "bigColor1_1" - Name 143 "bigColor1_2" - Name 144 "bigColor1_3" - Name 145 "bigColor2" - Name 146 "bigColor3" - Name 147 "bigColor5" - Name 148 "bigColor6" - Name 149 "bigColor7" - Name 150 "bigColor8" - Name 151 "d" - Name 152 "d2" - Name 153 "d3" - Name 154 "d5" - Name 155 "d6" - Name 156 "d7" - Name 157 "d8" - Name 158 "d9" - Name 159 "d10" - Name 160 "d11" - Name 161 "d12" - Name 162 "d14" - Name 163 "d15" - Name 164 "d16" - Name 165 "d17" - Name 166 "d18" - Name 167 "d19" - Name 168 "d20" - Name 169 "d21" - Name 170 "d22" - Name 171 "d23" - Name 172 "d24" - Name 173 "d25" - Name 174 "d26" - Name 175 "d27" - Name 176 "d28" - Name 177 "d29" - Name 178 "d30" - Name 179 "d31" - Name 180 "d32" - Name 181 "d33" - Name 182 "d34" - Name 185 "Count" + Name 18 "bigColor4" + Name 28 "d4" + Name 80 "d13" + Name 140 "gl_FragColor" + Name 142 "bigColor" + Name 143 "bigColor1_1" + Name 144 "bigColor1_2" + Name 145 "bigColor1_3" + Name 146 "bigColor2" + Name 147 "bigColor3" + Name 148 "bigColor5" + Name 149 "bigColor6" + Name 150 "bigColor7" + Name 151 "bigColor8" + Name 152 "d" + Name 153 "d2" + Name 154 "d3" + Name 155 "d5" + Name 156 "d6" + Name 157 "d7" + Name 158 "d8" + Name 159 "d9" + Name 160 "d10" + Name 161 "d11" + Name 162 "d12" + Name 163 "d14" + Name 164 "d15" + Name 165 "d16" + Name 166 "d17" + Name 167 "d18" + Name 168 "d19" + Name 169 "d20" + Name 170 "d21" + Name 171 "d22" + Name 172 "d23" + Name 173 "d24" + Name 174 "d25" + Name 175 "d26" + Name 176 "d27" + Name 177 "d28" + Name 178 "d29" + Name 179 "d30" + Name 180 "d31" + Name 181 "d32" + Name 182 "d33" + Name 183 "d34" + Name 186 "Count" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -72,67 +72,67 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 16: TypePointer UniformConstant 7(fvec4) - 17(bigColor4): 16(ptr) Variable UniformConstant - 21: TypeInt 32 0 - 22: 21(int) Constant 0 - 23: TypePointer Function 6(float) - 26: TypePointer UniformConstant 6(float) - 27(d4): 26(ptr) Variable UniformConstant - 29: TypeBool - 33: 6(float) Constant 1073741824 - 34: 21(int) Constant 2 - 47: 6(float) Constant 1065353216 - 50: 21(int) Constant 1 - 76: 21(int) Constant 3 - 79(d13): 26(ptr) Variable UniformConstant - 138: TypePointer Output 7(fvec4) -139(gl_FragColor): 138(ptr) Variable Output - 141(bigColor): 16(ptr) Variable UniformConstant -142(bigColor1_1): 16(ptr) Variable UniformConstant -143(bigColor1_2): 16(ptr) Variable UniformConstant -144(bigColor1_3): 16(ptr) Variable UniformConstant - 145(bigColor2): 16(ptr) Variable UniformConstant - 146(bigColor3): 16(ptr) Variable UniformConstant - 147(bigColor5): 16(ptr) Variable UniformConstant - 148(bigColor6): 16(ptr) Variable UniformConstant - 149(bigColor7): 16(ptr) Variable UniformConstant - 150(bigColor8): 16(ptr) Variable UniformConstant - 151(d): 26(ptr) Variable UniformConstant - 152(d2): 26(ptr) Variable UniformConstant - 153(d3): 26(ptr) Variable UniformConstant - 154(d5): 26(ptr) Variable UniformConstant - 155(d6): 26(ptr) Variable UniformConstant - 156(d7): 26(ptr) Variable UniformConstant - 157(d8): 26(ptr) Variable UniformConstant - 158(d9): 26(ptr) Variable UniformConstant - 159(d10): 26(ptr) Variable UniformConstant - 160(d11): 26(ptr) Variable UniformConstant - 161(d12): 26(ptr) Variable UniformConstant - 162(d14): 26(ptr) Variable UniformConstant - 163(d15): 26(ptr) Variable UniformConstant - 164(d16): 26(ptr) Variable UniformConstant - 165(d17): 26(ptr) Variable UniformConstant - 166(d18): 26(ptr) Variable UniformConstant - 167(d19): 26(ptr) Variable UniformConstant - 168(d20): 26(ptr) Variable UniformConstant - 169(d21): 26(ptr) Variable UniformConstant - 170(d22): 26(ptr) Variable UniformConstant - 171(d23): 26(ptr) Variable UniformConstant - 172(d24): 26(ptr) Variable UniformConstant - 173(d25): 26(ptr) Variable UniformConstant - 174(d26): 26(ptr) Variable UniformConstant - 175(d27): 26(ptr) Variable UniformConstant - 176(d28): 26(ptr) Variable UniformConstant - 177(d29): 26(ptr) Variable UniformConstant - 178(d30): 26(ptr) Variable UniformConstant - 179(d31): 26(ptr) Variable UniformConstant - 180(d32): 26(ptr) Variable UniformConstant - 181(d33): 26(ptr) Variable UniformConstant - 182(d34): 26(ptr) Variable UniformConstant - 183: TypeInt 32 1 - 184: TypePointer UniformConstant 183(int) - 185(Count): 184(ptr) Variable UniformConstant + 17: TypePointer UniformConstant 7(fvec4) + 18(bigColor4): 17(ptr) Variable UniformConstant + 22: TypeInt 32 0 + 23: 22(int) Constant 0 + 24: TypePointer Function 6(float) + 27: TypePointer UniformConstant 6(float) + 28(d4): 27(ptr) Variable UniformConstant + 30: TypeBool + 34: 6(float) Constant 1073741824 + 35: 22(int) Constant 2 + 48: 6(float) Constant 1065353216 + 51: 22(int) Constant 1 + 77: 22(int) Constant 3 + 80(d13): 27(ptr) Variable UniformConstant + 139: TypePointer Output 7(fvec4) +140(gl_FragColor): 139(ptr) Variable Output + 142(bigColor): 17(ptr) Variable UniformConstant +143(bigColor1_1): 17(ptr) Variable UniformConstant +144(bigColor1_2): 17(ptr) Variable UniformConstant +145(bigColor1_3): 17(ptr) Variable UniformConstant + 146(bigColor2): 17(ptr) Variable UniformConstant + 147(bigColor3): 17(ptr) Variable UniformConstant + 148(bigColor5): 17(ptr) Variable UniformConstant + 149(bigColor6): 17(ptr) Variable UniformConstant + 150(bigColor7): 17(ptr) Variable UniformConstant + 151(bigColor8): 17(ptr) Variable UniformConstant + 152(d): 27(ptr) Variable UniformConstant + 153(d2): 27(ptr) Variable UniformConstant + 154(d3): 27(ptr) Variable UniformConstant + 155(d5): 27(ptr) Variable UniformConstant + 156(d6): 27(ptr) Variable UniformConstant + 157(d7): 27(ptr) Variable UniformConstant + 158(d8): 27(ptr) Variable UniformConstant + 159(d9): 27(ptr) Variable UniformConstant + 160(d10): 27(ptr) Variable UniformConstant + 161(d11): 27(ptr) Variable UniformConstant + 162(d12): 27(ptr) Variable UniformConstant + 163(d14): 27(ptr) Variable UniformConstant + 164(d15): 27(ptr) Variable UniformConstant + 165(d16): 27(ptr) Variable UniformConstant + 166(d17): 27(ptr) Variable UniformConstant + 167(d18): 27(ptr) Variable UniformConstant + 168(d19): 27(ptr) Variable UniformConstant + 169(d20): 27(ptr) Variable UniformConstant + 170(d21): 27(ptr) Variable UniformConstant + 171(d22): 27(ptr) Variable UniformConstant + 172(d23): 27(ptr) Variable UniformConstant + 173(d24): 27(ptr) Variable UniformConstant + 174(d25): 27(ptr) Variable UniformConstant + 175(d26): 27(ptr) Variable UniformConstant + 176(d27): 27(ptr) Variable UniformConstant + 177(d28): 27(ptr) Variable UniformConstant + 178(d29): 27(ptr) Variable UniformConstant + 179(d30): 27(ptr) Variable UniformConstant + 180(d31): 27(ptr) Variable UniformConstant + 181(d32): 27(ptr) Variable UniformConstant + 182(d33): 27(ptr) Variable UniformConstant + 183(d34): 27(ptr) Variable UniformConstant + 184: TypeInt 32 1 + 185: TypePointer UniformConstant 184(int) + 186(Count): 185(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -140,160 +140,162 @@ Linked fragment stage: Store 9(color) 12 Branch 13 13: Label - 18: 7(fvec4) Load 17(bigColor4) - 19: 7(fvec4) Load 9(color) - 20: 7(fvec4) FAdd 19 18 - Store 9(color) 20 - 24: 23(ptr) AccessChain 9(color) 22 - 25: 6(float) Load 24 - 28: 6(float) Load 27(d4) - 30: 29(bool) FOrdLessThan 25 28 - SelectionMerge 32 None - BranchConditional 30 31 32 - 14: Label - Branch 75 + LoopMerge 15 16 None + Branch 14 + 14: Label + 19: 7(fvec4) Load 18(bigColor4) + 20: 7(fvec4) Load 9(color) + 21: 7(fvec4) FAdd 20 19 + Store 9(color) 21 + 25: 24(ptr) AccessChain 9(color) 23 + 26: 6(float) Load 25 + 29: 6(float) Load 28(d4) + 31: 30(bool) FOrdLessThan 26 29 + SelectionMerge 33 None + BranchConditional 31 32 33 15: Label - 68: 23(ptr) AccessChain 9(color) 34 - 69: 6(float) Load 68 - 70: 6(float) Load 27(d4) - 71: 29(bool) FOrdLessThan 69 70 - LoopMerge 14 15 None - BranchConditional 71 13 14 - 31: Label - 35: 23(ptr) AccessChain 9(color) 34 - 36: 6(float) Load 35 - 37: 6(float) FAdd 36 33 - 38: 23(ptr) AccessChain 9(color) 34 - Store 38 37 - 39: 23(ptr) AccessChain 9(color) 34 - 40: 6(float) Load 39 - 41: 6(float) Load 27(d4) - 42: 29(bool) FOrdLessThan 40 41 - SelectionMerge 44 None - BranchConditional 42 43 44 - 43: Label - 45: 23(ptr) AccessChain 9(color) 22 - 46: 6(float) Load 45 - 48: 6(float) FAdd 46 47 - Store 45 48 - Branch 15 + Branch 73 + 16: Label + 69: 24(ptr) AccessChain 9(color) 35 + 70: 6(float) Load 69 + 71: 6(float) Load 28(d4) + 72: 30(bool) FOrdLessThan 70 71 + BranchConditional 72 13 15 + 32: Label + 36: 24(ptr) AccessChain 9(color) 35 + 37: 6(float) Load 36 + 38: 6(float) FAdd 37 34 + 39: 24(ptr) AccessChain 9(color) 35 + Store 39 38 + 40: 24(ptr) AccessChain 9(color) 35 + 41: 6(float) Load 40 + 42: 6(float) Load 28(d4) + 43: 30(bool) FOrdLessThan 41 42 + SelectionMerge 45 None + BranchConditional 43 44 45 44: Label - Branch 32 - 32: Label - 51: 23(ptr) AccessChain 9(color) 50 - 52: 6(float) Load 51 - 53: 6(float) Load 27(d4) - 54: 29(bool) FOrdLessThan 52 53 - SelectionMerge 56 None - BranchConditional 54 55 62 - 55: Label - 57: 6(float) Load 27(d4) - 58: 23(ptr) AccessChain 9(color) 50 - 59: 6(float) Load 58 - 60: 6(float) FAdd 59 57 - 61: 23(ptr) AccessChain 9(color) 50 - Store 61 60 - Branch 56 - 62: Label - 63: 6(float) Load 27(d4) - 64: 23(ptr) AccessChain 9(color) 22 - 65: 6(float) Load 64 - 66: 6(float) FAdd 65 63 - 67: 23(ptr) AccessChain 9(color) 22 - Store 67 66 - Branch 56 - 56: Label - Branch 15 - 72: Label - 82: 23(ptr) AccessChain 9(color) 34 - 83: 6(float) Load 82 - 84: 6(float) Load 79(d13) - 85: 29(bool) FOrdLessThan 83 84 - SelectionMerge 87 None - BranchConditional 85 86 91 - 73: Label - 135: 7(fvec4) Load 9(color) - 136: 7(fvec4) CompositeConstruct 47 47 47 47 - 137: 7(fvec4) FAdd 135 136 - Store 9(color) 137 - 140: 7(fvec4) Load 9(color) - Store 139(gl_FragColor) 140 - Return - 74: Label - Branch 75 - 75: Label - 77: 23(ptr) AccessChain 9(color) 76 - 78: 6(float) Load 77 - 80: 6(float) Load 79(d13) - 81: 29(bool) FOrdLessThan 78 80 - LoopMerge 73 74 None - BranchConditional 81 72 73 - 86: Label - 88: 7(fvec4) Load 9(color) - 89: 7(fvec4) CompositeConstruct 47 47 47 47 - 90: 7(fvec4) FAdd 88 89 - Store 9(color) 90 - Branch 87 - 91: Label - 92: 7(fvec4) Load 9(color) - 93: 7(fvec4) CompositeConstruct 47 47 47 47 - 94: 7(fvec4) FSub 92 93 - Store 9(color) 94 - Branch 87 - 87: Label - 95: 7(fvec4) Load 17(bigColor4) - 96: 7(fvec4) Load 9(color) - 97: 7(fvec4) FAdd 96 95 - Store 9(color) 97 - 98: 23(ptr) AccessChain 9(color) 22 - 99: 6(float) Load 98 - 100: 6(float) Load 27(d4) - 101: 29(bool) FOrdLessThan 99 100 - SelectionMerge 103 None - BranchConditional 101 102 103 - 102: Label - 104: 23(ptr) AccessChain 9(color) 34 - 105: 6(float) Load 104 - 106: 6(float) FAdd 105 33 - 107: 23(ptr) AccessChain 9(color) 34 - Store 107 106 - 108: 23(ptr) AccessChain 9(color) 34 - 109: 6(float) Load 108 - 110: 6(float) Load 27(d4) - 111: 29(bool) FOrdLessThan 109 110 - SelectionMerge 113 None - BranchConditional 111 112 113 - 112: Label - 114: 23(ptr) AccessChain 9(color) 22 - 115: 6(float) Load 114 - 116: 6(float) FAdd 115 47 - Store 114 116 - Branch 74 - 113: Label - Branch 103 - 103: Label - 118: 23(ptr) AccessChain 9(color) 50 - 119: 6(float) Load 118 - 120: 6(float) Load 27(d4) - 121: 29(bool) FOrdLessThan 119 120 - SelectionMerge 123 None - BranchConditional 121 122 129 - 122: Label - 124: 6(float) Load 27(d4) - 125: 23(ptr) AccessChain 9(color) 50 - 126: 6(float) Load 125 - 127: 6(float) FAdd 126 124 - 128: 23(ptr) AccessChain 9(color) 50 - Store 128 127 - Branch 123 - 129: Label - 130: 6(float) Load 27(d4) - 131: 23(ptr) AccessChain 9(color) 22 - 132: 6(float) Load 131 - 133: 6(float) FAdd 132 130 - 134: 23(ptr) AccessChain 9(color) 22 - Store 134 133 - Branch 123 - 123: Label - Branch 74 - FunctionEnd + 46: 24(ptr) AccessChain 9(color) 23 + 47: 6(float) Load 46 + 49: 6(float) FAdd 47 48 + Store 46 49 + Branch 16 + 45: Label + Branch 33 + 33: Label + 52: 24(ptr) AccessChain 9(color) 51 + 53: 6(float) Load 52 + 54: 6(float) Load 28(d4) + 55: 30(bool) FOrdLessThan 53 54 + SelectionMerge 57 None + BranchConditional 55 56 63 + 56: Label + 58: 6(float) Load 28(d4) + 59: 24(ptr) AccessChain 9(color) 51 + 60: 6(float) Load 59 + 61: 6(float) FAdd 60 58 + 62: 24(ptr) AccessChain 9(color) 51 + Store 62 61 + Branch 57 + 63: Label + 64: 6(float) Load 28(d4) + 65: 24(ptr) AccessChain 9(color) 23 + 66: 6(float) Load 65 + 67: 6(float) FAdd 66 64 + 68: 24(ptr) AccessChain 9(color) 23 + Store 68 67 + Branch 57 + 57: Label + Branch 16 + 73: Label + 78: 24(ptr) AccessChain 9(color) 77 + 79: 6(float) Load 78 + 81: 6(float) Load 80(d13) + 82: 30(bool) FOrdLessThan 79 81 + LoopMerge 75 76 None + BranchConditional 82 74 75 + 74: Label + 83: 24(ptr) AccessChain 9(color) 35 + 84: 6(float) Load 83 + 85: 6(float) Load 80(d13) + 86: 30(bool) FOrdLessThan 84 85 + SelectionMerge 88 None + BranchConditional 86 87 92 + 75: Label + 136: 7(fvec4) Load 9(color) + 137: 7(fvec4) CompositeConstruct 48 48 48 48 + 138: 7(fvec4) FAdd 136 137 + Store 9(color) 138 + 141: 7(fvec4) Load 9(color) + Store 140(gl_FragColor) 141 + Return + 76: Label + Branch 73 + 87: Label + 89: 7(fvec4) Load 9(color) + 90: 7(fvec4) CompositeConstruct 48 48 48 48 + 91: 7(fvec4) FAdd 89 90 + Store 9(color) 91 + Branch 88 + 92: Label + 93: 7(fvec4) Load 9(color) + 94: 7(fvec4) CompositeConstruct 48 48 48 48 + 95: 7(fvec4) FSub 93 94 + Store 9(color) 95 + Branch 88 + 88: Label + 96: 7(fvec4) Load 18(bigColor4) + 97: 7(fvec4) Load 9(color) + 98: 7(fvec4) FAdd 97 96 + Store 9(color) 98 + 99: 24(ptr) AccessChain 9(color) 23 + 100: 6(float) Load 99 + 101: 6(float) Load 28(d4) + 102: 30(bool) FOrdLessThan 100 101 + SelectionMerge 104 None + BranchConditional 102 103 104 + 103: Label + 105: 24(ptr) AccessChain 9(color) 35 + 106: 6(float) Load 105 + 107: 6(float) FAdd 106 34 + 108: 24(ptr) AccessChain 9(color) 35 + Store 108 107 + 109: 24(ptr) AccessChain 9(color) 35 + 110: 6(float) Load 109 + 111: 6(float) Load 28(d4) + 112: 30(bool) FOrdLessThan 110 111 + SelectionMerge 114 None + BranchConditional 112 113 114 + 113: Label + 115: 24(ptr) AccessChain 9(color) 23 + 116: 6(float) Load 115 + 117: 6(float) FAdd 116 48 + Store 115 117 + Branch 76 + 114: Label + Branch 104 + 104: Label + 119: 24(ptr) AccessChain 9(color) 51 + 120: 6(float) Load 119 + 121: 6(float) Load 28(d4) + 122: 30(bool) FOrdLessThan 120 121 + SelectionMerge 124 None + BranchConditional 122 123 130 + 123: Label + 125: 6(float) Load 28(d4) + 126: 24(ptr) AccessChain 9(color) 51 + 127: 6(float) Load 126 + 128: 6(float) FAdd 127 125 + 129: 24(ptr) AccessChain 9(color) 51 + Store 129 128 + Branch 124 + 130: Label + 131: 6(float) Load 28(d4) + 132: 24(ptr) AccessChain 9(color) 23 + 133: 6(float) Load 132 + 134: 6(float) FAdd 133 131 + 135: 24(ptr) AccessChain 9(color) 23 + Store 135 134 + Branch 124 + 124: Label + Branch 76 + FunctionEnd diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index bc91acc5..fa7d6a54 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -216,29 +216,29 @@ Linked fragment stage: Branch 121 121: Label Store 153(i) 154 - Branch 158 + Branch 155 155: Label - 163: 9(int) Load 60(c) - SelectionMerge 167 None - Switch 163 166 - case 1: 164 - case 2: 165 + 159: 9(int) Load 153(i) + 162: 161(bool) SLessThan 159 160 + LoopMerge 157 158 None + BranchConditional 162 156 157 156: Label - 211: 9(int) Load 60(c) - SelectionMerge 214 None - Switch 211 214 - case 1: 212 - case 2: 213 + 163: 9(int) Load 60(c) + SelectionMerge 167 None + Switch 163 166 + case 1: 164 + case 2: 165 157: Label - 209: 9(int) Load 153(i) - 210: 9(int) IAdd 209 63 - Store 153(i) 210 - Branch 158 - 158: Label - 159: 9(int) Load 153(i) - 162: 161(bool) SLessThan 159 160 - LoopMerge 156 157 None - BranchConditional 162 155 156 + 211: 9(int) Load 60(c) + SelectionMerge 214 None + Switch 211 214 + case 1: 212 + case 2: 213 + 158: Label + 209: 9(int) Load 153(i) + 210: 9(int) IAdd 209 63 + Store 153(i) 210 + Branch 155 164: Label 168: 6(float) Load 73(x) 169: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 168 @@ -246,159 +246,159 @@ Linked fragment stage: 171: 6(float) FAdd 170 169 Store 71(f) 171 Store 172(j) 173 - Branch 177 + Branch 174 174: Label - 181: 6(float) Load 71(f) - 182: 6(float) FAdd 181 47 - Store 71(f) 182 - 183: 6(float) Load 71(f) - 185: 161(bool) FOrdLessThan 183 184 - SelectionMerge 187 None - BranchConditional 185 186 187 + 178: 9(int) Load 172(j) + 180: 161(bool) SLessThan 178 179 + LoopMerge 176 177 None + BranchConditional 180 175 176 175: Label - Branch 167 - 176: Label - 189: 9(int) Load 172(j) - 190: 9(int) IAdd 189 63 - Store 172(j) 190 - Branch 177 - 177: Label - 178: 9(int) Load 172(j) - 180: 161(bool) SLessThan 178 179 - LoopMerge 175 176 None - BranchConditional 180 174 175 + 181: 6(float) Load 71(f) + 182: 6(float) FAdd 181 47 + Store 71(f) 182 + 183: 6(float) Load 71(f) + 185: 161(bool) FOrdLessThan 183 184 + SelectionMerge 187 None + BranchConditional 185 186 187 + 176: Label + Branch 167 + 177: Label + 189: 9(int) Load 172(j) + 190: 9(int) IAdd 189 63 + Store 172(j) 190 + Branch 174 186: Label - Branch 175 - 187: Label Branch 176 - 165: Label - 192: 6(float) Load 73(x) - 193: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 192 - 194: 6(float) Load 71(f) - 195: 6(float) FAdd 194 193 - Store 71(f) 195 - Branch 167 - 166: Label - 198: 6(float) Load 73(x) - 199: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 198 - 200: 6(float) Load 71(f) - 201: 6(float) FAdd 200 199 - Store 71(f) 201 - Branch 167 - 167: Label - 203: 6(float) Load 71(f) - 205: 161(bool) FOrdLessThan 203 204 - SelectionMerge 207 None - BranchConditional 205 206 207 - 206: Label - Branch 156 - 207: Label + 187: Label + Branch 177 + 165: Label + 192: 6(float) Load 73(x) + 193: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 192 + 194: 6(float) Load 71(f) + 195: 6(float) FAdd 194 193 + Store 71(f) 195 + Branch 167 + 166: Label + 198: 6(float) Load 73(x) + 199: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 198 + 200: 6(float) Load 71(f) + 201: 6(float) FAdd 200 199 + Store 71(f) 201 + Branch 167 + 167: Label + 203: 6(float) Load 71(f) + 205: 161(bool) FOrdLessThan 203 204 + SelectionMerge 207 None + BranchConditional 205 206 207 + 206: Label Branch 157 - 212: Label - 215: 6(float) Load 73(x) - 216: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 215 - 217: 6(float) Load 71(f) - 218: 6(float) FAdd 217 216 - Store 71(f) 218 - Branch 214 - 213: Label - Branch 214 - 214: Label - 224: 6(float) Load 71(f) - 225: 9(int) Load 58(local) - 226: 6(float) ConvertSToF 225 - 227: 6(float) FAdd 224 226 - Store 223(color) 227 - 231: 7(fvec4) Load 229(v) - Store 230(param) 231 - 233: 7(fvec4) Load 229(v) - Store 232(param) 233 - 235: 9(int) Load 60(c) - Store 234(param) 235 - 236: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param) - 239: 6(float) CompositeExtract 236 1 - 240: 6(float) Load 223(color) - 241: 6(float) FAdd 240 239 - Store 223(color) 241 - 243: 7(fvec4) Load 229(v) - Store 242(param) 243 - 245: 7(fvec4) Load 229(v) - Store 244(param) 245 - 247: 9(int) Load 60(c) - Store 246(param) 247 - 248: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param) - 250: 6(float) CompositeExtract 248 2 - 251: 6(float) Load 223(color) - 252: 6(float) FAdd 251 250 - Store 223(color) 252 - 253: 9(int) Load 60(c) - SelectionMerge 256 None - Switch 253 255 - case 0: 254 - 254: Label - Branch 256 - 255: Label - Branch 256 - 256: Label - 260: 9(int) Load 60(c) - SelectionMerge 262 None - Switch 260 261 - 261: Label - Branch 262 - 262: Label - Return - FunctionEnd -15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 - 12(v1): 8(ptr) FunctionParameter - 13(v2): 8(ptr) FunctionParameter - 14(i1): 10(ptr) FunctionParameter - 16: Label - 22: 9(int) Load 14(i1) - SelectionMerge 26 None - Switch 22 26 - case 0: 23 - case 2: 24 - case 1: 24 - case 3: 25 - 23: Label - 27: 7(fvec4) Load 12(v1) - ReturnValue 27 - 24: Label - 29: 7(fvec4) Load 13(v2) - ReturnValue 29 - 25: Label - 31: 7(fvec4) Load 12(v1) - 32: 7(fvec4) Load 13(v2) - 33: 7(fvec4) FMul 31 32 - ReturnValue 33 - 26: Label - ReturnValue 37 - FunctionEnd -20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11 - 17(v1): 8(ptr) FunctionParameter - 18(v2): 8(ptr) FunctionParameter - 19(i1): 10(ptr) FunctionParameter - 21: Label - 39: 9(int) Load 19(i1) - SelectionMerge 44 None - Switch 39 44 - case 0: 40 - case 2: 41 - case 1: 42 - case 3: 43 - 40: Label - 45: 7(fvec4) Load 17(v1) - ReturnValue 45 - 41: Label - ReturnValue 48 - 42: Label - 50: 7(fvec4) Load 18(v2) - ReturnValue 50 - 43: Label - 52: 7(fvec4) Load 17(v1) - 53: 7(fvec4) Load 18(v2) - 54: 7(fvec4) FMul 52 53 - ReturnValue 54 - 44: Label - ReturnValue 37 - FunctionEnd + 207: Label + Branch 158 + 212: Label + 215: 6(float) Load 73(x) + 216: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 215 + 217: 6(float) Load 71(f) + 218: 6(float) FAdd 217 216 + Store 71(f) 218 + Branch 214 + 213: Label + Branch 214 + 214: Label + 224: 6(float) Load 71(f) + 225: 9(int) Load 58(local) + 226: 6(float) ConvertSToF 225 + 227: 6(float) FAdd 224 226 + Store 223(color) 227 + 231: 7(fvec4) Load 229(v) + Store 230(param) 231 + 233: 7(fvec4) Load 229(v) + Store 232(param) 233 + 235: 9(int) Load 60(c) + Store 234(param) 235 + 236: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param) + 239: 6(float) CompositeExtract 236 1 + 240: 6(float) Load 223(color) + 241: 6(float) FAdd 240 239 + Store 223(color) 241 + 243: 7(fvec4) Load 229(v) + Store 242(param) 243 + 245: 7(fvec4) Load 229(v) + Store 244(param) 245 + 247: 9(int) Load 60(c) + Store 246(param) 247 + 248: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param) + 250: 6(float) CompositeExtract 248 2 + 251: 6(float) Load 223(color) + 252: 6(float) FAdd 251 250 + Store 223(color) 252 + 253: 9(int) Load 60(c) + SelectionMerge 256 None + Switch 253 255 + case 0: 254 + 254: Label + Branch 256 + 255: Label + Branch 256 + 256: Label + 260: 9(int) Load 60(c) + SelectionMerge 262 None + Switch 260 261 + 261: Label + Branch 262 + 262: Label + Return + FunctionEnd +15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 + 12(v1): 8(ptr) FunctionParameter + 13(v2): 8(ptr) FunctionParameter + 14(i1): 10(ptr) FunctionParameter + 16: Label + 22: 9(int) Load 14(i1) + SelectionMerge 26 None + Switch 22 26 + case 0: 23 + case 2: 24 + case 1: 24 + case 3: 25 + 23: Label + 27: 7(fvec4) Load 12(v1) + ReturnValue 27 + 24: Label + 29: 7(fvec4) Load 13(v2) + ReturnValue 29 + 25: Label + 31: 7(fvec4) Load 12(v1) + 32: 7(fvec4) Load 13(v2) + 33: 7(fvec4) FMul 31 32 + ReturnValue 33 + 26: Label + ReturnValue 37 + FunctionEnd +20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11 + 17(v1): 8(ptr) FunctionParameter + 18(v2): 8(ptr) FunctionParameter + 19(i1): 10(ptr) FunctionParameter + 21: Label + 39: 9(int) Load 19(i1) + SelectionMerge 44 None + Switch 39 44 + case 0: 40 + case 2: 41 + case 1: 42 + case 3: 43 + 40: Label + 45: 7(fvec4) Load 17(v1) + ReturnValue 45 + 41: Label + ReturnValue 48 + 42: Label + 50: 7(fvec4) Load 18(v2) + ReturnValue 50 + 43: Label + 52: 7(fvec4) Load 17(v1) + 53: 7(fvec4) Load 18(v2) + 54: 7(fvec4) FMul 52 53 + ReturnValue 54 + 44: Label + ReturnValue 37 + FunctionEnd diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index 0938db43..684f4526 100755 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -44,45 +44,45 @@ Linked vertex stage: 28(C): 7(ptr) Variable Function 38(D): 7(ptr) Variable Function Store 8(i) 9 - Branch 13 + Branch 10 10: Label - Store 18(A) 19 - 20: 6(int) Load 8(i) - 22: 6(int) SMod 20 21 - 23: 16(bool) IEqual 22 9 - SelectionMerge 25 None - BranchConditional 23 24 25 + 14: 6(int) Load 8(i) + 17: 16(bool) SLessThan 14 15 + LoopMerge 12 13 None + BranchConditional 17 11 12 11: Label - Store 38(D) 39 - Return - 12: Label - Branch 13 - 13: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 - LoopMerge 11 12 None - BranchConditional 17 10 11 + Store 18(A) 19 + 20: 6(int) Load 8(i) + 22: 6(int) SMod 20 21 + 23: 16(bool) IEqual 22 9 + SelectionMerge 25 None + BranchConditional 23 24 25 + 12: Label + Store 38(D) 39 + Return + 13: Label + Branch 10 24: Label Store 26(B) 21 - Branch 12 + Branch 13 27: Label Store 28(C) 21 Branch 25 - 25: Label - 29: 6(int) Load 8(i) - 31: 6(int) SMod 29 30 - 32: 16(bool) IEqual 31 9 - SelectionMerge 34 None - BranchConditional 32 33 34 - 33: Label - Store 26(B) 21 - Branch 11 - 35: Label - Store 28(C) 21 - Branch 34 - 34: Label - 36: 6(int) Load 8(i) - 37: 6(int) IAdd 36 19 - Store 8(i) 37 + 25: Label + 29: 6(int) Load 8(i) + 31: 6(int) SMod 29 30 + 32: 16(bool) IEqual 31 9 + SelectionMerge 34 None + BranchConditional 32 33 34 + 33: Label + Store 26(B) 21 Branch 12 - FunctionEnd + 35: Label + Store 28(C) 21 + Branch 34 + 34: Label + 36: 6(int) Load 8(i) + 37: 6(int) IAdd 36 19 + Store 8(i) 37 + Branch 13 + FunctionEnd diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index 3684101c..63656537 100755 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -33,19 +33,19 @@ Linked vertex stage: 5: Label 8(i): 7(ptr) Variable Function Store 8(i) 9 - Branch 13 + Branch 10 10: Label - 18: 6(int) Load 8(i) - 20: 6(int) IAdd 18 19 - Store 8(i) 20 - Branch 12 - 11: Label - Return - 12: Label - Branch 13 - 13: Label 14: 6(int) Load 8(i) 17: 16(bool) SLessThan 14 15 - LoopMerge 11 12 None - BranchConditional 17 10 11 - FunctionEnd + LoopMerge 12 13 None + BranchConditional 17 11 12 + 11: Label + 18: 6(int) Load 8(i) + 20: 6(int) IAdd 18 19 + Store 8(i) 20 + Branch 13 + 12: Label + Return + 13: Label + Branch 10 + FunctionEnd diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index 62279827..e5c9642e 100755 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -41,24 +41,24 @@ Linked fragment stage: 9(color): 8(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 - Branch 16 + Branch 13 13: Label - 29: 7(fvec4) Load 28(bigColor) - 30: 7(fvec4) Load 9(color) - 31: 7(fvec4) FAdd 30 29 - Store 9(color) 31 - Branch 15 - 14: Label - 34: 7(fvec4) Load 9(color) - Store 33(gl_FragColor) 34 - Return - 15: Label - Branch 16 - 16: Label 20: 19(ptr) AccessChain 9(color) 18 21: 6(float) Load 20 24: 6(float) Load 23(d) 26: 25(bool) FOrdLessThan 21 24 - LoopMerge 14 15 None - BranchConditional 26 13 14 - FunctionEnd + LoopMerge 15 16 None + BranchConditional 26 14 15 + 14: Label + 29: 7(fvec4) Load 28(bigColor) + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 + Branch 16 + 15: Label + 34: 7(fvec4) Load 9(color) + Store 33(gl_FragColor) 34 + Return + 16: Label + Branch 13 + FunctionEnd diff --git a/Test/spv.for-notest.vert b/Test/spv.for-notest.vert index f40e6664..7aff3b30 100644 --- a/Test/spv.for-notest.vert +++ b/Test/spv.for-notest.vert @@ -2,5 +2,8 @@ layout(location=0) out highp int r; void main() { int i; + // This infinite loop results in bad SPIR-V generated, since the merge block + // is dropped as unreachable. It is still useful for testing the rest of the + // code generation. for (i=0; ; i++) { r = i; } } From e602d25f09d430c26862dfa4a07ec02f38764e96 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Tue, 12 Jan 2016 15:45:55 -0500 Subject: [PATCH 09/84] Removed strcpy that copied to itself. Found by running glslang with -fsanitize=address in clang. Also fixes a potential buffer-overrun with return from lReadByte. --- glslang/MachineIndependent/preprocessor/PpTokens.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index 642793d9..52343b7c 100644 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -195,7 +195,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) case PpAtomConstUint: len = 0; ch = lReadByte(pTok); - while (ch != 0) { + while (ch != 0 && ch != EndOfInput) { if (len < MaxTokenLength) { tokenText[len] = (char)ch; len++; @@ -215,12 +215,10 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) break; case PpAtomConstFloat: case PpAtomConstDouble: - strcpy(ppToken->name, tokenText); ppToken->dval = atof(ppToken->name); break; case PpAtomConstInt: case PpAtomConstUint: - strcpy(ppToken->name, tokenText); if (len > 0 && tokenText[0] == '0') { if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X')) ppToken->ival = strtol(ppToken->name, 0, 16); From 79b7046a272ffd33f221b85cf45a128fc498680f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 12 Jan 2016 13:04:52 -0800 Subject: [PATCH 10/84] getBaseAlignment: Round up structure sizes to max alignment --- glslang/MachineIndependent/linkValidate.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index 7c96d225..664a8dff 100644 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -959,6 +959,11 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b size += memberSize; } + // The structure may have padding at the end; the base offset of + // the member following the sub-structure is rounded up to the next + // multiple of the base alignment of the structure. + RoundToPow2(size, maxAlignment); + return maxAlignment; } From a76766a43474f11b00c89eef6ef3772c6537a4c2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 13 Jan 2016 17:14:43 -0800 Subject: [PATCH 11/84] getBaseAlignment: Use the rowMajor argument for determining matrix strides The argument version is passed in from above and struct handling ensures that row-majorness gets propagated correctly from one level to the next. If we just look at the type itself and it's embedded in a struct that's declared row-major, we may get the wrong stride. --- glslang/MachineIndependent/linkValidate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index 664a8dff..d0e7b021 100644 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -987,7 +987,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b // rules 5 and 7 if (type.isMatrix()) { // rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows - TType derefType(type, 0, type.getQualifier().layoutMatrix == ElmRowMajor); + TType derefType(type, 0, rowMajor); alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor); if (std140) From e95fa5e0959d8cff720daa1d9ba10b7f3312f9b2 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Wed, 13 Jan 2016 19:04:19 -0700 Subject: [PATCH 12/84] Tests: Update to match previous pull request. --- Test/baseResults/reflection.vert.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/baseResults/reflection.vert.out b/Test/baseResults/reflection.vert.out index 7e9d322d..43fb2340 100644 --- a/Test/baseResults/reflection.vert.out +++ b/Test/baseResults/reflection.vert.out @@ -85,7 +85,7 @@ Uniform block reflection: nameless: offset -1, type ffffffff, size 496, index -1 named: offset -1, type ffffffff, size 304, index -1 c_nameless: offset -1, type ffffffff, size 112, index -1 -nested: offset -1, type ffffffff, size 28, index -1 +nested: offset -1, type ffffffff, size 32, index -1 abl[0]: offset -1, type ffffffff, size 4, index -1 abl[1]: offset -1, type ffffffff, size 4, index -1 abl[2]: offset -1, type ffffffff, size 4, index -1 From c57b2a97fa808970a4809c53de605bbf103fce12 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sat, 16 Jan 2016 15:30:03 -0700 Subject: [PATCH 13/84] Memory/Perf: For link-mode, isolate file I/O so API can be looped over. Separating file I/O from compile/link lets the compile/link be done repeatedly in a loop for testing and measuring of performance and memory footprint, including seeing memory growth over time for functional-level memory-leak testing. While the older compile-only mode already had this functionality, and typically showed no memory leaks, SPIR-V uses the link path, has pending "TODO" for memory freeing, and this shows several kilobytes of leaking per compile-link. Most likely, pending merge request 131 will address much of this. --- StandAlone/StandAlone.cpp | 112 +++++++++++++++++------ glslang/OSDependent/Windows/ossource.cpp | 2 + 2 files changed, 87 insertions(+), 27 deletions(-) diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 92010840..45527d85 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -658,17 +658,27 @@ void StderrIfNonEmpty(const char* str) } } +// Simple bundling of what makes a compilation unit for ease in passing around, +// and separation of handling file IO versus API (programmatic) compilation. +struct ShaderCompUnit { + EShLanguage stage; + std::string fileName; + char** text; // memory owned/managed externally +}; + // -// For linking mode: Will independently parse each item in the worklist, but then put them -// in the same program and link them together. +// For linking mode: Will independently parse each compilation unit, but then put them +// in the same program and link them together, making at most one linked module per +// pipeline stage. // // Uses the new C++ interface instead of the old handle-based interface. // -void CompileAndLinkShaders() + +void CompileAndLinkShaderUnits(std::vector compUnits) { // keep track of what to free std::list shaders; - + EShMessages messages = EShMsgDefault; SetMessageOptions(messages); @@ -677,22 +687,13 @@ void CompileAndLinkShaders() // glslang::TProgram& program = *new glslang::TProgram; - glslang::TWorkItem* workItem; - while (Worklist.remove(workItem)) { - EShLanguage stage = FindLanguage(workItem->name); - glslang::TShader* shader = new glslang::TShader(stage); + for (auto compUnit : compUnits) { + glslang::TShader* shader = new glslang::TShader(compUnit.stage); + shader->setStrings(compUnit.text, 1); shaders.push_back(shader); - - char** shaderStrings = ReadFileData(workItem->name.c_str()); - if (! shaderStrings) { - usage(); - delete &program; - return; - } const int defaultVersion = Options & EOptionDefaultDesktop? 110: 100; - shader->setStrings(shaderStrings, 1); if (Options & EOptionOutputPreprocessed) { std::string str; if (shader->preprocess(&Resources, defaultVersion, ENoProfile, false, false, @@ -703,7 +704,6 @@ void CompileAndLinkShaders() } StderrIfNonEmpty(shader->getInfoLog()); StderrIfNonEmpty(shader->getInfoDebugLog()); - FreeFileData(shaderStrings); continue; } if (! shader->parse(&Resources, defaultVersion, false, messages)) @@ -711,13 +711,12 @@ void CompileAndLinkShaders() program.addShader(shader); - if (! (Options & EOptionSuppressInfolog)) { - PutsIfNonEmpty(workItem->name.c_str()); + if (! (Options & EOptionSuppressInfolog) && + ! (Options & EOptionMemoryLeakMode)) { + PutsIfNonEmpty(compUnit.fileName.c_str()); PutsIfNonEmpty(shader->getInfoLog()); PutsIfNonEmpty(shader->getInfoDebugLog()); } - - FreeFileData(shaderStrings); } // @@ -727,7 +726,8 @@ void CompileAndLinkShaders() if (! (Options & EOptionOutputPreprocessed) && ! program.link(messages)) LinkFailed = true; - if (! (Options & EOptionSuppressInfolog)) { + if (! (Options & EOptionSuppressInfolog) && + ! (Options & EOptionMemoryLeakMode)) { PutsIfNonEmpty(program.getInfoLog()); PutsIfNonEmpty(program.getInfoDebugLog()); } @@ -745,10 +745,15 @@ void CompileAndLinkShaders() if (program.getIntermediate((EShLanguage)stage)) { std::vector spirv; glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv); - glslang::OutputSpv(spirv, GetBinaryName((EShLanguage)stage)); - if (Options & EOptionHumanReadableSpv) { - spv::Parameterize(); - spv::Disassemble(std::cout, spirv); + + // Dump the spv to a file or stdout, etc., but only if not doing + // memory/perf testing, as it's not internal to programmatic use. + if (! (Options & EOptionMemoryLeakMode)) { + glslang::OutputSpv(spirv, GetBinaryName((EShLanguage)stage)); + if (Options & EOptionHumanReadableSpv) { + spv::Parameterize(); + spv::Disassemble(std::cout, spirv); + } } } } @@ -766,6 +771,59 @@ void CompileAndLinkShaders() } } +// +// Do file IO part of compile and link, handing off the pure +// API/programmatic mode to CompileAndLinkShaderUnits(), which can +// be put in a loop for testing memory footprint and performance. +// +// This is just for linking mode: meaning all the shaders will be put into the +// the same program linked together. +// +// This means there are a limited number of work items (not multi-threading mode) +// and that the point is testing at the linking level. Hence, to enable +// performance and memory testing, the actual compile/link can be put in +// a loop, independent of processing the work items and file IO. +// +void CompileAndLinkShaderFiles() +{ + std::vector compUnits; + + // Transfer all the work items from to a simple list of + // of compilation units. (We don't care about the thread + // work-item distribution properties in this path, which + // is okay due to the limited number of shaders, know since + // they are all getting linked together.) + glslang::TWorkItem* workItem; + while (Worklist.remove(workItem)) { + ShaderCompUnit compUnit = { + FindLanguage(workItem->name), + workItem->name, + ReadFileData(workItem->name.c_str()) + }; + + if (! compUnit.text) { + usage(); + return; + } + + compUnits.push_back(compUnit); + } + + // Actual call to programmatic processing of compile and link, + // in a loop for testing memory and performance. This part contains + // all the perf/memory that a programmatic consumer will care about. + for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) { + for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) + CompileAndLinkShaderUnits(compUnits); + + if (Options & EOptionMemoryLeakMode) + glslang::OS_DumpMemoryCounters(); + } + + for (auto c : compUnits) + FreeFileData(c.text); +} + int C_DECL main(int argc, char* argv[]) { ProcessArguments(argc, argv); @@ -803,7 +861,7 @@ int C_DECL main(int argc, char* argv[]) if (Options & EOptionLinkProgram || Options & EOptionOutputPreprocessed) { glslang::InitializeProcess(); - CompileAndLinkShaders(); + CompileAndLinkShaderFiles(); glslang::FinalizeProcess(); } else { ShInitialize(); diff --git a/glslang/OSDependent/Windows/ossource.cpp b/glslang/OSDependent/Windows/ossource.cpp index b5ce18c2..56dbf791 100644 --- a/glslang/OSDependent/Windows/ossource.cpp +++ b/glslang/OSDependent/Windows/ossource.cpp @@ -147,6 +147,8 @@ void OS_Sleep(int milliseconds) Sleep(milliseconds); } +//#define DUMP_COUNTERS + void OS_DumpMemoryCounters() { #ifdef DUMP_COUNTERS From 712ecb96a2256093761ec958a7232445ba19d231 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sat, 16 Jan 2016 20:37:43 -0700 Subject: [PATCH 14/84] Doubles: Add all the missing built-in double-based prototypes. --- Test/400.frag | 2 +- Test/400.geom | 213 +++ Test/baseResults/400.frag.out | 64 +- Test/baseResults/400.geom.out | 1698 +++++++++++++++++++++ Test/baseResults/spv.400.frag.out | 1483 ++++++++++++++++-- Test/spv.400.frag | 218 +++ glslang/MachineIndependent/Initialize.cpp | 208 +++ 7 files changed, 3699 insertions(+), 187 deletions(-) diff --git a/Test/400.frag b/Test/400.frag index bb4d2b58..059743e4 100644 --- a/Test/400.frag +++ b/Test/400.frag @@ -60,7 +60,7 @@ patch out vec4 patchOut; // ERROR void foo24() { dvec3 df, di; - df = modf(outp.xyz, di); + df = modf(dvec3(outp.xyz), di); } in float in1; diff --git a/Test/400.geom b/Test/400.geom index e2ca9b91..0b77e121 100644 --- a/Test/400.geom +++ b/Test/400.geom @@ -115,3 +115,216 @@ void qlod() lod = textureQueryLod(samp1D, pf); // ERROR, only in fragment lod = textureQueryLod(samp2Ds, pf2); // ERROR, only in fragment } + +void doubles() +{ + double doublev; + dvec2 dvec2v; + dvec3 dvec3v; + dvec4 dvec4v; + + bool boolv; + bvec2 bvec2v; + bvec3 bvec3v; + bvec4 bvec4v; + + doublev = sqrt(2.9); + dvec2v = sqrt(dvec2(2.7)); + dvec3v = sqrt(dvec3(2.0)); + dvec4v = sqrt(dvec4(2.1)); + + doublev += inversesqrt(doublev); + dvec2v += inversesqrt(dvec2v); + dvec3v += inversesqrt(dvec3v); + dvec4v += inversesqrt(dvec4v); + + doublev += abs(doublev); + dvec2v += abs(dvec2v); + dvec3v += abs(dvec3v); + dvec4v += abs(dvec4v); + + doublev += sign(doublev); + dvec2v += sign(dvec2v); + dvec3v += sign(dvec3v); + dvec4v += sign(dvec4v); + + doublev += floor(doublev); + dvec2v += floor(dvec2v); + dvec3v += floor(dvec3v); + dvec4v += floor(dvec4v); + + doublev += trunc(doublev); + dvec2v += trunc(dvec2v); + dvec3v += trunc(dvec3v); + dvec4v += trunc(dvec4v); + + doublev += round(doublev); + dvec2v += round(dvec2v); + dvec3v += round(dvec3v); + dvec4v += round(dvec4v); + + doublev += roundEven(doublev); + dvec2v += roundEven(dvec2v); + dvec3v += roundEven(dvec3v); + dvec4v += roundEven(dvec4v); + + doublev += ceil(doublev); + dvec2v += ceil(dvec2v); + dvec3v += ceil(dvec3v); + dvec4v += ceil(dvec4v); + + doublev += fract(doublev); + dvec2v += fract(dvec2v); + dvec3v += fract(dvec3v); + dvec4v += fract(dvec4v); + + doublev += mod(doublev, doublev); + dvec2v += mod(dvec2v, doublev); + dvec3v += mod(dvec3v, doublev); + dvec4v += mod(dvec4v, doublev); + dvec2v += mod(dvec2v, dvec2v); + dvec3v += mod(dvec3v, dvec3v); + dvec4v += mod(dvec4v, dvec4v); + + doublev += modf(doublev, doublev); + dvec2v += modf(dvec2v, dvec2v); + dvec3v += modf(dvec3v, dvec3v); + dvec4v += modf(dvec4v, dvec4v); + + doublev += min(doublev, doublev); + dvec2v += min(dvec2v, doublev); + dvec3v += min(dvec3v, doublev); + dvec4v += min(dvec4v, doublev); + dvec2v += min(dvec2v, dvec2v); + dvec3v += min(dvec3v, dvec3v); + dvec4v += min(dvec4v, dvec4v); + + doublev += max(doublev, doublev); + dvec2v += max(dvec2v, doublev); + dvec3v += max(dvec3v, doublev); + dvec4v += max(dvec4v, doublev); + dvec2v += max(dvec2v, dvec2v); + dvec3v += max(dvec3v, dvec3v); + dvec4v += max(dvec4v, dvec4v); + + doublev += clamp(doublev, doublev, doublev); + dvec2v += clamp(dvec2v, doublev, doublev); + dvec3v += clamp(dvec3v, doublev, doublev); + dvec4v += clamp(dvec4v, doublev, doublev); + dvec2v += clamp(dvec2v, dvec2v, dvec2v); + dvec3v += clamp(dvec3v, dvec3v, dvec3v); + dvec4v += clamp(dvec4v, dvec4v, dvec4v); + + doublev += mix(doublev, doublev, doublev); + dvec2v += mix(dvec2v, dvec2v, doublev); + dvec3v += mix(dvec3v, dvec3v, doublev); + dvec4v += mix(dvec4v, dvec4v, doublev); + dvec2v += mix(dvec2v, dvec2v, dvec2v); + dvec3v += mix(dvec3v, dvec3v, dvec3v); + dvec4v += mix(dvec4v, dvec4v, dvec4v); + doublev += mix(doublev, doublev, boolv); + dvec2v += mix(dvec2v, dvec2v, bvec2v); + dvec3v += mix(dvec3v, dvec3v, bvec3v); + dvec4v += mix(dvec4v, dvec4v, bvec4v); + + doublev += step(doublev, doublev); + dvec2v += step(dvec2v, dvec2v); + dvec3v += step(dvec3v, dvec3v); + dvec4v += step(dvec4v, dvec4v); + dvec2v += step(doublev, dvec2v); + dvec3v += step(doublev, dvec3v); + dvec4v += step(doublev, dvec4v); + + doublev += smoothstep(doublev, doublev, doublev); + dvec2v += smoothstep(dvec2v, dvec2v, dvec2v); + dvec3v += smoothstep(dvec3v, dvec3v, dvec3v); + dvec4v += smoothstep(dvec4v, dvec4v, dvec4v); + dvec2v += smoothstep(doublev, doublev, dvec2v); + dvec3v += smoothstep(doublev, doublev, dvec3v); + dvec4v += smoothstep(doublev, doublev, dvec4v); + + boolv = isnan(doublev); + bvec2v = isnan(dvec2v); + bvec3v = isnan(dvec3v); + bvec4v = isnan(dvec4v); + + boolv = boolv ? isinf(doublev) : false; + bvec2v = boolv ? isinf(dvec2v) : bvec2(false); + bvec3v = boolv ? isinf(dvec3v) : bvec3(false); + bvec4v = boolv ? isinf(dvec4v) : bvec4(false); + + doublev += length(doublev); + doublev += length(dvec2v); + doublev += length(dvec3v); + doublev += length(dvec4v); + + doublev += distance(doublev, doublev); + doublev += distance(dvec2v, dvec2v); + doublev += distance(dvec3v, dvec3v); + doublev += distance(dvec4v, dvec4v); + + doublev += dot(doublev, doublev); + doublev += dot(dvec2v, dvec2v); + doublev += dot(dvec3v, dvec3v); + doublev += dot(dvec4v, dvec4v); + + dvec3v += cross(dvec3v, dvec3v); + + doublev += normalize(doublev); + dvec2v += normalize(dvec2v); + dvec3v += normalize(dvec3v); + dvec4v += normalize(dvec4v); + + doublev += faceforward(doublev, doublev, doublev); + dvec2v += faceforward(dvec2v, dvec2v, dvec2v); + dvec3v += faceforward(dvec3v, dvec3v, dvec3v); + dvec4v += faceforward(dvec4v, dvec4v, dvec4v); + + doublev += reflect(doublev, doublev); + dvec2v += reflect(dvec2v, dvec2v); + dvec3v += reflect(dvec3v, dvec3v); + dvec4v += reflect(dvec4v, dvec4v); + + doublev += refract(doublev, doublev, doublev); + dvec2v += refract(dvec2v, dvec2v, doublev); + dvec3v += refract(dvec3v, dvec3v, doublev); + dvec4v += refract(dvec4v, dvec4v, doublev); + + dmat2 dmat2v = outerProduct(dvec2v, dvec2v); + dmat3 dmat3v = outerProduct(dvec3v, dvec3v); + dmat4 dmat4v = outerProduct(dvec4v, dvec4v); + dmat2x3 dmat2x3v = outerProduct(dvec3v, dvec2v); + dmat3x2 dmat3x2v = outerProduct(dvec2v, dvec3v); + dmat2x4 dmat2x4v = outerProduct(dvec4v, dvec2v); + dmat4x2 dmat4x2v = outerProduct(dvec2v, dvec4v); + dmat3x4 dmat3x4v = outerProduct(dvec4v, dvec3v); + dmat4x3 dmat4x3v = outerProduct(dvec3v, dvec4v); + + dmat2v *= matrixCompMult(dmat2v, dmat2v); + dmat3v *= matrixCompMult(dmat3v, dmat3v); + dmat4v *= matrixCompMult(dmat4v, dmat4v); + dmat2x3v = matrixCompMult(dmat2x3v, dmat2x3v); + dmat2x4v = matrixCompMult(dmat2x4v, dmat2x4v); + dmat3x2v = matrixCompMult(dmat3x2v, dmat3x2v); + dmat3x4v = matrixCompMult(dmat3x4v, dmat3x4v); + dmat4x2v = matrixCompMult(dmat4x2v, dmat4x2v); + dmat4x3v = matrixCompMult(dmat4x3v, dmat4x3v); + + dmat2v *= transpose(dmat2v); + dmat3v *= transpose(dmat3v); + dmat4v *= transpose(dmat4v); + dmat2x3v = transpose(dmat3x2v); + dmat3x2v = transpose(dmat2x3v); + dmat2x4v = transpose(dmat4x2v); + dmat4x2v = transpose(dmat2x4v); + dmat3x4v = transpose(dmat4x3v); + dmat4x3v = transpose(dmat3x4v); + + doublev += determinant(dmat2v); + doublev += determinant(dmat3v); + doublev += determinant(dmat4v); + + dmat2v *= inverse(dmat2v); + dmat3v *= inverse(dmat3v); + dmat4v *= inverse(dmat4v); +} diff --git a/Test/baseResults/400.frag.out b/Test/baseResults/400.frag.out index 0069585b..33a8c9ab 100644 --- a/Test/baseResults/400.frag.out +++ b/Test/baseResults/400.frag.out @@ -218,26 +218,18 @@ ERROR: node is still EOpNull! 0:? Sequence 0:63 move second child to first child (temp 3-component vector of double) 0:63 'df' (temp 3-component vector of double) -0:63 Convert float to double (temp 3-component vector of double) -0:63 Comma (global 3-component vector of float) -0:63 move second child to first child (temp 3-component vector of float) -0:63 'tempReturn' (global 3-component vector of float) -0:63 modf (global 3-component vector of float) -0:63 vector swizzle (temp 3-component vector of float) -0:63 'outp' (out 4-component vector of float) -0:63 Sequence -0:63 Constant: -0:63 0 (const int) -0:63 Constant: -0:63 1 (const int) -0:63 Constant: -0:63 2 (const int) -0:63 'tempArg' (temp 3-component vector of float) -0:63 move second child to first child (temp 3-component vector of double) -0:63 'di' (temp 3-component vector of double) -0:63 Convert float to double (temp 3-component vector of double) -0:63 'tempArg' (temp 3-component vector of float) -0:63 'tempReturn' (global 3-component vector of float) +0:63 modf (global 3-component vector of double) +0:63 Convert float to double (temp 3-component vector of double) +0:63 vector swizzle (temp 3-component vector of float) +0:63 'outp' (out 4-component vector of float) +0:63 Sequence +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 2 (const int) +0:63 'di' (temp 3-component vector of double) 0:71 Function Definition: foodc1( (global void) 0:71 Function Parameters: 0:73 Sequence @@ -707,26 +699,18 @@ ERROR: node is still EOpNull! 0:? Sequence 0:63 move second child to first child (temp 3-component vector of double) 0:63 'df' (temp 3-component vector of double) -0:63 Convert float to double (temp 3-component vector of double) -0:63 Comma (global 3-component vector of float) -0:63 move second child to first child (temp 3-component vector of float) -0:63 'tempReturn' (global 3-component vector of float) -0:63 modf (global 3-component vector of float) -0:63 vector swizzle (temp 3-component vector of float) -0:63 'outp' (out 4-component vector of float) -0:63 Sequence -0:63 Constant: -0:63 0 (const int) -0:63 Constant: -0:63 1 (const int) -0:63 Constant: -0:63 2 (const int) -0:63 'tempArg' (temp 3-component vector of float) -0:63 move second child to first child (temp 3-component vector of double) -0:63 'di' (temp 3-component vector of double) -0:63 Convert float to double (temp 3-component vector of double) -0:63 'tempArg' (temp 3-component vector of float) -0:63 'tempReturn' (global 3-component vector of float) +0:63 modf (global 3-component vector of double) +0:63 Convert float to double (temp 3-component vector of double) +0:63 vector swizzle (temp 3-component vector of float) +0:63 'outp' (out 4-component vector of float) +0:63 Sequence +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 1 (const int) +0:63 Constant: +0:63 2 (const int) +0:63 'di' (temp 3-component vector of double) 0:71 Function Definition: foodc1( (global void) 0:71 Function Parameters: 0:73 Sequence diff --git a/Test/baseResults/400.geom.out b/Test/baseResults/400.geom.out index f120327b..16117e62 100644 --- a/Test/baseResults/400.geom.out +++ b/Test/baseResults/400.geom.out @@ -174,6 +174,855 @@ ERROR: node is still EOpNull! 0:? Sequence 0:115 'lod' (temp 2-component vector of float) 0:116 'lod' (temp 2-component vector of float) +0:119 Function Definition: doubles( (global void) +0:119 Function Parameters: +0:? Sequence +0:131 move second child to first child (temp double) +0:131 'doublev' (temp double) +0:131 Constant: +0:131 1.702939 +0:132 move second child to first child (temp 2-component vector of double) +0:132 'dvec2v' (temp 2-component vector of double) +0:132 Constant: +0:132 1.643168 +0:132 1.643168 +0:133 move second child to first child (temp 3-component vector of double) +0:133 'dvec3v' (temp 3-component vector of double) +0:133 Constant: +0:133 1.414214 +0:133 1.414214 +0:133 1.414214 +0:134 move second child to first child (temp 4-component vector of double) +0:134 'dvec4v' (temp 4-component vector of double) +0:134 Constant: +0:134 1.449138 +0:134 1.449138 +0:134 1.449138 +0:134 1.449138 +0:136 add second child into first child (temp double) +0:136 'doublev' (temp double) +0:136 inverse sqrt (global double) +0:136 'doublev' (temp double) +0:137 add second child into first child (temp 2-component vector of double) +0:137 'dvec2v' (temp 2-component vector of double) +0:137 inverse sqrt (global 2-component vector of double) +0:137 'dvec2v' (temp 2-component vector of double) +0:138 add second child into first child (temp 3-component vector of double) +0:138 'dvec3v' (temp 3-component vector of double) +0:138 inverse sqrt (global 3-component vector of double) +0:138 'dvec3v' (temp 3-component vector of double) +0:139 add second child into first child (temp 4-component vector of double) +0:139 'dvec4v' (temp 4-component vector of double) +0:139 inverse sqrt (global 4-component vector of double) +0:139 'dvec4v' (temp 4-component vector of double) +0:141 add second child into first child (temp double) +0:141 'doublev' (temp double) +0:141 Absolute value (global double) +0:141 'doublev' (temp double) +0:142 add second child into first child (temp 2-component vector of double) +0:142 'dvec2v' (temp 2-component vector of double) +0:142 Absolute value (global 2-component vector of double) +0:142 'dvec2v' (temp 2-component vector of double) +0:143 add second child into first child (temp 3-component vector of double) +0:143 'dvec3v' (temp 3-component vector of double) +0:143 Absolute value (global 3-component vector of double) +0:143 'dvec3v' (temp 3-component vector of double) +0:144 add second child into first child (temp 4-component vector of double) +0:144 'dvec4v' (temp 4-component vector of double) +0:144 Absolute value (global 4-component vector of double) +0:144 'dvec4v' (temp 4-component vector of double) +0:146 add second child into first child (temp double) +0:146 'doublev' (temp double) +0:146 Sign (global double) +0:146 'doublev' (temp double) +0:147 add second child into first child (temp 2-component vector of double) +0:147 'dvec2v' (temp 2-component vector of double) +0:147 Sign (global 2-component vector of double) +0:147 'dvec2v' (temp 2-component vector of double) +0:148 add second child into first child (temp 3-component vector of double) +0:148 'dvec3v' (temp 3-component vector of double) +0:148 Sign (global 3-component vector of double) +0:148 'dvec3v' (temp 3-component vector of double) +0:149 add second child into first child (temp 4-component vector of double) +0:149 'dvec4v' (temp 4-component vector of double) +0:149 Sign (global 4-component vector of double) +0:149 'dvec4v' (temp 4-component vector of double) +0:151 add second child into first child (temp double) +0:151 'doublev' (temp double) +0:151 Floor (global double) +0:151 'doublev' (temp double) +0:152 add second child into first child (temp 2-component vector of double) +0:152 'dvec2v' (temp 2-component vector of double) +0:152 Floor (global 2-component vector of double) +0:152 'dvec2v' (temp 2-component vector of double) +0:153 add second child into first child (temp 3-component vector of double) +0:153 'dvec3v' (temp 3-component vector of double) +0:153 Floor (global 3-component vector of double) +0:153 'dvec3v' (temp 3-component vector of double) +0:154 add second child into first child (temp 4-component vector of double) +0:154 'dvec4v' (temp 4-component vector of double) +0:154 Floor (global 4-component vector of double) +0:154 'dvec4v' (temp 4-component vector of double) +0:156 add second child into first child (temp double) +0:156 'doublev' (temp double) +0:156 trunc (global double) +0:156 'doublev' (temp double) +0:157 add second child into first child (temp 2-component vector of double) +0:157 'dvec2v' (temp 2-component vector of double) +0:157 trunc (global 2-component vector of double) +0:157 'dvec2v' (temp 2-component vector of double) +0:158 add second child into first child (temp 3-component vector of double) +0:158 'dvec3v' (temp 3-component vector of double) +0:158 trunc (global 3-component vector of double) +0:158 'dvec3v' (temp 3-component vector of double) +0:159 add second child into first child (temp 4-component vector of double) +0:159 'dvec4v' (temp 4-component vector of double) +0:159 trunc (global 4-component vector of double) +0:159 'dvec4v' (temp 4-component vector of double) +0:161 add second child into first child (temp double) +0:161 'doublev' (temp double) +0:161 round (global double) +0:161 'doublev' (temp double) +0:162 add second child into first child (temp 2-component vector of double) +0:162 'dvec2v' (temp 2-component vector of double) +0:162 round (global 2-component vector of double) +0:162 'dvec2v' (temp 2-component vector of double) +0:163 add second child into first child (temp 3-component vector of double) +0:163 'dvec3v' (temp 3-component vector of double) +0:163 round (global 3-component vector of double) +0:163 'dvec3v' (temp 3-component vector of double) +0:164 add second child into first child (temp 4-component vector of double) +0:164 'dvec4v' (temp 4-component vector of double) +0:164 round (global 4-component vector of double) +0:164 'dvec4v' (temp 4-component vector of double) +0:166 add second child into first child (temp double) +0:166 'doublev' (temp double) +0:166 roundEven (global double) +0:166 'doublev' (temp double) +0:167 add second child into first child (temp 2-component vector of double) +0:167 'dvec2v' (temp 2-component vector of double) +0:167 roundEven (global 2-component vector of double) +0:167 'dvec2v' (temp 2-component vector of double) +0:168 add second child into first child (temp 3-component vector of double) +0:168 'dvec3v' (temp 3-component vector of double) +0:168 roundEven (global 3-component vector of double) +0:168 'dvec3v' (temp 3-component vector of double) +0:169 add second child into first child (temp 4-component vector of double) +0:169 'dvec4v' (temp 4-component vector of double) +0:169 roundEven (global 4-component vector of double) +0:169 'dvec4v' (temp 4-component vector of double) +0:171 add second child into first child (temp double) +0:171 'doublev' (temp double) +0:171 Ceiling (global double) +0:171 'doublev' (temp double) +0:172 add second child into first child (temp 2-component vector of double) +0:172 'dvec2v' (temp 2-component vector of double) +0:172 Ceiling (global 2-component vector of double) +0:172 'dvec2v' (temp 2-component vector of double) +0:173 add second child into first child (temp 3-component vector of double) +0:173 'dvec3v' (temp 3-component vector of double) +0:173 Ceiling (global 3-component vector of double) +0:173 'dvec3v' (temp 3-component vector of double) +0:174 add second child into first child (temp 4-component vector of double) +0:174 'dvec4v' (temp 4-component vector of double) +0:174 Ceiling (global 4-component vector of double) +0:174 'dvec4v' (temp 4-component vector of double) +0:176 add second child into first child (temp double) +0:176 'doublev' (temp double) +0:176 Fraction (global double) +0:176 'doublev' (temp double) +0:177 add second child into first child (temp 2-component vector of double) +0:177 'dvec2v' (temp 2-component vector of double) +0:177 Fraction (global 2-component vector of double) +0:177 'dvec2v' (temp 2-component vector of double) +0:178 add second child into first child (temp 3-component vector of double) +0:178 'dvec3v' (temp 3-component vector of double) +0:178 Fraction (global 3-component vector of double) +0:178 'dvec3v' (temp 3-component vector of double) +0:179 add second child into first child (temp 4-component vector of double) +0:179 'dvec4v' (temp 4-component vector of double) +0:179 Fraction (global 4-component vector of double) +0:179 'dvec4v' (temp 4-component vector of double) +0:181 add second child into first child (temp double) +0:181 'doublev' (temp double) +0:181 mod (global double) +0:181 'doublev' (temp double) +0:181 'doublev' (temp double) +0:182 add second child into first child (temp 2-component vector of double) +0:182 'dvec2v' (temp 2-component vector of double) +0:182 mod (global 2-component vector of double) +0:182 'dvec2v' (temp 2-component vector of double) +0:182 'doublev' (temp double) +0:183 add second child into first child (temp 3-component vector of double) +0:183 'dvec3v' (temp 3-component vector of double) +0:183 mod (global 3-component vector of double) +0:183 'dvec3v' (temp 3-component vector of double) +0:183 'doublev' (temp double) +0:184 add second child into first child (temp 4-component vector of double) +0:184 'dvec4v' (temp 4-component vector of double) +0:184 mod (global 4-component vector of double) +0:184 'dvec4v' (temp 4-component vector of double) +0:184 'doublev' (temp double) +0:185 add second child into first child (temp 2-component vector of double) +0:185 'dvec2v' (temp 2-component vector of double) +0:185 mod (global 2-component vector of double) +0:185 'dvec2v' (temp 2-component vector of double) +0:185 'dvec2v' (temp 2-component vector of double) +0:186 add second child into first child (temp 3-component vector of double) +0:186 'dvec3v' (temp 3-component vector of double) +0:186 mod (global 3-component vector of double) +0:186 'dvec3v' (temp 3-component vector of double) +0:186 'dvec3v' (temp 3-component vector of double) +0:187 add second child into first child (temp 4-component vector of double) +0:187 'dvec4v' (temp 4-component vector of double) +0:187 mod (global 4-component vector of double) +0:187 'dvec4v' (temp 4-component vector of double) +0:187 'dvec4v' (temp 4-component vector of double) +0:189 add second child into first child (temp double) +0:189 'doublev' (temp double) +0:189 modf (global double) +0:189 'doublev' (temp double) +0:189 'doublev' (temp double) +0:190 add second child into first child (temp 2-component vector of double) +0:190 'dvec2v' (temp 2-component vector of double) +0:190 modf (global 2-component vector of double) +0:190 'dvec2v' (temp 2-component vector of double) +0:190 'dvec2v' (temp 2-component vector of double) +0:191 add second child into first child (temp 3-component vector of double) +0:191 'dvec3v' (temp 3-component vector of double) +0:191 modf (global 3-component vector of double) +0:191 'dvec3v' (temp 3-component vector of double) +0:191 'dvec3v' (temp 3-component vector of double) +0:192 add second child into first child (temp 4-component vector of double) +0:192 'dvec4v' (temp 4-component vector of double) +0:192 modf (global 4-component vector of double) +0:192 'dvec4v' (temp 4-component vector of double) +0:192 'dvec4v' (temp 4-component vector of double) +0:194 add second child into first child (temp double) +0:194 'doublev' (temp double) +0:194 min (global double) +0:194 'doublev' (temp double) +0:194 'doublev' (temp double) +0:195 add second child into first child (temp 2-component vector of double) +0:195 'dvec2v' (temp 2-component vector of double) +0:195 min (global 2-component vector of double) +0:195 'dvec2v' (temp 2-component vector of double) +0:195 'doublev' (temp double) +0:196 add second child into first child (temp 3-component vector of double) +0:196 'dvec3v' (temp 3-component vector of double) +0:196 min (global 3-component vector of double) +0:196 'dvec3v' (temp 3-component vector of double) +0:196 'doublev' (temp double) +0:197 add second child into first child (temp 4-component vector of double) +0:197 'dvec4v' (temp 4-component vector of double) +0:197 min (global 4-component vector of double) +0:197 'dvec4v' (temp 4-component vector of double) +0:197 'doublev' (temp double) +0:198 add second child into first child (temp 2-component vector of double) +0:198 'dvec2v' (temp 2-component vector of double) +0:198 min (global 2-component vector of double) +0:198 'dvec2v' (temp 2-component vector of double) +0:198 'dvec2v' (temp 2-component vector of double) +0:199 add second child into first child (temp 3-component vector of double) +0:199 'dvec3v' (temp 3-component vector of double) +0:199 min (global 3-component vector of double) +0:199 'dvec3v' (temp 3-component vector of double) +0:199 'dvec3v' (temp 3-component vector of double) +0:200 add second child into first child (temp 4-component vector of double) +0:200 'dvec4v' (temp 4-component vector of double) +0:200 min (global 4-component vector of double) +0:200 'dvec4v' (temp 4-component vector of double) +0:200 'dvec4v' (temp 4-component vector of double) +0:202 add second child into first child (temp double) +0:202 'doublev' (temp double) +0:202 max (global double) +0:202 'doublev' (temp double) +0:202 'doublev' (temp double) +0:203 add second child into first child (temp 2-component vector of double) +0:203 'dvec2v' (temp 2-component vector of double) +0:203 max (global 2-component vector of double) +0:203 'dvec2v' (temp 2-component vector of double) +0:203 'doublev' (temp double) +0:204 add second child into first child (temp 3-component vector of double) +0:204 'dvec3v' (temp 3-component vector of double) +0:204 max (global 3-component vector of double) +0:204 'dvec3v' (temp 3-component vector of double) +0:204 'doublev' (temp double) +0:205 add second child into first child (temp 4-component vector of double) +0:205 'dvec4v' (temp 4-component vector of double) +0:205 max (global 4-component vector of double) +0:205 'dvec4v' (temp 4-component vector of double) +0:205 'doublev' (temp double) +0:206 add second child into first child (temp 2-component vector of double) +0:206 'dvec2v' (temp 2-component vector of double) +0:206 max (global 2-component vector of double) +0:206 'dvec2v' (temp 2-component vector of double) +0:206 'dvec2v' (temp 2-component vector of double) +0:207 add second child into first child (temp 3-component vector of double) +0:207 'dvec3v' (temp 3-component vector of double) +0:207 max (global 3-component vector of double) +0:207 'dvec3v' (temp 3-component vector of double) +0:207 'dvec3v' (temp 3-component vector of double) +0:208 add second child into first child (temp 4-component vector of double) +0:208 'dvec4v' (temp 4-component vector of double) +0:208 max (global 4-component vector of double) +0:208 'dvec4v' (temp 4-component vector of double) +0:208 'dvec4v' (temp 4-component vector of double) +0:210 add second child into first child (temp double) +0:210 'doublev' (temp double) +0:210 clamp (global double) +0:210 'doublev' (temp double) +0:210 'doublev' (temp double) +0:210 'doublev' (temp double) +0:211 add second child into first child (temp 2-component vector of double) +0:211 'dvec2v' (temp 2-component vector of double) +0:211 clamp (global 2-component vector of double) +0:211 'dvec2v' (temp 2-component vector of double) +0:211 'doublev' (temp double) +0:211 'doublev' (temp double) +0:212 add second child into first child (temp 3-component vector of double) +0:212 'dvec3v' (temp 3-component vector of double) +0:212 clamp (global 3-component vector of double) +0:212 'dvec3v' (temp 3-component vector of double) +0:212 'doublev' (temp double) +0:212 'doublev' (temp double) +0:213 add second child into first child (temp 4-component vector of double) +0:213 'dvec4v' (temp 4-component vector of double) +0:213 clamp (global 4-component vector of double) +0:213 'dvec4v' (temp 4-component vector of double) +0:213 'doublev' (temp double) +0:213 'doublev' (temp double) +0:214 add second child into first child (temp 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:214 clamp (global 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:215 add second child into first child (temp 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:215 clamp (global 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:216 add second child into first child (temp 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:216 clamp (global 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:218 add second child into first child (temp double) +0:218 'doublev' (temp double) +0:218 mix (global double) +0:218 'doublev' (temp double) +0:218 'doublev' (temp double) +0:218 'doublev' (temp double) +0:219 add second child into first child (temp 2-component vector of double) +0:219 'dvec2v' (temp 2-component vector of double) +0:219 mix (global 2-component vector of double) +0:219 'dvec2v' (temp 2-component vector of double) +0:219 'dvec2v' (temp 2-component vector of double) +0:219 'doublev' (temp double) +0:220 add second child into first child (temp 3-component vector of double) +0:220 'dvec3v' (temp 3-component vector of double) +0:220 mix (global 3-component vector of double) +0:220 'dvec3v' (temp 3-component vector of double) +0:220 'dvec3v' (temp 3-component vector of double) +0:220 'doublev' (temp double) +0:221 add second child into first child (temp 4-component vector of double) +0:221 'dvec4v' (temp 4-component vector of double) +0:221 mix (global 4-component vector of double) +0:221 'dvec4v' (temp 4-component vector of double) +0:221 'dvec4v' (temp 4-component vector of double) +0:221 'doublev' (temp double) +0:222 add second child into first child (temp 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:222 mix (global 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:223 add second child into first child (temp 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:223 mix (global 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:224 add second child into first child (temp 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:224 mix (global 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:225 add second child into first child (temp double) +0:225 'doublev' (temp double) +0:225 mix (global double) +0:225 'doublev' (temp double) +0:225 'doublev' (temp double) +0:225 'boolv' (temp bool) +0:226 add second child into first child (temp 2-component vector of double) +0:226 'dvec2v' (temp 2-component vector of double) +0:226 mix (global 2-component vector of double) +0:226 'dvec2v' (temp 2-component vector of double) +0:226 'dvec2v' (temp 2-component vector of double) +0:226 'bvec2v' (temp 2-component vector of bool) +0:227 add second child into first child (temp 3-component vector of double) +0:227 'dvec3v' (temp 3-component vector of double) +0:227 mix (global 3-component vector of double) +0:227 'dvec3v' (temp 3-component vector of double) +0:227 'dvec3v' (temp 3-component vector of double) +0:227 'bvec3v' (temp 3-component vector of bool) +0:228 add second child into first child (temp 4-component vector of double) +0:228 'dvec4v' (temp 4-component vector of double) +0:228 mix (global 4-component vector of double) +0:228 'dvec4v' (temp 4-component vector of double) +0:228 'dvec4v' (temp 4-component vector of double) +0:228 'bvec4v' (temp 4-component vector of bool) +0:230 add second child into first child (temp double) +0:230 'doublev' (temp double) +0:230 step (global double) +0:230 'doublev' (temp double) +0:230 'doublev' (temp double) +0:231 add second child into first child (temp 2-component vector of double) +0:231 'dvec2v' (temp 2-component vector of double) +0:231 step (global 2-component vector of double) +0:231 'dvec2v' (temp 2-component vector of double) +0:231 'dvec2v' (temp 2-component vector of double) +0:232 add second child into first child (temp 3-component vector of double) +0:232 'dvec3v' (temp 3-component vector of double) +0:232 step (global 3-component vector of double) +0:232 'dvec3v' (temp 3-component vector of double) +0:232 'dvec3v' (temp 3-component vector of double) +0:233 add second child into first child (temp 4-component vector of double) +0:233 'dvec4v' (temp 4-component vector of double) +0:233 step (global 4-component vector of double) +0:233 'dvec4v' (temp 4-component vector of double) +0:233 'dvec4v' (temp 4-component vector of double) +0:234 add second child into first child (temp 2-component vector of double) +0:234 'dvec2v' (temp 2-component vector of double) +0:234 step (global 2-component vector of double) +0:234 'doublev' (temp double) +0:234 'dvec2v' (temp 2-component vector of double) +0:235 add second child into first child (temp 3-component vector of double) +0:235 'dvec3v' (temp 3-component vector of double) +0:235 step (global 3-component vector of double) +0:235 'doublev' (temp double) +0:235 'dvec3v' (temp 3-component vector of double) +0:236 add second child into first child (temp 4-component vector of double) +0:236 'dvec4v' (temp 4-component vector of double) +0:236 step (global 4-component vector of double) +0:236 'doublev' (temp double) +0:236 'dvec4v' (temp 4-component vector of double) +0:238 add second child into first child (temp double) +0:238 'doublev' (temp double) +0:238 smoothstep (global double) +0:238 'doublev' (temp double) +0:238 'doublev' (temp double) +0:238 'doublev' (temp double) +0:239 add second child into first child (temp 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:239 smoothstep (global 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:240 add second child into first child (temp 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:240 smoothstep (global 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:241 add second child into first child (temp 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:241 smoothstep (global 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:242 add second child into first child (temp 2-component vector of double) +0:242 'dvec2v' (temp 2-component vector of double) +0:242 smoothstep (global 2-component vector of double) +0:242 'doublev' (temp double) +0:242 'doublev' (temp double) +0:242 'dvec2v' (temp 2-component vector of double) +0:243 add second child into first child (temp 3-component vector of double) +0:243 'dvec3v' (temp 3-component vector of double) +0:243 smoothstep (global 3-component vector of double) +0:243 'doublev' (temp double) +0:243 'doublev' (temp double) +0:243 'dvec3v' (temp 3-component vector of double) +0:244 add second child into first child (temp 4-component vector of double) +0:244 'dvec4v' (temp 4-component vector of double) +0:244 smoothstep (global 4-component vector of double) +0:244 'doublev' (temp double) +0:244 'doublev' (temp double) +0:244 'dvec4v' (temp 4-component vector of double) +0:246 move second child to first child (temp bool) +0:246 'boolv' (temp bool) +0:246 isnan (global bool) +0:246 'doublev' (temp double) +0:247 move second child to first child (temp 2-component vector of bool) +0:247 'bvec2v' (temp 2-component vector of bool) +0:247 isnan (global 2-component vector of bool) +0:247 'dvec2v' (temp 2-component vector of double) +0:248 move second child to first child (temp 3-component vector of bool) +0:248 'bvec3v' (temp 3-component vector of bool) +0:248 isnan (global 3-component vector of bool) +0:248 'dvec3v' (temp 3-component vector of double) +0:249 move second child to first child (temp 4-component vector of bool) +0:249 'bvec4v' (temp 4-component vector of bool) +0:249 isnan (global 4-component vector of bool) +0:249 'dvec4v' (temp 4-component vector of double) +0:251 move second child to first child (temp bool) +0:251 'boolv' (temp bool) +0:251 Test condition and select (temp bool) +0:251 Condition +0:251 'boolv' (temp bool) +0:251 true case +0:251 isinf (global bool) +0:251 'doublev' (temp double) +0:251 false case +0:251 Constant: +0:251 false (const bool) +0:252 move second child to first child (temp 2-component vector of bool) +0:252 'bvec2v' (temp 2-component vector of bool) +0:252 Test condition and select (temp 2-component vector of bool) +0:252 Condition +0:252 'boolv' (temp bool) +0:252 true case +0:252 isinf (global 2-component vector of bool) +0:252 'dvec2v' (temp 2-component vector of double) +0:252 false case +0:252 Constant: +0:252 false (const bool) +0:252 false (const bool) +0:253 move second child to first child (temp 3-component vector of bool) +0:253 'bvec3v' (temp 3-component vector of bool) +0:253 Test condition and select (temp 3-component vector of bool) +0:253 Condition +0:253 'boolv' (temp bool) +0:253 true case +0:253 isinf (global 3-component vector of bool) +0:253 'dvec3v' (temp 3-component vector of double) +0:253 false case +0:253 Constant: +0:253 false (const bool) +0:253 false (const bool) +0:253 false (const bool) +0:254 move second child to first child (temp 4-component vector of bool) +0:254 'bvec4v' (temp 4-component vector of bool) +0:254 Test condition and select (temp 4-component vector of bool) +0:254 Condition +0:254 'boolv' (temp bool) +0:254 true case +0:254 isinf (global 4-component vector of bool) +0:254 'dvec4v' (temp 4-component vector of double) +0:254 false case +0:254 Constant: +0:254 false (const bool) +0:254 false (const bool) +0:254 false (const bool) +0:254 false (const bool) +0:256 add second child into first child (temp double) +0:256 'doublev' (temp double) +0:256 length (global double) +0:256 'doublev' (temp double) +0:257 add second child into first child (temp double) +0:257 'doublev' (temp double) +0:257 length (global double) +0:257 'dvec2v' (temp 2-component vector of double) +0:258 add second child into first child (temp double) +0:258 'doublev' (temp double) +0:258 length (global double) +0:258 'dvec3v' (temp 3-component vector of double) +0:259 add second child into first child (temp double) +0:259 'doublev' (temp double) +0:259 length (global double) +0:259 'dvec4v' (temp 4-component vector of double) +0:261 add second child into first child (temp double) +0:261 'doublev' (temp double) +0:261 distance (global double) +0:261 'doublev' (temp double) +0:261 'doublev' (temp double) +0:262 add second child into first child (temp double) +0:262 'doublev' (temp double) +0:262 distance (global double) +0:262 'dvec2v' (temp 2-component vector of double) +0:262 'dvec2v' (temp 2-component vector of double) +0:263 add second child into first child (temp double) +0:263 'doublev' (temp double) +0:263 distance (global double) +0:263 'dvec3v' (temp 3-component vector of double) +0:263 'dvec3v' (temp 3-component vector of double) +0:264 add second child into first child (temp double) +0:264 'doublev' (temp double) +0:264 distance (global double) +0:264 'dvec4v' (temp 4-component vector of double) +0:264 'dvec4v' (temp 4-component vector of double) +0:266 add second child into first child (temp double) +0:266 'doublev' (temp double) +0:266 dot-product (global double) +0:266 'doublev' (temp double) +0:266 'doublev' (temp double) +0:267 add second child into first child (temp double) +0:267 'doublev' (temp double) +0:267 dot-product (global double) +0:267 'dvec2v' (temp 2-component vector of double) +0:267 'dvec2v' (temp 2-component vector of double) +0:268 add second child into first child (temp double) +0:268 'doublev' (temp double) +0:268 dot-product (global double) +0:268 'dvec3v' (temp 3-component vector of double) +0:268 'dvec3v' (temp 3-component vector of double) +0:269 add second child into first child (temp double) +0:269 'doublev' (temp double) +0:269 dot-product (global double) +0:269 'dvec4v' (temp 4-component vector of double) +0:269 'dvec4v' (temp 4-component vector of double) +0:271 add second child into first child (temp 3-component vector of double) +0:271 'dvec3v' (temp 3-component vector of double) +0:271 cross-product (global 3-component vector of double) +0:271 'dvec3v' (temp 3-component vector of double) +0:271 'dvec3v' (temp 3-component vector of double) +0:273 add second child into first child (temp double) +0:273 'doublev' (temp double) +0:273 normalize (global double) +0:273 'doublev' (temp double) +0:274 add second child into first child (temp 2-component vector of double) +0:274 'dvec2v' (temp 2-component vector of double) +0:274 normalize (global 2-component vector of double) +0:274 'dvec2v' (temp 2-component vector of double) +0:275 add second child into first child (temp 3-component vector of double) +0:275 'dvec3v' (temp 3-component vector of double) +0:275 normalize (global 3-component vector of double) +0:275 'dvec3v' (temp 3-component vector of double) +0:276 add second child into first child (temp 4-component vector of double) +0:276 'dvec4v' (temp 4-component vector of double) +0:276 normalize (global 4-component vector of double) +0:276 'dvec4v' (temp 4-component vector of double) +0:278 add second child into first child (temp double) +0:278 'doublev' (temp double) +0:278 face-forward (global double) +0:278 'doublev' (temp double) +0:278 'doublev' (temp double) +0:278 'doublev' (temp double) +0:279 add second child into first child (temp 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:279 face-forward (global 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:280 add second child into first child (temp 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:280 face-forward (global 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:281 add second child into first child (temp 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:281 face-forward (global 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:283 add second child into first child (temp double) +0:283 'doublev' (temp double) +0:283 reflect (global double) +0:283 'doublev' (temp double) +0:283 'doublev' (temp double) +0:284 add second child into first child (temp 2-component vector of double) +0:284 'dvec2v' (temp 2-component vector of double) +0:284 reflect (global 2-component vector of double) +0:284 'dvec2v' (temp 2-component vector of double) +0:284 'dvec2v' (temp 2-component vector of double) +0:285 add second child into first child (temp 3-component vector of double) +0:285 'dvec3v' (temp 3-component vector of double) +0:285 reflect (global 3-component vector of double) +0:285 'dvec3v' (temp 3-component vector of double) +0:285 'dvec3v' (temp 3-component vector of double) +0:286 add second child into first child (temp 4-component vector of double) +0:286 'dvec4v' (temp 4-component vector of double) +0:286 reflect (global 4-component vector of double) +0:286 'dvec4v' (temp 4-component vector of double) +0:286 'dvec4v' (temp 4-component vector of double) +0:288 add second child into first child (temp double) +0:288 'doublev' (temp double) +0:288 refract (global double) +0:288 'doublev' (temp double) +0:288 'doublev' (temp double) +0:288 'doublev' (temp double) +0:289 add second child into first child (temp 2-component vector of double) +0:289 'dvec2v' (temp 2-component vector of double) +0:289 refract (global 2-component vector of double) +0:289 'dvec2v' (temp 2-component vector of double) +0:289 'dvec2v' (temp 2-component vector of double) +0:289 'doublev' (temp double) +0:290 add second child into first child (temp 3-component vector of double) +0:290 'dvec3v' (temp 3-component vector of double) +0:290 refract (global 3-component vector of double) +0:290 'dvec3v' (temp 3-component vector of double) +0:290 'dvec3v' (temp 3-component vector of double) +0:290 'doublev' (temp double) +0:291 add second child into first child (temp 4-component vector of double) +0:291 'dvec4v' (temp 4-component vector of double) +0:291 refract (global 4-component vector of double) +0:291 'dvec4v' (temp 4-component vector of double) +0:291 'dvec4v' (temp 4-component vector of double) +0:291 'doublev' (temp double) +0:293 Sequence +0:293 move second child to first child (temp 2X2 matrix of double) +0:293 'dmat2v' (temp 2X2 matrix of double) +0:293 outer product (global 2X2 matrix of double) +0:293 'dvec2v' (temp 2-component vector of double) +0:293 'dvec2v' (temp 2-component vector of double) +0:294 Sequence +0:294 move second child to first child (temp 3X3 matrix of double) +0:294 'dmat3v' (temp 3X3 matrix of double) +0:294 outer product (global 3X3 matrix of double) +0:294 'dvec3v' (temp 3-component vector of double) +0:294 'dvec3v' (temp 3-component vector of double) +0:295 Sequence +0:295 move second child to first child (temp 4X4 matrix of double) +0:295 'dmat4v' (temp 4X4 matrix of double) +0:295 outer product (global 4X4 matrix of double) +0:295 'dvec4v' (temp 4-component vector of double) +0:295 'dvec4v' (temp 4-component vector of double) +0:296 Sequence +0:296 move second child to first child (temp 2X3 matrix of double) +0:296 'dmat2x3v' (temp 2X3 matrix of double) +0:296 outer product (global 2X3 matrix of double) +0:296 'dvec3v' (temp 3-component vector of double) +0:296 'dvec2v' (temp 2-component vector of double) +0:297 Sequence +0:297 move second child to first child (temp 3X2 matrix of double) +0:297 'dmat3x2v' (temp 3X2 matrix of double) +0:297 outer product (global 3X2 matrix of double) +0:297 'dvec2v' (temp 2-component vector of double) +0:297 'dvec3v' (temp 3-component vector of double) +0:298 Sequence +0:298 move second child to first child (temp 2X4 matrix of double) +0:298 'dmat2x4v' (temp 2X4 matrix of double) +0:298 outer product (global 2X4 matrix of double) +0:298 'dvec4v' (temp 4-component vector of double) +0:298 'dvec2v' (temp 2-component vector of double) +0:299 Sequence +0:299 move second child to first child (temp 4X2 matrix of double) +0:299 'dmat4x2v' (temp 4X2 matrix of double) +0:299 outer product (global 4X2 matrix of double) +0:299 'dvec2v' (temp 2-component vector of double) +0:299 'dvec4v' (temp 4-component vector of double) +0:300 Sequence +0:300 move second child to first child (temp 3X4 matrix of double) +0:300 'dmat3x4v' (temp 3X4 matrix of double) +0:300 outer product (global 3X4 matrix of double) +0:300 'dvec4v' (temp 4-component vector of double) +0:300 'dvec3v' (temp 3-component vector of double) +0:301 Sequence +0:301 move second child to first child (temp 4X3 matrix of double) +0:301 'dmat4x3v' (temp 4X3 matrix of double) +0:301 outer product (global 4X3 matrix of double) +0:301 'dvec3v' (temp 3-component vector of double) +0:301 'dvec4v' (temp 4-component vector of double) +0:303 matrix mult second child into first child (temp 2X2 matrix of double) +0:303 'dmat2v' (temp 2X2 matrix of double) +0:303 component-wise multiply (global 2X2 matrix of double) +0:303 'dmat2v' (temp 2X2 matrix of double) +0:303 'dmat2v' (temp 2X2 matrix of double) +0:304 matrix mult second child into first child (temp 3X3 matrix of double) +0:304 'dmat3v' (temp 3X3 matrix of double) +0:304 component-wise multiply (global 3X3 matrix of double) +0:304 'dmat3v' (temp 3X3 matrix of double) +0:304 'dmat3v' (temp 3X3 matrix of double) +0:305 matrix mult second child into first child (temp 4X4 matrix of double) +0:305 'dmat4v' (temp 4X4 matrix of double) +0:305 component-wise multiply (global 4X4 matrix of double) +0:305 'dmat4v' (temp 4X4 matrix of double) +0:305 'dmat4v' (temp 4X4 matrix of double) +0:306 move second child to first child (temp 2X3 matrix of double) +0:306 'dmat2x3v' (temp 2X3 matrix of double) +0:306 component-wise multiply (global 2X3 matrix of double) +0:306 'dmat2x3v' (temp 2X3 matrix of double) +0:306 'dmat2x3v' (temp 2X3 matrix of double) +0:307 move second child to first child (temp 2X4 matrix of double) +0:307 'dmat2x4v' (temp 2X4 matrix of double) +0:307 component-wise multiply (global 2X4 matrix of double) +0:307 'dmat2x4v' (temp 2X4 matrix of double) +0:307 'dmat2x4v' (temp 2X4 matrix of double) +0:308 move second child to first child (temp 3X2 matrix of double) +0:308 'dmat3x2v' (temp 3X2 matrix of double) +0:308 component-wise multiply (global 3X2 matrix of double) +0:308 'dmat3x2v' (temp 3X2 matrix of double) +0:308 'dmat3x2v' (temp 3X2 matrix of double) +0:309 move second child to first child (temp 3X4 matrix of double) +0:309 'dmat3x4v' (temp 3X4 matrix of double) +0:309 component-wise multiply (global 3X4 matrix of double) +0:309 'dmat3x4v' (temp 3X4 matrix of double) +0:309 'dmat3x4v' (temp 3X4 matrix of double) +0:310 move second child to first child (temp 4X2 matrix of double) +0:310 'dmat4x2v' (temp 4X2 matrix of double) +0:310 component-wise multiply (global 4X2 matrix of double) +0:310 'dmat4x2v' (temp 4X2 matrix of double) +0:310 'dmat4x2v' (temp 4X2 matrix of double) +0:311 move second child to first child (temp 4X3 matrix of double) +0:311 'dmat4x3v' (temp 4X3 matrix of double) +0:311 component-wise multiply (global 4X3 matrix of double) +0:311 'dmat4x3v' (temp 4X3 matrix of double) +0:311 'dmat4x3v' (temp 4X3 matrix of double) +0:313 matrix mult second child into first child (temp 2X2 matrix of double) +0:313 'dmat2v' (temp 2X2 matrix of double) +0:313 transpose (global 2X2 matrix of double) +0:313 'dmat2v' (temp 2X2 matrix of double) +0:314 matrix mult second child into first child (temp 3X3 matrix of double) +0:314 'dmat3v' (temp 3X3 matrix of double) +0:314 transpose (global 3X3 matrix of double) +0:314 'dmat3v' (temp 3X3 matrix of double) +0:315 matrix mult second child into first child (temp 4X4 matrix of double) +0:315 'dmat4v' (temp 4X4 matrix of double) +0:315 transpose (global 4X4 matrix of double) +0:315 'dmat4v' (temp 4X4 matrix of double) +0:316 move second child to first child (temp 2X3 matrix of double) +0:316 'dmat2x3v' (temp 2X3 matrix of double) +0:316 transpose (global 2X3 matrix of double) +0:316 'dmat3x2v' (temp 3X2 matrix of double) +0:317 move second child to first child (temp 3X2 matrix of double) +0:317 'dmat3x2v' (temp 3X2 matrix of double) +0:317 transpose (global 3X2 matrix of double) +0:317 'dmat2x3v' (temp 2X3 matrix of double) +0:318 move second child to first child (temp 2X4 matrix of double) +0:318 'dmat2x4v' (temp 2X4 matrix of double) +0:318 transpose (global 2X4 matrix of double) +0:318 'dmat4x2v' (temp 4X2 matrix of double) +0:319 move second child to first child (temp 4X2 matrix of double) +0:319 'dmat4x2v' (temp 4X2 matrix of double) +0:319 transpose (global 4X2 matrix of double) +0:319 'dmat2x4v' (temp 2X4 matrix of double) +0:320 move second child to first child (temp 3X4 matrix of double) +0:320 'dmat3x4v' (temp 3X4 matrix of double) +0:320 transpose (global 3X4 matrix of double) +0:320 'dmat4x3v' (temp 4X3 matrix of double) +0:321 move second child to first child (temp 4X3 matrix of double) +0:321 'dmat4x3v' (temp 4X3 matrix of double) +0:321 transpose (global 4X3 matrix of double) +0:321 'dmat3x4v' (temp 3X4 matrix of double) +0:323 add second child into first child (temp double) +0:323 'doublev' (temp double) +0:323 determinant (global double) +0:323 'dmat2v' (temp 2X2 matrix of double) +0:324 add second child into first child (temp double) +0:324 'doublev' (temp double) +0:324 determinant (global double) +0:324 'dmat3v' (temp 3X3 matrix of double) +0:325 add second child into first child (temp double) +0:325 'doublev' (temp double) +0:325 determinant (global double) +0:325 'dmat4v' (temp 4X4 matrix of double) +0:327 matrix mult second child into first child (temp 2X2 matrix of double) +0:327 'dmat2v' (temp 2X2 matrix of double) +0:327 inverse (global 2X2 matrix of double) +0:327 'dmat2v' (temp 2X2 matrix of double) +0:328 matrix mult second child into first child (temp 3X3 matrix of double) +0:328 'dmat3v' (temp 3X3 matrix of double) +0:328 inverse (global 3X3 matrix of double) +0:328 'dmat3v' (temp 3X3 matrix of double) +0:329 matrix mult second child into first child (temp 4X4 matrix of double) +0:329 'dmat4v' (temp 4X4 matrix of double) +0:329 inverse (global 4X4 matrix of double) +0:329 'dmat4v' (temp 4X4 matrix of double) 0:? Linker Objects 0:? 'bn' (in 3-element array of block{in int a}) 0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize}) @@ -347,6 +1196,855 @@ ERROR: node is still EOpNull! 0:? Sequence 0:115 'lod' (temp 2-component vector of float) 0:116 'lod' (temp 2-component vector of float) +0:119 Function Definition: doubles( (global void) +0:119 Function Parameters: +0:? Sequence +0:131 move second child to first child (temp double) +0:131 'doublev' (temp double) +0:131 Constant: +0:131 1.702939 +0:132 move second child to first child (temp 2-component vector of double) +0:132 'dvec2v' (temp 2-component vector of double) +0:132 Constant: +0:132 1.643168 +0:132 1.643168 +0:133 move second child to first child (temp 3-component vector of double) +0:133 'dvec3v' (temp 3-component vector of double) +0:133 Constant: +0:133 1.414214 +0:133 1.414214 +0:133 1.414214 +0:134 move second child to first child (temp 4-component vector of double) +0:134 'dvec4v' (temp 4-component vector of double) +0:134 Constant: +0:134 1.449138 +0:134 1.449138 +0:134 1.449138 +0:134 1.449138 +0:136 add second child into first child (temp double) +0:136 'doublev' (temp double) +0:136 inverse sqrt (global double) +0:136 'doublev' (temp double) +0:137 add second child into first child (temp 2-component vector of double) +0:137 'dvec2v' (temp 2-component vector of double) +0:137 inverse sqrt (global 2-component vector of double) +0:137 'dvec2v' (temp 2-component vector of double) +0:138 add second child into first child (temp 3-component vector of double) +0:138 'dvec3v' (temp 3-component vector of double) +0:138 inverse sqrt (global 3-component vector of double) +0:138 'dvec3v' (temp 3-component vector of double) +0:139 add second child into first child (temp 4-component vector of double) +0:139 'dvec4v' (temp 4-component vector of double) +0:139 inverse sqrt (global 4-component vector of double) +0:139 'dvec4v' (temp 4-component vector of double) +0:141 add second child into first child (temp double) +0:141 'doublev' (temp double) +0:141 Absolute value (global double) +0:141 'doublev' (temp double) +0:142 add second child into first child (temp 2-component vector of double) +0:142 'dvec2v' (temp 2-component vector of double) +0:142 Absolute value (global 2-component vector of double) +0:142 'dvec2v' (temp 2-component vector of double) +0:143 add second child into first child (temp 3-component vector of double) +0:143 'dvec3v' (temp 3-component vector of double) +0:143 Absolute value (global 3-component vector of double) +0:143 'dvec3v' (temp 3-component vector of double) +0:144 add second child into first child (temp 4-component vector of double) +0:144 'dvec4v' (temp 4-component vector of double) +0:144 Absolute value (global 4-component vector of double) +0:144 'dvec4v' (temp 4-component vector of double) +0:146 add second child into first child (temp double) +0:146 'doublev' (temp double) +0:146 Sign (global double) +0:146 'doublev' (temp double) +0:147 add second child into first child (temp 2-component vector of double) +0:147 'dvec2v' (temp 2-component vector of double) +0:147 Sign (global 2-component vector of double) +0:147 'dvec2v' (temp 2-component vector of double) +0:148 add second child into first child (temp 3-component vector of double) +0:148 'dvec3v' (temp 3-component vector of double) +0:148 Sign (global 3-component vector of double) +0:148 'dvec3v' (temp 3-component vector of double) +0:149 add second child into first child (temp 4-component vector of double) +0:149 'dvec4v' (temp 4-component vector of double) +0:149 Sign (global 4-component vector of double) +0:149 'dvec4v' (temp 4-component vector of double) +0:151 add second child into first child (temp double) +0:151 'doublev' (temp double) +0:151 Floor (global double) +0:151 'doublev' (temp double) +0:152 add second child into first child (temp 2-component vector of double) +0:152 'dvec2v' (temp 2-component vector of double) +0:152 Floor (global 2-component vector of double) +0:152 'dvec2v' (temp 2-component vector of double) +0:153 add second child into first child (temp 3-component vector of double) +0:153 'dvec3v' (temp 3-component vector of double) +0:153 Floor (global 3-component vector of double) +0:153 'dvec3v' (temp 3-component vector of double) +0:154 add second child into first child (temp 4-component vector of double) +0:154 'dvec4v' (temp 4-component vector of double) +0:154 Floor (global 4-component vector of double) +0:154 'dvec4v' (temp 4-component vector of double) +0:156 add second child into first child (temp double) +0:156 'doublev' (temp double) +0:156 trunc (global double) +0:156 'doublev' (temp double) +0:157 add second child into first child (temp 2-component vector of double) +0:157 'dvec2v' (temp 2-component vector of double) +0:157 trunc (global 2-component vector of double) +0:157 'dvec2v' (temp 2-component vector of double) +0:158 add second child into first child (temp 3-component vector of double) +0:158 'dvec3v' (temp 3-component vector of double) +0:158 trunc (global 3-component vector of double) +0:158 'dvec3v' (temp 3-component vector of double) +0:159 add second child into first child (temp 4-component vector of double) +0:159 'dvec4v' (temp 4-component vector of double) +0:159 trunc (global 4-component vector of double) +0:159 'dvec4v' (temp 4-component vector of double) +0:161 add second child into first child (temp double) +0:161 'doublev' (temp double) +0:161 round (global double) +0:161 'doublev' (temp double) +0:162 add second child into first child (temp 2-component vector of double) +0:162 'dvec2v' (temp 2-component vector of double) +0:162 round (global 2-component vector of double) +0:162 'dvec2v' (temp 2-component vector of double) +0:163 add second child into first child (temp 3-component vector of double) +0:163 'dvec3v' (temp 3-component vector of double) +0:163 round (global 3-component vector of double) +0:163 'dvec3v' (temp 3-component vector of double) +0:164 add second child into first child (temp 4-component vector of double) +0:164 'dvec4v' (temp 4-component vector of double) +0:164 round (global 4-component vector of double) +0:164 'dvec4v' (temp 4-component vector of double) +0:166 add second child into first child (temp double) +0:166 'doublev' (temp double) +0:166 roundEven (global double) +0:166 'doublev' (temp double) +0:167 add second child into first child (temp 2-component vector of double) +0:167 'dvec2v' (temp 2-component vector of double) +0:167 roundEven (global 2-component vector of double) +0:167 'dvec2v' (temp 2-component vector of double) +0:168 add second child into first child (temp 3-component vector of double) +0:168 'dvec3v' (temp 3-component vector of double) +0:168 roundEven (global 3-component vector of double) +0:168 'dvec3v' (temp 3-component vector of double) +0:169 add second child into first child (temp 4-component vector of double) +0:169 'dvec4v' (temp 4-component vector of double) +0:169 roundEven (global 4-component vector of double) +0:169 'dvec4v' (temp 4-component vector of double) +0:171 add second child into first child (temp double) +0:171 'doublev' (temp double) +0:171 Ceiling (global double) +0:171 'doublev' (temp double) +0:172 add second child into first child (temp 2-component vector of double) +0:172 'dvec2v' (temp 2-component vector of double) +0:172 Ceiling (global 2-component vector of double) +0:172 'dvec2v' (temp 2-component vector of double) +0:173 add second child into first child (temp 3-component vector of double) +0:173 'dvec3v' (temp 3-component vector of double) +0:173 Ceiling (global 3-component vector of double) +0:173 'dvec3v' (temp 3-component vector of double) +0:174 add second child into first child (temp 4-component vector of double) +0:174 'dvec4v' (temp 4-component vector of double) +0:174 Ceiling (global 4-component vector of double) +0:174 'dvec4v' (temp 4-component vector of double) +0:176 add second child into first child (temp double) +0:176 'doublev' (temp double) +0:176 Fraction (global double) +0:176 'doublev' (temp double) +0:177 add second child into first child (temp 2-component vector of double) +0:177 'dvec2v' (temp 2-component vector of double) +0:177 Fraction (global 2-component vector of double) +0:177 'dvec2v' (temp 2-component vector of double) +0:178 add second child into first child (temp 3-component vector of double) +0:178 'dvec3v' (temp 3-component vector of double) +0:178 Fraction (global 3-component vector of double) +0:178 'dvec3v' (temp 3-component vector of double) +0:179 add second child into first child (temp 4-component vector of double) +0:179 'dvec4v' (temp 4-component vector of double) +0:179 Fraction (global 4-component vector of double) +0:179 'dvec4v' (temp 4-component vector of double) +0:181 add second child into first child (temp double) +0:181 'doublev' (temp double) +0:181 mod (global double) +0:181 'doublev' (temp double) +0:181 'doublev' (temp double) +0:182 add second child into first child (temp 2-component vector of double) +0:182 'dvec2v' (temp 2-component vector of double) +0:182 mod (global 2-component vector of double) +0:182 'dvec2v' (temp 2-component vector of double) +0:182 'doublev' (temp double) +0:183 add second child into first child (temp 3-component vector of double) +0:183 'dvec3v' (temp 3-component vector of double) +0:183 mod (global 3-component vector of double) +0:183 'dvec3v' (temp 3-component vector of double) +0:183 'doublev' (temp double) +0:184 add second child into first child (temp 4-component vector of double) +0:184 'dvec4v' (temp 4-component vector of double) +0:184 mod (global 4-component vector of double) +0:184 'dvec4v' (temp 4-component vector of double) +0:184 'doublev' (temp double) +0:185 add second child into first child (temp 2-component vector of double) +0:185 'dvec2v' (temp 2-component vector of double) +0:185 mod (global 2-component vector of double) +0:185 'dvec2v' (temp 2-component vector of double) +0:185 'dvec2v' (temp 2-component vector of double) +0:186 add second child into first child (temp 3-component vector of double) +0:186 'dvec3v' (temp 3-component vector of double) +0:186 mod (global 3-component vector of double) +0:186 'dvec3v' (temp 3-component vector of double) +0:186 'dvec3v' (temp 3-component vector of double) +0:187 add second child into first child (temp 4-component vector of double) +0:187 'dvec4v' (temp 4-component vector of double) +0:187 mod (global 4-component vector of double) +0:187 'dvec4v' (temp 4-component vector of double) +0:187 'dvec4v' (temp 4-component vector of double) +0:189 add second child into first child (temp double) +0:189 'doublev' (temp double) +0:189 modf (global double) +0:189 'doublev' (temp double) +0:189 'doublev' (temp double) +0:190 add second child into first child (temp 2-component vector of double) +0:190 'dvec2v' (temp 2-component vector of double) +0:190 modf (global 2-component vector of double) +0:190 'dvec2v' (temp 2-component vector of double) +0:190 'dvec2v' (temp 2-component vector of double) +0:191 add second child into first child (temp 3-component vector of double) +0:191 'dvec3v' (temp 3-component vector of double) +0:191 modf (global 3-component vector of double) +0:191 'dvec3v' (temp 3-component vector of double) +0:191 'dvec3v' (temp 3-component vector of double) +0:192 add second child into first child (temp 4-component vector of double) +0:192 'dvec4v' (temp 4-component vector of double) +0:192 modf (global 4-component vector of double) +0:192 'dvec4v' (temp 4-component vector of double) +0:192 'dvec4v' (temp 4-component vector of double) +0:194 add second child into first child (temp double) +0:194 'doublev' (temp double) +0:194 min (global double) +0:194 'doublev' (temp double) +0:194 'doublev' (temp double) +0:195 add second child into first child (temp 2-component vector of double) +0:195 'dvec2v' (temp 2-component vector of double) +0:195 min (global 2-component vector of double) +0:195 'dvec2v' (temp 2-component vector of double) +0:195 'doublev' (temp double) +0:196 add second child into first child (temp 3-component vector of double) +0:196 'dvec3v' (temp 3-component vector of double) +0:196 min (global 3-component vector of double) +0:196 'dvec3v' (temp 3-component vector of double) +0:196 'doublev' (temp double) +0:197 add second child into first child (temp 4-component vector of double) +0:197 'dvec4v' (temp 4-component vector of double) +0:197 min (global 4-component vector of double) +0:197 'dvec4v' (temp 4-component vector of double) +0:197 'doublev' (temp double) +0:198 add second child into first child (temp 2-component vector of double) +0:198 'dvec2v' (temp 2-component vector of double) +0:198 min (global 2-component vector of double) +0:198 'dvec2v' (temp 2-component vector of double) +0:198 'dvec2v' (temp 2-component vector of double) +0:199 add second child into first child (temp 3-component vector of double) +0:199 'dvec3v' (temp 3-component vector of double) +0:199 min (global 3-component vector of double) +0:199 'dvec3v' (temp 3-component vector of double) +0:199 'dvec3v' (temp 3-component vector of double) +0:200 add second child into first child (temp 4-component vector of double) +0:200 'dvec4v' (temp 4-component vector of double) +0:200 min (global 4-component vector of double) +0:200 'dvec4v' (temp 4-component vector of double) +0:200 'dvec4v' (temp 4-component vector of double) +0:202 add second child into first child (temp double) +0:202 'doublev' (temp double) +0:202 max (global double) +0:202 'doublev' (temp double) +0:202 'doublev' (temp double) +0:203 add second child into first child (temp 2-component vector of double) +0:203 'dvec2v' (temp 2-component vector of double) +0:203 max (global 2-component vector of double) +0:203 'dvec2v' (temp 2-component vector of double) +0:203 'doublev' (temp double) +0:204 add second child into first child (temp 3-component vector of double) +0:204 'dvec3v' (temp 3-component vector of double) +0:204 max (global 3-component vector of double) +0:204 'dvec3v' (temp 3-component vector of double) +0:204 'doublev' (temp double) +0:205 add second child into first child (temp 4-component vector of double) +0:205 'dvec4v' (temp 4-component vector of double) +0:205 max (global 4-component vector of double) +0:205 'dvec4v' (temp 4-component vector of double) +0:205 'doublev' (temp double) +0:206 add second child into first child (temp 2-component vector of double) +0:206 'dvec2v' (temp 2-component vector of double) +0:206 max (global 2-component vector of double) +0:206 'dvec2v' (temp 2-component vector of double) +0:206 'dvec2v' (temp 2-component vector of double) +0:207 add second child into first child (temp 3-component vector of double) +0:207 'dvec3v' (temp 3-component vector of double) +0:207 max (global 3-component vector of double) +0:207 'dvec3v' (temp 3-component vector of double) +0:207 'dvec3v' (temp 3-component vector of double) +0:208 add second child into first child (temp 4-component vector of double) +0:208 'dvec4v' (temp 4-component vector of double) +0:208 max (global 4-component vector of double) +0:208 'dvec4v' (temp 4-component vector of double) +0:208 'dvec4v' (temp 4-component vector of double) +0:210 add second child into first child (temp double) +0:210 'doublev' (temp double) +0:210 clamp (global double) +0:210 'doublev' (temp double) +0:210 'doublev' (temp double) +0:210 'doublev' (temp double) +0:211 add second child into first child (temp 2-component vector of double) +0:211 'dvec2v' (temp 2-component vector of double) +0:211 clamp (global 2-component vector of double) +0:211 'dvec2v' (temp 2-component vector of double) +0:211 'doublev' (temp double) +0:211 'doublev' (temp double) +0:212 add second child into first child (temp 3-component vector of double) +0:212 'dvec3v' (temp 3-component vector of double) +0:212 clamp (global 3-component vector of double) +0:212 'dvec3v' (temp 3-component vector of double) +0:212 'doublev' (temp double) +0:212 'doublev' (temp double) +0:213 add second child into first child (temp 4-component vector of double) +0:213 'dvec4v' (temp 4-component vector of double) +0:213 clamp (global 4-component vector of double) +0:213 'dvec4v' (temp 4-component vector of double) +0:213 'doublev' (temp double) +0:213 'doublev' (temp double) +0:214 add second child into first child (temp 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:214 clamp (global 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:214 'dvec2v' (temp 2-component vector of double) +0:215 add second child into first child (temp 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:215 clamp (global 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:215 'dvec3v' (temp 3-component vector of double) +0:216 add second child into first child (temp 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:216 clamp (global 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:216 'dvec4v' (temp 4-component vector of double) +0:218 add second child into first child (temp double) +0:218 'doublev' (temp double) +0:218 mix (global double) +0:218 'doublev' (temp double) +0:218 'doublev' (temp double) +0:218 'doublev' (temp double) +0:219 add second child into first child (temp 2-component vector of double) +0:219 'dvec2v' (temp 2-component vector of double) +0:219 mix (global 2-component vector of double) +0:219 'dvec2v' (temp 2-component vector of double) +0:219 'dvec2v' (temp 2-component vector of double) +0:219 'doublev' (temp double) +0:220 add second child into first child (temp 3-component vector of double) +0:220 'dvec3v' (temp 3-component vector of double) +0:220 mix (global 3-component vector of double) +0:220 'dvec3v' (temp 3-component vector of double) +0:220 'dvec3v' (temp 3-component vector of double) +0:220 'doublev' (temp double) +0:221 add second child into first child (temp 4-component vector of double) +0:221 'dvec4v' (temp 4-component vector of double) +0:221 mix (global 4-component vector of double) +0:221 'dvec4v' (temp 4-component vector of double) +0:221 'dvec4v' (temp 4-component vector of double) +0:221 'doublev' (temp double) +0:222 add second child into first child (temp 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:222 mix (global 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:222 'dvec2v' (temp 2-component vector of double) +0:223 add second child into first child (temp 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:223 mix (global 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:223 'dvec3v' (temp 3-component vector of double) +0:224 add second child into first child (temp 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:224 mix (global 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:224 'dvec4v' (temp 4-component vector of double) +0:225 add second child into first child (temp double) +0:225 'doublev' (temp double) +0:225 mix (global double) +0:225 'doublev' (temp double) +0:225 'doublev' (temp double) +0:225 'boolv' (temp bool) +0:226 add second child into first child (temp 2-component vector of double) +0:226 'dvec2v' (temp 2-component vector of double) +0:226 mix (global 2-component vector of double) +0:226 'dvec2v' (temp 2-component vector of double) +0:226 'dvec2v' (temp 2-component vector of double) +0:226 'bvec2v' (temp 2-component vector of bool) +0:227 add second child into first child (temp 3-component vector of double) +0:227 'dvec3v' (temp 3-component vector of double) +0:227 mix (global 3-component vector of double) +0:227 'dvec3v' (temp 3-component vector of double) +0:227 'dvec3v' (temp 3-component vector of double) +0:227 'bvec3v' (temp 3-component vector of bool) +0:228 add second child into first child (temp 4-component vector of double) +0:228 'dvec4v' (temp 4-component vector of double) +0:228 mix (global 4-component vector of double) +0:228 'dvec4v' (temp 4-component vector of double) +0:228 'dvec4v' (temp 4-component vector of double) +0:228 'bvec4v' (temp 4-component vector of bool) +0:230 add second child into first child (temp double) +0:230 'doublev' (temp double) +0:230 step (global double) +0:230 'doublev' (temp double) +0:230 'doublev' (temp double) +0:231 add second child into first child (temp 2-component vector of double) +0:231 'dvec2v' (temp 2-component vector of double) +0:231 step (global 2-component vector of double) +0:231 'dvec2v' (temp 2-component vector of double) +0:231 'dvec2v' (temp 2-component vector of double) +0:232 add second child into first child (temp 3-component vector of double) +0:232 'dvec3v' (temp 3-component vector of double) +0:232 step (global 3-component vector of double) +0:232 'dvec3v' (temp 3-component vector of double) +0:232 'dvec3v' (temp 3-component vector of double) +0:233 add second child into first child (temp 4-component vector of double) +0:233 'dvec4v' (temp 4-component vector of double) +0:233 step (global 4-component vector of double) +0:233 'dvec4v' (temp 4-component vector of double) +0:233 'dvec4v' (temp 4-component vector of double) +0:234 add second child into first child (temp 2-component vector of double) +0:234 'dvec2v' (temp 2-component vector of double) +0:234 step (global 2-component vector of double) +0:234 'doublev' (temp double) +0:234 'dvec2v' (temp 2-component vector of double) +0:235 add second child into first child (temp 3-component vector of double) +0:235 'dvec3v' (temp 3-component vector of double) +0:235 step (global 3-component vector of double) +0:235 'doublev' (temp double) +0:235 'dvec3v' (temp 3-component vector of double) +0:236 add second child into first child (temp 4-component vector of double) +0:236 'dvec4v' (temp 4-component vector of double) +0:236 step (global 4-component vector of double) +0:236 'doublev' (temp double) +0:236 'dvec4v' (temp 4-component vector of double) +0:238 add second child into first child (temp double) +0:238 'doublev' (temp double) +0:238 smoothstep (global double) +0:238 'doublev' (temp double) +0:238 'doublev' (temp double) +0:238 'doublev' (temp double) +0:239 add second child into first child (temp 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:239 smoothstep (global 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:239 'dvec2v' (temp 2-component vector of double) +0:240 add second child into first child (temp 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:240 smoothstep (global 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:240 'dvec3v' (temp 3-component vector of double) +0:241 add second child into first child (temp 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:241 smoothstep (global 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:241 'dvec4v' (temp 4-component vector of double) +0:242 add second child into first child (temp 2-component vector of double) +0:242 'dvec2v' (temp 2-component vector of double) +0:242 smoothstep (global 2-component vector of double) +0:242 'doublev' (temp double) +0:242 'doublev' (temp double) +0:242 'dvec2v' (temp 2-component vector of double) +0:243 add second child into first child (temp 3-component vector of double) +0:243 'dvec3v' (temp 3-component vector of double) +0:243 smoothstep (global 3-component vector of double) +0:243 'doublev' (temp double) +0:243 'doublev' (temp double) +0:243 'dvec3v' (temp 3-component vector of double) +0:244 add second child into first child (temp 4-component vector of double) +0:244 'dvec4v' (temp 4-component vector of double) +0:244 smoothstep (global 4-component vector of double) +0:244 'doublev' (temp double) +0:244 'doublev' (temp double) +0:244 'dvec4v' (temp 4-component vector of double) +0:246 move second child to first child (temp bool) +0:246 'boolv' (temp bool) +0:246 isnan (global bool) +0:246 'doublev' (temp double) +0:247 move second child to first child (temp 2-component vector of bool) +0:247 'bvec2v' (temp 2-component vector of bool) +0:247 isnan (global 2-component vector of bool) +0:247 'dvec2v' (temp 2-component vector of double) +0:248 move second child to first child (temp 3-component vector of bool) +0:248 'bvec3v' (temp 3-component vector of bool) +0:248 isnan (global 3-component vector of bool) +0:248 'dvec3v' (temp 3-component vector of double) +0:249 move second child to first child (temp 4-component vector of bool) +0:249 'bvec4v' (temp 4-component vector of bool) +0:249 isnan (global 4-component vector of bool) +0:249 'dvec4v' (temp 4-component vector of double) +0:251 move second child to first child (temp bool) +0:251 'boolv' (temp bool) +0:251 Test condition and select (temp bool) +0:251 Condition +0:251 'boolv' (temp bool) +0:251 true case +0:251 isinf (global bool) +0:251 'doublev' (temp double) +0:251 false case +0:251 Constant: +0:251 false (const bool) +0:252 move second child to first child (temp 2-component vector of bool) +0:252 'bvec2v' (temp 2-component vector of bool) +0:252 Test condition and select (temp 2-component vector of bool) +0:252 Condition +0:252 'boolv' (temp bool) +0:252 true case +0:252 isinf (global 2-component vector of bool) +0:252 'dvec2v' (temp 2-component vector of double) +0:252 false case +0:252 Constant: +0:252 false (const bool) +0:252 false (const bool) +0:253 move second child to first child (temp 3-component vector of bool) +0:253 'bvec3v' (temp 3-component vector of bool) +0:253 Test condition and select (temp 3-component vector of bool) +0:253 Condition +0:253 'boolv' (temp bool) +0:253 true case +0:253 isinf (global 3-component vector of bool) +0:253 'dvec3v' (temp 3-component vector of double) +0:253 false case +0:253 Constant: +0:253 false (const bool) +0:253 false (const bool) +0:253 false (const bool) +0:254 move second child to first child (temp 4-component vector of bool) +0:254 'bvec4v' (temp 4-component vector of bool) +0:254 Test condition and select (temp 4-component vector of bool) +0:254 Condition +0:254 'boolv' (temp bool) +0:254 true case +0:254 isinf (global 4-component vector of bool) +0:254 'dvec4v' (temp 4-component vector of double) +0:254 false case +0:254 Constant: +0:254 false (const bool) +0:254 false (const bool) +0:254 false (const bool) +0:254 false (const bool) +0:256 add second child into first child (temp double) +0:256 'doublev' (temp double) +0:256 length (global double) +0:256 'doublev' (temp double) +0:257 add second child into first child (temp double) +0:257 'doublev' (temp double) +0:257 length (global double) +0:257 'dvec2v' (temp 2-component vector of double) +0:258 add second child into first child (temp double) +0:258 'doublev' (temp double) +0:258 length (global double) +0:258 'dvec3v' (temp 3-component vector of double) +0:259 add second child into first child (temp double) +0:259 'doublev' (temp double) +0:259 length (global double) +0:259 'dvec4v' (temp 4-component vector of double) +0:261 add second child into first child (temp double) +0:261 'doublev' (temp double) +0:261 distance (global double) +0:261 'doublev' (temp double) +0:261 'doublev' (temp double) +0:262 add second child into first child (temp double) +0:262 'doublev' (temp double) +0:262 distance (global double) +0:262 'dvec2v' (temp 2-component vector of double) +0:262 'dvec2v' (temp 2-component vector of double) +0:263 add second child into first child (temp double) +0:263 'doublev' (temp double) +0:263 distance (global double) +0:263 'dvec3v' (temp 3-component vector of double) +0:263 'dvec3v' (temp 3-component vector of double) +0:264 add second child into first child (temp double) +0:264 'doublev' (temp double) +0:264 distance (global double) +0:264 'dvec4v' (temp 4-component vector of double) +0:264 'dvec4v' (temp 4-component vector of double) +0:266 add second child into first child (temp double) +0:266 'doublev' (temp double) +0:266 dot-product (global double) +0:266 'doublev' (temp double) +0:266 'doublev' (temp double) +0:267 add second child into first child (temp double) +0:267 'doublev' (temp double) +0:267 dot-product (global double) +0:267 'dvec2v' (temp 2-component vector of double) +0:267 'dvec2v' (temp 2-component vector of double) +0:268 add second child into first child (temp double) +0:268 'doublev' (temp double) +0:268 dot-product (global double) +0:268 'dvec3v' (temp 3-component vector of double) +0:268 'dvec3v' (temp 3-component vector of double) +0:269 add second child into first child (temp double) +0:269 'doublev' (temp double) +0:269 dot-product (global double) +0:269 'dvec4v' (temp 4-component vector of double) +0:269 'dvec4v' (temp 4-component vector of double) +0:271 add second child into first child (temp 3-component vector of double) +0:271 'dvec3v' (temp 3-component vector of double) +0:271 cross-product (global 3-component vector of double) +0:271 'dvec3v' (temp 3-component vector of double) +0:271 'dvec3v' (temp 3-component vector of double) +0:273 add second child into first child (temp double) +0:273 'doublev' (temp double) +0:273 normalize (global double) +0:273 'doublev' (temp double) +0:274 add second child into first child (temp 2-component vector of double) +0:274 'dvec2v' (temp 2-component vector of double) +0:274 normalize (global 2-component vector of double) +0:274 'dvec2v' (temp 2-component vector of double) +0:275 add second child into first child (temp 3-component vector of double) +0:275 'dvec3v' (temp 3-component vector of double) +0:275 normalize (global 3-component vector of double) +0:275 'dvec3v' (temp 3-component vector of double) +0:276 add second child into first child (temp 4-component vector of double) +0:276 'dvec4v' (temp 4-component vector of double) +0:276 normalize (global 4-component vector of double) +0:276 'dvec4v' (temp 4-component vector of double) +0:278 add second child into first child (temp double) +0:278 'doublev' (temp double) +0:278 face-forward (global double) +0:278 'doublev' (temp double) +0:278 'doublev' (temp double) +0:278 'doublev' (temp double) +0:279 add second child into first child (temp 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:279 face-forward (global 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:279 'dvec2v' (temp 2-component vector of double) +0:280 add second child into first child (temp 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:280 face-forward (global 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:280 'dvec3v' (temp 3-component vector of double) +0:281 add second child into first child (temp 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:281 face-forward (global 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:281 'dvec4v' (temp 4-component vector of double) +0:283 add second child into first child (temp double) +0:283 'doublev' (temp double) +0:283 reflect (global double) +0:283 'doublev' (temp double) +0:283 'doublev' (temp double) +0:284 add second child into first child (temp 2-component vector of double) +0:284 'dvec2v' (temp 2-component vector of double) +0:284 reflect (global 2-component vector of double) +0:284 'dvec2v' (temp 2-component vector of double) +0:284 'dvec2v' (temp 2-component vector of double) +0:285 add second child into first child (temp 3-component vector of double) +0:285 'dvec3v' (temp 3-component vector of double) +0:285 reflect (global 3-component vector of double) +0:285 'dvec3v' (temp 3-component vector of double) +0:285 'dvec3v' (temp 3-component vector of double) +0:286 add second child into first child (temp 4-component vector of double) +0:286 'dvec4v' (temp 4-component vector of double) +0:286 reflect (global 4-component vector of double) +0:286 'dvec4v' (temp 4-component vector of double) +0:286 'dvec4v' (temp 4-component vector of double) +0:288 add second child into first child (temp double) +0:288 'doublev' (temp double) +0:288 refract (global double) +0:288 'doublev' (temp double) +0:288 'doublev' (temp double) +0:288 'doublev' (temp double) +0:289 add second child into first child (temp 2-component vector of double) +0:289 'dvec2v' (temp 2-component vector of double) +0:289 refract (global 2-component vector of double) +0:289 'dvec2v' (temp 2-component vector of double) +0:289 'dvec2v' (temp 2-component vector of double) +0:289 'doublev' (temp double) +0:290 add second child into first child (temp 3-component vector of double) +0:290 'dvec3v' (temp 3-component vector of double) +0:290 refract (global 3-component vector of double) +0:290 'dvec3v' (temp 3-component vector of double) +0:290 'dvec3v' (temp 3-component vector of double) +0:290 'doublev' (temp double) +0:291 add second child into first child (temp 4-component vector of double) +0:291 'dvec4v' (temp 4-component vector of double) +0:291 refract (global 4-component vector of double) +0:291 'dvec4v' (temp 4-component vector of double) +0:291 'dvec4v' (temp 4-component vector of double) +0:291 'doublev' (temp double) +0:293 Sequence +0:293 move second child to first child (temp 2X2 matrix of double) +0:293 'dmat2v' (temp 2X2 matrix of double) +0:293 outer product (global 2X2 matrix of double) +0:293 'dvec2v' (temp 2-component vector of double) +0:293 'dvec2v' (temp 2-component vector of double) +0:294 Sequence +0:294 move second child to first child (temp 3X3 matrix of double) +0:294 'dmat3v' (temp 3X3 matrix of double) +0:294 outer product (global 3X3 matrix of double) +0:294 'dvec3v' (temp 3-component vector of double) +0:294 'dvec3v' (temp 3-component vector of double) +0:295 Sequence +0:295 move second child to first child (temp 4X4 matrix of double) +0:295 'dmat4v' (temp 4X4 matrix of double) +0:295 outer product (global 4X4 matrix of double) +0:295 'dvec4v' (temp 4-component vector of double) +0:295 'dvec4v' (temp 4-component vector of double) +0:296 Sequence +0:296 move second child to first child (temp 2X3 matrix of double) +0:296 'dmat2x3v' (temp 2X3 matrix of double) +0:296 outer product (global 2X3 matrix of double) +0:296 'dvec3v' (temp 3-component vector of double) +0:296 'dvec2v' (temp 2-component vector of double) +0:297 Sequence +0:297 move second child to first child (temp 3X2 matrix of double) +0:297 'dmat3x2v' (temp 3X2 matrix of double) +0:297 outer product (global 3X2 matrix of double) +0:297 'dvec2v' (temp 2-component vector of double) +0:297 'dvec3v' (temp 3-component vector of double) +0:298 Sequence +0:298 move second child to first child (temp 2X4 matrix of double) +0:298 'dmat2x4v' (temp 2X4 matrix of double) +0:298 outer product (global 2X4 matrix of double) +0:298 'dvec4v' (temp 4-component vector of double) +0:298 'dvec2v' (temp 2-component vector of double) +0:299 Sequence +0:299 move second child to first child (temp 4X2 matrix of double) +0:299 'dmat4x2v' (temp 4X2 matrix of double) +0:299 outer product (global 4X2 matrix of double) +0:299 'dvec2v' (temp 2-component vector of double) +0:299 'dvec4v' (temp 4-component vector of double) +0:300 Sequence +0:300 move second child to first child (temp 3X4 matrix of double) +0:300 'dmat3x4v' (temp 3X4 matrix of double) +0:300 outer product (global 3X4 matrix of double) +0:300 'dvec4v' (temp 4-component vector of double) +0:300 'dvec3v' (temp 3-component vector of double) +0:301 Sequence +0:301 move second child to first child (temp 4X3 matrix of double) +0:301 'dmat4x3v' (temp 4X3 matrix of double) +0:301 outer product (global 4X3 matrix of double) +0:301 'dvec3v' (temp 3-component vector of double) +0:301 'dvec4v' (temp 4-component vector of double) +0:303 matrix mult second child into first child (temp 2X2 matrix of double) +0:303 'dmat2v' (temp 2X2 matrix of double) +0:303 component-wise multiply (global 2X2 matrix of double) +0:303 'dmat2v' (temp 2X2 matrix of double) +0:303 'dmat2v' (temp 2X2 matrix of double) +0:304 matrix mult second child into first child (temp 3X3 matrix of double) +0:304 'dmat3v' (temp 3X3 matrix of double) +0:304 component-wise multiply (global 3X3 matrix of double) +0:304 'dmat3v' (temp 3X3 matrix of double) +0:304 'dmat3v' (temp 3X3 matrix of double) +0:305 matrix mult second child into first child (temp 4X4 matrix of double) +0:305 'dmat4v' (temp 4X4 matrix of double) +0:305 component-wise multiply (global 4X4 matrix of double) +0:305 'dmat4v' (temp 4X4 matrix of double) +0:305 'dmat4v' (temp 4X4 matrix of double) +0:306 move second child to first child (temp 2X3 matrix of double) +0:306 'dmat2x3v' (temp 2X3 matrix of double) +0:306 component-wise multiply (global 2X3 matrix of double) +0:306 'dmat2x3v' (temp 2X3 matrix of double) +0:306 'dmat2x3v' (temp 2X3 matrix of double) +0:307 move second child to first child (temp 2X4 matrix of double) +0:307 'dmat2x4v' (temp 2X4 matrix of double) +0:307 component-wise multiply (global 2X4 matrix of double) +0:307 'dmat2x4v' (temp 2X4 matrix of double) +0:307 'dmat2x4v' (temp 2X4 matrix of double) +0:308 move second child to first child (temp 3X2 matrix of double) +0:308 'dmat3x2v' (temp 3X2 matrix of double) +0:308 component-wise multiply (global 3X2 matrix of double) +0:308 'dmat3x2v' (temp 3X2 matrix of double) +0:308 'dmat3x2v' (temp 3X2 matrix of double) +0:309 move second child to first child (temp 3X4 matrix of double) +0:309 'dmat3x4v' (temp 3X4 matrix of double) +0:309 component-wise multiply (global 3X4 matrix of double) +0:309 'dmat3x4v' (temp 3X4 matrix of double) +0:309 'dmat3x4v' (temp 3X4 matrix of double) +0:310 move second child to first child (temp 4X2 matrix of double) +0:310 'dmat4x2v' (temp 4X2 matrix of double) +0:310 component-wise multiply (global 4X2 matrix of double) +0:310 'dmat4x2v' (temp 4X2 matrix of double) +0:310 'dmat4x2v' (temp 4X2 matrix of double) +0:311 move second child to first child (temp 4X3 matrix of double) +0:311 'dmat4x3v' (temp 4X3 matrix of double) +0:311 component-wise multiply (global 4X3 matrix of double) +0:311 'dmat4x3v' (temp 4X3 matrix of double) +0:311 'dmat4x3v' (temp 4X3 matrix of double) +0:313 matrix mult second child into first child (temp 2X2 matrix of double) +0:313 'dmat2v' (temp 2X2 matrix of double) +0:313 transpose (global 2X2 matrix of double) +0:313 'dmat2v' (temp 2X2 matrix of double) +0:314 matrix mult second child into first child (temp 3X3 matrix of double) +0:314 'dmat3v' (temp 3X3 matrix of double) +0:314 transpose (global 3X3 matrix of double) +0:314 'dmat3v' (temp 3X3 matrix of double) +0:315 matrix mult second child into first child (temp 4X4 matrix of double) +0:315 'dmat4v' (temp 4X4 matrix of double) +0:315 transpose (global 4X4 matrix of double) +0:315 'dmat4v' (temp 4X4 matrix of double) +0:316 move second child to first child (temp 2X3 matrix of double) +0:316 'dmat2x3v' (temp 2X3 matrix of double) +0:316 transpose (global 2X3 matrix of double) +0:316 'dmat3x2v' (temp 3X2 matrix of double) +0:317 move second child to first child (temp 3X2 matrix of double) +0:317 'dmat3x2v' (temp 3X2 matrix of double) +0:317 transpose (global 3X2 matrix of double) +0:317 'dmat2x3v' (temp 2X3 matrix of double) +0:318 move second child to first child (temp 2X4 matrix of double) +0:318 'dmat2x4v' (temp 2X4 matrix of double) +0:318 transpose (global 2X4 matrix of double) +0:318 'dmat4x2v' (temp 4X2 matrix of double) +0:319 move second child to first child (temp 4X2 matrix of double) +0:319 'dmat4x2v' (temp 4X2 matrix of double) +0:319 transpose (global 4X2 matrix of double) +0:319 'dmat2x4v' (temp 2X4 matrix of double) +0:320 move second child to first child (temp 3X4 matrix of double) +0:320 'dmat3x4v' (temp 3X4 matrix of double) +0:320 transpose (global 3X4 matrix of double) +0:320 'dmat4x3v' (temp 4X3 matrix of double) +0:321 move second child to first child (temp 4X3 matrix of double) +0:321 'dmat4x3v' (temp 4X3 matrix of double) +0:321 transpose (global 4X3 matrix of double) +0:321 'dmat3x4v' (temp 3X4 matrix of double) +0:323 add second child into first child (temp double) +0:323 'doublev' (temp double) +0:323 determinant (global double) +0:323 'dmat2v' (temp 2X2 matrix of double) +0:324 add second child into first child (temp double) +0:324 'doublev' (temp double) +0:324 determinant (global double) +0:324 'dmat3v' (temp 3X3 matrix of double) +0:325 add second child into first child (temp double) +0:325 'doublev' (temp double) +0:325 determinant (global double) +0:325 'dmat4v' (temp 4X4 matrix of double) +0:327 matrix mult second child into first child (temp 2X2 matrix of double) +0:327 'dmat2v' (temp 2X2 matrix of double) +0:327 inverse (global 2X2 matrix of double) +0:327 'dmat2v' (temp 2X2 matrix of double) +0:328 matrix mult second child into first child (temp 3X3 matrix of double) +0:328 'dmat3v' (temp 3X3 matrix of double) +0:328 inverse (global 3X3 matrix of double) +0:328 'dmat3v' (temp 3X3 matrix of double) +0:329 matrix mult second child into first child (temp 4X4 matrix of double) +0:329 'dmat4v' (temp 4X4 matrix of double) +0:329 inverse (global 4X4 matrix of double) +0:329 'dmat4v' (temp 4X4 matrix of double) 0:? Linker Objects 0:? 'bn' (in 3-element array of block{in int a}) 0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize}) diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index 39fefd24..f0709740 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -7,168 +7,1359 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 125 +// Id's are bound by 1104 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 44 50 56 69 96 117 119 + EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097 ExecutionMode 4 OriginLowerLeft Source GLSL 400 SourceExtension "GL_ARB_separate_shader_objects" Name 4 "main" Name 6 "foo23(" - Name 11 "outp" - Name 15 "u2drs" - Name 36 "v" - Name 42 "arrayedSampler" - Name 44 "i" - Name 50 "c2D" - Name 56 "gl_ClipDistance" - Name 69 "uoutp" - Name 73 "samp2dr" - Name 96 "ioutp" - Name 100 "isamp2DA" - Name 117 "gl_FragCoord" - Name 119 "vl2" - Decorate 44(i) Flat - Decorate 56(gl_ClipDistance) BuiltIn ClipDistance - Decorate 117(gl_FragCoord) BuiltIn FragCoord - Decorate 119(vl2) Location 6 + Name 8 "doubles(" + Name 13 "outp" + Name 17 "u2drs" + Name 39 "doublev" + Name 43 "dvec2v" + Name 48 "dvec3v" + Name 53 "dvec4v" + Name 428 "boolv" + Name 437 "bvec2v" + Name 446 "bvec3v" + Name 455 "bvec4v" + Name 737 "dmat2v" + Name 743 "dmat3v" + Name 749 "dmat4v" + Name 755 "dmat2x3v" + Name 761 "dmat3x2v" + Name 767 "dmat2x4v" + Name 773 "dmat4x2v" + Name 779 "dmat3x4v" + Name 785 "dmat4x3v" + Name 1017 "v" + Name 1023 "arrayedSampler" + Name 1025 "i" + Name 1031 "c2D" + Name 1036 "gl_ClipDistance" + Name 1048 "uoutp" + Name 1052 "samp2dr" + Name 1074 "ioutp" + Name 1078 "isamp2DA" + Name 1095 "gl_FragCoord" + Name 1097 "vl2" + Decorate 1025(i) Flat + Decorate 1036(gl_ClipDistance) BuiltIn ClipDistance + Decorate 1095(gl_FragCoord) BuiltIn FragCoord + Decorate 1097(vl2) Location 6 2: TypeVoid 3: TypeFunction 2 - 8: TypeFloat 32 - 9: TypeVector 8(float) 4 - 10: TypePointer Output 9(fvec4) - 11(outp): 10(ptr) Variable Output - 12: TypeImage 8(float) Rect depth sampled format:Unknown - 13: TypeSampledImage 12 - 14: TypePointer UniformConstant 13 - 15(u2drs): 14(ptr) Variable UniformConstant - 18: TypeVector 8(float) 2 - 19: 8(float) Constant 0 - 20: 18(fvec2) ConstantComposite 19 19 - 21: TypeInt 32 1 - 22: TypeVector 21(int) 2 - 23: 21(int) Constant 3 - 24: 21(int) Constant 4 - 25: 22(ivec2) ConstantComposite 23 24 - 28: TypeInt 32 0 - 29: 28(int) Constant 0 - 30: TypePointer Output 8(float) - 35: TypePointer Function 9(fvec4) - 37: TypeImage 8(float) 2D sampled format:Unknown - 38: TypeSampledImage 37 - 39: 28(int) Constant 5 - 40: TypeArray 38 39 - 41: TypePointer UniformConstant 40 -42(arrayedSampler): 41(ptr) Variable UniformConstant - 43: TypePointer Input 21(int) - 44(i): 43(ptr) Variable Input - 46: TypePointer UniformConstant 38 - 49: TypePointer Input 18(fvec2) - 50(c2D): 49(ptr) Variable Input - 53: 28(int) Constant 2 - 54: TypeArray 8(float) 53 - 55: TypePointer Input 54 -56(gl_ClipDistance): 55(ptr) Variable Input - 57: 21(int) Constant 1 - 58: TypePointer Input 8(float) - 62: TypeVector 8(float) 3 - 67: TypeVector 28(int) 4 - 68: TypePointer Output 67(ivec4) - 69(uoutp): 68(ptr) Variable Output - 70: TypeImage 28(int) Rect sampled format:Unknown - 71: TypeSampledImage 70 - 72: TypePointer UniformConstant 71 - 73(samp2dr): 72(ptr) Variable UniformConstant - 76: 28(int) Constant 4 - 77: TypeArray 22(ivec2) 76 - 78: 21(int) Constant 2 - 79: 22(ivec2) ConstantComposite 57 78 - 80: 21(int) Constant 15 - 81: 21(int) Constant 16 - 82: 22(ivec2) ConstantComposite 80 81 - 83: 21(int) Constant 4294967294 - 84: 21(int) Constant 0 - 85: 22(ivec2) ConstantComposite 83 84 - 86: 77 ConstantComposite 79 25 82 85 - 94: TypeVector 21(int) 4 - 95: TypePointer Output 94(ivec4) - 96(ioutp): 95(ptr) Variable Output - 97: TypeImage 21(int) 2D array sampled format:Unknown - 98: TypeSampledImage 97 - 99: TypePointer UniformConstant 98 - 100(isamp2DA): 99(ptr) Variable UniformConstant - 102: 8(float) Constant 1036831949 - 103: 62(fvec3) ConstantComposite 102 102 102 - 104: 22(ivec2) ConstantComposite 57 57 - 116: TypePointer Input 9(fvec4) -117(gl_FragCoord): 116(ptr) Variable Input - 119(vl2): 116(ptr) Variable Input + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Output 11(fvec4) + 13(outp): 12(ptr) Variable Output + 14: TypeImage 10(float) Rect depth sampled format:Unknown + 15: TypeSampledImage 14 + 16: TypePointer UniformConstant 15 + 17(u2drs): 16(ptr) Variable UniformConstant + 20: TypeVector 10(float) 2 + 21: 10(float) Constant 0 + 22: 20(fvec2) ConstantComposite 21 21 + 23: TypeInt 32 1 + 24: TypeVector 23(int) 2 + 25: 23(int) Constant 3 + 26: 23(int) Constant 4 + 27: 24(ivec2) ConstantComposite 25 26 + 30: TypeInt 32 0 + 31: 30(int) Constant 0 + 32: TypePointer Output 10(float) + 37: TypeFloat 64 + 38: TypePointer Function 37(float) + 40: 37(float) Constant 2507418074 1073430332 + 41: TypeVector 37(float) 2 + 42: TypePointer Function 41(fvec2) + 44: 37(float) Constant 796182188 1073367658 + 45: 41(fvec2) ConstantComposite 44 44 + 46: TypeVector 37(float) 3 + 47: TypePointer Function 46(fvec3) + 49: 37(float) Constant 1719614413 1073127582 + 50: 46(fvec3) ConstantComposite 49 49 49 + 51: TypeVector 37(float) 4 + 52: TypePointer Function 51(fvec4) + 426: TypeBool + 427: TypePointer Function 426(bool) + 435: TypeVector 426(bool) 2 + 436: TypePointer Function 435(bvec2) + 444: TypeVector 426(bool) 3 + 445: TypePointer Function 444(bvec3) + 453: TypeVector 426(bool) 4 + 454: TypePointer Function 453(bvec4) + 561: 426(bool) ConstantFalse + 570: 435(bvec2) ConstantComposite 561 561 + 579: 444(bvec3) ConstantComposite 561 561 561 + 588: 453(bvec4) ConstantComposite 561 561 561 561 + 735: TypeMatrix 41(fvec2) 2 + 736: TypePointer Function 735 + 741: TypeMatrix 46(fvec3) 3 + 742: TypePointer Function 741 + 747: TypeMatrix 51(fvec4) 4 + 748: TypePointer Function 747 + 753: TypeMatrix 46(fvec3) 2 + 754: TypePointer Function 753 + 759: TypeMatrix 41(fvec2) 3 + 760: TypePointer Function 759 + 765: TypeMatrix 51(fvec4) 2 + 766: TypePointer Function 765 + 771: TypeMatrix 41(fvec2) 4 + 772: TypePointer Function 771 + 777: TypeMatrix 51(fvec4) 3 + 778: TypePointer Function 777 + 783: TypeMatrix 46(fvec3) 4 + 784: TypePointer Function 783 + 952: 30(int) Constant 1 + 956: 30(int) Constant 2 + 960: 30(int) Constant 3 + 964: 23(int) Constant 1 + 968: 23(int) Constant 2 + 994: 10(float) Constant 1065353216 + 1016: TypePointer Function 11(fvec4) + 1018: TypeImage 10(float) 2D sampled format:Unknown + 1019: TypeSampledImage 1018 + 1020: 30(int) Constant 5 + 1021: TypeArray 1019 1020 + 1022: TypePointer UniformConstant 1021 +1023(arrayedSampler): 1022(ptr) Variable UniformConstant + 1024: TypePointer Input 23(int) + 1025(i): 1024(ptr) Variable Input + 1027: TypePointer UniformConstant 1019 + 1030: TypePointer Input 20(fvec2) + 1031(c2D): 1030(ptr) Variable Input + 1034: TypeArray 10(float) 956 + 1035: TypePointer Input 1034 +1036(gl_ClipDistance): 1035(ptr) Variable Input + 1037: TypePointer Input 10(float) + 1041: TypeVector 10(float) 3 + 1046: TypeVector 30(int) 4 + 1047: TypePointer Output 1046(ivec4) + 1048(uoutp): 1047(ptr) Variable Output + 1049: TypeImage 30(int) Rect sampled format:Unknown + 1050: TypeSampledImage 1049 + 1051: TypePointer UniformConstant 1050 + 1052(samp2dr): 1051(ptr) Variable UniformConstant + 1055: 30(int) Constant 4 + 1056: TypeArray 24(ivec2) 1055 + 1057: 24(ivec2) ConstantComposite 964 968 + 1058: 23(int) Constant 15 + 1059: 23(int) Constant 16 + 1060: 24(ivec2) ConstantComposite 1058 1059 + 1061: 23(int) Constant 4294967294 + 1062: 23(int) Constant 0 + 1063: 24(ivec2) ConstantComposite 1061 1062 + 1064: 1056 ConstantComposite 1057 27 1060 1063 + 1072: TypeVector 23(int) 4 + 1073: TypePointer Output 1072(ivec4) + 1074(ioutp): 1073(ptr) Variable Output + 1075: TypeImage 23(int) 2D array sampled format:Unknown + 1076: TypeSampledImage 1075 + 1077: TypePointer UniformConstant 1076 + 1078(isamp2DA): 1077(ptr) Variable UniformConstant + 1080: 10(float) Constant 1036831949 + 1081: 1041(fvec3) ConstantComposite 1080 1080 1080 + 1082: 24(ivec2) ConstantComposite 964 964 + 1094: TypePointer Input 11(fvec4) +1095(gl_FragCoord): 1094(ptr) Variable Input + 1097(vl2): 1094(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 36(v): 35(ptr) Variable Function - 45: 21(int) Load 44(i) - 47: 46(ptr) AccessChain 42(arrayedSampler) 45 - 48: 38 Load 47 - 51: 18(fvec2) Load 50(c2D) - 52: 9(fvec4) ImageSampleImplicitLod 48 51 - Store 36(v) 52 - 59: 58(ptr) AccessChain 56(gl_ClipDistance) 57 - 60: 8(float) Load 59 - 61: 30(ptr) AccessChain 11(outp) 29 - Store 61 60 - 63: 9(fvec4) Load 36(v) - 64: 62(fvec3) VectorShuffle 63 63 1 2 3 - 65: 9(fvec4) Load 11(outp) - 66: 9(fvec4) VectorShuffle 65 64 0 4 5 6 - Store 11(outp) 66 - 74: 71 Load 73(samp2dr) - 75: 18(fvec2) Load 50(c2D) - 87: 67(ivec4) ImageGather 74 75 78 ConstOffsets 86 - Store 69(uoutp) 87 - 88: 46(ptr) AccessChain 42(arrayedSampler) 84 - 89: 38 Load 88 - 90: 18(fvec2) Load 50(c2D) - 91: 9(fvec4) ImageGather 89 90 84 - 92: 9(fvec4) Load 11(outp) - 93: 9(fvec4) FAdd 92 91 - Store 11(outp) 93 - 101: 98 Load 100(isamp2DA) - 105: 94(ivec4) ImageGather 101 103 23 ConstOffset 104 - Store 96(ioutp) 105 - 106: 98 Load 100(isamp2DA) - 107: 94(ivec4) ImageGather 106 103 23 ConstOffset 104 - 108: 94(ivec4) Load 96(ioutp) - 109: 94(ivec4) IAdd 108 107 - Store 96(ioutp) 109 - 110: 98 Load 100(isamp2DA) - 111: 21(int) Load 44(i) - 112: 22(ivec2) CompositeConstruct 111 111 - 113: 94(ivec4) ImageGather 110 103 84 Offset 112 - 114: 94(ivec4) Load 96(ioutp) - 115: 94(ivec4) IAdd 114 113 - Store 96(ioutp) 115 - 118: 9(fvec4) Load 117(gl_FragCoord) - 120: 9(fvec4) Load 119(vl2) - 121: 9(fvec4) FAdd 118 120 - 122: 9(fvec4) Load 11(outp) - 123: 9(fvec4) FAdd 122 121 - Store 11(outp) 123 - 124: 2 FunctionCall 6(foo23() + 1017(v): 1016(ptr) Variable Function + 1026: 23(int) Load 1025(i) + 1028: 1027(ptr) AccessChain 1023(arrayedSampler) 1026 + 1029: 1019 Load 1028 + 1032: 20(fvec2) Load 1031(c2D) + 1033: 11(fvec4) ImageSampleImplicitLod 1029 1032 + Store 1017(v) 1033 + 1038: 1037(ptr) AccessChain 1036(gl_ClipDistance) 964 + 1039: 10(float) Load 1038 + 1040: 32(ptr) AccessChain 13(outp) 31 + Store 1040 1039 + 1042: 11(fvec4) Load 1017(v) + 1043: 1041(fvec3) VectorShuffle 1042 1042 1 2 3 + 1044: 11(fvec4) Load 13(outp) + 1045: 11(fvec4) VectorShuffle 1044 1043 0 4 5 6 + Store 13(outp) 1045 + 1053: 1050 Load 1052(samp2dr) + 1054: 20(fvec2) Load 1031(c2D) + 1065: 1046(ivec4) ImageGather 1053 1054 968 ConstOffsets 1064 + Store 1048(uoutp) 1065 + 1066: 1027(ptr) AccessChain 1023(arrayedSampler) 1062 + 1067: 1019 Load 1066 + 1068: 20(fvec2) Load 1031(c2D) + 1069: 11(fvec4) ImageGather 1067 1068 1062 + 1070: 11(fvec4) Load 13(outp) + 1071: 11(fvec4) FAdd 1070 1069 + Store 13(outp) 1071 + 1079: 1076 Load 1078(isamp2DA) + 1083: 1072(ivec4) ImageGather 1079 1081 25 ConstOffset 1082 + Store 1074(ioutp) 1083 + 1084: 1076 Load 1078(isamp2DA) + 1085: 1072(ivec4) ImageGather 1084 1081 25 ConstOffset 1082 + 1086: 1072(ivec4) Load 1074(ioutp) + 1087: 1072(ivec4) IAdd 1086 1085 + Store 1074(ioutp) 1087 + 1088: 1076 Load 1078(isamp2DA) + 1089: 23(int) Load 1025(i) + 1090: 24(ivec2) CompositeConstruct 1089 1089 + 1091: 1072(ivec4) ImageGather 1088 1081 1062 Offset 1090 + 1092: 1072(ivec4) Load 1074(ioutp) + 1093: 1072(ivec4) IAdd 1092 1091 + Store 1074(ioutp) 1093 + 1096: 11(fvec4) Load 1095(gl_FragCoord) + 1098: 11(fvec4) Load 1097(vl2) + 1099: 11(fvec4) FAdd 1096 1098 + 1100: 11(fvec4) Load 13(outp) + 1101: 11(fvec4) FAdd 1100 1099 + Store 13(outp) 1101 + 1102: 2 FunctionCall 6(foo23() + 1103: 2 FunctionCall 8(doubles() Return FunctionEnd 6(foo23(): 2 Function None 3 7: Label - 16: 13 Load 15(u2drs) - 17: 9(fvec4) Load 11(outp) - 26: 8(float) CompositeExtract 17 2 - 27: 8(float) ImageSampleProjDrefExplicitLod 16 17 26 Grad ConstOffset 20 20 25 - 31: 30(ptr) AccessChain 11(outp) 29 - 32: 8(float) Load 31 - 33: 8(float) FAdd 32 27 - 34: 30(ptr) AccessChain 11(outp) 29 - Store 34 33 + 18: 15 Load 17(u2drs) + 19: 11(fvec4) Load 13(outp) + 28: 10(float) CompositeExtract 19 2 + 29: 10(float) ImageSampleProjDrefExplicitLod 18 19 28 Grad ConstOffset 22 22 27 + 33: 32(ptr) AccessChain 13(outp) 31 + 34: 10(float) Load 33 + 35: 10(float) FAdd 34 29 + 36: 32(ptr) AccessChain 13(outp) 31 + Store 36 35 + Return + FunctionEnd + 8(doubles(): 2 Function None 3 + 9: Label + 39(doublev): 38(ptr) Variable Function + 43(dvec2v): 42(ptr) Variable Function + 48(dvec3v): 47(ptr) Variable Function + 53(dvec4v): 52(ptr) Variable Function + 428(boolv): 427(ptr) Variable Function + 437(bvec2v): 436(ptr) Variable Function + 446(bvec3v): 445(ptr) Variable Function + 455(bvec4v): 454(ptr) Variable Function + 554: 427(ptr) Variable Function + 563: 436(ptr) Variable Function + 572: 445(ptr) Variable Function + 581: 454(ptr) Variable Function + 737(dmat2v): 736(ptr) Variable Function + 743(dmat3v): 742(ptr) Variable Function + 749(dmat4v): 748(ptr) Variable Function + 755(dmat2x3v): 754(ptr) Variable Function + 761(dmat3x2v): 760(ptr) Variable Function + 767(dmat2x4v): 766(ptr) Variable Function + 773(dmat4x2v): 772(ptr) Variable Function + 779(dmat3x4v): 778(ptr) Variable Function + 785(dmat4x3v): 784(ptr) Variable Function + Store 39(doublev) 40 + Store 43(dvec2v) 45 + Store 48(dvec3v) 50 + 54: 37(float) Load 39(doublev) + 55: 51(fvec4) CompositeConstruct 54 54 54 54 + 56: 51(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 55 + Store 53(dvec4v) 56 + 57: 37(float) Load 39(doublev) + 58: 37(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 57 + 59: 37(float) Load 39(doublev) + 60: 37(float) FAdd 59 58 + Store 39(doublev) 60 + 61: 41(fvec2) Load 43(dvec2v) + 62: 41(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 61 + 63: 41(fvec2) Load 43(dvec2v) + 64: 41(fvec2) FAdd 63 62 + Store 43(dvec2v) 64 + 65: 46(fvec3) Load 48(dvec3v) + 66: 46(fvec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 65 + 67: 46(fvec3) Load 48(dvec3v) + 68: 46(fvec3) FAdd 67 66 + Store 48(dvec3v) 68 + 69: 51(fvec4) Load 53(dvec4v) + 70: 51(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 69 + 71: 51(fvec4) Load 53(dvec4v) + 72: 51(fvec4) FAdd 71 70 + Store 53(dvec4v) 72 + 73: 37(float) Load 39(doublev) + 74: 37(float) ExtInst 1(GLSL.std.450) 4(FAbs) 73 + 75: 37(float) Load 39(doublev) + 76: 37(float) FAdd 75 74 + Store 39(doublev) 76 + 77: 41(fvec2) Load 43(dvec2v) + 78: 41(fvec2) ExtInst 1(GLSL.std.450) 4(FAbs) 77 + 79: 41(fvec2) Load 43(dvec2v) + 80: 41(fvec2) FAdd 79 78 + Store 43(dvec2v) 80 + 81: 46(fvec3) Load 48(dvec3v) + 82: 46(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 81 + 83: 46(fvec3) Load 48(dvec3v) + 84: 46(fvec3) FAdd 83 82 + Store 48(dvec3v) 84 + 85: 51(fvec4) Load 53(dvec4v) + 86: 51(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 85 + 87: 51(fvec4) Load 53(dvec4v) + 88: 51(fvec4) FAdd 87 86 + Store 53(dvec4v) 88 + 89: 37(float) Load 39(doublev) + 90: 37(float) ExtInst 1(GLSL.std.450) 6(FSign) 89 + 91: 37(float) Load 39(doublev) + 92: 37(float) FAdd 91 90 + Store 39(doublev) 92 + 93: 41(fvec2) Load 43(dvec2v) + 94: 41(fvec2) ExtInst 1(GLSL.std.450) 6(FSign) 93 + 95: 41(fvec2) Load 43(dvec2v) + 96: 41(fvec2) FAdd 95 94 + Store 43(dvec2v) 96 + 97: 46(fvec3) Load 48(dvec3v) + 98: 46(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 97 + 99: 46(fvec3) Load 48(dvec3v) + 100: 46(fvec3) FAdd 99 98 + Store 48(dvec3v) 100 + 101: 51(fvec4) Load 53(dvec4v) + 102: 51(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 101 + 103: 51(fvec4) Load 53(dvec4v) + 104: 51(fvec4) FAdd 103 102 + Store 53(dvec4v) 104 + 105: 37(float) Load 39(doublev) + 106: 37(float) ExtInst 1(GLSL.std.450) 8(Floor) 105 + 107: 37(float) Load 39(doublev) + 108: 37(float) FAdd 107 106 + Store 39(doublev) 108 + 109: 41(fvec2) Load 43(dvec2v) + 110: 41(fvec2) ExtInst 1(GLSL.std.450) 8(Floor) 109 + 111: 41(fvec2) Load 43(dvec2v) + 112: 41(fvec2) FAdd 111 110 + Store 43(dvec2v) 112 + 113: 46(fvec3) Load 48(dvec3v) + 114: 46(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 113 + 115: 46(fvec3) Load 48(dvec3v) + 116: 46(fvec3) FAdd 115 114 + Store 48(dvec3v) 116 + 117: 51(fvec4) Load 53(dvec4v) + 118: 51(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 117 + 119: 51(fvec4) Load 53(dvec4v) + 120: 51(fvec4) FAdd 119 118 + Store 53(dvec4v) 120 + 121: 37(float) Load 39(doublev) + 122: 37(float) ExtInst 1(GLSL.std.450) 3(Trunc) 121 + 123: 37(float) Load 39(doublev) + 124: 37(float) FAdd 123 122 + Store 39(doublev) 124 + 125: 41(fvec2) Load 43(dvec2v) + 126: 41(fvec2) ExtInst 1(GLSL.std.450) 3(Trunc) 125 + 127: 41(fvec2) Load 43(dvec2v) + 128: 41(fvec2) FAdd 127 126 + Store 43(dvec2v) 128 + 129: 46(fvec3) Load 48(dvec3v) + 130: 46(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 129 + 131: 46(fvec3) Load 48(dvec3v) + 132: 46(fvec3) FAdd 131 130 + Store 48(dvec3v) 132 + 133: 51(fvec4) Load 53(dvec4v) + 134: 51(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 133 + 135: 51(fvec4) Load 53(dvec4v) + 136: 51(fvec4) FAdd 135 134 + Store 53(dvec4v) 136 + 137: 37(float) Load 39(doublev) + 138: 37(float) ExtInst 1(GLSL.std.450) 1(Round) 137 + 139: 37(float) Load 39(doublev) + 140: 37(float) FAdd 139 138 + Store 39(doublev) 140 + 141: 41(fvec2) Load 43(dvec2v) + 142: 41(fvec2) ExtInst 1(GLSL.std.450) 1(Round) 141 + 143: 41(fvec2) Load 43(dvec2v) + 144: 41(fvec2) FAdd 143 142 + Store 43(dvec2v) 144 + 145: 46(fvec3) Load 48(dvec3v) + 146: 46(fvec3) ExtInst 1(GLSL.std.450) 1(Round) 145 + 147: 46(fvec3) Load 48(dvec3v) + 148: 46(fvec3) FAdd 147 146 + Store 48(dvec3v) 148 + 149: 51(fvec4) Load 53(dvec4v) + 150: 51(fvec4) ExtInst 1(GLSL.std.450) 1(Round) 149 + 151: 51(fvec4) Load 53(dvec4v) + 152: 51(fvec4) FAdd 151 150 + Store 53(dvec4v) 152 + 153: 37(float) Load 39(doublev) + 154: 37(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 153 + 155: 37(float) Load 39(doublev) + 156: 37(float) FAdd 155 154 + Store 39(doublev) 156 + 157: 41(fvec2) Load 43(dvec2v) + 158: 41(fvec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 157 + 159: 41(fvec2) Load 43(dvec2v) + 160: 41(fvec2) FAdd 159 158 + Store 43(dvec2v) 160 + 161: 46(fvec3) Load 48(dvec3v) + 162: 46(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 161 + 163: 46(fvec3) Load 48(dvec3v) + 164: 46(fvec3) FAdd 163 162 + Store 48(dvec3v) 164 + 165: 51(fvec4) Load 53(dvec4v) + 166: 51(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 165 + 167: 51(fvec4) Load 53(dvec4v) + 168: 51(fvec4) FAdd 167 166 + Store 53(dvec4v) 168 + 169: 37(float) Load 39(doublev) + 170: 37(float) ExtInst 1(GLSL.std.450) 9(Ceil) 169 + 171: 37(float) Load 39(doublev) + 172: 37(float) FAdd 171 170 + Store 39(doublev) 172 + 173: 41(fvec2) Load 43(dvec2v) + 174: 41(fvec2) ExtInst 1(GLSL.std.450) 9(Ceil) 173 + 175: 41(fvec2) Load 43(dvec2v) + 176: 41(fvec2) FAdd 175 174 + Store 43(dvec2v) 176 + 177: 46(fvec3) Load 48(dvec3v) + 178: 46(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 177 + 179: 46(fvec3) Load 48(dvec3v) + 180: 46(fvec3) FAdd 179 178 + Store 48(dvec3v) 180 + 181: 51(fvec4) Load 53(dvec4v) + 182: 51(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 181 + 183: 51(fvec4) Load 53(dvec4v) + 184: 51(fvec4) FAdd 183 182 + Store 53(dvec4v) 184 + 185: 37(float) Load 39(doublev) + 186: 37(float) ExtInst 1(GLSL.std.450) 10(Fract) 185 + 187: 37(float) Load 39(doublev) + 188: 37(float) FAdd 187 186 + Store 39(doublev) 188 + 189: 41(fvec2) Load 43(dvec2v) + 190: 41(fvec2) ExtInst 1(GLSL.std.450) 10(Fract) 189 + 191: 41(fvec2) Load 43(dvec2v) + 192: 41(fvec2) FAdd 191 190 + Store 43(dvec2v) 192 + 193: 46(fvec3) Load 48(dvec3v) + 194: 46(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 193 + 195: 46(fvec3) Load 48(dvec3v) + 196: 46(fvec3) FAdd 195 194 + Store 48(dvec3v) 196 + 197: 51(fvec4) Load 53(dvec4v) + 198: 51(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 197 + 199: 51(fvec4) Load 53(dvec4v) + 200: 51(fvec4) FAdd 199 198 + Store 53(dvec4v) 200 + 201: 37(float) Load 39(doublev) + 202: 37(float) Load 39(doublev) + 203: 37(float) FMod 201 202 + 204: 37(float) Load 39(doublev) + 205: 37(float) FAdd 204 203 + Store 39(doublev) 205 + 206: 41(fvec2) Load 43(dvec2v) + 207: 37(float) Load 39(doublev) + 208: 41(fvec2) CompositeConstruct 207 207 + 209: 41(fvec2) FMod 206 208 + 210: 41(fvec2) Load 43(dvec2v) + 211: 41(fvec2) FAdd 210 209 + Store 43(dvec2v) 211 + 212: 46(fvec3) Load 48(dvec3v) + 213: 37(float) Load 39(doublev) + 214: 46(fvec3) CompositeConstruct 213 213 213 + 215: 46(fvec3) FMod 212 214 + 216: 46(fvec3) Load 48(dvec3v) + 217: 46(fvec3) FAdd 216 215 + Store 48(dvec3v) 217 + 218: 51(fvec4) Load 53(dvec4v) + 219: 37(float) Load 39(doublev) + 220: 51(fvec4) CompositeConstruct 219 219 219 219 + 221: 51(fvec4) FMod 218 220 + 222: 51(fvec4) Load 53(dvec4v) + 223: 51(fvec4) FAdd 222 221 + Store 53(dvec4v) 223 + 224: 41(fvec2) Load 43(dvec2v) + 225: 41(fvec2) Load 43(dvec2v) + 226: 41(fvec2) FMod 224 225 + 227: 41(fvec2) Load 43(dvec2v) + 228: 41(fvec2) FAdd 227 226 + Store 43(dvec2v) 228 + 229: 46(fvec3) Load 48(dvec3v) + 230: 46(fvec3) Load 48(dvec3v) + 231: 46(fvec3) FMod 229 230 + 232: 46(fvec3) Load 48(dvec3v) + 233: 46(fvec3) FAdd 232 231 + Store 48(dvec3v) 233 + 234: 51(fvec4) Load 53(dvec4v) + 235: 51(fvec4) Load 53(dvec4v) + 236: 51(fvec4) FMod 234 235 + 237: 51(fvec4) Load 53(dvec4v) + 238: 51(fvec4) FAdd 237 236 + Store 53(dvec4v) 238 + 239: 37(float) Load 39(doublev) + 240: 37(float) ExtInst 1(GLSL.std.450) 35(Modf) 239 39(doublev) + 241: 37(float) Load 39(doublev) + 242: 37(float) FAdd 241 240 + Store 39(doublev) 242 + 243: 41(fvec2) Load 43(dvec2v) + 244: 41(fvec2) ExtInst 1(GLSL.std.450) 35(Modf) 243 43(dvec2v) + 245: 41(fvec2) Load 43(dvec2v) + 246: 41(fvec2) FAdd 245 244 + Store 43(dvec2v) 246 + 247: 46(fvec3) Load 48(dvec3v) + 248: 46(fvec3) ExtInst 1(GLSL.std.450) 35(Modf) 247 48(dvec3v) + 249: 46(fvec3) Load 48(dvec3v) + 250: 46(fvec3) FAdd 249 248 + Store 48(dvec3v) 250 + 251: 51(fvec4) Load 53(dvec4v) + 252: 51(fvec4) ExtInst 1(GLSL.std.450) 35(Modf) 251 53(dvec4v) + 253: 51(fvec4) Load 53(dvec4v) + 254: 51(fvec4) FAdd 253 252 + Store 53(dvec4v) 254 + 255: 37(float) Load 39(doublev) + 256: 37(float) Load 39(doublev) + 257: 37(float) ExtInst 1(GLSL.std.450) 37(FMin) 255 256 + 258: 37(float) Load 39(doublev) + 259: 37(float) FAdd 258 257 + Store 39(doublev) 259 + 260: 41(fvec2) Load 43(dvec2v) + 261: 37(float) Load 39(doublev) + 262: 41(fvec2) CompositeConstruct 261 261 + 263: 41(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 260 262 + 264: 41(fvec2) Load 43(dvec2v) + 265: 41(fvec2) FAdd 264 263 + Store 43(dvec2v) 265 + 266: 46(fvec3) Load 48(dvec3v) + 267: 37(float) Load 39(doublev) + 268: 46(fvec3) CompositeConstruct 267 267 267 + 269: 46(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 266 268 + 270: 46(fvec3) Load 48(dvec3v) + 271: 46(fvec3) FAdd 270 269 + Store 48(dvec3v) 271 + 272: 51(fvec4) Load 53(dvec4v) + 273: 37(float) Load 39(doublev) + 274: 51(fvec4) CompositeConstruct 273 273 273 273 + 275: 51(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 272 274 + 276: 51(fvec4) Load 53(dvec4v) + 277: 51(fvec4) FAdd 276 275 + Store 53(dvec4v) 277 + 278: 41(fvec2) Load 43(dvec2v) + 279: 41(fvec2) Load 43(dvec2v) + 280: 41(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 278 279 + 281: 41(fvec2) Load 43(dvec2v) + 282: 41(fvec2) FAdd 281 280 + Store 43(dvec2v) 282 + 283: 46(fvec3) Load 48(dvec3v) + 284: 46(fvec3) Load 48(dvec3v) + 285: 46(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 283 284 + 286: 46(fvec3) Load 48(dvec3v) + 287: 46(fvec3) FAdd 286 285 + Store 48(dvec3v) 287 + 288: 51(fvec4) Load 53(dvec4v) + 289: 51(fvec4) Load 53(dvec4v) + 290: 51(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 288 289 + 291: 51(fvec4) Load 53(dvec4v) + 292: 51(fvec4) FAdd 291 290 + Store 53(dvec4v) 292 + 293: 37(float) Load 39(doublev) + 294: 37(float) Load 39(doublev) + 295: 37(float) ExtInst 1(GLSL.std.450) 40(FMax) 293 294 + 296: 37(float) Load 39(doublev) + 297: 37(float) FAdd 296 295 + Store 39(doublev) 297 + 298: 41(fvec2) Load 43(dvec2v) + 299: 37(float) Load 39(doublev) + 300: 41(fvec2) CompositeConstruct 299 299 + 301: 41(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 298 300 + 302: 41(fvec2) Load 43(dvec2v) + 303: 41(fvec2) FAdd 302 301 + Store 43(dvec2v) 303 + 304: 46(fvec3) Load 48(dvec3v) + 305: 37(float) Load 39(doublev) + 306: 46(fvec3) CompositeConstruct 305 305 305 + 307: 46(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 304 306 + 308: 46(fvec3) Load 48(dvec3v) + 309: 46(fvec3) FAdd 308 307 + Store 48(dvec3v) 309 + 310: 51(fvec4) Load 53(dvec4v) + 311: 37(float) Load 39(doublev) + 312: 51(fvec4) CompositeConstruct 311 311 311 311 + 313: 51(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 310 312 + 314: 51(fvec4) Load 53(dvec4v) + 315: 51(fvec4) FAdd 314 313 + Store 53(dvec4v) 315 + 316: 41(fvec2) Load 43(dvec2v) + 317: 41(fvec2) Load 43(dvec2v) + 318: 41(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 316 317 + 319: 41(fvec2) Load 43(dvec2v) + 320: 41(fvec2) FAdd 319 318 + Store 43(dvec2v) 320 + 321: 46(fvec3) Load 48(dvec3v) + 322: 46(fvec3) Load 48(dvec3v) + 323: 46(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 321 322 + 324: 46(fvec3) Load 48(dvec3v) + 325: 46(fvec3) FAdd 324 323 + Store 48(dvec3v) 325 + 326: 51(fvec4) Load 53(dvec4v) + 327: 51(fvec4) Load 53(dvec4v) + 328: 51(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 326 327 + 329: 51(fvec4) Load 53(dvec4v) + 330: 51(fvec4) FAdd 329 328 + Store 53(dvec4v) 330 + 331: 37(float) Load 39(doublev) + 332: 37(float) Load 39(doublev) + 333: 37(float) Load 39(doublev) + 334: 37(float) ExtInst 1(GLSL.std.450) 43(FClamp) 331 332 333 + 335: 37(float) Load 39(doublev) + 336: 37(float) FAdd 335 334 + Store 39(doublev) 336 + 337: 41(fvec2) Load 43(dvec2v) + 338: 37(float) Load 39(doublev) + 339: 37(float) Load 39(doublev) + 340: 41(fvec2) CompositeConstruct 338 338 + 341: 41(fvec2) CompositeConstruct 339 339 + 342: 41(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 337 340 341 + 343: 41(fvec2) Load 43(dvec2v) + 344: 41(fvec2) FAdd 343 342 + Store 43(dvec2v) 344 + 345: 46(fvec3) Load 48(dvec3v) + 346: 37(float) Load 39(doublev) + 347: 37(float) Load 39(doublev) + 348: 46(fvec3) CompositeConstruct 346 346 346 + 349: 46(fvec3) CompositeConstruct 347 347 347 + 350: 46(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 345 348 349 + 351: 46(fvec3) Load 48(dvec3v) + 352: 46(fvec3) FAdd 351 350 + Store 48(dvec3v) 352 + 353: 51(fvec4) Load 53(dvec4v) + 354: 37(float) Load 39(doublev) + 355: 37(float) Load 39(doublev) + 356: 51(fvec4) CompositeConstruct 354 354 354 354 + 357: 51(fvec4) CompositeConstruct 355 355 355 355 + 358: 51(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 353 356 357 + 359: 51(fvec4) Load 53(dvec4v) + 360: 51(fvec4) FAdd 359 358 + Store 53(dvec4v) 360 + 361: 41(fvec2) Load 43(dvec2v) + 362: 41(fvec2) Load 43(dvec2v) + 363: 41(fvec2) Load 43(dvec2v) + 364: 41(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 361 362 363 + 365: 41(fvec2) Load 43(dvec2v) + 366: 41(fvec2) FAdd 365 364 + Store 43(dvec2v) 366 + 367: 46(fvec3) Load 48(dvec3v) + 368: 46(fvec3) Load 48(dvec3v) + 369: 46(fvec3) Load 48(dvec3v) + 370: 46(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 367 368 369 + 371: 46(fvec3) Load 48(dvec3v) + 372: 46(fvec3) FAdd 371 370 + Store 48(dvec3v) 372 + 373: 51(fvec4) Load 53(dvec4v) + 374: 51(fvec4) Load 53(dvec4v) + 375: 51(fvec4) Load 53(dvec4v) + 376: 51(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 373 374 375 + 377: 51(fvec4) Load 53(dvec4v) + 378: 51(fvec4) FAdd 377 376 + Store 53(dvec4v) 378 + 379: 37(float) Load 39(doublev) + 380: 37(float) Load 39(doublev) + 381: 37(float) Load 39(doublev) + 382: 37(float) ExtInst 1(GLSL.std.450) 46(FMix) 379 380 381 + 383: 37(float) Load 39(doublev) + 384: 37(float) FAdd 383 382 + Store 39(doublev) 384 + 385: 41(fvec2) Load 43(dvec2v) + 386: 41(fvec2) Load 43(dvec2v) + 387: 37(float) Load 39(doublev) + 388: 41(fvec2) CompositeConstruct 387 387 + 389: 41(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 385 386 388 + 390: 41(fvec2) Load 43(dvec2v) + 391: 41(fvec2) FAdd 390 389 + Store 43(dvec2v) 391 + 392: 46(fvec3) Load 48(dvec3v) + 393: 46(fvec3) Load 48(dvec3v) + 394: 37(float) Load 39(doublev) + 395: 46(fvec3) CompositeConstruct 394 394 394 + 396: 46(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 392 393 395 + 397: 46(fvec3) Load 48(dvec3v) + 398: 46(fvec3) FAdd 397 396 + Store 48(dvec3v) 398 + 399: 51(fvec4) Load 53(dvec4v) + 400: 51(fvec4) Load 53(dvec4v) + 401: 37(float) Load 39(doublev) + 402: 51(fvec4) CompositeConstruct 401 401 401 401 + 403: 51(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 399 400 402 + 404: 51(fvec4) Load 53(dvec4v) + 405: 51(fvec4) FAdd 404 403 + Store 53(dvec4v) 405 + 406: 41(fvec2) Load 43(dvec2v) + 407: 41(fvec2) Load 43(dvec2v) + 408: 41(fvec2) Load 43(dvec2v) + 409: 41(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 406 407 408 + 410: 41(fvec2) Load 43(dvec2v) + 411: 41(fvec2) FAdd 410 409 + Store 43(dvec2v) 411 + 412: 46(fvec3) Load 48(dvec3v) + 413: 46(fvec3) Load 48(dvec3v) + 414: 46(fvec3) Load 48(dvec3v) + 415: 46(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 412 413 414 + 416: 46(fvec3) Load 48(dvec3v) + 417: 46(fvec3) FAdd 416 415 + Store 48(dvec3v) 417 + 418: 51(fvec4) Load 53(dvec4v) + 419: 51(fvec4) Load 53(dvec4v) + 420: 51(fvec4) Load 53(dvec4v) + 421: 51(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 418 419 420 + 422: 51(fvec4) Load 53(dvec4v) + 423: 51(fvec4) FAdd 422 421 + Store 53(dvec4v) 423 + 424: 37(float) Load 39(doublev) + 425: 37(float) Load 39(doublev) + 429: 426(bool) Load 428(boolv) + 430: 37(float) ExtInst 1(GLSL.std.450) 46(FMix) 424 425 429 + 431: 37(float) Load 39(doublev) + 432: 37(float) FAdd 431 430 + Store 39(doublev) 432 + 433: 41(fvec2) Load 43(dvec2v) + 434: 41(fvec2) Load 43(dvec2v) + 438: 435(bvec2) Load 437(bvec2v) + 439: 41(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 433 434 438 + 440: 41(fvec2) Load 43(dvec2v) + 441: 41(fvec2) FAdd 440 439 + Store 43(dvec2v) 441 + 442: 46(fvec3) Load 48(dvec3v) + 443: 46(fvec3) Load 48(dvec3v) + 447: 444(bvec3) Load 446(bvec3v) + 448: 46(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 442 443 447 + 449: 46(fvec3) Load 48(dvec3v) + 450: 46(fvec3) FAdd 449 448 + Store 48(dvec3v) 450 + 451: 51(fvec4) Load 53(dvec4v) + 452: 51(fvec4) Load 53(dvec4v) + 456: 453(bvec4) Load 455(bvec4v) + 457: 51(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 451 452 456 + 458: 51(fvec4) Load 53(dvec4v) + 459: 51(fvec4) FAdd 458 457 + Store 53(dvec4v) 459 + 460: 37(float) Load 39(doublev) + 461: 37(float) Load 39(doublev) + 462: 37(float) ExtInst 1(GLSL.std.450) 48(Step) 460 461 + 463: 37(float) Load 39(doublev) + 464: 37(float) FAdd 463 462 + Store 39(doublev) 464 + 465: 41(fvec2) Load 43(dvec2v) + 466: 41(fvec2) Load 43(dvec2v) + 467: 41(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 465 466 + 468: 41(fvec2) Load 43(dvec2v) + 469: 41(fvec2) FAdd 468 467 + Store 43(dvec2v) 469 + 470: 46(fvec3) Load 48(dvec3v) + 471: 46(fvec3) Load 48(dvec3v) + 472: 46(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 470 471 + 473: 46(fvec3) Load 48(dvec3v) + 474: 46(fvec3) FAdd 473 472 + Store 48(dvec3v) 474 + 475: 51(fvec4) Load 53(dvec4v) + 476: 51(fvec4) Load 53(dvec4v) + 477: 51(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 475 476 + 478: 51(fvec4) Load 53(dvec4v) + 479: 51(fvec4) FAdd 478 477 + Store 53(dvec4v) 479 + 480: 37(float) Load 39(doublev) + 481: 41(fvec2) Load 43(dvec2v) + 482: 41(fvec2) CompositeConstruct 480 480 + 483: 41(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 482 481 + 484: 41(fvec2) Load 43(dvec2v) + 485: 41(fvec2) FAdd 484 483 + Store 43(dvec2v) 485 + 486: 37(float) Load 39(doublev) + 487: 46(fvec3) Load 48(dvec3v) + 488: 46(fvec3) CompositeConstruct 486 486 486 + 489: 46(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 488 487 + 490: 46(fvec3) Load 48(dvec3v) + 491: 46(fvec3) FAdd 490 489 + Store 48(dvec3v) 491 + 492: 37(float) Load 39(doublev) + 493: 51(fvec4) Load 53(dvec4v) + 494: 51(fvec4) CompositeConstruct 492 492 492 492 + 495: 51(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 494 493 + 496: 51(fvec4) Load 53(dvec4v) + 497: 51(fvec4) FAdd 496 495 + Store 53(dvec4v) 497 + 498: 37(float) Load 39(doublev) + 499: 37(float) Load 39(doublev) + 500: 37(float) Load 39(doublev) + 501: 37(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 498 499 500 + 502: 37(float) Load 39(doublev) + 503: 37(float) FAdd 502 501 + Store 39(doublev) 503 + 504: 41(fvec2) Load 43(dvec2v) + 505: 41(fvec2) Load 43(dvec2v) + 506: 41(fvec2) Load 43(dvec2v) + 507: 41(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 504 505 506 + 508: 41(fvec2) Load 43(dvec2v) + 509: 41(fvec2) FAdd 508 507 + Store 43(dvec2v) 509 + 510: 46(fvec3) Load 48(dvec3v) + 511: 46(fvec3) Load 48(dvec3v) + 512: 46(fvec3) Load 48(dvec3v) + 513: 46(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 510 511 512 + 514: 46(fvec3) Load 48(dvec3v) + 515: 46(fvec3) FAdd 514 513 + Store 48(dvec3v) 515 + 516: 51(fvec4) Load 53(dvec4v) + 517: 51(fvec4) Load 53(dvec4v) + 518: 51(fvec4) Load 53(dvec4v) + 519: 51(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 516 517 518 + 520: 51(fvec4) Load 53(dvec4v) + 521: 51(fvec4) FAdd 520 519 + Store 53(dvec4v) 521 + 522: 37(float) Load 39(doublev) + 523: 37(float) Load 39(doublev) + 524: 41(fvec2) Load 43(dvec2v) + 525: 41(fvec2) CompositeConstruct 522 522 + 526: 41(fvec2) CompositeConstruct 523 523 + 527: 41(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 525 526 524 + 528: 41(fvec2) Load 43(dvec2v) + 529: 41(fvec2) FAdd 528 527 + Store 43(dvec2v) 529 + 530: 37(float) Load 39(doublev) + 531: 37(float) Load 39(doublev) + 532: 46(fvec3) Load 48(dvec3v) + 533: 46(fvec3) CompositeConstruct 530 530 530 + 534: 46(fvec3) CompositeConstruct 531 531 531 + 535: 46(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 533 534 532 + 536: 46(fvec3) Load 48(dvec3v) + 537: 46(fvec3) FAdd 536 535 + Store 48(dvec3v) 537 + 538: 37(float) Load 39(doublev) + 539: 37(float) Load 39(doublev) + 540: 51(fvec4) Load 53(dvec4v) + 541: 51(fvec4) CompositeConstruct 538 538 538 538 + 542: 51(fvec4) CompositeConstruct 539 539 539 539 + 543: 51(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 541 542 540 + 544: 51(fvec4) Load 53(dvec4v) + 545: 51(fvec4) FAdd 544 543 + Store 53(dvec4v) 545 + 546: 37(float) Load 39(doublev) + 547: 426(bool) IsNan 546 + Store 428(boolv) 547 + 548: 41(fvec2) Load 43(dvec2v) + 549: 435(bvec2) IsNan 548 + Store 437(bvec2v) 549 + 550: 46(fvec3) Load 48(dvec3v) + 551: 444(bvec3) IsNan 550 + Store 446(bvec3v) 551 + 552: 51(fvec4) Load 53(dvec4v) + 553: 453(bvec4) IsNan 552 + Store 455(bvec4v) 553 + 555: 426(bool) Load 428(boolv) + SelectionMerge 557 None + BranchConditional 555 556 560 + 556: Label + 558: 37(float) Load 39(doublev) + 559: 426(bool) IsInf 558 + Store 554 559 + Branch 557 + 560: Label + Store 554 561 + Branch 557 + 557: Label + 562: 426(bool) Load 554 + Store 428(boolv) 562 + 564: 426(bool) Load 428(boolv) + SelectionMerge 566 None + BranchConditional 564 565 569 + 565: Label + 567: 41(fvec2) Load 43(dvec2v) + 568: 435(bvec2) IsInf 567 + Store 563 568 + Branch 566 + 569: Label + Store 563 570 + Branch 566 + 566: Label + 571: 435(bvec2) Load 563 + Store 437(bvec2v) 571 + 573: 426(bool) Load 428(boolv) + SelectionMerge 575 None + BranchConditional 573 574 578 + 574: Label + 576: 46(fvec3) Load 48(dvec3v) + 577: 444(bvec3) IsInf 576 + Store 572 577 + Branch 575 + 578: Label + Store 572 579 + Branch 575 + 575: Label + 580: 444(bvec3) Load 572 + Store 446(bvec3v) 580 + 582: 426(bool) Load 428(boolv) + SelectionMerge 584 None + BranchConditional 582 583 587 + 583: Label + 585: 51(fvec4) Load 53(dvec4v) + 586: 453(bvec4) IsInf 585 + Store 581 586 + Branch 584 + 587: Label + Store 581 588 + Branch 584 + 584: Label + 589: 453(bvec4) Load 581 + Store 455(bvec4v) 589 + 590: 37(float) Load 39(doublev) + 591: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 590 + 592: 37(float) Load 39(doublev) + 593: 37(float) FAdd 592 591 + Store 39(doublev) 593 + 594: 41(fvec2) Load 43(dvec2v) + 595: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 594 + 596: 37(float) Load 39(doublev) + 597: 37(float) FAdd 596 595 + Store 39(doublev) 597 + 598: 46(fvec3) Load 48(dvec3v) + 599: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 598 + 600: 37(float) Load 39(doublev) + 601: 37(float) FAdd 600 599 + Store 39(doublev) 601 + 602: 51(fvec4) Load 53(dvec4v) + 603: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 602 + 604: 37(float) Load 39(doublev) + 605: 37(float) FAdd 604 603 + Store 39(doublev) 605 + 606: 37(float) Load 39(doublev) + 607: 37(float) Load 39(doublev) + 608: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 606 607 + 609: 37(float) Load 39(doublev) + 610: 37(float) FAdd 609 608 + Store 39(doublev) 610 + 611: 41(fvec2) Load 43(dvec2v) + 612: 41(fvec2) Load 43(dvec2v) + 613: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 611 612 + 614: 37(float) Load 39(doublev) + 615: 37(float) FAdd 614 613 + Store 39(doublev) 615 + 616: 46(fvec3) Load 48(dvec3v) + 617: 46(fvec3) Load 48(dvec3v) + 618: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 616 617 + 619: 37(float) Load 39(doublev) + 620: 37(float) FAdd 619 618 + Store 39(doublev) 620 + 621: 51(fvec4) Load 53(dvec4v) + 622: 51(fvec4) Load 53(dvec4v) + 623: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 621 622 + 624: 37(float) Load 39(doublev) + 625: 37(float) FAdd 624 623 + Store 39(doublev) 625 + 626: 37(float) Load 39(doublev) + 627: 37(float) Load 39(doublev) + 628: 37(float) FMul 626 627 + 629: 37(float) Load 39(doublev) + 630: 37(float) FAdd 629 628 + Store 39(doublev) 630 + 631: 41(fvec2) Load 43(dvec2v) + 632: 41(fvec2) Load 43(dvec2v) + 633: 37(float) Dot 631 632 + 634: 37(float) Load 39(doublev) + 635: 37(float) FAdd 634 633 + Store 39(doublev) 635 + 636: 46(fvec3) Load 48(dvec3v) + 637: 46(fvec3) Load 48(dvec3v) + 638: 37(float) Dot 636 637 + 639: 37(float) Load 39(doublev) + 640: 37(float) FAdd 639 638 + Store 39(doublev) 640 + 641: 51(fvec4) Load 53(dvec4v) + 642: 51(fvec4) Load 53(dvec4v) + 643: 37(float) Dot 641 642 + 644: 37(float) Load 39(doublev) + 645: 37(float) FAdd 644 643 + Store 39(doublev) 645 + 646: 46(fvec3) Load 48(dvec3v) + 647: 46(fvec3) Load 48(dvec3v) + 648: 46(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 646 647 + 649: 46(fvec3) Load 48(dvec3v) + 650: 46(fvec3) FAdd 649 648 + Store 48(dvec3v) 650 + 651: 37(float) Load 39(doublev) + 652: 37(float) ExtInst 1(GLSL.std.450) 69(Normalize) 651 + 653: 37(float) Load 39(doublev) + 654: 37(float) FAdd 653 652 + Store 39(doublev) 654 + 655: 41(fvec2) Load 43(dvec2v) + 656: 41(fvec2) ExtInst 1(GLSL.std.450) 69(Normalize) 655 + 657: 41(fvec2) Load 43(dvec2v) + 658: 41(fvec2) FAdd 657 656 + Store 43(dvec2v) 658 + 659: 46(fvec3) Load 48(dvec3v) + 660: 46(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 659 + 661: 46(fvec3) Load 48(dvec3v) + 662: 46(fvec3) FAdd 661 660 + Store 48(dvec3v) 662 + 663: 51(fvec4) Load 53(dvec4v) + 664: 51(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 663 + 665: 51(fvec4) Load 53(dvec4v) + 666: 51(fvec4) FAdd 665 664 + Store 53(dvec4v) 666 + 667: 37(float) Load 39(doublev) + 668: 37(float) Load 39(doublev) + 669: 37(float) Load 39(doublev) + 670: 37(float) ExtInst 1(GLSL.std.450) 70(FaceForward) 667 668 669 + 671: 37(float) Load 39(doublev) + 672: 37(float) FAdd 671 670 + Store 39(doublev) 672 + 673: 41(fvec2) Load 43(dvec2v) + 674: 41(fvec2) Load 43(dvec2v) + 675: 41(fvec2) Load 43(dvec2v) + 676: 41(fvec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 673 674 675 + 677: 41(fvec2) Load 43(dvec2v) + 678: 41(fvec2) FAdd 677 676 + Store 43(dvec2v) 678 + 679: 46(fvec3) Load 48(dvec3v) + 680: 46(fvec3) Load 48(dvec3v) + 681: 46(fvec3) Load 48(dvec3v) + 682: 46(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 679 680 681 + 683: 46(fvec3) Load 48(dvec3v) + 684: 46(fvec3) FAdd 683 682 + Store 48(dvec3v) 684 + 685: 51(fvec4) Load 53(dvec4v) + 686: 51(fvec4) Load 53(dvec4v) + 687: 51(fvec4) Load 53(dvec4v) + 688: 51(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 685 686 687 + 689: 51(fvec4) Load 53(dvec4v) + 690: 51(fvec4) FAdd 689 688 + Store 53(dvec4v) 690 + 691: 37(float) Load 39(doublev) + 692: 37(float) Load 39(doublev) + 693: 37(float) ExtInst 1(GLSL.std.450) 71(Reflect) 691 692 + 694: 37(float) Load 39(doublev) + 695: 37(float) FAdd 694 693 + Store 39(doublev) 695 + 696: 41(fvec2) Load 43(dvec2v) + 697: 41(fvec2) Load 43(dvec2v) + 698: 41(fvec2) ExtInst 1(GLSL.std.450) 71(Reflect) 696 697 + 699: 41(fvec2) Load 43(dvec2v) + 700: 41(fvec2) FAdd 699 698 + Store 43(dvec2v) 700 + 701: 46(fvec3) Load 48(dvec3v) + 702: 46(fvec3) Load 48(dvec3v) + 703: 46(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 701 702 + 704: 46(fvec3) Load 48(dvec3v) + 705: 46(fvec3) FAdd 704 703 + Store 48(dvec3v) 705 + 706: 51(fvec4) Load 53(dvec4v) + 707: 51(fvec4) Load 53(dvec4v) + 708: 51(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 706 707 + 709: 51(fvec4) Load 53(dvec4v) + 710: 51(fvec4) FAdd 709 708 + Store 53(dvec4v) 710 + 711: 37(float) Load 39(doublev) + 712: 37(float) Load 39(doublev) + 713: 37(float) Load 39(doublev) + 714: 37(float) ExtInst 1(GLSL.std.450) 72(Refract) 711 712 713 + 715: 37(float) Load 39(doublev) + 716: 37(float) FAdd 715 714 + Store 39(doublev) 716 + 717: 41(fvec2) Load 43(dvec2v) + 718: 41(fvec2) Load 43(dvec2v) + 719: 37(float) Load 39(doublev) + 720: 41(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 717 718 719 + 721: 41(fvec2) Load 43(dvec2v) + 722: 41(fvec2) FAdd 721 720 + Store 43(dvec2v) 722 + 723: 46(fvec3) Load 48(dvec3v) + 724: 46(fvec3) Load 48(dvec3v) + 725: 37(float) Load 39(doublev) + 726: 46(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 723 724 725 + 727: 46(fvec3) Load 48(dvec3v) + 728: 46(fvec3) FAdd 727 726 + Store 48(dvec3v) 728 + 729: 51(fvec4) Load 53(dvec4v) + 730: 51(fvec4) Load 53(dvec4v) + 731: 37(float) Load 39(doublev) + 732: 51(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 729 730 731 + 733: 51(fvec4) Load 53(dvec4v) + 734: 51(fvec4) FAdd 733 732 + Store 53(dvec4v) 734 + 738: 41(fvec2) Load 43(dvec2v) + 739: 41(fvec2) Load 43(dvec2v) + 740: 735 OuterProduct 738 739 + Store 737(dmat2v) 740 + 744: 46(fvec3) Load 48(dvec3v) + 745: 46(fvec3) Load 48(dvec3v) + 746: 741 OuterProduct 744 745 + Store 743(dmat3v) 746 + 750: 51(fvec4) Load 53(dvec4v) + 751: 51(fvec4) Load 53(dvec4v) + 752: 747 OuterProduct 750 751 + Store 749(dmat4v) 752 + 756: 46(fvec3) Load 48(dvec3v) + 757: 41(fvec2) Load 43(dvec2v) + 758: 753 OuterProduct 756 757 + Store 755(dmat2x3v) 758 + 762: 41(fvec2) Load 43(dvec2v) + 763: 46(fvec3) Load 48(dvec3v) + 764: 759 OuterProduct 762 763 + Store 761(dmat3x2v) 764 + 768: 51(fvec4) Load 53(dvec4v) + 769: 41(fvec2) Load 43(dvec2v) + 770: 765 OuterProduct 768 769 + Store 767(dmat2x4v) 770 + 774: 41(fvec2) Load 43(dvec2v) + 775: 51(fvec4) Load 53(dvec4v) + 776: 771 OuterProduct 774 775 + Store 773(dmat4x2v) 776 + 780: 51(fvec4) Load 53(dvec4v) + 781: 46(fvec3) Load 48(dvec3v) + 782: 777 OuterProduct 780 781 + Store 779(dmat3x4v) 782 + 786: 46(fvec3) Load 48(dvec3v) + 787: 51(fvec4) Load 53(dvec4v) + 788: 783 OuterProduct 786 787 + Store 785(dmat4x3v) 788 + 789: 735 Load 737(dmat2v) + 790: 735 Load 737(dmat2v) + 791: 41(fvec2) CompositeExtract 789 0 + 792: 41(fvec2) CompositeExtract 790 0 + 793: 41(fvec2) FMul 791 792 + 794: 41(fvec2) CompositeExtract 789 1 + 795: 41(fvec2) CompositeExtract 790 1 + 796: 41(fvec2) FMul 794 795 + 797: 735 CompositeConstruct 793 796 + 798: 735 Load 737(dmat2v) + 799: 735 MatrixTimesMatrix 798 797 + Store 737(dmat2v) 799 + 800: 741 Load 743(dmat3v) + 801: 741 Load 743(dmat3v) + 802: 46(fvec3) CompositeExtract 800 0 + 803: 46(fvec3) CompositeExtract 801 0 + 804: 46(fvec3) FMul 802 803 + 805: 46(fvec3) CompositeExtract 800 1 + 806: 46(fvec3) CompositeExtract 801 1 + 807: 46(fvec3) FMul 805 806 + 808: 46(fvec3) CompositeExtract 800 2 + 809: 46(fvec3) CompositeExtract 801 2 + 810: 46(fvec3) FMul 808 809 + 811: 741 CompositeConstruct 804 807 810 + 812: 741 Load 743(dmat3v) + 813: 741 MatrixTimesMatrix 812 811 + Store 743(dmat3v) 813 + 814: 747 Load 749(dmat4v) + 815: 747 Load 749(dmat4v) + 816: 51(fvec4) CompositeExtract 814 0 + 817: 51(fvec4) CompositeExtract 815 0 + 818: 51(fvec4) FMul 816 817 + 819: 51(fvec4) CompositeExtract 814 1 + 820: 51(fvec4) CompositeExtract 815 1 + 821: 51(fvec4) FMul 819 820 + 822: 51(fvec4) CompositeExtract 814 2 + 823: 51(fvec4) CompositeExtract 815 2 + 824: 51(fvec4) FMul 822 823 + 825: 51(fvec4) CompositeExtract 814 3 + 826: 51(fvec4) CompositeExtract 815 3 + 827: 51(fvec4) FMul 825 826 + 828: 747 CompositeConstruct 818 821 824 827 + 829: 747 Load 749(dmat4v) + 830: 747 MatrixTimesMatrix 829 828 + Store 749(dmat4v) 830 + 831: 753 Load 755(dmat2x3v) + 832: 753 Load 755(dmat2x3v) + 833: 46(fvec3) CompositeExtract 831 0 + 834: 46(fvec3) CompositeExtract 832 0 + 835: 46(fvec3) FMul 833 834 + 836: 46(fvec3) CompositeExtract 831 1 + 837: 46(fvec3) CompositeExtract 832 1 + 838: 46(fvec3) FMul 836 837 + 839: 753 CompositeConstruct 835 838 + Store 755(dmat2x3v) 839 + 840: 765 Load 767(dmat2x4v) + 841: 765 Load 767(dmat2x4v) + 842: 51(fvec4) CompositeExtract 840 0 + 843: 51(fvec4) CompositeExtract 841 0 + 844: 51(fvec4) FMul 842 843 + 845: 51(fvec4) CompositeExtract 840 1 + 846: 51(fvec4) CompositeExtract 841 1 + 847: 51(fvec4) FMul 845 846 + 848: 765 CompositeConstruct 844 847 + Store 767(dmat2x4v) 848 + 849: 759 Load 761(dmat3x2v) + 850: 759 Load 761(dmat3x2v) + 851: 41(fvec2) CompositeExtract 849 0 + 852: 41(fvec2) CompositeExtract 850 0 + 853: 41(fvec2) FMul 851 852 + 854: 41(fvec2) CompositeExtract 849 1 + 855: 41(fvec2) CompositeExtract 850 1 + 856: 41(fvec2) FMul 854 855 + 857: 41(fvec2) CompositeExtract 849 2 + 858: 41(fvec2) CompositeExtract 850 2 + 859: 41(fvec2) FMul 857 858 + 860: 759 CompositeConstruct 853 856 859 + Store 761(dmat3x2v) 860 + 861: 777 Load 779(dmat3x4v) + 862: 777 Load 779(dmat3x4v) + 863: 51(fvec4) CompositeExtract 861 0 + 864: 51(fvec4) CompositeExtract 862 0 + 865: 51(fvec4) FMul 863 864 + 866: 51(fvec4) CompositeExtract 861 1 + 867: 51(fvec4) CompositeExtract 862 1 + 868: 51(fvec4) FMul 866 867 + 869: 51(fvec4) CompositeExtract 861 2 + 870: 51(fvec4) CompositeExtract 862 2 + 871: 51(fvec4) FMul 869 870 + 872: 777 CompositeConstruct 865 868 871 + Store 779(dmat3x4v) 872 + 873: 771 Load 773(dmat4x2v) + 874: 771 Load 773(dmat4x2v) + 875: 41(fvec2) CompositeExtract 873 0 + 876: 41(fvec2) CompositeExtract 874 0 + 877: 41(fvec2) FMul 875 876 + 878: 41(fvec2) CompositeExtract 873 1 + 879: 41(fvec2) CompositeExtract 874 1 + 880: 41(fvec2) FMul 878 879 + 881: 41(fvec2) CompositeExtract 873 2 + 882: 41(fvec2) CompositeExtract 874 2 + 883: 41(fvec2) FMul 881 882 + 884: 41(fvec2) CompositeExtract 873 3 + 885: 41(fvec2) CompositeExtract 874 3 + 886: 41(fvec2) FMul 884 885 + 887: 771 CompositeConstruct 877 880 883 886 + Store 773(dmat4x2v) 887 + 888: 783 Load 785(dmat4x3v) + 889: 783 Load 785(dmat4x3v) + 890: 46(fvec3) CompositeExtract 888 0 + 891: 46(fvec3) CompositeExtract 889 0 + 892: 46(fvec3) FMul 890 891 + 893: 46(fvec3) CompositeExtract 888 1 + 894: 46(fvec3) CompositeExtract 889 1 + 895: 46(fvec3) FMul 893 894 + 896: 46(fvec3) CompositeExtract 888 2 + 897: 46(fvec3) CompositeExtract 889 2 + 898: 46(fvec3) FMul 896 897 + 899: 46(fvec3) CompositeExtract 888 3 + 900: 46(fvec3) CompositeExtract 889 3 + 901: 46(fvec3) FMul 899 900 + 902: 783 CompositeConstruct 892 895 898 901 + Store 785(dmat4x3v) 902 + 903: 735 Load 737(dmat2v) + 904: 735 Transpose 903 + 905: 735 Load 737(dmat2v) + 906: 735 MatrixTimesMatrix 905 904 + Store 737(dmat2v) 906 + 907: 741 Load 743(dmat3v) + 908: 741 Transpose 907 + 909: 741 Load 743(dmat3v) + 910: 741 MatrixTimesMatrix 909 908 + Store 743(dmat3v) 910 + 911: 747 Load 749(dmat4v) + 912: 747 Transpose 911 + 913: 747 Load 749(dmat4v) + 914: 747 MatrixTimesMatrix 913 912 + Store 749(dmat4v) 914 + 915: 759 Load 761(dmat3x2v) + 916: 753 Transpose 915 + Store 755(dmat2x3v) 916 + 917: 753 Load 755(dmat2x3v) + 918: 759 Transpose 917 + Store 761(dmat3x2v) 918 + 919: 771 Load 773(dmat4x2v) + 920: 765 Transpose 919 + Store 767(dmat2x4v) 920 + 921: 765 Load 767(dmat2x4v) + 922: 771 Transpose 921 + Store 773(dmat4x2v) 922 + 923: 783 Load 785(dmat4x3v) + 924: 777 Transpose 923 + Store 779(dmat3x4v) 924 + 925: 777 Load 779(dmat3x4v) + 926: 783 Transpose 925 + Store 785(dmat4x3v) 926 + 927: 735 Load 737(dmat2v) + 928: 37(float) ExtInst 1(GLSL.std.450) 33(Determinant) 927 + 929: 37(float) Load 39(doublev) + 930: 37(float) FAdd 929 928 + Store 39(doublev) 930 + 931: 741 Load 743(dmat3v) + 932: 37(float) ExtInst 1(GLSL.std.450) 33(Determinant) 931 + 933: 37(float) Load 39(doublev) + 934: 37(float) FAdd 933 932 + Store 39(doublev) 934 + 935: 747 Load 749(dmat4v) + 936: 37(float) ExtInst 1(GLSL.std.450) 33(Determinant) 935 + 937: 37(float) Load 39(doublev) + 938: 37(float) FAdd 937 936 + Store 39(doublev) 938 + 939: 735 Load 737(dmat2v) + 940: 735 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 939 + 941: 735 Load 737(dmat2v) + 942: 735 MatrixTimesMatrix 941 940 + Store 737(dmat2v) 942 + 943: 741 Load 743(dmat3v) + 944: 741 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 943 + 945: 741 Load 743(dmat3v) + 946: 741 MatrixTimesMatrix 945 944 + Store 743(dmat3v) 946 + 947: 747 Load 749(dmat4v) + 948: 747 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 947 + 949: 747 Load 749(dmat4v) + 950: 747 MatrixTimesMatrix 949 948 + Store 749(dmat4v) 950 + 951: 37(float) Load 39(doublev) + 953: 38(ptr) AccessChain 43(dvec2v) 952 + 954: 37(float) Load 953 + 955: 37(float) FAdd 951 954 + 957: 38(ptr) AccessChain 48(dvec3v) 956 + 958: 37(float) Load 957 + 959: 37(float) FAdd 955 958 + 961: 38(ptr) AccessChain 53(dvec4v) 960 + 962: 37(float) Load 961 + 963: 37(float) FAdd 959 962 + 965: 38(ptr) AccessChain 737(dmat2v) 964 952 + 966: 37(float) Load 965 + 967: 37(float) FAdd 963 966 + 969: 38(ptr) AccessChain 743(dmat3v) 968 956 + 970: 37(float) Load 969 + 971: 37(float) FAdd 967 970 + 972: 38(ptr) AccessChain 749(dmat4v) 25 960 + 973: 37(float) Load 972 + 974: 37(float) FAdd 971 973 + 975: 38(ptr) AccessChain 755(dmat2x3v) 964 952 + 976: 37(float) Load 975 + 977: 37(float) FAdd 974 976 + 978: 38(ptr) AccessChain 761(dmat3x2v) 964 952 + 979: 37(float) Load 978 + 980: 37(float) FAdd 977 979 + 981: 38(ptr) AccessChain 779(dmat3x4v) 968 956 + 982: 37(float) Load 981 + 983: 37(float) FAdd 980 982 + 984: 38(ptr) AccessChain 785(dmat4x3v) 968 956 + 985: 37(float) Load 984 + 986: 37(float) FAdd 983 985 + 987: 38(ptr) AccessChain 767(dmat2x4v) 964 952 + 988: 37(float) Load 987 + 989: 37(float) FAdd 986 988 + 990: 38(ptr) AccessChain 773(dmat4x2v) 964 952 + 991: 37(float) Load 990 + 992: 37(float) FAdd 989 991 + 993: 426(bool) Load 428(boolv) + 995: 10(float) Select 993 994 21 + 996: 37(float) FConvert 995 + 997: 37(float) FAdd 992 996 + 998: 435(bvec2) Load 437(bvec2v) + 999: 426(bool) CompositeExtract 998 0 + 1000: 10(float) Select 999 994 21 + 1001: 37(float) FConvert 1000 + 1002: 37(float) FAdd 997 1001 + 1003: 444(bvec3) Load 446(bvec3v) + 1004: 426(bool) CompositeExtract 1003 0 + 1005: 10(float) Select 1004 994 21 + 1006: 37(float) FConvert 1005 + 1007: 37(float) FAdd 1002 1006 + 1008: 453(bvec4) Load 455(bvec4v) + 1009: 426(bool) CompositeExtract 1008 0 + 1010: 10(float) Select 1009 994 21 + 1011: 37(float) FConvert 1010 + 1012: 37(float) FAdd 1007 1011 + 1013: 10(float) FConvert 1012 + 1014: 11(fvec4) Load 13(outp) + 1015: 11(fvec4) VectorTimesScalar 1014 1013 + Store 13(outp) 1015 Return FunctionEnd diff --git a/Test/spv.400.frag b/Test/spv.400.frag index f35537c9..2014b5b0 100644 --- a/Test/spv.400.frag +++ b/Test/spv.400.frag @@ -21,6 +21,223 @@ void foo23() outp.x += textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]); } +void doubles() +{ + double doublev; + dvec2 dvec2v; + dvec3 dvec3v; + dvec4 dvec4v; + + bool boolv; + bvec2 bvec2v; + bvec3 bvec3v; + bvec4 bvec4v; + + doublev = sqrt(2.9); + dvec2v = sqrt(dvec2(2.7)); + dvec3v = sqrt(dvec3(2.0)); + dvec4v = sqrt(dvec4(doublev)); + + doublev += inversesqrt(doublev); + dvec2v += inversesqrt(dvec2v); + dvec3v += inversesqrt(dvec3v); + dvec4v += inversesqrt(dvec4v); + + doublev += abs(doublev); + dvec2v += abs(dvec2v); + dvec3v += abs(dvec3v); + dvec4v += abs(dvec4v); + + doublev += sign(doublev); + dvec2v += sign(dvec2v); + dvec3v += sign(dvec3v); + dvec4v += sign(dvec4v); + + doublev += floor(doublev); + dvec2v += floor(dvec2v); + dvec3v += floor(dvec3v); + dvec4v += floor(dvec4v); + + doublev += trunc(doublev); + dvec2v += trunc(dvec2v); + dvec3v += trunc(dvec3v); + dvec4v += trunc(dvec4v); + + doublev += round(doublev); + dvec2v += round(dvec2v); + dvec3v += round(dvec3v); + dvec4v += round(dvec4v); + + doublev += roundEven(doublev); + dvec2v += roundEven(dvec2v); + dvec3v += roundEven(dvec3v); + dvec4v += roundEven(dvec4v); + + doublev += ceil(doublev); + dvec2v += ceil(dvec2v); + dvec3v += ceil(dvec3v); + dvec4v += ceil(dvec4v); + + doublev += fract(doublev); + dvec2v += fract(dvec2v); + dvec3v += fract(dvec3v); + dvec4v += fract(dvec4v); + + doublev += mod(doublev, doublev); + dvec2v += mod(dvec2v, doublev); + dvec3v += mod(dvec3v, doublev); + dvec4v += mod(dvec4v, doublev); + dvec2v += mod(dvec2v, dvec2v); + dvec3v += mod(dvec3v, dvec3v); + dvec4v += mod(dvec4v, dvec4v); + + doublev += modf(doublev, doublev); + dvec2v += modf(dvec2v, dvec2v); + dvec3v += modf(dvec3v, dvec3v); + dvec4v += modf(dvec4v, dvec4v); + + doublev += min(doublev, doublev); + dvec2v += min(dvec2v, doublev); + dvec3v += min(dvec3v, doublev); + dvec4v += min(dvec4v, doublev); + dvec2v += min(dvec2v, dvec2v); + dvec3v += min(dvec3v, dvec3v); + dvec4v += min(dvec4v, dvec4v); + + doublev += max(doublev, doublev); + dvec2v += max(dvec2v, doublev); + dvec3v += max(dvec3v, doublev); + dvec4v += max(dvec4v, doublev); + dvec2v += max(dvec2v, dvec2v); + dvec3v += max(dvec3v, dvec3v); + dvec4v += max(dvec4v, dvec4v); + + doublev += clamp(doublev, doublev, doublev); + dvec2v += clamp(dvec2v, doublev, doublev); + dvec3v += clamp(dvec3v, doublev, doublev); + dvec4v += clamp(dvec4v, doublev, doublev); + dvec2v += clamp(dvec2v, dvec2v, dvec2v); + dvec3v += clamp(dvec3v, dvec3v, dvec3v); + dvec4v += clamp(dvec4v, dvec4v, dvec4v); + + doublev += mix(doublev, doublev, doublev); + dvec2v += mix(dvec2v, dvec2v, doublev); + dvec3v += mix(dvec3v, dvec3v, doublev); + dvec4v += mix(dvec4v, dvec4v, doublev); + dvec2v += mix(dvec2v, dvec2v, dvec2v); + dvec3v += mix(dvec3v, dvec3v, dvec3v); + dvec4v += mix(dvec4v, dvec4v, dvec4v); + doublev += mix(doublev, doublev, boolv); + dvec2v += mix(dvec2v, dvec2v, bvec2v); + dvec3v += mix(dvec3v, dvec3v, bvec3v); + dvec4v += mix(dvec4v, dvec4v, bvec4v); + + doublev += step(doublev, doublev); + dvec2v += step(dvec2v, dvec2v); + dvec3v += step(dvec3v, dvec3v); + dvec4v += step(dvec4v, dvec4v); + dvec2v += step(doublev, dvec2v); + dvec3v += step(doublev, dvec3v); + dvec4v += step(doublev, dvec4v); + + doublev += smoothstep(doublev, doublev, doublev); + dvec2v += smoothstep(dvec2v, dvec2v, dvec2v); + dvec3v += smoothstep(dvec3v, dvec3v, dvec3v); + dvec4v += smoothstep(dvec4v, dvec4v, dvec4v); + dvec2v += smoothstep(doublev, doublev, dvec2v); + dvec3v += smoothstep(doublev, doublev, dvec3v); + dvec4v += smoothstep(doublev, doublev, dvec4v); + + boolv = isnan(doublev); + bvec2v = isnan(dvec2v); + bvec3v = isnan(dvec3v); + bvec4v = isnan(dvec4v); + + boolv = boolv ? isinf(doublev) : false; + bvec2v = boolv ? isinf(dvec2v) : bvec2(false); + bvec3v = boolv ? isinf(dvec3v) : bvec3(false); + bvec4v = boolv ? isinf(dvec4v) : bvec4(false); + + doublev += length(doublev); + doublev += length(dvec2v); + doublev += length(dvec3v); + doublev += length(dvec4v); + + doublev += distance(doublev, doublev); + doublev += distance(dvec2v, dvec2v); + doublev += distance(dvec3v, dvec3v); + doublev += distance(dvec4v, dvec4v); + + doublev += dot(doublev, doublev); + doublev += dot(dvec2v, dvec2v); + doublev += dot(dvec3v, dvec3v); + doublev += dot(dvec4v, dvec4v); + + dvec3v += cross(dvec3v, dvec3v); + + doublev += normalize(doublev); + dvec2v += normalize(dvec2v); + dvec3v += normalize(dvec3v); + dvec4v += normalize(dvec4v); + + doublev += faceforward(doublev, doublev, doublev); + dvec2v += faceforward(dvec2v, dvec2v, dvec2v); + dvec3v += faceforward(dvec3v, dvec3v, dvec3v); + dvec4v += faceforward(dvec4v, dvec4v, dvec4v); + + doublev += reflect(doublev, doublev); + dvec2v += reflect(dvec2v, dvec2v); + dvec3v += reflect(dvec3v, dvec3v); + dvec4v += reflect(dvec4v, dvec4v); + + doublev += refract(doublev, doublev, doublev); + dvec2v += refract(dvec2v, dvec2v, doublev); + dvec3v += refract(dvec3v, dvec3v, doublev); + dvec4v += refract(dvec4v, dvec4v, doublev); + + dmat2 dmat2v = outerProduct(dvec2v, dvec2v); + dmat3 dmat3v = outerProduct(dvec3v, dvec3v); + dmat4 dmat4v = outerProduct(dvec4v, dvec4v); + dmat2x3 dmat2x3v = outerProduct(dvec3v, dvec2v); + dmat3x2 dmat3x2v = outerProduct(dvec2v, dvec3v); + dmat2x4 dmat2x4v = outerProduct(dvec4v, dvec2v); + dmat4x2 dmat4x2v = outerProduct(dvec2v, dvec4v); + dmat3x4 dmat3x4v = outerProduct(dvec4v, dvec3v); + dmat4x3 dmat4x3v = outerProduct(dvec3v, dvec4v); + + dmat2v *= matrixCompMult(dmat2v, dmat2v); + dmat3v *= matrixCompMult(dmat3v, dmat3v); + dmat4v *= matrixCompMult(dmat4v, dmat4v); + dmat2x3v = matrixCompMult(dmat2x3v, dmat2x3v); // For now, relying on no dead-code elimination + dmat2x4v = matrixCompMult(dmat2x4v, dmat2x4v); + dmat3x2v = matrixCompMult(dmat3x2v, dmat3x2v); + dmat3x4v = matrixCompMult(dmat3x4v, dmat3x4v); + dmat4x2v = matrixCompMult(dmat4x2v, dmat4x2v); + dmat4x3v = matrixCompMult(dmat4x3v, dmat4x3v); + + dmat2v *= transpose(dmat2v); + dmat3v *= transpose(dmat3v); + dmat4v *= transpose(dmat4v); + dmat2x3v = transpose(dmat3x2v); // For now, relying on no dead-code elimination + dmat3x2v = transpose(dmat2x3v); + dmat2x4v = transpose(dmat4x2v); + dmat4x2v = transpose(dmat2x4v); + dmat3x4v = transpose(dmat4x3v); + dmat4x3v = transpose(dmat3x4v); + + doublev += determinant(dmat2v); + doublev += determinant(dmat3v); + doublev += determinant(dmat4v); + + dmat2v *= inverse(dmat2v); + dmat3v *= inverse(dmat3v); + dmat4v *= inverse(dmat4v); + + outp *= float(doublev + dvec2v.y + dvec3v.z + dvec4v.w + + dmat2v[1][1] + dmat3v[2][2] + dmat4v[3][3] + dmat2x3v[1][1] + dmat3x2v[1][1] + dmat3x4v[2][2] + dmat4x3v[2][2] + dmat2x4v[1][1] + dmat4x2v[1][1] + + float(boolv) + float(bvec2v.x) + float(bvec3v.x) + float(bvec4v.x)); +} + void main() { vec4 v; @@ -38,5 +255,6 @@ void main() outp += gl_FragCoord + vl2; foo23(); + doubles(); } diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 75e85661..089751b1 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -419,6 +419,214 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) "\n"); } + // + // double functions added to desktop 4.00, but not fma, frexp, ldexp, or pack/unpack + // + if (profile != EEsProfile && version >= 400) { + commonBuiltins.append( + + "double sqrt(double);" + "dvec2 sqrt(dvec2);" + "dvec3 sqrt(dvec3);" + "dvec4 sqrt(dvec4);" + + "double inversesqrt(double);" + "dvec2 inversesqrt(dvec2);" + "dvec3 inversesqrt(dvec3);" + "dvec4 inversesqrt(dvec4);" + + "double abs(double);" + "dvec2 abs(dvec2);" + "dvec3 abs(dvec3);" + "dvec4 abs(dvec4);" + + "double sign(double);" + "dvec2 sign(dvec2);" + "dvec3 sign(dvec3);" + "dvec4 sign(dvec4);" + + "double floor(double);" + "dvec2 floor(dvec2);" + "dvec3 floor(dvec3);" + "dvec4 floor(dvec4);" + + "double trunc(double);" + "dvec2 trunc(dvec2);" + "dvec3 trunc(dvec3);" + "dvec4 trunc(dvec4);" + + "double round(double);" + "dvec2 round(dvec2);" + "dvec3 round(dvec3);" + "dvec4 round(dvec4);" + + "double roundEven(double);" + "dvec2 roundEven(dvec2);" + "dvec3 roundEven(dvec3);" + "dvec4 roundEven(dvec4);" + + "double ceil(double);" + "dvec2 ceil(dvec2);" + "dvec3 ceil(dvec3);" + "dvec4 ceil(dvec4);" + + "double fract(double);" + "dvec2 fract(dvec2);" + "dvec3 fract(dvec3);" + "dvec4 fract(dvec4);" + + "double mod(double, double);" + "dvec2 mod(dvec2 , double);" + "dvec3 mod(dvec3 , double);" + "dvec4 mod(dvec4 , double);" + "dvec2 mod(dvec2 , dvec2);" + "dvec3 mod(dvec3 , dvec3);" + "dvec4 mod(dvec4 , dvec4);" + + "double modf(double, out double);" + "dvec2 modf(dvec2, out dvec2);" + "dvec3 modf(dvec3, out dvec3);" + "dvec4 modf(dvec4, out dvec4);" + + "double min(double, double);" + "dvec2 min(dvec2, double);" + "dvec3 min(dvec3, double);" + "dvec4 min(dvec4, double);" + "dvec2 min(dvec2, dvec2);" + "dvec3 min(dvec3, dvec3);" + "dvec4 min(dvec4, dvec4);" + + "double max(double, double);" + "dvec2 max(dvec2 , double);" + "dvec3 max(dvec3 , double);" + "dvec4 max(dvec4 , double);" + "dvec2 max(dvec2 , dvec2);" + "dvec3 max(dvec3 , dvec3);" + "dvec4 max(dvec4 , dvec4);" + + "double clamp(double, double, double);" + "dvec2 clamp(dvec2 , double, double);" + "dvec3 clamp(dvec3 , double, double);" + "dvec4 clamp(dvec4 , double, double);" + "dvec2 clamp(dvec2 , dvec2 , dvec2);" + "dvec3 clamp(dvec3 , dvec3 , dvec3);" + "dvec4 clamp(dvec4 , dvec4 , dvec4);" + + "double mix(double, double, double);" + "dvec2 mix(dvec2, dvec2, double);" + "dvec3 mix(dvec3, dvec3, double);" + "dvec4 mix(dvec4, dvec4, double);" + "dvec2 mix(dvec2, dvec2, dvec2);" + "dvec3 mix(dvec3, dvec3, dvec3);" + "dvec4 mix(dvec4, dvec4, dvec4);" + "double mix(double, double, bool);" + "dvec2 mix(dvec2, dvec2, bvec2);" + "dvec3 mix(dvec3, dvec3, bvec3);" + "dvec4 mix(dvec4, dvec4, bvec4);" + + "double step(double, double);" + "dvec2 step(dvec2 , dvec2);" + "dvec3 step(dvec3 , dvec3);" + "dvec4 step(dvec4 , dvec4);" + "dvec2 step(double, dvec2);" + "dvec3 step(double, dvec3);" + "dvec4 step(double, dvec4);" + + "double smoothstep(double, double, double);" + "dvec2 smoothstep(dvec2 , dvec2 , dvec2);" + "dvec3 smoothstep(dvec3 , dvec3 , dvec3);" + "dvec4 smoothstep(dvec4 , dvec4 , dvec4);" + "dvec2 smoothstep(double, double, dvec2);" + "dvec3 smoothstep(double, double, dvec3);" + "dvec4 smoothstep(double, double, dvec4);" + + "bool isnan(double);" + "bvec2 isnan(dvec2);" + "bvec3 isnan(dvec3);" + "bvec4 isnan(dvec4);" + + "bool isinf(double);" + "bvec2 isinf(dvec2);" + "bvec3 isinf(dvec3);" + "bvec4 isinf(dvec4);" + + "double length(double);" + "double length(dvec2);" + "double length(dvec3);" + "double length(dvec4);" + + "double distance(double, double);" + "double distance(dvec2 , dvec2);" + "double distance(dvec3 , dvec3);" + "double distance(dvec4 , dvec4);" + + "double dot(double, double);" + "double dot(dvec2 , dvec2);" + "double dot(dvec3 , dvec3);" + "double dot(dvec4 , dvec4);" + + "dvec3 cross(dvec3, dvec3);" + + "double normalize(double);" + "dvec2 normalize(dvec2);" + "dvec3 normalize(dvec3);" + "dvec4 normalize(dvec4);" + + "double faceforward(double, double, double);" + "dvec2 faceforward(dvec2, dvec2, dvec2);" + "dvec3 faceforward(dvec3, dvec3, dvec3);" + "dvec4 faceforward(dvec4, dvec4, dvec4);" + + "double reflect(double, double);" + "dvec2 reflect(dvec2 , dvec2 );" + "dvec3 reflect(dvec3 , dvec3 );" + "dvec4 reflect(dvec4 , dvec4 );" + + "double refract(double, double, double);" + "dvec2 refract(dvec2 , dvec2 , double);" + "dvec3 refract(dvec3 , dvec3 , double);" + "dvec4 refract(dvec4 , dvec4 , double);" + + "dmat2 matrixCompMult(dmat2, dmat2);" + "dmat3 matrixCompMult(dmat3, dmat3);" + "dmat4 matrixCompMult(dmat4, dmat4);" + "dmat2x3 matrixCompMult(dmat2x3, dmat2x3);" + "dmat2x4 matrixCompMult(dmat2x4, dmat2x4);" + "dmat3x2 matrixCompMult(dmat3x2, dmat3x2);" + "dmat3x4 matrixCompMult(dmat3x4, dmat3x4);" + "dmat4x2 matrixCompMult(dmat4x2, dmat4x2);" + "dmat4x3 matrixCompMult(dmat4x3, dmat4x3);" + + "dmat2 outerProduct(dvec2, dvec2);" + "dmat3 outerProduct(dvec3, dvec3);" + "dmat4 outerProduct(dvec4, dvec4);" + "dmat2x3 outerProduct(dvec3, dvec2);" + "dmat3x2 outerProduct(dvec2, dvec3);" + "dmat2x4 outerProduct(dvec4, dvec2);" + "dmat4x2 outerProduct(dvec2, dvec4);" + "dmat3x4 outerProduct(dvec4, dvec3);" + "dmat4x3 outerProduct(dvec3, dvec4);" + + "dmat2 transpose(dmat2);" + "dmat3 transpose(dmat3);" + "dmat4 transpose(dmat4);" + "dmat2x3 transpose(dmat3x2);" + "dmat3x2 transpose(dmat2x3);" + "dmat2x4 transpose(dmat4x2);" + "dmat4x2 transpose(dmat2x4);" + "dmat3x4 transpose(dmat4x3);" + "dmat4x3 transpose(dmat3x4);" + + "double determinant(dmat2);" + "double determinant(dmat3);" + "double determinant(dmat4);" + + "dmat2 inverse(dmat2);" + "dmat3 inverse(dmat3);" + "dmat4 inverse(dmat4);" + ); + } + if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 430)) { commonBuiltins.append( From b891c2b8272859f32bf92ca30fca5841139c78a8 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Mon, 18 Jan 2016 09:26:25 -0500 Subject: [PATCH 15/84] Freed up some memory when no longer needed in glslangValidator. --- StandAlone/StandAlone.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 92010840..f47410b8 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -435,6 +435,8 @@ void ProcessConfigFile() } if (configStrings) FreeFileData(configStrings); + else + delete[] config; } // thread-safe list of shaders to asynchronously grab and compile @@ -805,6 +807,11 @@ int C_DECL main(int argc, char* argv[]) glslang::InitializeProcess(); CompileAndLinkShaders(); glslang::FinalizeProcess(); + for (int w = 0; w < NumWorkItems; ++w) { + if (Work[w]) { + delete Work[w]; + } + } } else { ShInitialize(); @@ -837,6 +844,8 @@ int C_DECL main(int argc, char* argv[]) ShFinalize(); } + delete[] Work; + if (CompileFailed) return EFailCompile; if (LinkFailed) From b7946d16bbfc80e8d743e2c3f62794c8f3295b64 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Mon, 18 Jan 2016 09:23:56 -0500 Subject: [PATCH 16/84] Free memory associated with SPIR-V generation. --- SPIRV/SpvBuilder.cpp | 136 ++++++++++---------- SPIRV/SpvBuilder.h | 24 ++-- SPIRV/spvIR.h | 30 +++-- glslang/Include/intermediate.h | 4 +- glslang/MachineIndependent/Intermediate.cpp | 8 +- 5 files changed, 109 insertions(+), 93 deletions(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 969a6d7c..7b17e17d 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -77,7 +77,7 @@ Id Builder::import(const char* name) Instruction* import = new Instruction(getUniqueId(), NoType, OpExtInstImport); import->addStringOperand(name); - imports.push_back(import); + imports.push_back(std::unique_ptr(import)); return import->getResultId(); } @@ -88,7 +88,7 @@ Id Builder::makeVoidType() if (groupedTypes[OpTypeVoid].size() == 0) { type = new Instruction(getUniqueId(), NoType, OpTypeVoid); groupedTypes[OpTypeVoid].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); } else type = groupedTypes[OpTypeVoid].back(); @@ -102,7 +102,7 @@ Id Builder::makeBoolType() if (groupedTypes[OpTypeBool].size() == 0) { type = new Instruction(getUniqueId(), NoType, OpTypeBool); groupedTypes[OpTypeBool].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); } else type = groupedTypes[OpTypeBool].back(); @@ -116,7 +116,7 @@ Id Builder::makeSamplerType() if (groupedTypes[OpTypeSampler].size() == 0) { type = new Instruction(getUniqueId(), NoType, OpTypeSampler); groupedTypes[OpTypeSampler].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); } else type = groupedTypes[OpTypeSampler].back(); @@ -140,7 +140,7 @@ Id Builder::makePointer(StorageClass storageClass, Id pointee) type->addImmediateOperand(storageClass); type->addIdOperand(pointee); groupedTypes[OpTypePointer].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -162,7 +162,7 @@ Id Builder::makeIntegerType(int width, bool hasSign) type->addImmediateOperand(width); type->addImmediateOperand(hasSign ? 1 : 0); groupedTypes[OpTypeInt].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -182,7 +182,7 @@ Id Builder::makeFloatType(int width) type = new Instruction(getUniqueId(), NoType, OpTypeFloat); type->addImmediateOperand(width); groupedTypes[OpTypeFloat].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -202,7 +202,7 @@ Id Builder::makeStructType(std::vector& members, const char* name) for (int op = 0; op < (int)members.size(); ++op) type->addIdOperand(members[op]); groupedTypes[OpTypeStruct].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); addName(type->getResultId(), name); @@ -249,7 +249,7 @@ Id Builder::makeVectorType(Id component, int size) type->addIdOperand(component); type->addImmediateOperand(size); groupedTypes[OpTypeVector].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -275,7 +275,7 @@ Id Builder::makeMatrixType(Id component, int cols, int rows) type->addIdOperand(column); type->addImmediateOperand(cols); groupedTypes[OpTypeMatrix].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -305,7 +305,7 @@ Id Builder::makeArrayType(Id element, unsigned size, int stride) type->addIdOperand(element); type->addIdOperand(sizeId); groupedTypes[OpTypeArray].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -315,7 +315,7 @@ Id Builder::makeRuntimeArray(Id element) { Instruction* type = new Instruction(getUniqueId(), NoType, OpTypeRuntimeArray); type->addIdOperand(element); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -346,7 +346,7 @@ Id Builder::makeFunctionType(Id returnType, std::vector& paramTypes) for (int p = 0; p < (int)paramTypes.size(); ++p) type->addIdOperand(paramTypes[p]); groupedTypes[OpTypeFunction].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -379,7 +379,7 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo type->addImmediateOperand((unsigned int)format); groupedTypes[OpTypeImage].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -400,7 +400,7 @@ Id Builder::makeSampledImageType(Id imageType) type->addIdOperand(imageType); groupedTypes[OpTypeSampledImage].push_back(type); - constantsTypesGlobals.push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); @@ -594,7 +594,7 @@ Id Builder::makeBoolConstant(bool b, bool specConstant) // Make it Instruction* c = new Instruction(getUniqueId(), typeId, opcode); - constantsTypesGlobals.push_back(c); + constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[OpTypeBool].push_back(c); module.mapInstruction(c); @@ -610,7 +610,7 @@ Id Builder::makeIntConstant(Id typeId, unsigned value, bool specConstant) Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); - constantsTypesGlobals.push_back(c); + constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[OpTypeInt].push_back(c); module.mapInstruction(c); @@ -628,7 +628,7 @@ Id Builder::makeFloatConstant(float f, bool specConstant) Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); - constantsTypesGlobals.push_back(c); + constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[OpTypeFloat].push_back(c); module.mapInstruction(c); @@ -649,7 +649,7 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(op1); c->addImmediateOperand(op2); - constantsTypesGlobals.push_back(c); + constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[OpTypeFloat].push_back(c); module.mapInstruction(c); @@ -708,7 +708,7 @@ Id Builder::makeCompositeConstant(Id typeId, std::vector& members) Instruction* c = new Instruction(getUniqueId(), typeId, OpConstantComposite); for (int op = 0; op < (int)members.size(); ++op) c->addIdOperand(members[op]); - constantsTypesGlobals.push_back(c); + constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[typeClass].push_back(c); module.mapInstruction(c); @@ -722,7 +722,7 @@ Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, co entryPoint->addIdOperand(function->getId()); entryPoint->addStringOperand(name); - entryPoints.push_back(entryPoint); + entryPoints.push_back(std::unique_ptr(entryPoint)); return entryPoint; } @@ -740,7 +740,7 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int val if (value3 >= 0) instr->addImmediateOperand(value3); - executionModes.push_back(instr); + executionModes.push_back(std::unique_ptr(instr)); } void Builder::addName(Id id, const char* string) @@ -749,7 +749,7 @@ void Builder::addName(Id id, const char* string) name->addIdOperand(id); name->addStringOperand(string); - names.push_back(name); + names.push_back(std::unique_ptr(name)); } void Builder::addMemberName(Id id, int memberNumber, const char* string) @@ -759,7 +759,7 @@ void Builder::addMemberName(Id id, int memberNumber, const char* string) name->addImmediateOperand(memberNumber); name->addStringOperand(string); - names.push_back(name); + names.push_back(std::unique_ptr(name)); } void Builder::addLine(Id target, Id fileName, int lineNum, int column) @@ -770,7 +770,7 @@ void Builder::addLine(Id target, Id fileName, int lineNum, int column) line->addImmediateOperand(lineNum); line->addImmediateOperand(column); - lines.push_back(line); + lines.push_back(std::unique_ptr(line)); } void Builder::addDecoration(Id id, Decoration decoration, int num) @@ -783,7 +783,7 @@ void Builder::addDecoration(Id id, Decoration decoration, int num) if (num >= 0) dec->addImmediateOperand(num); - decorations.push_back(dec); + decorations.push_back(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num) @@ -795,7 +795,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat if (num >= 0) dec->addImmediateOperand(num); - decorations.push_back(dec); + decorations.push_back(std::unique_ptr(dec)); } // Comments in header @@ -827,6 +827,8 @@ Function* Builder::makeFunctionEntry(Id returnType, const char* name, std::vecto if (name) addName(function->getId(), name); + functions.push_back(std::unique_ptr(function)); + return function; } @@ -836,9 +838,9 @@ void Builder::makeReturn(bool implicit, Id retVal) if (retVal) { Instruction* inst = new Instruction(NoResult, NoType, OpReturnValue); inst->addIdOperand(retVal); - buildPoint->addInstruction(inst); + buildPoint->addInstruction(std::unique_ptr(inst)); } else - buildPoint->addInstruction(new Instruction(NoResult, NoType, OpReturn)); + buildPoint->addInstruction(std::unique_ptr(new Instruction(NoResult, NoType, OpReturn))); if (! implicit) createAndSetNoPredecessorBlock("post-return"); @@ -878,7 +880,7 @@ void Builder::leaveFunction() // Comments in header void Builder::makeDiscard() { - buildPoint->addInstruction(new Instruction(OpKill)); + buildPoint->addInstruction(std::unique_ptr(new Instruction(OpKill))); createAndSetNoPredecessorBlock("post-discard"); } @@ -892,11 +894,11 @@ Id Builder::createVariable(StorageClass storageClass, Id type, const char* name) switch (storageClass) { case StorageClassFunction: // Validation rules require the declaration in the entry block - buildPoint->getParent().addLocalVariable(inst); + buildPoint->getParent().addLocalVariable(std::unique_ptr(inst)); break; default: - constantsTypesGlobals.push_back(inst); + constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); break; } @@ -911,7 +913,7 @@ Id Builder::createVariable(StorageClass storageClass, Id type, const char* name) Id Builder::createUndefined(Id type) { Instruction* inst = new Instruction(getUniqueId(), type, OpUndef); - buildPoint->addInstruction(inst); + buildPoint->addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } @@ -921,7 +923,7 @@ void Builder::createStore(Id rValue, Id lValue) Instruction* store = new Instruction(OpStore); store->addIdOperand(lValue); store->addIdOperand(rValue); - buildPoint->addInstruction(store); + buildPoint->addInstruction(std::unique_ptr(store)); } // Comments in header @@ -929,7 +931,7 @@ Id Builder::createLoad(Id lValue) { Instruction* load = new Instruction(getUniqueId(), getDerefTypeId(lValue), OpLoad); load->addIdOperand(lValue); - buildPoint->addInstruction(load); + buildPoint->addInstruction(std::unique_ptr(load)); return load->getResultId(); } @@ -955,7 +957,7 @@ Id Builder::createAccessChain(StorageClass storageClass, Id base, std::vectoraddIdOperand(base); for (int i = 0; i < (int)offsets.size(); ++i) chain->addIdOperand(offsets[i]); - buildPoint->addInstruction(chain); + buildPoint->addInstruction(std::unique_ptr(chain)); return chain->getResultId(); } @@ -965,7 +967,7 @@ Id Builder::createArrayLength(Id base, unsigned int member) Instruction* length = new Instruction(getUniqueId(), makeIntType(32), OpArrayLength); length->addIdOperand(base); length->addImmediateOperand(member); - buildPoint->addInstruction(length); + buildPoint->addInstruction(std::unique_ptr(length)); return length->getResultId(); } @@ -975,7 +977,7 @@ Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index) Instruction* extract = new Instruction(getUniqueId(), typeId, OpCompositeExtract); extract->addIdOperand(composite); extract->addImmediateOperand(index); - buildPoint->addInstruction(extract); + buildPoint->addInstruction(std::unique_ptr(extract)); return extract->getResultId(); } @@ -986,7 +988,7 @@ Id Builder::createCompositeExtract(Id composite, Id typeId, std::vectoraddIdOperand(composite); for (int i = 0; i < (int)indexes.size(); ++i) extract->addImmediateOperand(indexes[i]); - buildPoint->addInstruction(extract); + buildPoint->addInstruction(std::unique_ptr(extract)); return extract->getResultId(); } @@ -997,7 +999,7 @@ Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, unsigned i insert->addIdOperand(object); insert->addIdOperand(composite); insert->addImmediateOperand(index); - buildPoint->addInstruction(insert); + buildPoint->addInstruction(std::unique_ptr(insert)); return insert->getResultId(); } @@ -1009,7 +1011,7 @@ Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, std::vecto insert->addIdOperand(composite); for (int i = 0; i < (int)indexes.size(); ++i) insert->addImmediateOperand(indexes[i]); - buildPoint->addInstruction(insert); + buildPoint->addInstruction(std::unique_ptr(insert)); return insert->getResultId(); } @@ -1019,7 +1021,7 @@ Id Builder::createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex) Instruction* extract = new Instruction(getUniqueId(), typeId, OpVectorExtractDynamic); extract->addIdOperand(vector); extract->addIdOperand(componentIndex); - buildPoint->addInstruction(extract); + buildPoint->addInstruction(std::unique_ptr(extract)); return extract->getResultId(); } @@ -1030,7 +1032,7 @@ Id Builder::createVectorInsertDynamic(Id vector, Id typeId, Id component, Id com insert->addIdOperand(vector); insert->addIdOperand(component); insert->addIdOperand(componentIndex); - buildPoint->addInstruction(insert); + buildPoint->addInstruction(std::unique_ptr(insert)); return insert->getResultId(); } @@ -1039,7 +1041,7 @@ Id Builder::createVectorInsertDynamic(Id vector, Id typeId, Id component, Id com void Builder::createNoResultOp(Op opCode) { Instruction* op = new Instruction(opCode); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); } // An opcode that has one operand, no result id, and no type @@ -1047,7 +1049,7 @@ void Builder::createNoResultOp(Op opCode, Id operand) { Instruction* op = new Instruction(opCode); op->addIdOperand(operand); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); } // An opcode that has one operand, no result id, and no type @@ -1056,7 +1058,7 @@ void Builder::createNoResultOp(Op opCode, const std::vector& operands) Instruction* op = new Instruction(opCode); for (auto operand : operands) op->addIdOperand(operand); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); } void Builder::createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask semantics) @@ -1065,7 +1067,7 @@ void Builder::createControlBarrier(Scope execution, Scope memory, MemorySemantic op->addImmediateOperand(makeUintConstant(execution)); op->addImmediateOperand(makeUintConstant(memory)); op->addImmediateOperand(makeUintConstant(semantics)); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); } void Builder::createMemoryBarrier(unsigned executionScope, unsigned memorySemantics) @@ -1073,7 +1075,7 @@ void Builder::createMemoryBarrier(unsigned executionScope, unsigned memorySemant Instruction* op = new Instruction(OpMemoryBarrier); op->addImmediateOperand(makeUintConstant(executionScope)); op->addImmediateOperand(makeUintConstant(memorySemantics)); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); } // An opcode that has one operands, a result id, and a type @@ -1081,7 +1083,7 @@ Id Builder::createUnaryOp(Op opCode, Id typeId, Id operand) { Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->addIdOperand(operand); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); } @@ -1091,7 +1093,7 @@ Id Builder::createBinOp(Op opCode, Id typeId, Id left, Id right) Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->addIdOperand(left); op->addIdOperand(right); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); } @@ -1102,7 +1104,7 @@ Id Builder::createTriOp(Op opCode, Id typeId, Id op1, Id op2, Id op3) op->addIdOperand(op1); op->addIdOperand(op2); op->addIdOperand(op3); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); } @@ -1112,7 +1114,7 @@ Id Builder::createOp(Op opCode, Id typeId, const std::vector& operands) Instruction* op = new Instruction(getUniqueId(), typeId, opCode); for (auto operand : operands) op->addIdOperand(operand); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); } @@ -1123,7 +1125,7 @@ Id Builder::createFunctionCall(spv::Function* function, std::vector& ar op->addIdOperand(function->getId()); for (int a = 0; a < (int)args.size(); ++a) op->addIdOperand(args[a]); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); } @@ -1140,7 +1142,7 @@ Id Builder::createRvalueSwizzle(Id typeId, Id source, std::vector& cha swizzle->addIdOperand(source); for (int i = 0; i < (int)channels.size(); ++i) swizzle->addImmediateOperand(channels[i]); - buildPoint->addInstruction(swizzle); + buildPoint->addInstruction(std::unique_ptr(swizzle)); return swizzle->getResultId(); } @@ -1171,7 +1173,7 @@ Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, std::vectoraddImmediateOperand(components[i]); - buildPoint->addInstruction(swizzle); + buildPoint->addInstruction(std::unique_ptr(swizzle)); return swizzle->getResultId(); } @@ -1202,7 +1204,7 @@ Id Builder::smearScalar(Decoration /*precision*/, Id scalar, Id vectorType) Instruction* smear = new Instruction(getUniqueId(), vectorType, OpCompositeConstruct); for (int c = 0; c < numComponents; ++c) smear->addIdOperand(scalar); - buildPoint->addInstruction(smear); + buildPoint->addInstruction(std::unique_ptr(smear)); return smear->getResultId(); } @@ -1216,7 +1218,7 @@ Id Builder::createBuiltinCall(Decoration /*precision*/, Id resultType, Id builti for (int arg = 0; arg < (int)args.size(); ++arg) inst->addIdOperand(args[arg]); - buildPoint->addInstruction(inst); + buildPoint->addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } @@ -1344,7 +1346,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b for (int op = optArgNum + 1; op < numArgs; ++op) textureInst->addIdOperand(texArgs[op]); setPrecision(textureInst->getResultId(), precision); - buildPoint->addInstruction(textureInst); + buildPoint->addInstruction(std::unique_ptr(textureInst)); Id resultId = textureInst->getResultId(); @@ -1412,7 +1414,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter query->addIdOperand(parameters.coords); if (parameters.lod) query->addIdOperand(parameters.lod); - buildPoint->addInstruction(query); + buildPoint->addInstruction(std::unique_ptr(query)); return query->getResultId(); } @@ -1494,7 +1496,7 @@ Id Builder::createCompositeConstruct(Id typeId, std::vector& constituents) Instruction* op = new Instruction(getUniqueId(), typeId, OpCompositeConstruct); for (int c = 0; c < (int)constituents.size(); ++c) op->addIdOperand(constituents[c]); - buildPoint->addInstruction(op); + buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); } @@ -1710,7 +1712,7 @@ void Builder::makeSwitch(Id selector, int numSegments, std::vector& caseVal switchInst->addImmediateOperand(caseValues[i]); switchInst->addIdOperand(segmentBlocks[valueIndexToSegment[i]]->getId()); } - buildPoint->addInstruction(switchInst); + buildPoint->addInstruction(std::unique_ptr(switchInst)); // push the merge block switchMerges.push(mergeBlock); @@ -1781,7 +1783,7 @@ void Builder::makeNewLoop(bool loopTestFirst) // but we don't yet know where they will come from. loop.isFirstIteration->addIdOperand(makeBoolConstant(true)); loop.isFirstIteration->addIdOperand(preheader->getId()); - getBuildPoint()->addInstruction(loop.isFirstIteration); + getBuildPoint()->addInstruction(std::unique_ptr(loop.isFirstIteration)); // Mark the end of the structured loop. This must exist in the loop header block. createLoopMerge(loop.merge, loop.header, LoopControlMaskNone); @@ -2203,7 +2205,7 @@ void Builder::createBranch(Block* block) { Instruction* branch = new Instruction(OpBranch); branch->addIdOperand(block->getId()); - buildPoint->addInstruction(branch); + buildPoint->addInstruction(std::unique_ptr(branch)); block->addPredecessor(buildPoint); } @@ -2212,7 +2214,7 @@ void Builder::createSelectionMerge(Block* mergeBlock, unsigned int control) Instruction* merge = new Instruction(OpSelectionMerge); merge->addIdOperand(mergeBlock->getId()); merge->addImmediateOperand(control); - buildPoint->addInstruction(merge); + buildPoint->addInstruction(std::unique_ptr(merge)); } void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control) @@ -2221,7 +2223,7 @@ void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned merge->addIdOperand(mergeBlock->getId()); merge->addIdOperand(continueBlock->getId()); merge->addImmediateOperand(control); - buildPoint->addInstruction(merge); + buildPoint->addInstruction(std::unique_ptr(merge)); } void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock) @@ -2230,12 +2232,12 @@ void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* els branch->addIdOperand(condition); branch->addIdOperand(thenBlock->getId()); branch->addIdOperand(elseBlock->getId()); - buildPoint->addInstruction(branch); + buildPoint->addInstruction(std::unique_ptr(branch)); thenBlock->addPredecessor(buildPoint); elseBlock->addPredecessor(buildPoint); } -void Builder::dumpInstructions(std::vector& out, const std::vector& instructions) const +void Builder::dumpInstructions(std::vector& out, const std::vector >& instructions) const { for (int i = 0; i < (int)instructions.size(); ++i) { instructions[i]->dump(out); diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 7bf43962..026e81d5 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -52,6 +52,7 @@ #include "spvIR.h" #include +#include #include #include @@ -201,11 +202,13 @@ public: void setBuildPoint(Block* bp) { buildPoint = bp; } Block* getBuildPoint() const { return buildPoint; } - // Make the main function. + // Make the main function. The returned pointer is only valid + // for the lifetime of this builder. Function* makeMain(); // Make a shader-style function, and create its entry block if entry is non-zero. // Return the function, pass back the entry. + // The returned pointer is only valid for the lifetime of this builder. Function* makeFunctionEntry(Id returnType, const char* name, std::vector& paramTypes, Block **entry = 0); // Create a return. An 'implicit' return is one not appearing in the source @@ -516,7 +519,7 @@ protected: void createSelectionMerge(Block* mergeBlock, unsigned int control); void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control); void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); - void dumpInstructions(std::vector&, const std::vector&) const; + void dumpInstructions(std::vector&, const std::vector >&) const; struct Loop; // Defined below. void createBranchToLoopHeaderFromInside(const Loop& loop); @@ -535,14 +538,15 @@ protected: AccessChain accessChain; // special blocks of instructions for output - std::vector imports; - std::vector entryPoints; - std::vector executionModes; - std::vector names; - std::vector lines; - std::vector decorations; - std::vector constantsTypesGlobals; - std::vector externals; + std::vector > imports; + std::vector > entryPoints; + std::vector > executionModes; + std::vector > names; + std::vector > lines; + std::vector > decorations; + std::vector > constantsTypesGlobals; + std::vector > externals; + std::vector > functions; // not output, internally used for quick & dirty canonical (unique) creation std::vector groupedConstants[OpConstant]; // all types appear before OpConstant diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 92911854..e763dbb9 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -54,6 +54,7 @@ #include #include +#include #include namespace spv { @@ -155,15 +156,14 @@ public: Block(Id id, Function& parent); virtual ~Block() { - // TODO: free instructions } Id getId() { return instructions.front()->getResultId(); } Function& getParent() const { return parent; } - void addInstruction(Instruction* inst); + void addInstruction(std::unique_ptr inst); void addPredecessor(Block* pred) { predecessors.push_back(pred); } - void addLocalVariable(Instruction* inst) { localVariables.push_back(inst); } + void addLocalVariable(std::unique_ptr inst) { localVariables.push_back(std::move(inst)); } int getNumPredecessors() const { return (int)predecessors.size(); } void setUnreachable() { unreachable = true; } bool isUnreachable() const { return unreachable; } @@ -205,9 +205,9 @@ protected: // To enforce keeping parent and ownership in sync: friend Function; - std::vector instructions; + std::vector > instructions; std::vector predecessors; - std::vector localVariables; + std::vector > localVariables; Function& parent; // track whether this block is known to be uncreachable (not necessarily @@ -240,7 +240,7 @@ public: Module& getParent() const { return parent; } Block* getEntryBlock() const { return blocks.front(); } Block* getLastBlock() const { return blocks.back(); } - void addLocalVariable(Instruction* inst); + void addLocalVariable(std::unique_ptr inst); Id getReturnType() const { return functionInstruction.getTypeId(); } void dump(std::vector& out) const { @@ -341,22 +341,24 @@ __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParam } } -__inline void Function::addLocalVariable(Instruction* inst) +__inline void Function::addLocalVariable(std::unique_ptr inst) { - blocks[0]->addLocalVariable(inst); - parent.mapInstruction(inst); + Instruction* raw_instruction = inst.get(); + blocks[0]->addLocalVariable(std::move(inst)); + parent.mapInstruction(raw_instruction); } __inline Block::Block(Id id, Function& parent) : parent(parent), unreachable(false) { - instructions.push_back(new Instruction(id, NoType, OpLabel)); + instructions.push_back(std::unique_ptr(new Instruction(id, NoType, OpLabel))); } -__inline void Block::addInstruction(Instruction* inst) +__inline void Block::addInstruction(std::unique_ptr inst) { - instructions.push_back(inst); - if (inst->getResultId()) - parent.getParent().mapInstruction(inst); + Instruction* raw_instruction = inst.get(); + instructions.push_back(std::move(inst)); + if (raw_instruction->getResultId()) + parent.getParent().mapInstruction(raw_instruction); } }; // end spv namespace diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 59955fcf..ebd4439c 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -784,7 +784,9 @@ class TIntermAggregate : public TIntermOperator { public: TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { } TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { } - ~TIntermAggregate() { delete pragmaTable; } + // Since pragmaTable is allocated with the PoolAllocator, we + // only want to destroy it, not free the associated memory. + ~TIntermAggregate() { pragmaTable->~TPragmaTable(); } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } virtual void setOperator(TOperator o) { op = o; } diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 2e9fa85c..4d60dcd8 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -1613,7 +1613,13 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable) { assert(!pragmaTable); - pragmaTable = new TPragmaTable(); + + // We allocate this with the thread-pool allocator because the destructors + // for TIntermNode's are never called. When TIntermNodes are no longer + // needed, the pool allocator destroys all memory at once without + // destruction. + void* memory = GetThreadPoolAllocator().allocate(sizeof(TPragmaTable)); + pragmaTable = new(memory) TPragmaTable(); *pragmaTable = pTable; } From 28ad350b35faa3beb5da684c24886d00887ab86d Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 18 Jan 2016 11:10:40 -0700 Subject: [PATCH 17/84] Memory: remove a part of the last merge request that causes crashes in multi-threaded mode. --- glslang/Include/intermediate.h | 4 +--- glslang/MachineIndependent/Intermediate.cpp | 8 +------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 20d73232..cf701776 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -847,9 +847,7 @@ class TIntermAggregate : public TIntermOperator { public: TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { } TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { } - // Since pragmaTable is allocated with the PoolAllocator, we - // only want to destroy it, not free the associated memory. - ~TIntermAggregate() { pragmaTable->~TPragmaTable(); } + ~TIntermAggregate() { delete pragmaTable; } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } virtual void setOperator(TOperator o) { op = o; } diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 4d60dcd8..2e9fa85c 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -1613,13 +1613,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable) { assert(!pragmaTable); - - // We allocate this with the thread-pool allocator because the destructors - // for TIntermNode's are never called. When TIntermNodes are no longer - // needed, the pool allocator destroys all memory at once without - // destruction. - void* memory = GetThreadPoolAllocator().allocate(sizeof(TPragmaTable)); - pragmaTable = new(memory) TPragmaTable(); + pragmaTable = new TPragmaTable(); *pragmaTable = pTable; } From 5fe789b4afb8d1e8067e3a91001399572cbd4db3 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Sun, 17 Jan 2016 23:27:45 -0500 Subject: [PATCH 18/84] Add Block::successors. --- SPIRV/SpvBuilder.cpp | 2 +- SPIRV/spvIR.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 4d5ce419..29f48602 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -857,7 +857,7 @@ void Builder::leaveFunction() if (! block->isTerminated()) { // Whether we're in an unreachable (non-entry) block. - bool unreachable = function.getEntryBlock() != block && block->getNumPredecessors() == 0; + bool unreachable = function.getEntryBlock() != block && block->getPredecessors().empty(); if (unreachable) { // Given that this block is at the end of a function, it must be right after an diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index e763dbb9..38e51971 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -162,9 +162,10 @@ public: Function& getParent() const { return parent; } void addInstruction(std::unique_ptr inst); - void addPredecessor(Block* pred) { predecessors.push_back(pred); } + void addPredecessor(Block* pred) { predecessors.push_back(pred); pred->successors.push_back(this);} void addLocalVariable(std::unique_ptr inst) { localVariables.push_back(std::move(inst)); } - int getNumPredecessors() const { return (int)predecessors.size(); } + const std::vector getPredecessors() const { return predecessors; } + const std::vector getSuccessors() const { return successors; } void setUnreachable() { unreachable = true; } bool isUnreachable() const { return unreachable; } @@ -206,7 +207,7 @@ protected: friend Function; std::vector > instructions; - std::vector predecessors; + std::vector predecessors, successors; std::vector > localVariables; Function& parent; From 454796e008b1c541734eda997a1afc9d6da257bd Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 18 Jan 2016 16:18:01 -0500 Subject: [PATCH 19/84] Call addPredecessor() on OpSwitch blocks. --- SPIRV/SpvBuilder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 29f48602..5536a55a 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1759,10 +1759,13 @@ void Builder::makeSwitch(Id selector, int numSegments, std::vector& caseVal // make the switch instruction Instruction* switchInst = new Instruction(NoResult, NoType, OpSwitch); switchInst->addIdOperand(selector); - switchInst->addIdOperand(defaultSegment >= 0 ? segmentBlocks[defaultSegment]->getId() : mergeBlock->getId()); + auto defaultOrMerge = (defaultSegment >= 0) ? segmentBlocks[defaultSegment] : mergeBlock; + switchInst->addIdOperand(defaultOrMerge->getId()); + defaultOrMerge->addPredecessor(buildPoint); for (int i = 0; i < (int)caseValues.size(); ++i) { switchInst->addImmediateOperand(caseValues[i]); switchInst->addIdOperand(segmentBlocks[valueIndexToSegment[i]]->getId()); + segmentBlocks[valueIndexToSegment[i]]->addPredecessor(buildPoint); } buildPoint->addInstruction(std::unique_ptr(switchInst)); From 44bfb0d0cd3417f9d2494d9055d89b45cbf30ff8 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 18 Jan 2016 16:18:37 -0500 Subject: [PATCH 20/84] Implement inReadableOrder(). --- SPIRV/CMakeLists.txt | 1 + SPIRV/InReadableOrder.cpp | 64 +++++++++++++++++++++++++++++++++++++++ SPIRV/spvIR.h | 28 ++++++++++++++--- 3 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 SPIRV/InReadableOrder.cpp diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index 945350e7..50cda686 100755 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8) set(SOURCES GlslangToSpv.cpp + InReadableOrder.cpp SpvBuilder.cpp SPVRemapper.cpp doc.cpp diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp new file mode 100644 index 00000000..f0812126 --- /dev/null +++ b/SPIRV/InReadableOrder.cpp @@ -0,0 +1,64 @@ +// The SPIR-V spec requires code blocks to appear in an order satisfying the +// dominator-tree direction (ie, dominator before the dominated). This is, +// actually, easy to achieve: any pre-order CFG traversal algorithm will do it. +// Because such algorithms visit a block only after traversing some path to it +// from the root, they necessarily visit the block's idom first. +// +// But not every graph-traversal algorithm outputs blocks in an order that +// appears logical to human readers. The problem is that unrelated branches may +// be interspersed with each other, and merge blocks may come before some of the +// branches being merged. +// +// A good, human-readable order of blocks may be achieved by performing +// depth-first search but delaying merge nodes until after all their branches +// have been visited. This is implemented below by the inReadableOrder() +// function. + +#include "spvIR.h" + +#include +#include +#include +#include + +using spv::Block; +using spv::Id; +using BlockSet = std::unordered_set; +using IdToBool = std::unordered_map; + +namespace { +// True if any of prerequisites have not yet been visited. +bool delay(const BlockSet& prereqs, const IdToBool& visited) { + return std::any_of(prereqs.begin(), prereqs.end(), + [&visited](Id b) { return !visited.count(b); }); +} +} + +void spv::inReadableOrder(Block* root, std::function callback) { + // Prerequisites for a merge block; must be completed prior to visiting the + // merge block. + std::unordered_map prereqs; + IdToBool visited; // Whether a block has already been visited. + std::deque worklist; // DFS worklist + worklist.push_back(root); + while (!worklist.empty()) { + Block* current = worklist.front(); + worklist.pop_front(); + // Nodes may be pushed repeadetly (before they're first visited) if they + // have multiple predecessors. Skip the already-visited ones. + if (visited[current->getId()]) continue; + callback(current); + visited[current->getId()] = true; + if (auto merge = current->getMergeInstruction()) { + auto& mergePrereqs = prereqs[merge->getIdOperand(0)]; + // Delay visiting merge blocks until all branches are visited. + for (const auto succ : current->getSuccessors()) + mergePrereqs.insert(succ->getId()); + } + for (auto succ : current->getSuccessors()) { + if (!visited[succ->getId()] && !delay(prereqs[succ->getId()], visited)) { + worklist.push_back(succ); + } + } + } +} diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 38e51971..a854384f 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -52,10 +52,11 @@ #include "spirv.hpp" -#include +#include +#include #include #include -#include +#include namespace spv { @@ -157,7 +158,7 @@ public: virtual ~Block() { } - + Id getId() { return instructions.front()->getResultId(); } Function& getParent() const { return parent; } @@ -168,6 +169,19 @@ public: const std::vector getSuccessors() const { return successors; } void setUnreachable() { unreachable = true; } bool isUnreachable() const { return unreachable; } + // Returns the block's merge instruction, if one exists (otherwise null). + const Instruction* getMergeInstruction() const { + if (instructions.size() < 2) return nullptr; + const Instruction* nextToLast = *(instructions.cend() - 2); + switch (nextToLast->getOpCode()) { + case OpSelectionMerge: + case OpLoopMerge: + return nextToLast; + default: + return nullptr; + } + return nullptr; + } bool isTerminated() const { @@ -217,6 +231,11 @@ protected: bool unreachable; }; +// Traverses the control-flow graph rooted at root in an order suited for +// readable code generation. Invokes callback at every node in the traversal +// order. +void inReadableOrder(Block* root, std::function callback); + // // SPIR-V IR Function. // @@ -253,8 +272,7 @@ public: parameterInstructions[p]->dump(out); // Blocks - for (int b = 0; b < (int)blocks.size(); ++b) - blocks[b]->dump(out); + inReadableOrder(blocks[0], [&out](const Block* b) { b->dump(out); }); Instruction end(0, 0, OpFunctionEnd); end.dump(out); } From baa55a15916cc0a58d981f053c3604766173451e Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 18 Jan 2016 17:12:59 -0500 Subject: [PATCH 21/84] Add spv.branch-return.vert and fix inReadableOrder(). --- SPIRV/InReadableOrder.cpp | 7 ++- Test/baseResults/spv.branch-return.vert.out | 63 +++++++++++++++++++++ Test/spv.branch-return.vert | 10 ++++ Test/test-spirv-list | 1 + 4 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 Test/baseResults/spv.branch-return.vert.out create mode 100644 Test/spv.branch-return.vert diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index f0812126..f88e41a8 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -27,10 +27,11 @@ using BlockSet = std::unordered_set; using IdToBool = std::unordered_map; namespace { -// True if any of prerequisites have not yet been visited. -bool delay(const BlockSet& prereqs, const IdToBool& visited) { +// True if any of prerequisites have not yet been visited. May add new, +// zero-initialized, values to visited, but doesn't modify any existing values. +bool delay(const BlockSet& prereqs, IdToBool& visited) { return std::any_of(prereqs.begin(), prereqs.end(), - [&visited](Id b) { return !visited.count(b); }); + [&visited](Id b) { return !visited[b]; }); } } diff --git a/Test/baseResults/spv.branch-return.vert.out b/Test/baseResults/spv.branch-return.vert.out new file mode 100644 index 00000000..75ebefe1 --- /dev/null +++ b/Test/baseResults/spv.branch-return.vert.out @@ -0,0 +1,63 @@ +spv.branch-return.vert + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 35 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 8 19 34 + Source ESSL 300 + Name 4 "main" + Name 8 "gl_InstanceID" + Name 19 "gl_Position" + Name 34 "gl_VertexID" + Decorate 8(gl_InstanceID) BuiltIn InstanceId + Decorate 19(gl_Position) BuiltIn Position + Decorate 34(gl_VertexID) BuiltIn VertexId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Input 6(int) +8(gl_InstanceID): 7(ptr) Variable Input + 16: TypeFloat 32 + 17: TypeVector 16(float) 4 + 18: TypePointer Output 17(fvec4) + 19(gl_Position): 18(ptr) Variable Output + 20: 16(float) Constant 0 + 21: 17(fvec4) ConstantComposite 20 20 20 20 + 26: 16(float) Constant 1039918957 + 27: TypeInt 32 0 + 28: 27(int) Constant 0 + 29: TypePointer Output 16(float) + 34(gl_VertexID): 7(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 9: 6(int) Load 8(gl_InstanceID) + SelectionMerge 14 None + Switch 9 14 + case 0: 10 + case 1: 11 + case 2: 12 + case 3: 13 + 10: Label + Return + 11: Label + Store 19(gl_Position) 21 + Branch 14 + 12: Label + Return + 13: Label + Return + 14: Label + 30: 29(ptr) AccessChain 19(gl_Position) 28 + 31: 16(float) Load 30 + 32: 16(float) FAdd 31 26 + 33: 29(ptr) AccessChain 19(gl_Position) 28 + Store 33 32 + Return + FunctionEnd diff --git a/Test/spv.branch-return.vert b/Test/spv.branch-return.vert new file mode 100644 index 00000000..0b5897bf --- /dev/null +++ b/Test/spv.branch-return.vert @@ -0,0 +1,10 @@ +#version 300 es +void main() { + switch (gl_InstanceID) { + case 0: return; + case 1: gl_Position = vec4(0.0); break; + case 2: return; + case 3: return; + } + gl_Position.x += 0.123; +} diff --git a/Test/test-spirv-list b/Test/test-spirv-list index af962627..13ff7c0a 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -32,6 +32,7 @@ spv.always-discard.frag spv.always-discard2.frag spv.bitCast.frag spv.bool.vert +spv.branch-return.vert spv.conditionalDiscard.frag spv.conversion.frag spv.dataOut.frag From 9c591487adfce2b92a92b4a682a11de6560e3b6a Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 18 Jan 2016 17:33:25 -0500 Subject: [PATCH 22/84] Fix spv.branch-return.vert. --- SPIRV/InReadableOrder.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index f88e41a8..b24d3ef2 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -39,7 +39,7 @@ void spv::inReadableOrder(Block* root, std::function callback) { // Prerequisites for a merge block; must be completed prior to visiting the // merge block. std::unordered_map prereqs; - IdToBool visited; // Whether a block has already been visited. + IdToBool visited; // Whether a block has already been visited. std::deque worklist; // DFS worklist worklist.push_back(root); while (!worklist.empty()) { @@ -48,18 +48,22 @@ void spv::inReadableOrder(Block* root, std::function callback) { // Nodes may be pushed repeadetly (before they're first visited) if they // have multiple predecessors. Skip the already-visited ones. if (visited[current->getId()]) continue; + if (delay(prereqs[current->getId()], visited)) { + // Not every prerequisite has been visited -- push it off for later. + worklist.push_back(current); + continue; + } callback(current); visited[current->getId()] = true; if (auto merge = current->getMergeInstruction()) { - auto& mergePrereqs = prereqs[merge->getIdOperand(0)]; + Id mergeId = merge->getIdOperand(0); + auto& mergePrereqs = prereqs[mergeId]; // Delay visiting merge blocks until all branches are visited. for (const auto succ : current->getSuccessors()) - mergePrereqs.insert(succ->getId()); + if (succ->getId() != mergeId) mergePrereqs.insert(succ->getId()); } for (auto succ : current->getSuccessors()) { - if (!visited[succ->getId()] && !delay(prereqs[succ->getId()], visited)) { - worklist.push_back(succ); - } + if (!visited[succ->getId()]) worklist.push_back(succ); } } } From 38d039d0637a20c01f55645c3961a564d9f29e3f Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 10:01:27 -0500 Subject: [PATCH 23/84] Rework inReadableOrder() as a recursive descent. Add a test for unreachable merge block. Update test results with the new order: mainly delaying merge blocks and removing unreachable ones. --- SPIRV/InReadableOrder.cpp | 77 +++++++++---------- SPIRV/spvIR.h | 13 +++- Test/baseResults/spv.always-discard.frag.out | 19 ----- .../spv.do-while-continue-break.vert.out | 6 -- .../spv.for-continue-break.vert.out | 6 -- .../spv.merge-unreachable.frag.out | 47 +++++++++++ Test/baseResults/spv.switch.frag.out | 56 +++++++------- .../spv.while-continue-break.vert.out | 6 -- Test/spv.merge-unreachable.frag | 7 ++ Test/test-spirv-list | 1 + 10 files changed, 131 insertions(+), 107 deletions(-) mode change 100755 => 100644 Test/baseResults/spv.always-discard.frag.out mode change 100755 => 100644 Test/baseResults/spv.do-while-continue-break.vert.out mode change 100755 => 100644 Test/baseResults/spv.for-continue-break.vert.out create mode 100644 Test/baseResults/spv.merge-unreachable.frag.out mode change 100755 => 100644 Test/baseResults/spv.while-continue-break.vert.out create mode 100644 Test/spv.merge-unreachable.frag diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index b24d3ef2..de506f41 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -17,53 +17,52 @@ #include "spvIR.h" #include +#include #include #include -#include using spv::Block; using spv::Id; -using BlockSet = std::unordered_set; -using IdToBool = std::unordered_map; namespace { -// True if any of prerequisites have not yet been visited. May add new, -// zero-initialized, values to visited, but doesn't modify any existing values. -bool delay(const BlockSet& prereqs, IdToBool& visited) { - return std::any_of(prereqs.begin(), prereqs.end(), - [&visited](Id b) { return !visited[b]; }); -} +// Traverses CFG in a readable order, invoking a pre-set callback on each block. +// Use by calling visit() on the root block. +class ReadableOrderTraverser { + public: + explicit ReadableOrderTraverser(std::function callback) + : callback_(callback) {} + + // Visits the block if it hasn't been visited already and isn't currently + // being delayed. Invokes callback(block), then descends into its successors. + // Delays merge-block processing until all the branches have been completed. + void visit(Block* block) { + assert(block); + if (visited_[block] || delayed_[block]) return; + callback_(block); + visited_[block] = true; + Block* mergeBlock = nullptr; + auto mergeInst = block->getMergeInstruction(); + if (mergeInst) { + Id mergeId = mergeInst->getIdOperand(0); + mergeBlock = + block->getParent().getParent().getInstruction(mergeId)->getBlock(); + delayed_[mergeBlock] = true; + } + for (const auto succ : block->getSuccessors()) + if (succ != mergeBlock) visit(succ); + if (mergeBlock) { + delayed_[mergeBlock] = false; + visit(mergeBlock); + } + } + + private: + std::function callback_; + // Whether a block has already been visited or is being delayed. + std::unordered_map visited_, delayed_; +}; } void spv::inReadableOrder(Block* root, std::function callback) { - // Prerequisites for a merge block; must be completed prior to visiting the - // merge block. - std::unordered_map prereqs; - IdToBool visited; // Whether a block has already been visited. - std::deque worklist; // DFS worklist - worklist.push_back(root); - while (!worklist.empty()) { - Block* current = worklist.front(); - worklist.pop_front(); - // Nodes may be pushed repeadetly (before they're first visited) if they - // have multiple predecessors. Skip the already-visited ones. - if (visited[current->getId()]) continue; - if (delay(prereqs[current->getId()], visited)) { - // Not every prerequisite has been visited -- push it off for later. - worklist.push_back(current); - continue; - } - callback(current); - visited[current->getId()] = true; - if (auto merge = current->getMergeInstruction()) { - Id mergeId = merge->getIdOperand(0); - auto& mergePrereqs = prereqs[mergeId]; - // Delay visiting merge blocks until all branches are visited. - for (const auto succ : current->getSuccessors()) - if (succ->getId() != mergeId) mergePrereqs.insert(succ->getId()); - } - for (auto succ : current->getSuccessors()) { - if (!visited[succ->getId()]) worklist.push_back(succ); - } - } + ReadableOrderTraverser(callback).visit(root); } diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index a854384f..307711bf 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -60,6 +60,7 @@ namespace spv { +class Block; class Function; class Module; @@ -108,6 +109,8 @@ public: addImmediateOperand(word); } } + void setBlock(Block* b) { block = b; } + Block* getBlock() { return block; } Op getOpCode() const { return opCode; } int getNumOperands() const { return (int)operands.size(); } Id getResultId() const { return resultId; } @@ -146,6 +149,7 @@ protected: Op opCode; std::vector operands; std::string originalString; // could be optimized away; convenience for getting string operand + Block* block; }; // @@ -165,8 +169,8 @@ public: void addInstruction(std::unique_ptr inst); void addPredecessor(Block* pred) { predecessors.push_back(pred); pred->successors.push_back(this);} void addLocalVariable(std::unique_ptr inst) { localVariables.push_back(std::move(inst)); } - const std::vector getPredecessors() const { return predecessors; } - const std::vector getSuccessors() const { return successors; } + const std::vector& getPredecessors() const { return predecessors; } + const std::vector& getSuccessors() const { return successors; } void setUnreachable() { unreachable = true; } bool isUnreachable() const { return unreachable; } // Returns the block's merge instruction, if one exists (otherwise null). @@ -370,12 +374,15 @@ __inline void Function::addLocalVariable(std::unique_ptr inst) __inline Block::Block(Id id, Function& parent) : parent(parent), unreachable(false) { instructions.push_back(std::unique_ptr(new Instruction(id, NoType, OpLabel))); + instructions.back()->setBlock(this); + parent.getParent().mapInstruction(instructions.back()); } __inline void Block::addInstruction(std::unique_ptr inst) { - Instruction* raw_instruction = inst.get(); + Instruction* raw_instruction = inst.get(); instructions.push_back(std::move(inst)); + raw_instruction->setBlock(this); if (raw_instruction->getResultId()) parent.getParent().mapInstruction(raw_instruction); } diff --git a/Test/baseResults/spv.always-discard.frag.out b/Test/baseResults/spv.always-discard.frag.out old mode 100755 new mode 100644 index a639515b..73e34bdc --- a/Test/baseResults/spv.always-discard.frag.out +++ b/Test/baseResults/spv.always-discard.frag.out @@ -110,23 +110,4 @@ Linked fragment stage: Branch 49 49: Label Kill - 69: Label - 70: 6(float) Load 36(radius) - 72: 46(bool) FOrdGreaterThanEqual 70 71 - SelectionMerge 74 None - BranchConditional 72 73 74 - 73: Label - 75: 6(float) Load 36(radius) - 77: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 75 76 - 78: 6(float) FDiv 77 27 - 79: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 78 - 80: 7(fvec4) Load 15(color) - 81: 7(fvec4) CompositeConstruct 79 79 79 79 - 82: 7(fvec4) FSub 80 81 - Store 15(color) 82 - Branch 74 - 74: Label - 83: 7(fvec4) Load 15(color) - Store 59(gl_FragColor) 83 - Return FunctionEnd diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out old mode 100755 new mode 100644 index c483861c..44a1730d --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -81,9 +81,6 @@ Linked vertex stage: 28: Label Store 30(B) 19 Branch 10 - 32: Label - Store 33(C) 26 - Branch 29 29: Label 34: 6(int) Load 8(i) 36: 14(bool) IEqual 34 35 @@ -92,9 +89,6 @@ Linked vertex stage: 37: Label Store 39(D) 40 Branch 11 - 41: Label - Store 42(E) 43 - Branch 38 38: Label Store 44(F) 45 Branch 10 diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out old mode 100755 new mode 100644 index 92976eb5..c759fc65 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -70,9 +70,6 @@ Linked vertex stage: 27: 6(int) IAdd 26 18 Store 8(i) 27 Branch 10 - 28: Label - Store 29(C) 18 - Branch 24 24: Label 30: 6(int) Load 8(i) 32: 6(int) SMod 30 31 @@ -82,9 +79,6 @@ Linked vertex stage: 34: Label Store 36(D) 18 Branch 11 - 37: Label - Store 38(E) 18 - Branch 35 35: Label Store 39(F) 40 41: 6(int) Load 8(i) diff --git a/Test/baseResults/spv.merge-unreachable.frag.out b/Test/baseResults/spv.merge-unreachable.frag.out new file mode 100644 index 00000000..65429768 --- /dev/null +++ b/Test/baseResults/spv.merge-unreachable.frag.out @@ -0,0 +1,47 @@ +spv.merge-unreachable.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 25 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 9 + ExecutionMode 4 OriginLowerLeft + Source GLSL 450 + Name 4 "main" + Name 9 "v" + Decorate 9(v) Location 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Input 7(fvec4) + 9(v): 8(ptr) Variable Input + 11: 6(float) Constant 1036831949 + 12: 6(float) Constant 1045220557 + 13: 6(float) Constant 1050253722 + 14: 6(float) Constant 1053609165 + 15: 7(fvec4) ConstantComposite 11 12 13 14 + 16: TypeBool + 17: TypeVector 16(bool) 4 + 4(main): 2 Function None 3 + 5: Label + 10: 7(fvec4) Load 9(v) + 18: 17(bvec4) FOrdEqual 10 15 + 19: 16(bool) All 18 + SelectionMerge 21 None + BranchConditional 19 20 23 + 20: Label + Kill + 23: Label + Return + 21: Label + Return + FunctionEnd diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index 0d430832..918c1d66 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -106,6 +106,11 @@ Linked fragment stage: Switch 65 68 case 1: 66 case 2: 67 + 68: Label + 80: 6(float) Load 73(x) + 81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80 + Store 71(f) 81 + Branch 69 66: Label 74: 6(float) Load 73(x) 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74 @@ -116,17 +121,19 @@ Linked fragment stage: 78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77 Store 71(f) 78 Branch 69 - 68: Label - 80: 6(float) Load 73(x) - 81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80 - Store 71(f) 81 - Branch 69 69: Label 83: 9(int) Load 60(c) SelectionMerge 87 None Switch 83 86 case 1: 84 case 2: 85 + 86: Label + 97: 6(float) Load 73(x) + 98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97 + 99: 6(float) Load 71(f) + 100: 6(float) FAdd 99 98 + Store 71(f) 100 + Branch 87 84: Label 88: 6(float) Load 73(x) 89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88 @@ -141,13 +148,6 @@ Linked fragment stage: 95: 6(float) FAdd 94 93 Store 71(f) 95 Branch 87 - 86: Label - 97: 6(float) Load 73(x) - 98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97 - 99: 6(float) Load 71(f) - 100: 6(float) FAdd 99 98 - Store 71(f) 100 - Branch 87 87: Label 102: 9(int) Load 60(c) SelectionMerge 105 None @@ -174,6 +174,13 @@ Linked fragment stage: Switch 117 120 case 1: 118 case 2: 119 + 120: Label + 148: 6(float) Load 73(x) + 149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148 + 150: 6(float) Load 71(f) + 151: 6(float) FAdd 150 149 + Store 71(f) 151 + Branch 121 118: Label 122: 6(float) Load 73(x) 123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122 @@ -207,13 +214,6 @@ Linked fragment stage: Branch 131 131: Label Branch 121 - 120: Label - 148: 6(float) Load 73(x) - 149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148 - 150: 6(float) Load 71(f) - 151: 6(float) FAdd 150 149 - Store 71(f) 151 - Branch 121 121: Label Store 153(i) 154 Branch 155 @@ -228,6 +228,13 @@ Linked fragment stage: Switch 162 165 case 1: 163 case 2: 164 + 165: Label + 196: 6(float) Load 73(x) + 197: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 196 + 198: 6(float) Load 71(f) + 199: 6(float) FAdd 198 197 + Store 71(f) 199 + Branch 166 163: Label 167: 6(float) Load 73(x) 168: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 167 @@ -265,13 +272,6 @@ Linked fragment stage: 193: 6(float) FAdd 192 191 Store 71(f) 193 Branch 166 - 165: Label - 196: 6(float) Load 73(x) - 197: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 196 - 198: 6(float) Load 71(f) - 199: 6(float) FAdd 198 197 - Store 71(f) 199 - Branch 166 166: Label 201: 6(float) Load 71(f) 203: 160(bool) FOrdLessThan 201 202 @@ -331,10 +331,10 @@ Linked fragment stage: SelectionMerge 254 None Switch 251 253 case 0: 252 - 252: Label - Branch 254 253: Label Branch 254 + 252: Label + Branch 254 254: Label 258: 9(int) Load 60(c) SelectionMerge 260 None diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out old mode 100755 new mode 100644 index 5d6094f5..b2ccbaaa --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -60,9 +60,6 @@ Linked vertex stage: 23: Label Store 25(B) 20 Branch 10 - 26: Label - Store 27(C) 20 - Branch 24 24: Label 28: 6(int) Load 8(i) 30: 6(int) SMod 28 29 @@ -72,9 +69,6 @@ Linked vertex stage: 32: Label Store 25(B) 20 Branch 11 - 34: Label - Store 27(C) 20 - Branch 33 33: Label 35: 6(int) Load 8(i) 36: 6(int) IAdd 35 18 diff --git a/Test/spv.merge-unreachable.frag b/Test/spv.merge-unreachable.frag new file mode 100644 index 00000000..12f57cd1 --- /dev/null +++ b/Test/spv.merge-unreachable.frag @@ -0,0 +1,7 @@ +#version 450 +layout(location=1) in highp vec4 v; +void main (void) +{ + if (v == vec4(0.1,0.2,0.3,0.4)) discard; + else return; +} diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 13ff7c0a..d0661245 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -57,6 +57,7 @@ spv.loopsArtificial.frag spv.matFun.vert spv.matrix.frag spv.matrix2.frag +spv.merge-unreachable.frag spv.newTexture.frag spv.nonSquare.vert spv.Operations.frag From 377f0cab2613de3f9c67cd881db7170b63eb862d Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 10:17:33 -0500 Subject: [PATCH 24/84] Fix merge issues. --- SPIRV/spvIR.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 307711bf..91e42aa3 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -176,7 +176,7 @@ public: // Returns the block's merge instruction, if one exists (otherwise null). const Instruction* getMergeInstruction() const { if (instructions.size() < 2) return nullptr; - const Instruction* nextToLast = *(instructions.cend() - 2); + const Instruction* nextToLast = (instructions.cend() - 2)->get(); switch (nextToLast->getOpCode()) { case OpSelectionMerge: case OpLoopMerge: @@ -375,7 +375,7 @@ __inline Block::Block(Id id, Function& parent) : parent(parent), unreachable(fal { instructions.push_back(std::unique_ptr(new Instruction(id, NoType, OpLabel))); instructions.back()->setBlock(this); - parent.getParent().mapInstruction(instructions.back()); + parent.getParent().mapInstruction(instructions.back().get()); } __inline void Block::addInstruction(std::unique_ptr inst) From fa242904b04edd7f0c21cc005b0a25fe8c48784f Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 11:31:55 -0500 Subject: [PATCH 25/84] Make Instruction::getBlock() const. --- SPIRV/spvIR.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 91e42aa3..688068da 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -110,7 +110,7 @@ public: } } void setBlock(Block* b) { block = b; } - Block* getBlock() { return block; } + Block* getBlock() const { return block; } Op getOpCode() const { return opCode; } int getNumOperands() const { return (int)operands.size(); } Id getResultId() const { return resultId; } From 57bbde4a99b17865498e915d2eb29190def6f4b7 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 11:44:53 -0500 Subject: [PATCH 26/84] Add copyright, remove unused #includes. --- SPIRV/InReadableOrder.cpp | 40 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index de506f41..a87622a8 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -1,3 +1,41 @@ +// +//Copyright (C) 2016 LunarG, Inc. +// +//All rights reserved. +// +//Redistribution and use in source and binary forms, with or without +//modification, are permitted provided that the following conditions +//are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +//POSSIBILITY OF SUCH DAMAGE. + +// +// Author: Dejan Mircevski, Google +// + // The SPIR-V spec requires code blocks to appear in an order satisfying the // dominator-tree direction (ie, dominator before the dominated). This is, // actually, easy to achieve: any pre-order CFG traversal algorithm will do it. @@ -16,9 +54,7 @@ #include "spvIR.h" -#include #include -#include #include using spv::Block; From a7e734962ec9d27aeb56a8db8109454f3a78475a Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 11:49:37 -0500 Subject: [PATCH 27/84] Remove a redundant check before visit(succ). --- SPIRV/InReadableOrder.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index a87622a8..36594530 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -84,8 +84,7 @@ class ReadableOrderTraverser { block->getParent().getParent().getInstruction(mergeId)->getBlock(); delayed_[mergeBlock] = true; } - for (const auto succ : block->getSuccessors()) - if (succ != mergeBlock) visit(succ); + for (const auto succ : block->getSuccessors()) visit(succ); if (mergeBlock) { delayed_[mergeBlock] = false; visit(mergeBlock); From 34bc6c389690df7937dfeb9cad7d473775ecb1fd Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 14:08:32 -0500 Subject: [PATCH 28/84] Explicitly initialize Instruction::block. --- SPIRV/spvIR.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 688068da..ea8548e3 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -77,8 +77,8 @@ const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)0x3FF; class Instruction { public: - Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode) { } - explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode) { } + Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), block(nullptr) { } + explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { } virtual ~Instruction() {} void addIdOperand(Id id) { operands.push_back(id); } void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); } From cce6a8acaf61d3de38e0f5b0934b577e7648cc57 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 14:50:12 -0500 Subject: [PATCH 29/84] (C) Google --- SPIRV/InReadableOrder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index 36594530..6299b4ef 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -1,5 +1,5 @@ // -//Copyright (C) 2016 LunarG, Inc. +//Copyright (C) 2016 Google, Inc. // //All rights reserved. // From 159b59faa717d85b90b94aa4315306972c026f8f Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 14:52:31 -0500 Subject: [PATCH 30/84] Reformat to better match existing style. --- SPIRV/InReadableOrder.cpp | 63 ++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index 6299b4ef..4eb56d64 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -64,40 +64,41 @@ namespace { // Traverses CFG in a readable order, invoking a pre-set callback on each block. // Use by calling visit() on the root block. class ReadableOrderTraverser { - public: - explicit ReadableOrderTraverser(std::function callback) - : callback_(callback) {} - - // Visits the block if it hasn't been visited already and isn't currently - // being delayed. Invokes callback(block), then descends into its successors. - // Delays merge-block processing until all the branches have been completed. - void visit(Block* block) { - assert(block); - if (visited_[block] || delayed_[block]) return; - callback_(block); - visited_[block] = true; - Block* mergeBlock = nullptr; - auto mergeInst = block->getMergeInstruction(); - if (mergeInst) { - Id mergeId = mergeInst->getIdOperand(0); - mergeBlock = - block->getParent().getParent().getInstruction(mergeId)->getBlock(); - delayed_[mergeBlock] = true; +public: + explicit ReadableOrderTraverser(std::function callback) : callback_(callback) {} + // Visits the block if it hasn't been visited already and isn't currently + // being delayed. Invokes callback(block), then descends into its successors. + // Delays merge-block processing until all the branches have been completed. + void visit(Block* block) + { + assert(block); + if (visited_[block] || delayed_[block]) + return; + callback_(block); + visited_[block] = true; + Block* mergeBlock = nullptr; + auto mergeInst = block->getMergeInstruction(); + if (mergeInst) { + Id mergeId = mergeInst->getIdOperand(0); + mergeBlock = block->getParent().getParent().getInstruction(mergeId)->getBlock(); + delayed_[mergeBlock] = true; + } + for (const auto succ : block->getSuccessors()) + visit(succ); + if (mergeBlock) { + delayed_[mergeBlock] = false; + visit(mergeBlock); + } } - for (const auto succ : block->getSuccessors()) visit(succ); - if (mergeBlock) { - delayed_[mergeBlock] = false; - visit(mergeBlock); - } - } - private: - std::function callback_; - // Whether a block has already been visited or is being delayed. - std::unordered_map visited_, delayed_; +private: + std::function callback_; + // Whether a block has already been visited or is being delayed. + std::unordered_map visited_, delayed_; }; } -void spv::inReadableOrder(Block* root, std::function callback) { - ReadableOrderTraverser(callback).visit(root); +void spv::inReadableOrder(Block* root, std::function callback) +{ + ReadableOrderTraverser(callback).visit(root); } From f3c63cc35923b06c7a5c5e4be3fa0c728ab5f5e7 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 16:56:45 -0500 Subject: [PATCH 31/84] Move continue-block to after all branches. --- SPIRV/InReadableOrder.cpp | 16 +++++++-- .../spv.do-while-continue-break.vert.out | 12 +++---- .../spv.for-continue-break.vert.out | 10 +++--- Test/baseResults/spv.loops.frag.out | 36 ++++++++++--------- Test/baseResults/spv.loopsArtificial.frag.out | 16 ++++----- .../spv.while-continue-break.vert.out | 4 +-- 6 files changed, 54 insertions(+), 40 deletions(-) diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index 4eb56d64..9180dc8c 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -67,8 +67,9 @@ class ReadableOrderTraverser { public: explicit ReadableOrderTraverser(std::function callback) : callback_(callback) {} // Visits the block if it hasn't been visited already and isn't currently - // being delayed. Invokes callback(block), then descends into its successors. - // Delays merge-block processing until all the branches have been completed. + // being delayed. Invokes callback(block), then descends into its + // successors. Delays merge-block and continue-block processing until all + // the branches have been completed. void visit(Block* block) { assert(block); @@ -77,14 +78,25 @@ public: callback_(block); visited_[block] = true; Block* mergeBlock = nullptr; + Block* continueBlock = nullptr; auto mergeInst = block->getMergeInstruction(); if (mergeInst) { Id mergeId = mergeInst->getIdOperand(0); mergeBlock = block->getParent().getParent().getInstruction(mergeId)->getBlock(); delayed_[mergeBlock] = true; + if (mergeInst->getOpCode() == spv::OpLoopMerge) { + Id continueId = mergeInst->getIdOperand(1); + continueBlock = + block->getParent().getParent().getInstruction(continueId)->getBlock(); + delayed_[continueBlock] = true; + } } for (const auto succ : block->getSuccessors()) visit(succ); + if (continueBlock) { + delayed_[continueBlock] = false; + visit(continueBlock); + } if (mergeBlock) { delayed_[mergeBlock] = false; visit(mergeBlock); diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index 1b5ff62b..c8f0b2f9 100644 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -66,12 +66,6 @@ Linked vertex stage: 19: Label Store 21(B) 22 Branch 13 - 13: Label - 37: 6(int) Load 8(i) - 38: 6(int) IAdd 37 22 - Store 8(i) 38 - 40: 17(bool) SLessThan 38 39 - BranchConditional 40 10 12 20: Label 25: 6(int) Load 8(i) 27: 17(bool) IEqual 25 26 @@ -83,6 +77,12 @@ Linked vertex stage: 29: Label Store 35(F) 36 Branch 13 + 13: Label + 37: 6(int) Load 8(i) + 38: 6(int) IAdd 37 22 + Store 8(i) 38 + 40: 17(bool) SLessThan 38 39 + BranchConditional 40 10 12 12: Label Store 41(G) 42 Return diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index 6aaf82a3..33c61386 100644 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -67,11 +67,6 @@ Linked vertex stage: 24: Label Store 26(B) 19 Branch 13 - 13: Label - 40: 6(int) Load 8(i) - 41: 6(int) IAdd 40 19 - Store 8(i) 41 - Branch 10 25: Label 29: 6(int) Load 8(i) 31: 6(int) SMod 29 30 @@ -84,6 +79,11 @@ Linked vertex stage: 34: Label Store 38(F) 39 Branch 13 + 13: Label + 40: 6(int) Load 8(i) + 41: 6(int) IAdd 40 19 + Store 8(i) 41 + Branch 10 12: Label Store 42(G) 43 Return diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index a4556933..98d2878b 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -197,6 +197,8 @@ Linked fragment stage: 43: 7(fvec4) FAdd 42 28 Store 9(color) 43 Branch 15 + 16: Label + Branch 13 15: Label Branch 45 45: Label @@ -236,14 +238,14 @@ Linked fragment stage: BranchConditional 77 78 79 78: Label Branch 63 - 63: Label - Branch 60 79: Label 81: 7(fvec4) Load 69(bigColor1_1) 82: 7(fvec4) Load 9(color) 83: 7(fvec4) FAdd 82 81 Store 9(color) 83 Branch 63 + 63: Label + Branch 60 62: Label Branch 84 84: Label @@ -482,17 +484,17 @@ Linked fragment stage: BranchConditional 260 261 262 261: Label Branch 249 - 249: Label - 267: 141(int) Load 245(i) - 268: 141(int) IAdd 267 159 - Store 245(i) 268 - Branch 246 262: Label 264: 21(ptr) AccessChain 9(color) 73 265: 6(float) Load 264 266: 6(float) FAdd 265 93 Store 264 266 Branch 249 + 249: Label + 267: 141(int) Load 245(i) + 268: 141(int) IAdd 267 159 + Store 245(i) 268 + Branch 246 248: Label Store 269(i) 144 Branch 270 @@ -545,12 +547,6 @@ Linked fragment stage: BranchConditional 304 305 306 305: Label Branch 296 - 296: Label - 325: 21(ptr) AccessChain 9(color) 64 - 326: 6(float) Load 325 - 327: 6(float) Load 132(d4) - 328: 17(bool) FOrdLessThan 326 327 - BranchConditional 328 293 295 306: Label 308: 21(ptr) AccessChain 9(color) 107 309: 6(float) Load 308 @@ -576,6 +572,12 @@ Linked fragment stage: Branch 313 313: Label Branch 296 + 296: Label + 325: 21(ptr) AccessChain 9(color) 64 + 326: 6(float) Load 325 + 327: 6(float) Load 132(d4) + 328: 17(bool) FOrdLessThan 326 327 + BranchConditional 328 293 295 295: Label Branch 329 329: Label @@ -891,14 +893,14 @@ Linked fragment stage: Branch 549 549: Label Branch 524 - 524: Label - Branch 521 539: Label 558: 7(fvec4) Load 9(color) 559: 7(fvec4) CompositeConstruct 93 93 93 93 560: 7(fvec4) FAdd 558 559 Store 9(color) 560 Branch 523 + 524: Label + Branch 521 523: Label Branch 562 562: Label @@ -927,8 +929,6 @@ Linked fragment stage: BranchConditional 583 584 585 584: Label Branch 565 - 565: Label - Branch 562 585: Label Branch 579 579: Label @@ -940,6 +940,8 @@ Linked fragment stage: 592: 21(ptr) AccessChain 9(color) 107 Store 592 591 Branch 565 + 565: Label + Branch 562 564: Label 593: 7(fvec4) Load 9(color) 594: 7(fvec4) CompositeConstruct 93 93 93 93 diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index dd700ca0..e1bf0859 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -171,12 +171,6 @@ Linked fragment stage: 49: 6(float) FAdd 47 48 Store 46 49 Branch 16 - 16: Label - 69: 24(ptr) AccessChain 9(color) 35 - 70: 6(float) Load 69 - 71: 6(float) Load 28(d4) - 72: 30(bool) FOrdLessThan 70 71 - BranchConditional 72 13 15 45: Label Branch 33 33: Label @@ -204,6 +198,12 @@ Linked fragment stage: Branch 57 57: Label Branch 16 + 16: Label + 69: 24(ptr) AccessChain 9(color) 35 + 70: 6(float) Load 69 + 71: 6(float) Load 28(d4) + 72: 30(bool) FOrdLessThan 70 71 + BranchConditional 72 13 15 15: Label Branch 73 73: Label @@ -261,8 +261,6 @@ Linked fragment stage: 117: 6(float) FAdd 116 48 Store 115 117 Branch 76 - 76: Label - Branch 73 114: Label Branch 104 104: Label @@ -290,6 +288,8 @@ Linked fragment stage: Branch 124 124: Label Branch 76 + 76: Label + Branch 73 75: Label 136: 7(fvec4) Load 9(color) 137: 7(fvec4) CompositeConstruct 48 48 48 48 diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index 3f13b7c8..aedd4371 100644 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -60,8 +60,6 @@ Linked vertex stage: 24: Label Store 26(B) 21 Branch 13 - 13: Label - Branch 10 25: Label 29: 6(int) Load 8(i) 31: 6(int) SMod 29 30 @@ -76,6 +74,8 @@ Linked vertex stage: 37: 6(int) IAdd 36 19 Store 8(i) 37 Branch 13 + 13: Label + Branch 10 12: Label Store 38(D) 39 Return From ed55bcd9f869d7017be1cb403abd4de5c6361b30 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Tue, 19 Jan 2016 21:13:38 -0500 Subject: [PATCH 32/84] Don't remove SPIR-V blocks before codegen. A removed block releases its instructions, so Module::idToInstruction suddenly contains dangling references. The original motivation for block removal was to skip some unreachable blocks, but that's already achieved by InReadableOrder.cpp. Also updated stale comments. --- SPIRV/GlslangToSpv.cpp | 17 +- SPIRV/SpvBuilder.cpp | 22 +- SPIRV/spvIR.h | 6 - Test/baseResults/spv.100ops.frag.out | 2 +- Test/baseResults/spv.140.frag.out | 100 +-- Test/baseResults/spv.AofA.frag.out | 184 +++--- Test/baseResults/spv.atomic.comp.out | 180 ++--- Test/baseResults/spv.bool.vert.out | 128 ++-- Test/baseResults/spv.for-notest.vert.out | 2 + Test/baseResults/spv.forwardFun.frag.out | 10 +- Test/baseResults/spv.functionCall.frag.out | 130 ++-- .../spv.functionSemantics.frag.out | 258 ++++---- Test/baseResults/spv.matFun.vert.out | 162 ++--- Test/baseResults/spv.precision.frag.out | 250 +++---- Test/baseResults/spv.shortCircuit.frag.out | 386 +++++------ .../spv.simpleFunctionCall.frag.out | 26 +- Test/baseResults/spv.switch.frag.out | 622 +++++++++--------- 17 files changed, 1233 insertions(+), 1252 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 9bee407c..71127c7e 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1412,9 +1412,11 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.createBranch(&blocks.head); } else { // Spec requires back edges to target header blocks, and every header - // block must dominate its merge block. Create an empty header block - // here to ensure these conditions are met even when body contains - // non-trivial control flow. + // block must dominate its merge block. Make a header block first to + // ensure these conditions are met. By definition, it will contain + // OpLoopMerge, followed by a block-ending branch. But we don't want to + // put any other body instructions in it, since the body may have + // arbitrary instructions, including merges of its own. builder.setBuildPoint(&blocks.head); builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); builder.createBranch(&blocks.body); @@ -1435,12 +1437,9 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); builder.createConditionalBranch(condition, &blocks.head, &blocks.merge); } else { - // TODO: unless there was a break instruction somewhere in the body, - // this is an infinite loop, so we should abort code generation with - // a warning. As it stands now, nothing will jump to the merge - // block, and it may be dropped as unreachable by the SPIR-V dumper. - // That, in turn, will result in a non-existing %ID in the LoopMerge - // above. + // TODO: unless there was a break/return/discard instruction + // somewhere in the body, this is an infinite loop, so we should + // issue a warning. builder.createBranch(&blocks.head); } } diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index af6de668..82e5f2c9 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -855,24 +855,10 @@ void Builder::leaveFunction() // If our function did not contain a return, add a return void now. if (! block->isTerminated()) { - - // Whether we're in an unreachable (non-entry) block. - bool unreachable = function.getEntryBlock() != block && block->getPredecessors().empty(); - - if (unreachable) { - // Given that this block is at the end of a function, it must be right after an - // explicit return, just remove it. - function.removeBlock(block); - } else { - // We'll add a return instruction at the end of the current block, - // which for a non-void function is really error recovery (?), as the source - // being translated should have had an explicit return, which would have been - // followed by an unreachable block, which was handled above. - if (function.getReturnType() == makeVoidType()) - makeReturn(true); - else { - makeReturn(true, createUndefined(function.getReturnType())); - } + if (function.getReturnType() == makeVoidType()) + makeReturn(true); + else { + makeReturn(true, createUndefined(function.getReturnType())); } } } diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 9c8db1fd..1501e6bb 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -205,12 +205,6 @@ public: void dump(std::vector& out) const { - // skip the degenerate unreachable blocks - // TODO: code gen: skip all unreachable blocks (transitive closure) - // (but, until that's done safer to keep non-degenerate unreachable blocks, in case others depend on something) - if (unreachable && instructions.size() <= 2) - return; - instructions[0]->dump(out); for (int i = 0; i < (int)localVariables.size(); ++i) localVariables[i]->dump(out); diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out index fa21783e..11391f6a 100755 --- a/Test/baseResults/spv.100ops.frag.out +++ b/Test/baseResults/spv.100ops.frag.out @@ -5,7 +5,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 47 +// Id's are bound by 48 Capability Shader 1: ExtInstImport "GLSL.std.450" diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index e54dda6c..01b2e472 100755 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -5,7 +5,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 100 +// Id's are bound by 101 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -23,40 +23,40 @@ Linked fragment stage: Name 43 "k" Name 55 "sampR" Name 63 "sampB" - Name 86 "samp2Da" - Name 91 "bn" - MemberName 91(bn) 0 "matra" - MemberName 91(bn) 1 "matca" - MemberName 91(bn) 2 "matr" - MemberName 91(bn) 3 "matc" - MemberName 91(bn) 4 "matrdef" - Name 93 "" - Name 96 "bi" - MemberName 96(bi) 0 "v" - Name 99 "bname" + Name 87 "samp2Da" + Name 92 "bn" + MemberName 92(bn) 0 "matra" + MemberName 92(bn) 1 "matca" + MemberName 92(bn) 2 "matr" + MemberName 92(bn) 3 "matc" + MemberName 92(bn) 4 "matrdef" + Name 94 "" + Name 97 "bi" + MemberName 97(bi) 0 "v" + Name 100 "bname" Decorate 16(gl_FrontFacing) BuiltIn FrontFacing Decorate 33(gl_ClipDistance) BuiltIn ClipDistance - Decorate 89 ArrayStride 64 Decorate 90 ArrayStride 64 - MemberDecorate 91(bn) 0 RowMajor - MemberDecorate 91(bn) 0 Offset 0 - MemberDecorate 91(bn) 0 MatrixStride 16 - MemberDecorate 91(bn) 1 ColMajor - MemberDecorate 91(bn) 1 Offset 256 - MemberDecorate 91(bn) 1 MatrixStride 16 - MemberDecorate 91(bn) 2 RowMajor - MemberDecorate 91(bn) 2 Offset 512 - MemberDecorate 91(bn) 2 MatrixStride 16 - MemberDecorate 91(bn) 3 ColMajor - MemberDecorate 91(bn) 3 Offset 576 - MemberDecorate 91(bn) 3 MatrixStride 16 - MemberDecorate 91(bn) 4 RowMajor - MemberDecorate 91(bn) 4 Offset 640 - MemberDecorate 91(bn) 4 MatrixStride 16 - Decorate 91(bn) Block - Decorate 95 ArrayStride 16 - MemberDecorate 96(bi) 0 Offset 0 - Decorate 96(bi) Block + Decorate 91 ArrayStride 64 + MemberDecorate 92(bn) 0 RowMajor + MemberDecorate 92(bn) 0 Offset 0 + MemberDecorate 92(bn) 0 MatrixStride 16 + MemberDecorate 92(bn) 1 ColMajor + MemberDecorate 92(bn) 1 Offset 256 + MemberDecorate 92(bn) 1 MatrixStride 16 + MemberDecorate 92(bn) 2 RowMajor + MemberDecorate 92(bn) 2 Offset 512 + MemberDecorate 92(bn) 2 MatrixStride 16 + MemberDecorate 92(bn) 3 ColMajor + MemberDecorate 92(bn) 3 Offset 576 + MemberDecorate 92(bn) 3 MatrixStride 16 + MemberDecorate 92(bn) 4 RowMajor + MemberDecorate 92(bn) 4 Offset 640 + MemberDecorate 92(bn) 4 MatrixStride 16 + Decorate 92(bn) Block + Decorate 96 ArrayStride 16 + MemberDecorate 97(bi) 0 Offset 0 + Decorate 97(bi) Block 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -100,24 +100,24 @@ Linked fragment stage: 69: TypeVector 6(float) 2 72: 6(float) Constant 1120403456 74: 29(int) Constant 3 - 82: TypeImage 6(float) 2D sampled format:Unknown - 83: TypeSampledImage 82 - 84: TypeArray 83 74 - 85: TypePointer UniformConstant 84 - 86(samp2Da): 85(ptr) Variable UniformConstant - 87: TypeMatrix 26(fvec4) 4 - 88: 29(int) Constant 4 - 89: TypeArray 87 88 - 90: TypeArray 87 88 - 91(bn): TypeStruct 89 90 87 87 87 - 92: TypePointer Uniform 91(bn) - 93: 92(ptr) Variable Uniform - 94: TypeVector 6(float) 3 - 95: TypeArray 94(fvec3) 50 - 96(bi): TypeStruct 95 - 97: TypeArray 96(bi) 88 - 98: TypePointer Uniform 97 - 99(bname): 98(ptr) Variable Uniform + 83: TypeImage 6(float) 2D sampled format:Unknown + 84: TypeSampledImage 83 + 85: TypeArray 84 74 + 86: TypePointer UniformConstant 85 + 87(samp2Da): 86(ptr) Variable UniformConstant + 88: TypeMatrix 26(fvec4) 4 + 89: 29(int) Constant 4 + 90: TypeArray 88 89 + 91: TypeArray 88 89 + 92(bn): TypeStruct 90 91 88 88 88 + 93: TypePointer Uniform 92(bn) + 94: 93(ptr) Variable Uniform + 95: TypeVector 6(float) 3 + 96: TypeArray 95(fvec3) 50 + 97(bi): TypeStruct 96 + 98: TypeArray 97(bi) 89 + 99: TypePointer Uniform 98 + 100(bname): 99(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label 13: 12(ptr) Variable Function diff --git a/Test/baseResults/spv.AofA.frag.out b/Test/baseResults/spv.AofA.frag.out index 822ad3d5..1e41c3b8 100644 --- a/Test/baseResults/spv.AofA.frag.out +++ b/Test/baseResults/spv.AofA.frag.out @@ -7,34 +7,34 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 103 +// Id's are bound by 104 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 38 43 77 + EntryPoint Fragment 4 "main" 39 44 78 ExecutionMode 4 OriginLowerLeft Source GLSL 430 Name 4 "main" Name 17 "foo(f1[5][7];" Name 16 "a" Name 20 "r" - Name 38 "outfloat" - Name 41 "g4" - Name 43 "g5" - Name 44 "param" - Name 47 "u" - Name 51 "param" - Name 65 "many" - Name 67 "i" - Name 69 "j" - Name 71 "k" - Name 77 "infloat" - Name 93 "uAofA" - MemberName 93(uAofA) 0 "f" - Name 97 "nameAofA" - Decorate 93(uAofA) GLSLShared - Decorate 93(uAofA) Block + Name 39 "outfloat" + Name 42 "g4" + Name 44 "g5" + Name 45 "param" + Name 48 "u" + Name 52 "param" + Name 66 "many" + Name 68 "i" + Name 70 "j" + Name 72 "k" + Name 78 "infloat" + Name 94 "uAofA" + MemberName 94(uAofA) 0 "f" + Name 98 "nameAofA" + Decorate 94(uAofA) GLSLShared + Decorate 94(uAofA) Block 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -53,82 +53,82 @@ Linked fragment stage: 25: 21(int) Constant 0 28: 21(int) Constant 1 32: 21(int) Constant 3 - 37: TypePointer Output 6(float) - 38(outfloat): 37(ptr) Variable Output - 39: 6(float) Constant 0 - 40: TypePointer Private 14 - 41(g4): 40(ptr) Variable Private - 42: TypePointer Input 11 - 43(g5): 42(ptr) Variable Input - 48: 6(float) Constant 1077936128 - 49: TypePointer Function 6(float) - 54: 7(int) Constant 6 - 55: TypeArray 6(float) 54 - 56: TypeArray 55 10 - 57: TypeArray 56 13 - 58: 7(int) Constant 3 - 59: TypeArray 57 58 - 60: 7(int) Constant 2 - 61: TypeArray 59 60 - 62: 7(int) Constant 1 - 63: TypeArray 61 62 - 64: TypePointer Private 63 - 65(many): 64(ptr) Variable Private - 66: TypePointer UniformConstant 21(int) - 67(i): 66(ptr) Variable UniformConstant - 69(j): 66(ptr) Variable UniformConstant - 71(k): 66(ptr) Variable UniformConstant - 76: TypePointer Input 6(float) - 77(infloat): 76(ptr) Variable Input - 79: TypePointer Private 6(float) - 91: TypeArray 6(float) 13 - 92: TypeArray 91 60 - 93(uAofA): TypeStruct 92 - 94: TypeArray 93(uAofA) 10 - 95: TypeArray 94 58 - 96: TypePointer Uniform 95 - 97(nameAofA): 96(ptr) Variable Uniform - 98: TypePointer Uniform 6(float) + 38: TypePointer Output 6(float) + 39(outfloat): 38(ptr) Variable Output + 40: 6(float) Constant 0 + 41: TypePointer Private 14 + 42(g4): 41(ptr) Variable Private + 43: TypePointer Input 11 + 44(g5): 43(ptr) Variable Input + 49: 6(float) Constant 1077936128 + 50: TypePointer Function 6(float) + 55: 7(int) Constant 6 + 56: TypeArray 6(float) 55 + 57: TypeArray 56 10 + 58: TypeArray 57 13 + 59: 7(int) Constant 3 + 60: TypeArray 58 59 + 61: 7(int) Constant 2 + 62: TypeArray 60 61 + 63: 7(int) Constant 1 + 64: TypeArray 62 63 + 65: TypePointer Private 64 + 66(many): 65(ptr) Variable Private + 67: TypePointer UniformConstant 21(int) + 68(i): 67(ptr) Variable UniformConstant + 70(j): 67(ptr) Variable UniformConstant + 72(k): 67(ptr) Variable UniformConstant + 77: TypePointer Input 6(float) + 78(infloat): 77(ptr) Variable Input + 80: TypePointer Private 6(float) + 92: TypeArray 6(float) 13 + 93: TypeArray 92 61 + 94(uAofA): TypeStruct 93 + 95: TypeArray 94(uAofA) 10 + 96: TypeArray 95 59 + 97: TypePointer Uniform 96 + 98(nameAofA): 97(ptr) Variable Uniform + 99: TypePointer Uniform 6(float) 4(main): 2 Function None 3 5: Label - 44(param): 12(ptr) Variable Function - 47(u): 12(ptr) Variable Function - 51(param): 12(ptr) Variable Function - Store 38(outfloat) 39 - 45: 11 Load 43(g5) - Store 44(param) 45 - 46: 14 FunctionCall 17(foo(f1[5][7];) 44(param) - Store 41(g4) 46 - 50: 49(ptr) AccessChain 47(u) 22 22 - Store 50 48 - 52: 11 Load 47(u) - Store 51(param) 52 - 53: 14 FunctionCall 17(foo(f1[5][7];) 51(param) - 68: 21(int) Load 67(i) - 70: 21(int) Load 69(j) - 72: 21(int) Load 71(k) - 73: 21(int) Load 67(i) - 74: 21(int) Load 69(j) - 75: 21(int) Load 71(k) - 78: 6(float) Load 77(infloat) - 80: 79(ptr) AccessChain 65(many) 68 70 72 73 74 75 - Store 80 78 - 81: 21(int) Load 69(j) - 82: 21(int) Load 69(j) - 83: 21(int) Load 69(j) - 84: 21(int) Load 69(j) - 85: 21(int) Load 69(j) - 86: 21(int) Load 69(j) - 87: 79(ptr) AccessChain 65(many) 81 82 83 84 85 86 - 88: 6(float) Load 87 - 89: 6(float) Load 38(outfloat) - 90: 6(float) FAdd 89 88 - Store 38(outfloat) 90 - 99: 98(ptr) AccessChain 97(nameAofA) 28 22 25 25 32 - 100: 6(float) Load 99 - 101: 6(float) Load 38(outfloat) - 102: 6(float) FAdd 101 100 - Store 38(outfloat) 102 + 45(param): 12(ptr) Variable Function + 48(u): 12(ptr) Variable Function + 52(param): 12(ptr) Variable Function + Store 39(outfloat) 40 + 46: 11 Load 44(g5) + Store 45(param) 46 + 47: 14 FunctionCall 17(foo(f1[5][7];) 45(param) + Store 42(g4) 47 + 51: 50(ptr) AccessChain 48(u) 22 22 + Store 51 49 + 53: 11 Load 48(u) + Store 52(param) 53 + 54: 14 FunctionCall 17(foo(f1[5][7];) 52(param) + 69: 21(int) Load 68(i) + 71: 21(int) Load 70(j) + 73: 21(int) Load 72(k) + 74: 21(int) Load 68(i) + 75: 21(int) Load 70(j) + 76: 21(int) Load 72(k) + 79: 6(float) Load 78(infloat) + 81: 80(ptr) AccessChain 66(many) 69 71 73 74 75 76 + Store 81 79 + 82: 21(int) Load 70(j) + 83: 21(int) Load 70(j) + 84: 21(int) Load 70(j) + 85: 21(int) Load 70(j) + 86: 21(int) Load 70(j) + 87: 21(int) Load 70(j) + 88: 80(ptr) AccessChain 66(many) 82 83 84 85 86 87 + 89: 6(float) Load 88 + 90: 6(float) Load 39(outfloat) + 91: 6(float) FAdd 90 89 + Store 39(outfloat) 91 + 100: 99(ptr) AccessChain 98(nameAofA) 28 22 25 25 32 + 101: 6(float) Load 100 + 102: 6(float) Load 39(outfloat) + 103: 6(float) FAdd 102 101 + Store 39(outfloat) 103 Return FunctionEnd 17(foo(f1[5][7];): 14 Function None 15 diff --git a/Test/baseResults/spv.atomic.comp.out b/Test/baseResults/spv.atomic.comp.out index 2ee4978f..bdf16fe5 100755 --- a/Test/baseResults/spv.atomic.comp.out +++ b/Test/baseResults/spv.atomic.comp.out @@ -8,7 +8,7 @@ Linked compute stage: TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class? // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 74 +// Id's are bound by 75 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -20,28 +20,28 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, Name 10 "func(au1;" Name 9 "c" Name 12 "atoms(" - Name 20 "counter" - Name 21 "param" - Name 24 "val" - Name 28 "countArr" - Name 35 "origi" - Name 37 "atomi" - Name 40 "origu" - Name 42 "atomu" - Name 44 "value" - Name 61 "dataSSB" - MemberName 61(dataSSB) 0 "f" - MemberName 61(dataSSB) 1 "n_frames_rendered" - Name 63 "result" - Name 71 "arrX" - Name 72 "arrY" - Name 73 "arrZ" - Decorate 20(counter) Binding 0 - Decorate 28(countArr) Binding 0 - MemberDecorate 61(dataSSB) 0 Offset 0 - MemberDecorate 61(dataSSB) 1 Offset 16 - Decorate 61(dataSSB) BufferBlock - Decorate 63(result) Binding 0 + Name 21 "counter" + Name 22 "param" + Name 25 "val" + Name 29 "countArr" + Name 36 "origi" + Name 38 "atomi" + Name 41 "origu" + Name 43 "atomu" + Name 45 "value" + Name 62 "dataSSB" + MemberName 62(dataSSB) 0 "f" + MemberName 62(dataSSB) 1 "n_frames_rendered" + Name 64 "result" + Name 72 "arrX" + Name 73 "arrY" + Name 74 "arrZ" + Decorate 21(counter) Binding 0 + Decorate 29(countArr) Binding 0 + MemberDecorate 62(dataSSB) 0 Offset 0 + MemberDecorate 62(dataSSB) 1 Offset 16 + Decorate 62(dataSSB) BufferBlock + Decorate 64(result) Binding 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -49,51 +49,51 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, 8: TypeFunction 6(int) 7(ptr) 14: 6(int) Constant 1 15: 6(int) Constant 0 - 18: 6(int) Constant 1024 - 19: TypePointer AtomicCounter 6(int) - 20(counter): 19(ptr) Variable AtomicCounter - 25: 6(int) Constant 4 - 26: TypeArray 6(int) 25 - 27: TypePointer AtomicCounter 26 - 28(countArr): 27(ptr) Variable AtomicCounter - 29: TypeInt 32 1 - 30: 29(int) Constant 2 - 34: TypePointer Function 29(int) - 36: TypePointer Workgroup 29(int) - 37(atomi): 36(ptr) Variable Workgroup - 38: 29(int) Constant 3 - 41: TypePointer Workgroup 6(int) - 42(atomu): 41(ptr) Variable Workgroup - 43: TypePointer UniformConstant 6(int) - 44(value): 43(ptr) Variable UniformConstant - 47: 6(int) Constant 7 - 52: 29(int) Constant 7 - 56: 6(int) Constant 10 - 59: TypeFloat 32 - 60: TypeVector 29(int) 4 - 61(dataSSB): TypeStruct 59(float) 60(ivec4) - 62: TypePointer Uniform 61(dataSSB) - 63(result): 62(ptr) Variable Uniform - 64: 29(int) Constant 1 - 65: 6(int) Constant 2 - 66: TypePointer Uniform 29(int) - 69: TypeArray 29(int) 14 - 70: TypePointer Private 69 - 71(arrX): 70(ptr) Variable Private - 72(arrY): 70(ptr) Variable Private - 73(arrZ): 70(ptr) Variable Private + 19: 6(int) Constant 1024 + 20: TypePointer AtomicCounter 6(int) + 21(counter): 20(ptr) Variable AtomicCounter + 26: 6(int) Constant 4 + 27: TypeArray 6(int) 26 + 28: TypePointer AtomicCounter 27 + 29(countArr): 28(ptr) Variable AtomicCounter + 30: TypeInt 32 1 + 31: 30(int) Constant 2 + 35: TypePointer Function 30(int) + 37: TypePointer Workgroup 30(int) + 38(atomi): 37(ptr) Variable Workgroup + 39: 30(int) Constant 3 + 42: TypePointer Workgroup 6(int) + 43(atomu): 42(ptr) Variable Workgroup + 44: TypePointer UniformConstant 6(int) + 45(value): 44(ptr) Variable UniformConstant + 48: 6(int) Constant 7 + 53: 30(int) Constant 7 + 57: 6(int) Constant 10 + 60: TypeFloat 32 + 61: TypeVector 30(int) 4 + 62(dataSSB): TypeStruct 60(float) 61(ivec4) + 63: TypePointer Uniform 62(dataSSB) + 64(result): 63(ptr) Variable Uniform + 65: 30(int) Constant 1 + 66: 6(int) Constant 2 + 67: TypePointer Uniform 30(int) + 70: TypeArray 30(int) 14 + 71: TypePointer Private 70 + 72(arrX): 71(ptr) Variable Private + 73(arrY): 71(ptr) Variable Private + 74(arrZ): 71(ptr) Variable Private 4(main): 2 Function None 3 5: Label - 21(param): 7(ptr) Variable Function - 24(val): 7(ptr) Variable Function - MemoryBarrier 14 18 - 22: 6(int) Load 20(counter) - Store 21(param) 22 - 23: 6(int) FunctionCall 10(func(au1;) 21(param) - 31: 19(ptr) AccessChain 28(countArr) 30 - 32: 6(int) AtomicLoad 31 14 15 - Store 24(val) 32 - 33: 6(int) AtomicIDecrement 20(counter) 14 15 + 22(param): 7(ptr) Variable Function + 25(val): 7(ptr) Variable Function + MemoryBarrier 14 19 + 23: 6(int) Load 21(counter) + Store 22(param) 23 + 24: 6(int) FunctionCall 10(func(au1;) 22(param) + 32: 20(ptr) AccessChain 29(countArr) 31 + 33: 6(int) AtomicLoad 32 14 15 + Store 25(val) 33 + 34: 6(int) AtomicIDecrement 21(counter) 14 15 Return FunctionEnd 10(func(au1;): 6(int) Function None 8 @@ -104,29 +104,29 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, FunctionEnd 12(atoms(): 2 Function None 3 13: Label - 35(origi): 34(ptr) Variable Function - 40(origu): 7(ptr) Variable Function - 39: 29(int) AtomicIAdd 37(atomi) 14 15 38 - Store 35(origi) 39 - 45: 6(int) Load 44(value) - 46: 6(int) AtomicAnd 42(atomu) 14 15 45 - Store 40(origu) 46 - 48: 6(int) AtomicOr 42(atomu) 14 15 47 - Store 40(origu) 48 - 49: 6(int) AtomicXor 42(atomu) 14 15 47 - Store 40(origu) 49 - 50: 6(int) Load 44(value) - 51: 6(int) AtomicUMin 42(atomu) 14 15 50 - Store 40(origu) 51 - 53: 29(int) AtomicSMax 37(atomi) 14 15 52 - Store 35(origi) 53 - 54: 29(int) Load 35(origi) - 55: 29(int) AtomicExchange 37(atomi) 14 15 54 - Store 35(origi) 55 - 57: 6(int) Load 44(value) - 58: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56 - Store 40(origu) 58 - 67: 66(ptr) AccessChain 63(result) 64 65 - 68: 29(int) AtomicIAdd 67 14 15 64 + 36(origi): 35(ptr) Variable Function + 41(origu): 7(ptr) Variable Function + 40: 30(int) AtomicIAdd 38(atomi) 14 15 39 + Store 36(origi) 40 + 46: 6(int) Load 45(value) + 47: 6(int) AtomicAnd 43(atomu) 14 15 46 + Store 41(origu) 47 + 49: 6(int) AtomicOr 43(atomu) 14 15 48 + Store 41(origu) 49 + 50: 6(int) AtomicXor 43(atomu) 14 15 48 + Store 41(origu) 50 + 51: 6(int) Load 45(value) + 52: 6(int) AtomicUMin 43(atomu) 14 15 51 + Store 41(origu) 52 + 54: 30(int) AtomicSMax 38(atomi) 14 15 53 + Store 36(origi) 54 + 55: 30(int) Load 36(origi) + 56: 30(int) AtomicExchange 38(atomi) 14 15 55 + Store 36(origi) 56 + 58: 6(int) Load 45(value) + 59: 6(int) AtomicCompareExchange 43(atomu) 14 15 15 58 57 + Store 41(origu) 59 + 68: 67(ptr) AccessChain 64(result) 65 66 + 69: 30(int) AtomicIAdd 68 14 15 65 Return FunctionEnd diff --git a/Test/baseResults/spv.bool.vert.out b/Test/baseResults/spv.bool.vert.out index 7217ae7b..0fece207 100644 --- a/Test/baseResults/spv.bool.vert.out +++ b/Test/baseResults/spv.bool.vert.out @@ -7,86 +7,86 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 49 +// Id's are bound by 50 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 23 47 48 + EntryPoint Vertex 4 "main" 24 48 49 Source GLSL 450 Name 4 "main" Name 10 "foo(b1;" Name 9 "b" - Name 21 "gl_PerVertex" - MemberName 21(gl_PerVertex) 0 "gl_Position" - MemberName 21(gl_PerVertex) 1 "gl_PointSize" - MemberName 21(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 21(gl_PerVertex) 3 "gl_CullDistance" - Name 23 "" - Name 28 "ubname" - MemberName 28(ubname) 0 "b" - Name 30 "ubinst" - Name 31 "param" - Name 47 "gl_VertexID" - Name 48 "gl_InstanceID" - MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 21(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 21(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 21(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 21(gl_PerVertex) Block - Decorate 28(ubname) GLSLShared - Decorate 28(ubname) Block - Decorate 47(gl_VertexID) BuiltIn VertexId - Decorate 48(gl_InstanceID) BuiltIn InstanceId + Name 22 "gl_PerVertex" + MemberName 22(gl_PerVertex) 0 "gl_Position" + MemberName 22(gl_PerVertex) 1 "gl_PointSize" + MemberName 22(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 22(gl_PerVertex) 3 "gl_CullDistance" + Name 24 "" + Name 29 "ubname" + MemberName 29(ubname) 0 "b" + Name 31 "ubinst" + Name 32 "param" + Name 48 "gl_VertexID" + Name 49 "gl_InstanceID" + MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 22(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 22(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 22(gl_PerVertex) Block + Decorate 29(ubname) GLSLShared + Decorate 29(ubname) Block + Decorate 48(gl_VertexID) BuiltIn VertexId + Decorate 49(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeBool 7: TypePointer Function 6(bool) 8: TypeFunction 6(bool) 7(ptr) 13: 6(bool) ConstantFalse - 16: TypeFloat 32 - 17: TypeVector 16(float) 4 - 18: TypeInt 32 0 - 19: 18(int) Constant 1 - 20: TypeArray 16(float) 19 -21(gl_PerVertex): TypeStruct 17(fvec4) 16(float) 20 20 - 22: TypePointer Output 21(gl_PerVertex) - 23: 22(ptr) Variable Output - 24: TypeInt 32 1 - 25: 24(int) Constant 0 - 26: TypePointer Function 17(fvec4) - 28(ubname): TypeStruct 6(bool) - 29: TypePointer Uniform 28(ubname) - 30(ubinst): 29(ptr) Variable Uniform - 32: TypePointer Uniform 6(bool) - 38: 16(float) Constant 0 - 39: 17(fvec4) ConstantComposite 38 38 38 38 - 41: 16(float) Constant 1065353216 - 42: 17(fvec4) ConstantComposite 41 41 41 41 - 44: TypePointer Output 17(fvec4) - 46: TypePointer Input 24(int) - 47(gl_VertexID): 46(ptr) Variable Input -48(gl_InstanceID): 46(ptr) Variable Input + 17: TypeFloat 32 + 18: TypeVector 17(float) 4 + 19: TypeInt 32 0 + 20: 19(int) Constant 1 + 21: TypeArray 17(float) 20 +22(gl_PerVertex): TypeStruct 18(fvec4) 17(float) 21 21 + 23: TypePointer Output 22(gl_PerVertex) + 24: 23(ptr) Variable Output + 25: TypeInt 32 1 + 26: 25(int) Constant 0 + 27: TypePointer Function 18(fvec4) + 29(ubname): TypeStruct 6(bool) + 30: TypePointer Uniform 29(ubname) + 31(ubinst): 30(ptr) Variable Uniform + 33: TypePointer Uniform 6(bool) + 39: 17(float) Constant 0 + 40: 18(fvec4) ConstantComposite 39 39 39 39 + 42: 17(float) Constant 1065353216 + 43: 18(fvec4) ConstantComposite 42 42 42 42 + 45: TypePointer Output 18(fvec4) + 47: TypePointer Input 25(int) + 48(gl_VertexID): 47(ptr) Variable Input +49(gl_InstanceID): 47(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 27: 26(ptr) Variable Function - 31(param): 7(ptr) Variable Function - 33: 32(ptr) AccessChain 30(ubinst) 25 - 34: 6(bool) Load 33 - Store 31(param) 34 - 35: 6(bool) FunctionCall 10(foo(b1;) 31(param) - SelectionMerge 37 None - BranchConditional 35 36 40 - 36: Label - Store 27 39 - Branch 37 - 40: Label - Store 27 42 - Branch 37 - 37: Label - 43: 17(fvec4) Load 27 - 45: 44(ptr) AccessChain 23 25 - Store 45 43 + 28: 27(ptr) Variable Function + 32(param): 7(ptr) Variable Function + 34: 33(ptr) AccessChain 31(ubinst) 26 + 35: 6(bool) Load 34 + Store 32(param) 35 + 36: 6(bool) FunctionCall 10(foo(b1;) 32(param) + SelectionMerge 38 None + BranchConditional 36 37 41 + 37: Label + Store 28 40 + Branch 38 + 41: Label + Store 28 43 + Branch 38 + 38: Label + 44: 18(fvec4) Load 28 + 46: 45(ptr) AccessChain 24 26 + Store 46 44 Return FunctionEnd 10(foo(b1;): 6(bool) Function None 8 diff --git a/Test/baseResults/spv.for-notest.vert.out b/Test/baseResults/spv.for-notest.vert.out index 0b77cb11..b2618c1e 100644 --- a/Test/baseResults/spv.for-notest.vert.out +++ b/Test/baseResults/spv.for-notest.vert.out @@ -50,4 +50,6 @@ Linked vertex stage: 19: 6(int) IAdd 17 18 Store 8(i) 19 Branch 10 + 12: Label + Return FunctionEnd diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out index 8d0323b9..2000a369 100755 --- a/Test/baseResults/spv.forwardFun.frag.out +++ b/Test/baseResults/spv.forwardFun.frag.out @@ -5,7 +5,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 60 +// Id's are bound by 61 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -24,13 +24,13 @@ Linked fragment stage: Name 27 "f" Name 30 "gl_FragColor" Name 36 "d" - Name 59 "bigColor" + Name 60 "bigColor" Decorate 18(color) RelaxedPrecision Decorate 20(BaseColor) RelaxedPrecision Decorate 27(f) RelaxedPrecision Decorate 30(gl_FragColor) RelaxedPrecision Decorate 36(d) RelaxedPrecision - Decorate 59(bigColor) RelaxedPrecision + Decorate 60(bigColor) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -52,8 +52,8 @@ Linked fragment stage: 49: TypeInt 32 0 50: 49(int) Constant 0 53: 49(int) Constant 1 - 58: TypePointer UniformConstant 12(fvec4) - 59(bigColor): 58(ptr) Variable UniformConstant + 59: TypePointer UniformConstant 12(fvec4) + 60(bigColor): 59(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 18(color): 13(ptr) Variable Function diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out index 5716f1d9..f2d381db 100755 --- a/Test/baseResults/spv.functionCall.frag.out +++ b/Test/baseResults/spv.functionCall.frag.out @@ -7,12 +7,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 76 +// Id's are bound by 77 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 57 68 + EntryPoint Fragment 4 "main" 58 69 ExecutionMode 4 OriginLowerLeft Source GLSL 130 Name 4 "main" @@ -22,14 +22,14 @@ Linked fragment stage: Name 16 "unreachableReturn(" Name 18 "missingReturn(" Name 21 "h" - Name 34 "d" - Name 55 "color" - Name 57 "BaseColor" - Name 58 "param" - Name 63 "f" - Name 65 "g" - Name 68 "gl_FragColor" - Name 75 "bigColor" + Name 35 "d" + Name 56 "color" + Name 58 "BaseColor" + Name 59 "param" + Name 64 "f" + Name 66 "g" + Name 69 "gl_FragColor" + Name 76 "bigColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -44,42 +44,42 @@ Linked fragment stage: 24: 23(int) Constant 0 25: TypePointer Function 6(float) 28: 23(int) Constant 1 - 33: TypePointer UniformConstant 6(float) - 34(d): 33(ptr) Variable UniformConstant - 36: 6(float) Constant 1082549862 - 37: TypeBool - 41: 6(float) Constant 1067030938 - 44: 6(float) Constant 1083179008 - 52: 6(float) Constant 1081711002 - 56: TypePointer Input 7(fvec4) - 57(BaseColor): 56(ptr) Variable Input - 67: TypePointer Output 7(fvec4) -68(gl_FragColor): 67(ptr) Variable Output - 74: TypePointer UniformConstant 7(fvec4) - 75(bigColor): 74(ptr) Variable UniformConstant + 34: TypePointer UniformConstant 6(float) + 35(d): 34(ptr) Variable UniformConstant + 37: 6(float) Constant 1082549862 + 38: TypeBool + 42: 6(float) Constant 1067030938 + 45: 6(float) Constant 1083179008 + 53: 6(float) Constant 1081711002 + 57: TypePointer Input 7(fvec4) + 58(BaseColor): 57(ptr) Variable Input + 68: TypePointer Output 7(fvec4) +69(gl_FragColor): 68(ptr) Variable Output + 75: TypePointer UniformConstant 7(fvec4) + 76(bigColor): 75(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label - 55(color): 8(ptr) Variable Function - 58(param): 8(ptr) Variable Function - 63(f): 25(ptr) Variable Function - 65(g): 25(ptr) Variable Function + 56(color): 8(ptr) Variable Function + 59(param): 8(ptr) Variable Function + 64(f): 25(ptr) Variable Function + 66(g): 25(ptr) Variable Function Store 21(h) 22 - 59: 7(fvec4) Load 57(BaseColor) - Store 58(param) 59 - 60: 6(float) FunctionCall 11(foo(vf4;) 58(param) - 61: 7(fvec4) CompositeConstruct 60 60 60 60 - Store 55(color) 61 - 62: 2 FunctionCall 13(bar() - 64: 6(float) FunctionCall 16(unreachableReturn() - Store 63(f) 64 - 66: 6(float) FunctionCall 18(missingReturn() - Store 65(g) 66 - 69: 7(fvec4) Load 55(color) - 70: 6(float) Load 63(f) - 71: 7(fvec4) VectorTimesScalar 69 70 - 72: 6(float) Load 21(h) - 73: 7(fvec4) VectorTimesScalar 71 72 - Store 68(gl_FragColor) 73 + 60: 7(fvec4) Load 58(BaseColor) + Store 59(param) 60 + 61: 6(float) FunctionCall 11(foo(vf4;) 59(param) + 62: 7(fvec4) CompositeConstruct 61 61 61 61 + Store 56(color) 62 + 63: 2 FunctionCall 13(bar() + 65: 6(float) FunctionCall 16(unreachableReturn() + Store 64(f) 65 + 67: 6(float) FunctionCall 18(missingReturn() + Store 66(g) 67 + 70: 7(fvec4) Load 56(color) + 71: 6(float) Load 64(f) + 72: 7(fvec4) VectorTimesScalar 70 71 + 73: 6(float) Load 21(h) + 74: 7(fvec4) VectorTimesScalar 72 73 + Store 69(gl_FragColor) 74 Return FunctionEnd 11(foo(vf4;): 6(float) Function None 9 @@ -98,29 +98,29 @@ Linked fragment stage: FunctionEnd 16(unreachableReturn(): 6(float) Function None 15 17: Label - 35: 6(float) Load 34(d) - 38: 37(bool) FOrdLessThan 35 36 - SelectionMerge 40 None - BranchConditional 38 39 43 - 39: Label - ReturnValue 41 - 43: Label - ReturnValue 44 - 40: Label - 46: 6(float) Undef - ReturnValue 46 + 36: 6(float) Load 35(d) + 39: 38(bool) FOrdLessThan 36 37 + SelectionMerge 41 None + BranchConditional 39 40 44 + 40: Label + ReturnValue 42 + 44: Label + ReturnValue 45 + 41: Label + 47: 6(float) Undef + ReturnValue 47 FunctionEnd 18(missingReturn(): 6(float) Function None 15 19: Label - 47: 6(float) Load 34(d) - 48: 37(bool) FOrdLessThan 47 44 - SelectionMerge 50 None - BranchConditional 48 49 50 - 49: Label - 51: 6(float) Load 34(d) - Store 21(h) 51 - ReturnValue 52 - 50: Label - 54: 6(float) Undef - ReturnValue 54 + 48: 6(float) Load 35(d) + 49: 38(bool) FOrdLessThan 48 45 + SelectionMerge 51 None + BranchConditional 49 50 51 + 50: Label + 52: 6(float) Load 35(d) + Store 21(h) 52 + ReturnValue 53 + 51: Label + 55: 6(float) Undef + ReturnValue 55 FunctionEnd diff --git a/Test/baseResults/spv.functionSemantics.frag.out b/Test/baseResults/spv.functionSemantics.frag.out index 35d8100e..9978539f 100755 --- a/Test/baseResults/spv.functionSemantics.frag.out +++ b/Test/baseResults/spv.functionSemantics.frag.out @@ -7,12 +7,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 153 +// Id's are bound by 156 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 149 + EntryPoint Fragment 4 "main" 152 ExecutionMode 4 OriginLowerLeft Source GLSL 400 Name 4 "main" @@ -29,25 +29,25 @@ Linked fragment stage: Name 24 "r" Name 28 "foo3(" Name 30 "sum" - Name 74 "u" - Name 86 "t" - Name 89 "s" - MemberName 89(s) 0 "t" - Name 91 "f" - Name 95 "color" - Name 101 "e" - Name 102 "param" - Name 103 "param" - Name 104 "param" + Name 76 "u" + Name 89 "t" + Name 92 "s" + MemberName 92(s) 0 "t" + Name 94 "f" + Name 98 "color" + Name 104 "e" Name 105 "param" - Name 120 "ret" - Name 122 "tempReturn" - Name 127 "tempArg" - Name 128 "param" - Name 129 "param" - Name 130 "param" - Name 133 "arg" - Name 149 "gl_FragColor" + Name 106 "param" + Name 107 "param" + Name 108 "param" + Name 123 "ret" + Name 125 "tempReturn" + Name 130 "tempArg" + Name 131 "param" + Name 132 "param" + Name 133 "param" + Name 136 "arg" + Name 152 "gl_FragColor" 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -61,103 +61,103 @@ Linked fragment stage: 27: TypeFunction 6(int) 38: 6(int) Constant 64 43: 6(int) Constant 1024 - 61: 17(float) Constant 1077936128 - 65: 17(float) Constant 1084227584 - 66: TypeInt 32 0 - 67: 66(int) Constant 1 - 73: TypePointer UniformConstant 17(float) - 74(u): 73(ptr) Variable UniformConstant - 76: 17(float) Constant 1078774989 - 77: TypeBool - 82: 6(int) Constant 1000000 - 84: 6(int) Constant 2000000 - 87: 6(int) Constant 2 - 88: TypeVector 6(int) 4 - 89(s): TypeStruct 88(ivec4) - 90: TypePointer Function 89(s) - 92: 6(int) Constant 0 - 93: 6(int) Constant 32 - 96: 6(int) Constant 1 - 100: 6(int) Constant 8 - 112: 6(int) Constant 128 - 121: TypePointer Private 6(int) - 122(tempReturn): 121(ptr) Variable Private - 123: 17(float) Constant 1082130432 - 124: 17(float) Constant 1065353216 - 125: 17(float) Constant 1073741824 - 126: 19(fvec3) ConstantComposite 124 125 61 - 147: TypeVector 17(float) 4 - 148: TypePointer Output 147(fvec4) -149(gl_FragColor): 148(ptr) Variable Output + 62: 17(float) Constant 1077936128 + 66: 17(float) Constant 1084227584 + 67: TypeInt 32 0 + 68: 67(int) Constant 1 + 75: TypePointer UniformConstant 17(float) + 76(u): 75(ptr) Variable UniformConstant + 78: 17(float) Constant 1078774989 + 79: TypeBool + 84: 6(int) Constant 1000000 + 86: 6(int) Constant 2000000 + 90: 6(int) Constant 2 + 91: TypeVector 6(int) 4 + 92(s): TypeStruct 91(ivec4) + 93: TypePointer Function 92(s) + 95: 6(int) Constant 0 + 96: 6(int) Constant 32 + 99: 6(int) Constant 1 + 103: 6(int) Constant 8 + 115: 6(int) Constant 128 + 124: TypePointer Private 6(int) + 125(tempReturn): 124(ptr) Variable Private + 126: 17(float) Constant 1082130432 + 127: 17(float) Constant 1065353216 + 128: 17(float) Constant 1073741824 + 129: 19(fvec3) ConstantComposite 127 128 62 + 150: TypeVector 17(float) 4 + 151: TypePointer Output 150(fvec4) +152(gl_FragColor): 151(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 86(t): 7(ptr) Variable Function - 91(f): 90(ptr) Variable Function - 95(color): 7(ptr) Variable Function - 101(e): 7(ptr) Variable Function - 102(param): 7(ptr) Variable Function - 103(param): 7(ptr) Variable Function - 104(param): 7(ptr) Variable Function + 89(t): 7(ptr) Variable Function + 94(f): 93(ptr) Variable Function + 98(color): 7(ptr) Variable Function + 104(e): 7(ptr) Variable Function 105(param): 7(ptr) Variable Function - 120(ret): 18(ptr) Variable Function - 127(tempArg): 7(ptr) Variable Function - 128(param): 18(ptr) Variable Function - 129(param): 20(ptr) Variable Function - 130(param): 7(ptr) Variable Function - 133(arg): 18(ptr) Variable Function - Store 86(t) 87 - 94: 7(ptr) AccessChain 91(f) 92 67 - Store 94 93 - 97: 6(int) Load 86(t) - 98: 6(int) Load 86(t) - 99: 6(int) IAdd 97 98 - Store 102(param) 96 - Store 103(param) 99 - 106: 7(ptr) AccessChain 91(f) 92 67 - 107: 6(int) Load 106 - Store 105(param) 107 - 108: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 102(param) 87 103(param) 100 104(param) 105(param) - 109: 6(int) Load 104(param) - Store 101(e) 109 - 110: 6(int) Load 105(param) - 111: 7(ptr) AccessChain 91(f) 92 67 - Store 111 110 - Store 95(color) 108 - 113: 6(int) Load 101(e) - 114: 7(ptr) AccessChain 91(f) 92 67 - 115: 6(int) Load 114 - 116: 6(int) IAdd 113 115 - 117: 6(int) IMul 112 116 - 118: 6(int) Load 95(color) - 119: 6(int) IAdd 118 117 - Store 95(color) 119 - Store 128(param) 123 - Store 129(param) 126 - 131: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 128(param) 129(param) 130(param) - 132: 6(int) Load 130(param) - Store 127(tempArg) 132 - Store 122(tempReturn) 131 - 134: 6(int) Load 127(tempArg) - 135: 17(float) ConvertSToF 134 - Store 133(arg) 135 - 136: 6(int) Load 122(tempReturn) - 137: 17(float) ConvertSToF 136 - Store 120(ret) 137 - 138: 17(float) Load 120(ret) - 139: 17(float) Load 133(arg) - 140: 17(float) FAdd 138 139 - 141: 6(int) ConvertFToS 140 - 142: 6(int) Load 95(color) - 143: 6(int) IAdd 142 141 - Store 95(color) 143 - 144: 6(int) FunctionCall 28(foo3() - 145: 6(int) Load 95(color) + 106(param): 7(ptr) Variable Function + 107(param): 7(ptr) Variable Function + 108(param): 7(ptr) Variable Function + 123(ret): 18(ptr) Variable Function + 130(tempArg): 7(ptr) Variable Function + 131(param): 18(ptr) Variable Function + 132(param): 20(ptr) Variable Function + 133(param): 7(ptr) Variable Function + 136(arg): 18(ptr) Variable Function + Store 89(t) 90 + 97: 7(ptr) AccessChain 94(f) 95 68 + Store 97 96 + 100: 6(int) Load 89(t) + 101: 6(int) Load 89(t) + 102: 6(int) IAdd 100 101 + Store 105(param) 99 + Store 106(param) 102 + 109: 7(ptr) AccessChain 94(f) 95 68 + 110: 6(int) Load 109 + Store 108(param) 110 + 111: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 105(param) 90 106(param) 103 107(param) 108(param) + 112: 6(int) Load 107(param) + Store 104(e) 112 + 113: 6(int) Load 108(param) + 114: 7(ptr) AccessChain 94(f) 95 68 + Store 114 113 + Store 98(color) 111 + 116: 6(int) Load 104(e) + 117: 7(ptr) AccessChain 94(f) 95 68 + 118: 6(int) Load 117 + 119: 6(int) IAdd 116 118 + 120: 6(int) IMul 115 119 + 121: 6(int) Load 98(color) + 122: 6(int) IAdd 121 120 + Store 98(color) 122 + Store 131(param) 126 + Store 132(param) 129 + 134: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 131(param) 132(param) 133(param) + 135: 6(int) Load 133(param) + Store 130(tempArg) 135 + Store 125(tempReturn) 134 + 137: 6(int) Load 130(tempArg) + 138: 17(float) ConvertSToF 137 + Store 136(arg) 138 + 139: 6(int) Load 125(tempReturn) + 140: 17(float) ConvertSToF 139 + Store 123(ret) 140 + 141: 17(float) Load 123(ret) + 142: 17(float) Load 136(arg) + 143: 17(float) FAdd 141 142 + 144: 6(int) ConvertFToS 143 + 145: 6(int) Load 98(color) 146: 6(int) IAdd 145 144 - Store 95(color) 146 - 150: 6(int) Load 95(color) - 151: 17(float) ConvertSToF 150 - 152: 147(fvec4) CompositeConstruct 151 151 151 151 - Store 149(gl_FragColor) 152 + Store 98(color) 146 + 147: 6(int) FunctionCall 28(foo3() + 148: 6(int) Load 98(color) + 149: 6(int) IAdd 148 147 + Store 98(color) 149 + 153: 6(int) Load 98(color) + 154: 17(float) ConvertSToF 153 + 155: 150(fvec4) CompositeConstruct 154 154 154 154 + Store 152(gl_FragColor) 155 Return FunctionEnd 15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8 @@ -209,24 +209,24 @@ Linked fragment stage: 23(b): 20(ptr) FunctionParameter 24(r): 7(ptr) FunctionParameter 26: Label - 62: 17(float) Load 22(a) - 63: 17(float) FMul 61 62 - 64: 6(int) ConvertFToS 63 - Store 24(r) 64 - 68: 18(ptr) AccessChain 23(b) 67 - 69: 17(float) Load 68 - 70: 17(float) FMul 65 69 - 71: 6(int) ConvertFToS 70 - ReturnValue 71 + 63: 17(float) Load 22(a) + 64: 17(float) FMul 62 63 + 65: 6(int) ConvertFToS 64 + Store 24(r) 65 + 69: 18(ptr) AccessChain 23(b) 68 + 70: 17(float) Load 69 + 71: 17(float) FMul 66 70 + 72: 6(int) ConvertFToS 71 + ReturnValue 72 FunctionEnd 28(foo3(): 6(int) Function None 27 29: Label - 75: 17(float) Load 74(u) - 78: 77(bool) FOrdGreaterThan 75 76 - SelectionMerge 80 None - BranchConditional 78 79 80 - 79: Label + 77: 17(float) Load 76(u) + 80: 79(bool) FOrdGreaterThan 77 78 + SelectionMerge 82 None + BranchConditional 80 81 82 + 81: Label Kill - 80: Label - ReturnValue 84 + 82: Label + ReturnValue 86 FunctionEnd diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out index 122adc96..bf0a3d1e 100755 --- a/Test/baseResults/spv.matFun.vert.out +++ b/Test/baseResults/spv.matFun.vert.out @@ -5,12 +5,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 93 +// Id's are bound by 96 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 69 73 92 + EntryPoint Vertex 4 "main" 72 76 95 Source GLSL 130 Name 4 "main" Name 14 "xf(mf33;vf3;" @@ -21,18 +21,18 @@ Linked vertex stage: Name 26 "mxv(mf44;vf3;" Name 24 "m4" Name 25 "v" - Name 63 "param" - Name 69 "gl_Position" - Name 71 "m4" - Name 73 "v3" - Name 74 "param" - Name 76 "param" - Name 80 "m3" - Name 81 "param" - Name 83 "param" - Name 92 "gl_VertexID" - Decorate 69(gl_Position) BuiltIn Position - Decorate 92(gl_VertexID) BuiltIn VertexId + Name 65 "param" + Name 72 "gl_Position" + Name 74 "m4" + Name 76 "v3" + Name 77 "param" + Name 79 "param" + Name 83 "m3" + Name 84 "param" + Name 86 "param" + Name 95 "gl_VertexID" + Decorate 72(gl_Position) BuiltIn Position + Decorate 95(gl_VertexID) BuiltIn VertexId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -46,45 +46,45 @@ Linked vertex stage: 18: TypePointer Function 17 19: TypeFunction 8 18(ptr) 23: TypeFunction 7(fvec3) 18(ptr) 10(ptr) - 32: TypeInt 32 1 - 33: 32(int) Constant 0 - 34: TypePointer Function 16(fvec4) - 38: 32(int) Constant 1 - 42: 32(int) Constant 2 - 46: 6(float) Constant 1065353216 - 47: 6(float) Constant 0 - 68: TypePointer Output 16(fvec4) - 69(gl_Position): 68(ptr) Variable Output - 70: TypePointer UniformConstant 17 - 71(m4): 70(ptr) Variable UniformConstant - 72: TypePointer Input 7(fvec3) - 73(v3): 72(ptr) Variable Input - 79: TypePointer UniformConstant 8 - 80(m3): 79(ptr) Variable UniformConstant - 91: TypePointer Input 32(int) - 92(gl_VertexID): 91(ptr) Variable Input + 33: TypeInt 32 1 + 34: 33(int) Constant 0 + 35: TypePointer Function 16(fvec4) + 39: 33(int) Constant 1 + 43: 33(int) Constant 2 + 47: 6(float) Constant 1065353216 + 48: 6(float) Constant 0 + 71: TypePointer Output 16(fvec4) + 72(gl_Position): 71(ptr) Variable Output + 73: TypePointer UniformConstant 17 + 74(m4): 73(ptr) Variable UniformConstant + 75: TypePointer Input 7(fvec3) + 76(v3): 75(ptr) Variable Input + 82: TypePointer UniformConstant 8 + 83(m3): 82(ptr) Variable UniformConstant + 94: TypePointer Input 33(int) + 95(gl_VertexID): 94(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 74(param): 18(ptr) Variable Function - 76(param): 10(ptr) Variable Function - 81(param): 9(ptr) Variable Function - 83(param): 10(ptr) Variable Function - 75: 17 Load 71(m4) - Store 74(param) 75 - 77: 7(fvec3) Load 73(v3) - Store 76(param) 77 - 78: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 74(param) 76(param) - 82: 8 Load 80(m3) - Store 81(param) 82 - 84: 7(fvec3) Load 73(v3) - Store 83(param) 84 - 85: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 81(param) 83(param) - 86: 7(fvec3) FAdd 78 85 - 87: 6(float) CompositeExtract 86 0 - 88: 6(float) CompositeExtract 86 1 - 89: 6(float) CompositeExtract 86 2 - 90: 16(fvec4) CompositeConstruct 87 88 89 46 - Store 69(gl_Position) 90 + 77(param): 18(ptr) Variable Function + 79(param): 10(ptr) Variable Function + 84(param): 9(ptr) Variable Function + 86(param): 10(ptr) Variable Function + 78: 17 Load 74(m4) + Store 77(param) 78 + 80: 7(fvec3) Load 76(v3) + Store 79(param) 80 + 81: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 77(param) 79(param) + 85: 8 Load 83(m3) + Store 84(param) 85 + 87: 7(fvec3) Load 76(v3) + Store 86(param) 87 + 88: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 84(param) 86(param) + 89: 7(fvec3) FAdd 81 88 + 90: 6(float) CompositeExtract 89 0 + 91: 6(float) CompositeExtract 89 1 + 92: 6(float) CompositeExtract 89 2 + 93: 16(fvec4) CompositeConstruct 90 91 92 47 + Store 72(gl_Position) 93 Return FunctionEnd 14(xf(mf33;vf3;): 7(fvec3) Function None 11 @@ -99,39 +99,39 @@ Linked vertex stage: 21(Mat3(mf44;): 8 Function None 19 20(m): 18(ptr) FunctionParameter 22: Label - 35: 34(ptr) AccessChain 20(m) 33 - 36: 16(fvec4) Load 35 - 37: 7(fvec3) VectorShuffle 36 36 0 1 2 - 39: 34(ptr) AccessChain 20(m) 38 - 40: 16(fvec4) Load 39 - 41: 7(fvec3) VectorShuffle 40 40 0 1 2 - 43: 34(ptr) AccessChain 20(m) 42 - 44: 16(fvec4) Load 43 - 45: 7(fvec3) VectorShuffle 44 44 0 1 2 - 48: 6(float) CompositeExtract 37 0 - 49: 6(float) CompositeExtract 37 1 - 50: 6(float) CompositeExtract 37 2 - 51: 6(float) CompositeExtract 41 0 - 52: 6(float) CompositeExtract 41 1 - 53: 6(float) CompositeExtract 41 2 - 54: 6(float) CompositeExtract 45 0 - 55: 6(float) CompositeExtract 45 1 - 56: 6(float) CompositeExtract 45 2 - 57: 7(fvec3) CompositeConstruct 48 49 50 - 58: 7(fvec3) CompositeConstruct 51 52 53 - 59: 7(fvec3) CompositeConstruct 54 55 56 - 60: 8 CompositeConstruct 57 58 59 - ReturnValue 60 + 36: 35(ptr) AccessChain 20(m) 34 + 37: 16(fvec4) Load 36 + 38: 7(fvec3) VectorShuffle 37 37 0 1 2 + 40: 35(ptr) AccessChain 20(m) 39 + 41: 16(fvec4) Load 40 + 42: 7(fvec3) VectorShuffle 41 41 0 1 2 + 44: 35(ptr) AccessChain 20(m) 43 + 45: 16(fvec4) Load 44 + 46: 7(fvec3) VectorShuffle 45 45 0 1 2 + 49: 6(float) CompositeExtract 38 0 + 50: 6(float) CompositeExtract 38 1 + 51: 6(float) CompositeExtract 38 2 + 52: 6(float) CompositeExtract 42 0 + 53: 6(float) CompositeExtract 42 1 + 54: 6(float) CompositeExtract 42 2 + 55: 6(float) CompositeExtract 46 0 + 56: 6(float) CompositeExtract 46 1 + 57: 6(float) CompositeExtract 46 2 + 58: 7(fvec3) CompositeConstruct 49 50 51 + 59: 7(fvec3) CompositeConstruct 52 53 54 + 60: 7(fvec3) CompositeConstruct 55 56 57 + 61: 8 CompositeConstruct 58 59 60 + ReturnValue 61 FunctionEnd 26(mxv(mf44;vf3;): 7(fvec3) Function None 23 24(m4): 18(ptr) FunctionParameter 25(v): 10(ptr) FunctionParameter 27: Label - 63(param): 18(ptr) Variable Function - 62: 7(fvec3) Load 25(v) - 64: 17 Load 24(m4) - Store 63(param) 64 - 65: 8 FunctionCall 21(Mat3(mf44;) 63(param) - 66: 7(fvec3) VectorTimesMatrix 62 65 - ReturnValue 66 + 65(param): 18(ptr) Variable Function + 64: 7(fvec3) Load 25(v) + 66: 17 Load 24(m4) + Store 65(param) 66 + 67: 8 FunctionCall 21(Mat3(mf44;) 65(param) + 68: 7(fvec3) VectorTimesMatrix 64 67 + ReturnValue 68 FunctionEnd diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out index 8c28fed7..e120eecd 100755 --- a/Test/baseResults/spv.precision.frag.out +++ b/Test/baseResults/spv.precision.frag.out @@ -5,12 +5,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 112 +// Id's are bound by 114 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 23 57 59 71 + EntryPoint Fragment 4 "main" 23 59 61 73 ExecutionMode 4 OriginLowerLeft Source ESSL 300 Name 4 "main" @@ -19,29 +19,29 @@ Linked fragment stage: Name 19 "boolfun(vb2;" Name 18 "bv2" Name 23 "highfin" - Name 36 "sum" - Name 38 "uniform_medium" - Name 40 "uniform_high" - Name 46 "uniform_low" - Name 51 "arg1" - Name 53 "arg2" - Name 55 "d" - Name 57 "lowfin" - Name 59 "mediumfin" - Name 63 "global_highp" - Name 67 "local_highp" - Name 71 "mediumfout" - Name 102 "ub2" - Name 103 "param" - Decorate 36(sum) RelaxedPrecision - Decorate 38(uniform_medium) RelaxedPrecision - Decorate 46(uniform_low) RelaxedPrecision - Decorate 51(arg1) RelaxedPrecision - Decorate 53(arg2) RelaxedPrecision - Decorate 55(d) RelaxedPrecision - Decorate 57(lowfin) RelaxedPrecision - Decorate 59(mediumfin) RelaxedPrecision - Decorate 71(mediumfout) RelaxedPrecision + Name 38 "sum" + Name 40 "uniform_medium" + Name 42 "uniform_high" + Name 48 "uniform_low" + Name 53 "arg1" + Name 55 "arg2" + Name 57 "d" + Name 59 "lowfin" + Name 61 "mediumfin" + Name 65 "global_highp" + Name 69 "local_highp" + Name 73 "mediumfout" + Name 104 "ub2" + Name 105 "param" + Decorate 38(sum) RelaxedPrecision + Decorate 40(uniform_medium) RelaxedPrecision + Decorate 48(uniform_low) RelaxedPrecision + Decorate 53(arg1) RelaxedPrecision + Decorate 55(arg2) RelaxedPrecision + Decorate 57(d) RelaxedPrecision + Decorate 59(lowfin) RelaxedPrecision + Decorate 61(mediumfin) RelaxedPrecision + Decorate 73(mediumfout) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -56,105 +56,105 @@ Linked fragment stage: 21: TypeVector 6(float) 4 22: TypePointer Input 21(fvec4) 23(highfin): 22(ptr) Variable Input - 28: 14(bool) ConstantFalse - 29: 14(bool) ConstantTrue - 30: 15(bvec2) ConstantComposite 28 29 - 34: TypeInt 32 1 - 35: TypePointer Function 34(int) - 37: TypePointer UniformConstant 34(int) -38(uniform_medium): 37(ptr) Variable UniformConstant -40(uniform_high): 37(ptr) Variable UniformConstant - 46(uniform_low): 37(ptr) Variable UniformConstant - 50: TypePointer Function 6(float) - 52: 6(float) Constant 1078774989 - 54: 6(float) Constant 1232730691 - 56: TypePointer Input 6(float) - 57(lowfin): 56(ptr) Variable Input - 59(mediumfin): 56(ptr) Variable Input - 62: TypePointer Private 6(float) -63(global_highp): 62(ptr) Variable Private - 66: TypePointer Function 21(fvec4) - 70: TypePointer Output 21(fvec4) - 71(mediumfout): 70(ptr) Variable Output - 80: 34(int) Constant 4 - 82: TypeVector 34(int) 2 - 90: TypeInt 32 0 - 91: 90(int) Constant 0 - 101: TypePointer UniformConstant 15(bvec2) - 102(ub2): 101(ptr) Variable UniformConstant - 109: 6(float) Constant 1065353216 + 29: 14(bool) ConstantFalse + 30: 14(bool) ConstantTrue + 31: 15(bvec2) ConstantComposite 29 30 + 36: TypeInt 32 1 + 37: TypePointer Function 36(int) + 39: TypePointer UniformConstant 36(int) +40(uniform_medium): 39(ptr) Variable UniformConstant +42(uniform_high): 39(ptr) Variable UniformConstant + 48(uniform_low): 39(ptr) Variable UniformConstant + 52: TypePointer Function 6(float) + 54: 6(float) Constant 1078774989 + 56: 6(float) Constant 1232730691 + 58: TypePointer Input 6(float) + 59(lowfin): 58(ptr) Variable Input + 61(mediumfin): 58(ptr) Variable Input + 64: TypePointer Private 6(float) +65(global_highp): 64(ptr) Variable Private + 68: TypePointer Function 21(fvec4) + 72: TypePointer Output 21(fvec4) + 73(mediumfout): 72(ptr) Variable Output + 82: 36(int) Constant 4 + 84: TypeVector 36(int) 2 + 92: TypeInt 32 0 + 93: 92(int) Constant 0 + 103: TypePointer UniformConstant 15(bvec2) + 104(ub2): 103(ptr) Variable UniformConstant + 111: 6(float) Constant 1065353216 4(main): 2 Function None 3 5: Label - 36(sum): 35(ptr) Variable Function - 51(arg1): 50(ptr) Variable Function - 53(arg2): 50(ptr) Variable Function - 55(d): 50(ptr) Variable Function - 67(local_highp): 66(ptr) Variable Function - 103(param): 16(ptr) Variable Function - 39: 34(int) Load 38(uniform_medium) - 41: 34(int) Load 40(uniform_high) - 42: 34(int) IAdd 39 41 - Store 36(sum) 42 - 43: 34(int) Load 40(uniform_high) - 44: 34(int) Load 36(sum) - 45: 34(int) IAdd 44 43 - Store 36(sum) 45 - 47: 34(int) Load 46(uniform_low) - 48: 34(int) Load 36(sum) - 49: 34(int) IAdd 48 47 - Store 36(sum) 49 - Store 51(arg1) 52 - Store 53(arg2) 54 - 58: 6(float) Load 57(lowfin) - 60: 6(float) Load 59(mediumfin) - 61: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 58 60 - Store 55(d) 61 - 64: 21(fvec4) Load 23(highfin) - 65: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 64 - Store 63(global_highp) 65 - 68: 6(float) Load 63(global_highp) - 69: 21(fvec4) CompositeConstruct 68 68 68 68 - Store 67(local_highp) 69 - 72: 6(float) Load 55(d) - 73: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 72 - 74: 21(fvec4) CompositeConstruct 73 73 73 73 - 75: 6(float) Load 53(arg2) + 38(sum): 37(ptr) Variable Function + 53(arg1): 52(ptr) Variable Function + 55(arg2): 52(ptr) Variable Function + 57(d): 52(ptr) Variable Function + 69(local_highp): 68(ptr) Variable Function + 105(param): 16(ptr) Variable Function + 41: 36(int) Load 40(uniform_medium) + 43: 36(int) Load 42(uniform_high) + 44: 36(int) IAdd 41 43 + Store 38(sum) 44 + 45: 36(int) Load 42(uniform_high) + 46: 36(int) Load 38(sum) + 47: 36(int) IAdd 46 45 + Store 38(sum) 47 + 49: 36(int) Load 48(uniform_low) + 50: 36(int) Load 38(sum) + 51: 36(int) IAdd 50 49 + Store 38(sum) 51 + Store 53(arg1) 54 + Store 55(arg2) 56 + 60: 6(float) Load 59(lowfin) + 62: 6(float) Load 61(mediumfin) + 63: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 60 62 + Store 57(d) 63 + 66: 21(fvec4) Load 23(highfin) + 67: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 66 + Store 65(global_highp) 67 + 70: 6(float) Load 65(global_highp) + 71: 21(fvec4) CompositeConstruct 70 70 70 70 + Store 69(local_highp) 71 + 74: 6(float) Load 57(d) + 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74 76: 21(fvec4) CompositeConstruct 75 75 75 75 - 77: 21(fvec4) FAdd 74 76 - 78: 21(fvec4) Load 67(local_highp) - 79: 21(fvec4) FAdd 77 78 - Store 71(mediumfout) 79 - 81: 34(int) Load 46(uniform_low) - 83: 82(ivec2) CompositeConstruct 81 81 - 84: 34(int) Load 40(uniform_high) - 85: 82(ivec2) CompositeConstruct 84 84 - 86: 82(ivec2) IMul 83 85 - 87: 34(int) Load 40(uniform_high) - 88: 82(ivec2) CompositeConstruct 87 87 - 89: 82(ivec2) IAdd 86 88 - 92: 34(int) CompositeExtract 89 0 - 93: 34(int) IAdd 80 92 - 94: 34(int) Load 36(sum) - 95: 34(int) IAdd 94 93 - Store 36(sum) 95 - 96: 34(int) Load 36(sum) - 97: 6(float) ConvertSToF 96 - 98: 21(fvec4) CompositeConstruct 97 97 97 97 - 99: 21(fvec4) Load 71(mediumfout) - 100: 21(fvec4) FAdd 99 98 - Store 71(mediumfout) 100 - 104: 15(bvec2) Load 102(ub2) - Store 103(param) 104 - 105: 14(bool) FunctionCall 19(boolfun(vb2;) 103(param) - SelectionMerge 107 None - BranchConditional 105 106 107 - 106: Label - 108: 21(fvec4) Load 71(mediumfout) - 110: 21(fvec4) CompositeConstruct 109 109 109 109 - 111: 21(fvec4) FAdd 108 110 - Store 71(mediumfout) 111 - Branch 107 - 107: Label + 77: 6(float) Load 55(arg2) + 78: 21(fvec4) CompositeConstruct 77 77 77 77 + 79: 21(fvec4) FAdd 76 78 + 80: 21(fvec4) Load 69(local_highp) + 81: 21(fvec4) FAdd 79 80 + Store 73(mediumfout) 81 + 83: 36(int) Load 48(uniform_low) + 85: 84(ivec2) CompositeConstruct 83 83 + 86: 36(int) Load 42(uniform_high) + 87: 84(ivec2) CompositeConstruct 86 86 + 88: 84(ivec2) IMul 85 87 + 89: 36(int) Load 42(uniform_high) + 90: 84(ivec2) CompositeConstruct 89 89 + 91: 84(ivec2) IAdd 88 90 + 94: 36(int) CompositeExtract 91 0 + 95: 36(int) IAdd 82 94 + 96: 36(int) Load 38(sum) + 97: 36(int) IAdd 96 95 + Store 38(sum) 97 + 98: 36(int) Load 38(sum) + 99: 6(float) ConvertSToF 98 + 100: 21(fvec4) CompositeConstruct 99 99 99 99 + 101: 21(fvec4) Load 73(mediumfout) + 102: 21(fvec4) FAdd 101 100 + Store 73(mediumfout) 102 + 106: 15(bvec2) Load 104(ub2) + Store 105(param) 106 + 107: 14(bool) FunctionCall 19(boolfun(vb2;) 105(param) + SelectionMerge 109 None + BranchConditional 107 108 109 + 108: Label + 110: 21(fvec4) Load 73(mediumfout) + 112: 21(fvec4) CompositeConstruct 111 111 111 111 + 113: 21(fvec4) FAdd 110 112 + Store 73(mediumfout) 113 + Branch 109 + 109: Label Return FunctionEnd 12(foo(vf3;): 9(fvec2) Function None 10 @@ -167,8 +167,8 @@ Linked fragment stage: 19(boolfun(vb2;): 14(bool) Function None 17 18(bv2): 16(ptr) FunctionParameter 20: Label - 27: 15(bvec2) Load 18(bv2) - 31: 15(bvec2) LogicalEqual 27 30 - 32: 14(bool) All 31 - ReturnValue 32 + 28: 15(bvec2) Load 18(bv2) + 32: 15(bvec2) LogicalEqual 28 31 + 33: 14(bool) All 32 + ReturnValue 33 FunctionEnd diff --git a/Test/baseResults/spv.shortCircuit.frag.out b/Test/baseResults/spv.shortCircuit.frag.out index bbe719f9..008f9705 100644 --- a/Test/baseResults/spv.shortCircuit.frag.out +++ b/Test/baseResults/spv.shortCircuit.frag.out @@ -7,26 +7,26 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 143 +// Id's are bound by 144 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 12 23 + EntryPoint Fragment 4 "main" 12 24 ExecutionMode 4 OriginLowerLeft Source GLSL 400 Name 4 "main" Name 8 "foo(" Name 12 "of1" - Name 23 "of4" - Name 26 "ub" - Name 30 "ui" - Name 40 "uba" - Name 109 "uf" - Name 136 "uiv4" - Name 138 "uv4" - Name 141 "ub41" - Name 142 "ub42" + Name 24 "of4" + Name 27 "ub" + Name 31 "ui" + Name 41 "uba" + Name 110 "uf" + Name 137 "uiv4" + Name 139 "uv4" + Name 142 "ub41" + Name 143 "ub42" 2: TypeVoid 3: TypeFunction 2 6: TypeBool @@ -36,190 +36,190 @@ Linked fragment stage: 12(of1): 11(ptr) Variable Output 14: 10(float) Constant 1065353216 17: 10(float) Constant 1092616192 - 20: 10(float) Constant 0 - 21: TypeVector 10(float) 4 - 22: TypePointer Output 21(fvec4) - 23(of4): 22(ptr) Variable Output - 24: 21(fvec4) ConstantComposite 20 20 20 20 - 25: TypePointer UniformConstant 6(bool) - 26(ub): 25(ptr) Variable UniformConstant - 28: TypeInt 32 1 - 29: TypePointer UniformConstant 28(int) - 30(ui): 29(ptr) Variable UniformConstant - 32: 28(int) Constant 2 - 40(uba): 25(ptr) Variable UniformConstant - 108: TypePointer UniformConstant 10(float) - 109(uf): 108(ptr) Variable UniformConstant - 112: 10(float) Constant 1082130432 - 134: TypeVector 28(int) 4 - 135: TypePointer UniformConstant 134(ivec4) - 136(uiv4): 135(ptr) Variable UniformConstant - 137: TypePointer UniformConstant 21(fvec4) - 138(uv4): 137(ptr) Variable UniformConstant - 139: TypeVector 6(bool) 4 - 140: TypePointer UniformConstant 139(bvec4) - 141(ub41): 140(ptr) Variable UniformConstant - 142(ub42): 140(ptr) Variable UniformConstant + 21: 10(float) Constant 0 + 22: TypeVector 10(float) 4 + 23: TypePointer Output 22(fvec4) + 24(of4): 23(ptr) Variable Output + 25: 22(fvec4) ConstantComposite 21 21 21 21 + 26: TypePointer UniformConstant 6(bool) + 27(ub): 26(ptr) Variable UniformConstant + 29: TypeInt 32 1 + 30: TypePointer UniformConstant 29(int) + 31(ui): 30(ptr) Variable UniformConstant + 33: 29(int) Constant 2 + 41(uba): 26(ptr) Variable UniformConstant + 109: TypePointer UniformConstant 10(float) + 110(uf): 109(ptr) Variable UniformConstant + 113: 10(float) Constant 1082130432 + 135: TypeVector 29(int) 4 + 136: TypePointer UniformConstant 135(ivec4) + 137(uiv4): 136(ptr) Variable UniformConstant + 138: TypePointer UniformConstant 22(fvec4) + 139(uv4): 138(ptr) Variable UniformConstant + 140: TypeVector 6(bool) 4 + 141: TypePointer UniformConstant 140(bvec4) + 142(ub41): 141(ptr) Variable UniformConstant + 143(ub42): 141(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label - Store 12(of1) 20 - Store 23(of4) 24 - 27: 6(bool) Load 26(ub) - 31: 28(int) Load 30(ui) - 33: 6(bool) SGreaterThan 31 32 - 34: 6(bool) LogicalOr 27 33 - SelectionMerge 36 None - BranchConditional 34 35 36 - 35: Label - 37: 10(float) Load 12(of1) - 38: 10(float) FAdd 37 14 - Store 12(of1) 38 - Branch 36 - 36: Label - 39: 6(bool) Load 26(ub) - 41: 6(bool) Load 40(uba) - 42: 6(bool) LogicalNot 41 - 43: 6(bool) LogicalAnd 39 42 - SelectionMerge 45 None - BranchConditional 43 44 45 - 44: Label - 46: 10(float) Load 12(of1) - 47: 10(float) FAdd 46 14 - Store 12(of1) 47 - Branch 45 - 45: Label - 48: 6(bool) Load 26(ub) - 49: 6(bool) LogicalNot 48 - SelectionMerge 51 None - BranchConditional 49 50 51 - 50: Label - 52: 6(bool) FunctionCall 8(foo() - Branch 51 - 51: Label - 53: 6(bool) Phi 48 45 52 50 - SelectionMerge 55 None - BranchConditional 53 54 55 - 54: Label - 56: 10(float) Load 12(of1) - 57: 10(float) FAdd 56 14 - Store 12(of1) 57 - Branch 55 - 55: Label - 58: 6(bool) Load 26(ub) - SelectionMerge 60 None - BranchConditional 58 59 60 - 59: Label - 61: 6(bool) FunctionCall 8(foo() - Branch 60 - 60: Label - 62: 6(bool) Phi 58 55 61 59 - SelectionMerge 64 None - BranchConditional 62 63 64 - 63: Label - 65: 10(float) Load 12(of1) - 66: 10(float) FAdd 65 14 - Store 12(of1) 66 - Branch 64 - 64: Label - 67: 6(bool) FunctionCall 8(foo() - 68: 6(bool) Load 26(ub) - 69: 6(bool) LogicalOr 67 68 - SelectionMerge 71 None - BranchConditional 69 70 71 - 70: Label - 72: 10(float) Load 12(of1) - 73: 10(float) FAdd 72 14 - Store 12(of1) 73 - Branch 71 - 71: Label - 74: 6(bool) FunctionCall 8(foo() - 75: 6(bool) Load 26(ub) - 76: 6(bool) LogicalAnd 74 75 - SelectionMerge 78 None - BranchConditional 76 77 78 - 77: Label - 79: 10(float) Load 12(of1) - 80: 10(float) FAdd 79 14 - Store 12(of1) 80 - Branch 78 - 78: Label - 81: 6(bool) Load 26(ub) - 82: 6(bool) LogicalNot 81 - SelectionMerge 84 None - BranchConditional 82 83 84 - 83: Label - 85: 10(float) Load 12(of1) - 86: 10(float) FAdd 85 14 - Store 12(of1) 86 - 87: 6(bool) FOrdGreaterThan 86 14 - Branch 84 - 84: Label - 88: 6(bool) Phi 81 78 87 83 - SelectionMerge 90 None - BranchConditional 88 89 90 - 89: Label - 91: 21(fvec4) Load 23(of4) - 92: 21(fvec4) CompositeConstruct 14 14 14 14 - 93: 21(fvec4) FAdd 91 92 - Store 23(of4) 93 - Branch 90 - 90: Label - 94: 10(float) Load 12(of1) - 95: 10(float) FAdd 94 14 - Store 12(of1) 95 - 96: 6(bool) FOrdGreaterThan 95 14 - 97: 6(bool) Load 26(ub) - 98: 6(bool) LogicalOr 96 97 - SelectionMerge 100 None - BranchConditional 98 99 100 - 99: Label - 101: 21(fvec4) Load 23(of4) - 102: 21(fvec4) CompositeConstruct 14 14 14 14 - 103: 21(fvec4) FAdd 101 102 - Store 23(of4) 103 - Branch 100 - 100: Label - 104: 6(bool) Load 26(ub) - 105: 6(bool) LogicalNot 104 - SelectionMerge 107 None - BranchConditional 105 106 107 - 106: Label - 110: 10(float) Load 109(uf) - 111: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 110 - 113: 10(float) FMul 111 112 - 114: 10(float) Load 12(of1) - 115: 6(bool) FOrdGreaterThan 113 114 - Branch 107 - 107: Label - 116: 6(bool) Phi 104 100 115 106 - SelectionMerge 118 None - BranchConditional 116 117 118 - 117: Label - 119: 10(float) Load 12(of1) - 120: 10(float) FAdd 119 14 - Store 12(of1) 120 - Branch 118 - 118: Label - 121: 6(bool) Load 26(ub) - SelectionMerge 123 None - BranchConditional 121 122 123 - 122: Label - 124: 10(float) Load 109(uf) - 125: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 124 - 126: 10(float) FMul 125 112 - 127: 10(float) Load 12(of1) - 128: 6(bool) FOrdGreaterThan 126 127 - Branch 123 - 123: Label - 129: 6(bool) Phi 121 118 128 122 - SelectionMerge 131 None - BranchConditional 129 130 131 - 130: Label - 132: 10(float) Load 12(of1) - 133: 10(float) FAdd 132 14 - Store 12(of1) 133 - Branch 131 - 131: Label + Store 12(of1) 21 + Store 24(of4) 25 + 28: 6(bool) Load 27(ub) + 32: 29(int) Load 31(ui) + 34: 6(bool) SGreaterThan 32 33 + 35: 6(bool) LogicalOr 28 34 + SelectionMerge 37 None + BranchConditional 35 36 37 + 36: Label + 38: 10(float) Load 12(of1) + 39: 10(float) FAdd 38 14 + Store 12(of1) 39 + Branch 37 + 37: Label + 40: 6(bool) Load 27(ub) + 42: 6(bool) Load 41(uba) + 43: 6(bool) LogicalNot 42 + 44: 6(bool) LogicalAnd 40 43 + SelectionMerge 46 None + BranchConditional 44 45 46 + 45: Label + 47: 10(float) Load 12(of1) + 48: 10(float) FAdd 47 14 + Store 12(of1) 48 + Branch 46 + 46: Label + 49: 6(bool) Load 27(ub) + 50: 6(bool) LogicalNot 49 + SelectionMerge 52 None + BranchConditional 50 51 52 + 51: Label + 53: 6(bool) FunctionCall 8(foo() + Branch 52 + 52: Label + 54: 6(bool) Phi 49 46 53 51 + SelectionMerge 56 None + BranchConditional 54 55 56 + 55: Label + 57: 10(float) Load 12(of1) + 58: 10(float) FAdd 57 14 + Store 12(of1) 58 + Branch 56 + 56: Label + 59: 6(bool) Load 27(ub) + SelectionMerge 61 None + BranchConditional 59 60 61 + 60: Label + 62: 6(bool) FunctionCall 8(foo() + Branch 61 + 61: Label + 63: 6(bool) Phi 59 56 62 60 + SelectionMerge 65 None + BranchConditional 63 64 65 + 64: Label + 66: 10(float) Load 12(of1) + 67: 10(float) FAdd 66 14 + Store 12(of1) 67 + Branch 65 + 65: Label + 68: 6(bool) FunctionCall 8(foo() + 69: 6(bool) Load 27(ub) + 70: 6(bool) LogicalOr 68 69 + SelectionMerge 72 None + BranchConditional 70 71 72 + 71: Label + 73: 10(float) Load 12(of1) + 74: 10(float) FAdd 73 14 + Store 12(of1) 74 + Branch 72 + 72: Label + 75: 6(bool) FunctionCall 8(foo() + 76: 6(bool) Load 27(ub) + 77: 6(bool) LogicalAnd 75 76 + SelectionMerge 79 None + BranchConditional 77 78 79 + 78: Label + 80: 10(float) Load 12(of1) + 81: 10(float) FAdd 80 14 + Store 12(of1) 81 + Branch 79 + 79: Label + 82: 6(bool) Load 27(ub) + 83: 6(bool) LogicalNot 82 + SelectionMerge 85 None + BranchConditional 83 84 85 + 84: Label + 86: 10(float) Load 12(of1) + 87: 10(float) FAdd 86 14 + Store 12(of1) 87 + 88: 6(bool) FOrdGreaterThan 87 14 + Branch 85 + 85: Label + 89: 6(bool) Phi 82 79 88 84 + SelectionMerge 91 None + BranchConditional 89 90 91 + 90: Label + 92: 22(fvec4) Load 24(of4) + 93: 22(fvec4) CompositeConstruct 14 14 14 14 + 94: 22(fvec4) FAdd 92 93 + Store 24(of4) 94 + Branch 91 + 91: Label + 95: 10(float) Load 12(of1) + 96: 10(float) FAdd 95 14 + Store 12(of1) 96 + 97: 6(bool) FOrdGreaterThan 96 14 + 98: 6(bool) Load 27(ub) + 99: 6(bool) LogicalOr 97 98 + SelectionMerge 101 None + BranchConditional 99 100 101 + 100: Label + 102: 22(fvec4) Load 24(of4) + 103: 22(fvec4) CompositeConstruct 14 14 14 14 + 104: 22(fvec4) FAdd 102 103 + Store 24(of4) 104 + Branch 101 + 101: Label + 105: 6(bool) Load 27(ub) + 106: 6(bool) LogicalNot 105 + SelectionMerge 108 None + BranchConditional 106 107 108 + 107: Label + 111: 10(float) Load 110(uf) + 112: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 111 + 114: 10(float) FMul 112 113 + 115: 10(float) Load 12(of1) + 116: 6(bool) FOrdGreaterThan 114 115 + Branch 108 + 108: Label + 117: 6(bool) Phi 105 101 116 107 + SelectionMerge 119 None + BranchConditional 117 118 119 + 118: Label + 120: 10(float) Load 12(of1) + 121: 10(float) FAdd 120 14 + Store 12(of1) 121 + Branch 119 + 119: Label + 122: 6(bool) Load 27(ub) + SelectionMerge 124 None + BranchConditional 122 123 124 + 123: Label + 125: 10(float) Load 110(uf) + 126: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 125 + 127: 10(float) FMul 126 113 + 128: 10(float) Load 12(of1) + 129: 6(bool) FOrdGreaterThan 127 128 + Branch 124 + 124: Label + 130: 6(bool) Phi 122 119 129 123 + SelectionMerge 132 None + BranchConditional 130 131 132 + 131: Label + 133: 10(float) Load 12(of1) + 134: 10(float) FAdd 133 14 + Store 12(of1) 134 + Branch 132 + 132: Label Return FunctionEnd 8(foo(): 6(bool) Function None 7 diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out index 1a41f6ad..34bdae06 100755 --- a/Test/baseResults/spv.simpleFunctionCall.frag.out +++ b/Test/baseResults/spv.simpleFunctionCall.frag.out @@ -7,20 +7,20 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 22 +// Id's are bound by 23 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 12 16 + EntryPoint Fragment 4 "main" 12 17 ExecutionMode 4 OriginLowerLeft Source GLSL 150 Name 4 "main" Name 9 "foo(" Name 12 "BaseColor" - Name 16 "gl_FragColor" - Name 19 "bigColor" - Name 21 "d" + Name 17 "gl_FragColor" + Name 20 "bigColor" + Name 22 "d" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -28,16 +28,16 @@ Linked fragment stage: 8: TypeFunction 7(fvec4) 11: TypePointer Input 7(fvec4) 12(BaseColor): 11(ptr) Variable Input - 15: TypePointer Output 7(fvec4) -16(gl_FragColor): 15(ptr) Variable Output - 18: TypePointer UniformConstant 7(fvec4) - 19(bigColor): 18(ptr) Variable UniformConstant - 20: TypePointer UniformConstant 6(float) - 21(d): 20(ptr) Variable UniformConstant + 16: TypePointer Output 7(fvec4) +17(gl_FragColor): 16(ptr) Variable Output + 19: TypePointer UniformConstant 7(fvec4) + 20(bigColor): 19(ptr) Variable UniformConstant + 21: TypePointer UniformConstant 6(float) + 22(d): 21(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label - 17: 7(fvec4) FunctionCall 9(foo() - Store 16(gl_FragColor) 17 + 18: 7(fvec4) FunctionCall 9(foo() + Store 17(gl_FragColor) 18 Return FunctionEnd 9(foo(): 7(fvec4) Function None 8 diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index ecee9304..efd2df07 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -10,12 +10,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 265 +// Id's are bound by 267 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 73 223 + EntryPoint Fragment 4 "main" 75 225 ExecutionMode 4 OriginLowerLeft Source ESSL 310 Name 4 "main" @@ -27,30 +27,30 @@ Linked fragment stage: Name 17 "v1" Name 18 "v2" Name 19 "i1" - Name 58 "local" - Name 60 "c" - Name 71 "f" - Name 73 "x" - Name 127 "d" - Name 153 "i" - Name 172 "j" - Name 223 "color" - Name 229 "v" - Name 230 "param" + Name 60 "local" + Name 62 "c" + Name 73 "f" + Name 75 "x" + Name 129 "d" + Name 155 "i" + Name 174 "j" + Name 225 "color" + Name 231 "v" Name 232 "param" Name 234 "param" - Name 242 "param" + Name 236 "param" Name 244 "param" Name 246 "param" - Decorate 58(local) RelaxedPrecision - Decorate 60(c) RelaxedPrecision - Decorate 71(f) RelaxedPrecision - Decorate 73(x) RelaxedPrecision - Decorate 127(d) RelaxedPrecision - Decorate 153(i) RelaxedPrecision - Decorate 172(j) RelaxedPrecision - Decorate 223(color) RelaxedPrecision - Decorate 229(v) RelaxedPrecision + Name 248 "param" + Decorate 60(local) RelaxedPrecision + Decorate 62(c) RelaxedPrecision + Decorate 73(f) RelaxedPrecision + Decorate 75(x) RelaxedPrecision + Decorate 129(d) RelaxedPrecision + Decorate 155(i) RelaxedPrecision + Decorate 174(j) RelaxedPrecision + Decorate 225(color) RelaxedPrecision + Decorate 231(v) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -61,291 +61,291 @@ Linked fragment stage: 11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr) 36: 6(float) Constant 0 37: 7(fvec4) ConstantComposite 36 36 36 36 - 47: 6(float) Constant 1065353216 - 48: 7(fvec4) ConstantComposite 47 47 47 47 - 59: TypePointer UniformConstant 9(int) - 60(c): 59(ptr) Variable UniformConstant - 63: 9(int) Constant 1 - 70: TypePointer Function 6(float) - 72: TypePointer Input 6(float) - 73(x): 72(ptr) Variable Input - 127(d): 59(ptr) Variable UniformConstant - 154: 9(int) Constant 0 - 160: 9(int) Constant 10 - 161: TypeBool - 173: 9(int) Constant 20 - 179: 9(int) Constant 30 - 184: 6(float) Constant 1120429670 - 204: 6(float) Constant 1079739679 - 222: TypePointer Output 6(float) - 223(color): 222(ptr) Variable Output - 228: TypePointer UniformConstant 7(fvec4) - 229(v): 228(ptr) Variable UniformConstant - 237: TypeInt 32 0 - 238: 237(int) Constant 1 - 249: 237(int) Constant 2 + 48: 6(float) Constant 1065353216 + 49: 7(fvec4) ConstantComposite 48 48 48 48 + 61: TypePointer UniformConstant 9(int) + 62(c): 61(ptr) Variable UniformConstant + 65: 9(int) Constant 1 + 72: TypePointer Function 6(float) + 74: TypePointer Input 6(float) + 75(x): 74(ptr) Variable Input + 129(d): 61(ptr) Variable UniformConstant + 156: 9(int) Constant 0 + 162: 9(int) Constant 10 + 163: TypeBool + 175: 9(int) Constant 20 + 181: 9(int) Constant 30 + 186: 6(float) Constant 1120429670 + 206: 6(float) Constant 1079739679 + 224: TypePointer Output 6(float) + 225(color): 224(ptr) Variable Output + 230: TypePointer UniformConstant 7(fvec4) + 231(v): 230(ptr) Variable UniformConstant + 239: TypeInt 32 0 + 240: 239(int) Constant 1 + 251: 239(int) Constant 2 4(main): 2 Function None 3 5: Label - 58(local): 10(ptr) Variable Function - 71(f): 70(ptr) Variable Function - 153(i): 10(ptr) Variable Function - 172(j): 10(ptr) Variable Function - 230(param): 8(ptr) Variable Function + 60(local): 10(ptr) Variable Function + 73(f): 72(ptr) Variable Function + 155(i): 10(ptr) Variable Function + 174(j): 10(ptr) Variable Function 232(param): 8(ptr) Variable Function - 234(param): 10(ptr) Variable Function - 242(param): 8(ptr) Variable Function + 234(param): 8(ptr) Variable Function + 236(param): 10(ptr) Variable Function 244(param): 8(ptr) Variable Function - 246(param): 10(ptr) Variable Function - 61: 9(int) Load 60(c) - Store 58(local) 61 - 62: 9(int) Load 58(local) - 64: 9(int) IAdd 62 63 - Store 58(local) 64 - 65: 9(int) Load 60(c) - SelectionMerge 69 None - Switch 65 68 - case 1: 66 - case 2: 67 + 246(param): 8(ptr) Variable Function + 248(param): 10(ptr) Variable Function + 63: 9(int) Load 62(c) + Store 60(local) 63 + 64: 9(int) Load 60(local) + 66: 9(int) IAdd 64 65 + Store 60(local) 66 + 67: 9(int) Load 62(c) + SelectionMerge 71 None + Switch 67 70 + case 1: 68 + case 2: 69 + 70: Label + 82: 6(float) Load 75(x) + 83: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 82 + Store 73(f) 83 + Branch 71 68: Label - 80: 6(float) Load 73(x) - 81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80 - Store 71(f) 81 - Branch 69 - 66: Label - 74: 6(float) Load 73(x) - 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74 - Store 71(f) 75 - Branch 69 - 67: Label - 77: 6(float) Load 73(x) - 78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77 - Store 71(f) 78 - Branch 69 - 69: Label - 83: 9(int) Load 60(c) - SelectionMerge 87 None - Switch 83 86 - case 1: 84 - case 2: 85 + 76: 6(float) Load 75(x) + 77: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 76 + Store 73(f) 77 + Branch 71 + 69: Label + 79: 6(float) Load 75(x) + 80: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 79 + Store 73(f) 80 + Branch 71 + 71: Label + 85: 9(int) Load 62(c) + SelectionMerge 89 None + Switch 85 88 + case 1: 86 + case 2: 87 + 88: Label + 99: 6(float) Load 75(x) + 100: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 99 + 101: 6(float) Load 73(f) + 102: 6(float) FAdd 101 100 + Store 73(f) 102 + Branch 89 86: Label - 97: 6(float) Load 73(x) - 98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97 - 99: 6(float) Load 71(f) - 100: 6(float) FAdd 99 98 - Store 71(f) 100 + 90: 6(float) Load 75(x) + 91: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 90 + 92: 6(float) Load 73(f) + 93: 6(float) FAdd 92 91 + Store 73(f) 93 Branch 87 - 84: Label - 88: 6(float) Load 73(x) - 89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88 - 90: 6(float) Load 71(f) - 91: 6(float) FAdd 90 89 - Store 71(f) 91 - Branch 85 - 85: Label - 92: 6(float) Load 73(x) - 93: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 92 - 94: 6(float) Load 71(f) - 95: 6(float) FAdd 94 93 - Store 71(f) 95 - Branch 87 - 87: Label - 102: 9(int) Load 60(c) - SelectionMerge 105 None - Switch 102 105 - case 1: 103 - case 2: 104 - 103: Label - 106: 6(float) Load 73(x) - 107: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 106 - 108: 6(float) Load 71(f) - 109: 6(float) FAdd 108 107 - Store 71(f) 109 - Branch 105 - 104: Label - 111: 6(float) Load 73(x) - 112: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 111 - 113: 6(float) Load 71(f) - 114: 6(float) FAdd 113 112 - Store 71(f) 114 - Branch 105 - 105: Label - 117: 9(int) Load 60(c) - SelectionMerge 121 None - Switch 117 120 - case 1: 118 - case 2: 119 + 87: Label + 94: 6(float) Load 75(x) + 95: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 94 + 96: 6(float) Load 73(f) + 97: 6(float) FAdd 96 95 + Store 73(f) 97 + Branch 89 + 89: Label + 104: 9(int) Load 62(c) + SelectionMerge 107 None + Switch 104 107 + case 1: 105 + case 2: 106 + 105: Label + 108: 6(float) Load 75(x) + 109: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 108 + 110: 6(float) Load 73(f) + 111: 6(float) FAdd 110 109 + Store 73(f) 111 + Branch 107 + 106: Label + 113: 6(float) Load 75(x) + 114: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 113 + 115: 6(float) Load 73(f) + 116: 6(float) FAdd 115 114 + Store 73(f) 116 + Branch 107 + 107: Label + 119: 9(int) Load 62(c) + SelectionMerge 123 None + Switch 119 122 + case 1: 120 + case 2: 121 + 122: Label + 150: 6(float) Load 75(x) + 151: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 150 + 152: 6(float) Load 73(f) + 153: 6(float) FAdd 152 151 + Store 73(f) 153 + Branch 123 120: Label - 148: 6(float) Load 73(x) - 149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148 - 150: 6(float) Load 71(f) - 151: 6(float) FAdd 150 149 - Store 71(f) 151 - Branch 121 - 118: Label - 122: 6(float) Load 73(x) - 123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122 - 124: 6(float) Load 71(f) - 125: 6(float) FAdd 124 123 - Store 71(f) 125 - Branch 121 - 119: Label - 128: 9(int) Load 127(d) - SelectionMerge 131 None - Switch 128 131 - case 1: 129 - case 2: 130 - 129: Label - 132: 6(float) Load 73(x) - 133: 6(float) Load 73(x) - 134: 6(float) FMul 132 133 - 135: 6(float) Load 73(x) + 124: 6(float) Load 75(x) + 125: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 124 + 126: 6(float) Load 73(f) + 127: 6(float) FAdd 126 125 + Store 73(f) 127 + Branch 123 + 121: Label + 130: 9(int) Load 129(d) + SelectionMerge 133 None + Switch 130 133 + case 1: 131 + case 2: 132 + 131: Label + 134: 6(float) Load 75(x) + 135: 6(float) Load 75(x) 136: 6(float) FMul 134 135 - 137: 6(float) Load 71(f) - 138: 6(float) FAdd 137 136 - Store 71(f) 138 - Branch 131 - 130: Label - 140: 6(float) Load 73(x) - 141: 6(float) Load 73(x) - 142: 6(float) FMul 140 141 - 143: 6(float) Load 71(f) - 144: 6(float) FAdd 143 142 - Store 71(f) 144 - Branch 131 - 131: Label - Branch 121 - 121: Label - Store 153(i) 154 - Branch 155 - 155: Label - 159: 9(int) Load 153(i) - 162: 161(bool) SLessThan 159 160 - LoopMerge 157 158 None - BranchConditional 162 156 157 - 156: Label - 163: 9(int) Load 60(c) - SelectionMerge 167 None - Switch 163 166 - case 1: 164 - case 2: 165 - 166: Label - 198: 6(float) Load 73(x) - 199: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 198 - 200: 6(float) Load 71(f) - 201: 6(float) FAdd 200 199 - Store 71(f) 201 - Branch 167 - 164: Label - 168: 6(float) Load 73(x) - 169: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 168 - 170: 6(float) Load 71(f) - 171: 6(float) FAdd 170 169 - Store 71(f) 171 - Store 172(j) 173 - Branch 174 - 174: Label - 178: 9(int) Load 172(j) - 180: 161(bool) SLessThan 178 179 - LoopMerge 176 177 None - BranchConditional 180 175 176 - 175: Label - 181: 6(float) Load 71(f) - 182: 6(float) FAdd 181 47 - Store 71(f) 182 - 183: 6(float) Load 71(f) - 185: 161(bool) FOrdLessThan 183 184 - SelectionMerge 187 None - BranchConditional 185 186 187 - 186: Label - Branch 176 - 187: Label - Branch 177 - 177: Label - 189: 9(int) Load 172(j) - 190: 9(int) IAdd 189 63 - Store 172(j) 190 - Branch 174 - 176: Label - Branch 167 - 165: Label - 192: 6(float) Load 73(x) - 193: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 192 - 194: 6(float) Load 71(f) - 195: 6(float) FAdd 194 193 - Store 71(f) 195 - Branch 167 - 167: Label - 203: 6(float) Load 71(f) - 205: 161(bool) FOrdLessThan 203 204 - SelectionMerge 207 None - BranchConditional 205 206 207 - 206: Label - Branch 157 - 207: Label - Branch 158 - 158: Label - 209: 9(int) Load 153(i) - 210: 9(int) IAdd 209 63 - Store 153(i) 210 - Branch 155 + 137: 6(float) Load 75(x) + 138: 6(float) FMul 136 137 + 139: 6(float) Load 73(f) + 140: 6(float) FAdd 139 138 + Store 73(f) 140 + Branch 133 + 132: Label + 142: 6(float) Load 75(x) + 143: 6(float) Load 75(x) + 144: 6(float) FMul 142 143 + 145: 6(float) Load 73(f) + 146: 6(float) FAdd 145 144 + Store 73(f) 146 + Branch 133 + 133: Label + Branch 123 + 123: Label + Store 155(i) 156 + Branch 157 157: Label - 211: 9(int) Load 60(c) - SelectionMerge 214 None - Switch 211 214 - case 1: 212 - case 2: 213 - 212: Label - 215: 6(float) Load 73(x) - 216: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 215 - 217: 6(float) Load 71(f) - 218: 6(float) FAdd 217 216 - Store 71(f) 218 - Branch 214 - 213: Label - Branch 214 - 214: Label - 224: 6(float) Load 71(f) - 225: 9(int) Load 58(local) - 226: 6(float) ConvertSToF 225 - 227: 6(float) FAdd 224 226 - Store 223(color) 227 - 231: 7(fvec4) Load 229(v) - Store 230(param) 231 - 233: 7(fvec4) Load 229(v) + 161: 9(int) Load 155(i) + 164: 163(bool) SLessThan 161 162 + LoopMerge 159 160 None + BranchConditional 164 158 159 + 158: Label + 165: 9(int) Load 62(c) + SelectionMerge 169 None + Switch 165 168 + case 1: 166 + case 2: 167 + 168: Label + 200: 6(float) Load 75(x) + 201: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 200 + 202: 6(float) Load 73(f) + 203: 6(float) FAdd 202 201 + Store 73(f) 203 + Branch 169 + 166: Label + 170: 6(float) Load 75(x) + 171: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 170 + 172: 6(float) Load 73(f) + 173: 6(float) FAdd 172 171 + Store 73(f) 173 + Store 174(j) 175 + Branch 176 + 176: Label + 180: 9(int) Load 174(j) + 182: 163(bool) SLessThan 180 181 + LoopMerge 178 179 None + BranchConditional 182 177 178 + 177: Label + 183: 6(float) Load 73(f) + 184: 6(float) FAdd 183 48 + Store 73(f) 184 + 185: 6(float) Load 73(f) + 187: 163(bool) FOrdLessThan 185 186 + SelectionMerge 189 None + BranchConditional 187 188 189 + 188: Label + Branch 178 + 189: Label + Branch 179 + 179: Label + 191: 9(int) Load 174(j) + 192: 9(int) IAdd 191 65 + Store 174(j) 192 + Branch 176 + 178: Label + Branch 169 + 167: Label + 194: 6(float) Load 75(x) + 195: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 194 + 196: 6(float) Load 73(f) + 197: 6(float) FAdd 196 195 + Store 73(f) 197 + Branch 169 + 169: Label + 205: 6(float) Load 73(f) + 207: 163(bool) FOrdLessThan 205 206 + SelectionMerge 209 None + BranchConditional 207 208 209 + 208: Label + Branch 159 + 209: Label + Branch 160 + 160: Label + 211: 9(int) Load 155(i) + 212: 9(int) IAdd 211 65 + Store 155(i) 212 + Branch 157 + 159: Label + 213: 9(int) Load 62(c) + SelectionMerge 216 None + Switch 213 216 + case 1: 214 + case 2: 215 + 214: Label + 217: 6(float) Load 75(x) + 218: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 217 + 219: 6(float) Load 73(f) + 220: 6(float) FAdd 219 218 + Store 73(f) 220 + Branch 216 + 215: Label + Branch 216 + 216: Label + 226: 6(float) Load 73(f) + 227: 9(int) Load 60(local) + 228: 6(float) ConvertSToF 227 + 229: 6(float) FAdd 226 228 + Store 225(color) 229 + 233: 7(fvec4) Load 231(v) Store 232(param) 233 - 235: 9(int) Load 60(c) + 235: 7(fvec4) Load 231(v) Store 234(param) 235 - 236: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param) - 239: 6(float) CompositeExtract 236 1 - 240: 6(float) Load 223(color) - 241: 6(float) FAdd 240 239 - Store 223(color) 241 - 243: 7(fvec4) Load 229(v) - Store 242(param) 243 - 245: 7(fvec4) Load 229(v) + 237: 9(int) Load 62(c) + Store 236(param) 237 + 238: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 232(param) 234(param) 236(param) + 241: 6(float) CompositeExtract 238 1 + 242: 6(float) Load 225(color) + 243: 6(float) FAdd 242 241 + Store 225(color) 243 + 245: 7(fvec4) Load 231(v) Store 244(param) 245 - 247: 9(int) Load 60(c) + 247: 7(fvec4) Load 231(v) Store 246(param) 247 - 248: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param) - 250: 6(float) CompositeExtract 248 2 - 251: 6(float) Load 223(color) - 252: 6(float) FAdd 251 250 - Store 223(color) 252 - 253: 9(int) Load 60(c) - SelectionMerge 256 None - Switch 253 255 - case 0: 254 - 255: Label - Branch 256 - 254: Label - Branch 256 - 256: Label - 260: 9(int) Load 60(c) - SelectionMerge 262 None - Switch 260 261 - 261: Label - Branch 262 - 262: Label + 249: 9(int) Load 62(c) + Store 248(param) 249 + 250: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 244(param) 246(param) 248(param) + 252: 6(float) CompositeExtract 250 2 + 253: 6(float) Load 225(color) + 254: 6(float) FAdd 253 252 + Store 225(color) 254 + 255: 9(int) Load 62(c) + SelectionMerge 258 None + Switch 255 257 + case 0: 256 + 257: Label + Branch 258 + 256: Label + Branch 258 + 258: Label + 262: 9(int) Load 62(c) + SelectionMerge 264 None + Switch 262 263 + 263: Label + Branch 264 + 264: Label Return FunctionEnd 15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 @@ -379,26 +379,26 @@ Linked fragment stage: 18(v2): 8(ptr) FunctionParameter 19(i1): 10(ptr) FunctionParameter 21: Label - 39: 9(int) Load 19(i1) - SelectionMerge 44 None - Switch 39 44 - case 0: 40 - case 2: 41 - case 1: 42 - case 3: 43 - 40: Label - 45: 7(fvec4) Load 17(v1) - ReturnValue 45 + 40: 9(int) Load 19(i1) + SelectionMerge 45 None + Switch 40 45 + case 0: 41 + case 2: 42 + case 1: 43 + case 3: 44 41: Label - ReturnValue 48 + 46: 7(fvec4) Load 17(v1) + ReturnValue 46 42: Label - 50: 7(fvec4) Load 18(v2) - ReturnValue 50 + ReturnValue 49 43: Label - 52: 7(fvec4) Load 17(v1) - 53: 7(fvec4) Load 18(v2) - 54: 7(fvec4) FMul 52 53 - ReturnValue 54 - 44: Label + 51: 7(fvec4) Load 18(v2) + ReturnValue 51 + 44: Label + 53: 7(fvec4) Load 17(v1) + 54: 7(fvec4) Load 18(v2) + 55: 7(fvec4) FMul 53 54 + ReturnValue 55 + 45: Label ReturnValue 37 FunctionEnd From 97605c86fd8ef98922ee3d2a17b78de7fc9d566b Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Wed, 20 Jan 2016 10:19:25 -0500 Subject: [PATCH 33/84] Fix #137 by avoiding a C++11 feature. Apparently, older MSVC versions don't support brace-initializers for function arguments. Thanks @baldurk for a suggestion on his branch. --- SPIRV/SpvBuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 82e5f2c9..ac6283e8 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1804,7 +1804,9 @@ Block& Builder::makeNewBlock() Builder::LoopBlocks& Builder::makeNewLoop() { - loops.push({makeNewBlock(), makeNewBlock(), makeNewBlock(), makeNewBlock()}); + // Older MSVC versions don't allow inlining of blocks below. + LoopBlocks blocks = {makeNewBlock(), makeNewBlock(), makeNewBlock(), makeNewBlock()}; + loops.push(blocks); return loops.top(); } From 213bbbe4a77a8c9c9bb6f4f24be3fe3a2f764b17 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Wed, 20 Jan 2016 11:51:43 -0500 Subject: [PATCH 34/84] Split loop header from condition testing for for/while loops. --- SPIRV/GlslangToSpv.cpp | 22 +- Test/baseResults/spv.dataOutIndirect.vert.out | 76 +- .../spv.for-continue-break.vert.out | 112 +- Test/baseResults/spv.for-nobody.vert.out | 50 +- Test/baseResults/spv.for-simple.vert.out | 46 +- Test/baseResults/spv.forLoop.frag.out | 326 +-- Test/baseResults/spv.localAggregates.frag.out | 156 +- Test/baseResults/spv.loops.frag.out | 2104 +++++++++-------- Test/baseResults/spv.loopsArtificial.frag.out | 358 +-- Test/baseResults/spv.switch.frag.out | 292 +-- .../spv.while-continue-break.vert.out | 96 +- Test/baseResults/spv.while-simple.vert.out | 38 +- Test/baseResults/spv.whileLoop.frag.out | 54 +- Test/spv.for-notest.vert | 3 - 14 files changed, 1905 insertions(+), 1828 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 71127c7e..9d42e3cf 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1391,12 +1391,22 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn { auto blocks = builder.makeNewLoop(); builder.createBranch(&blocks.head); + // Spec requires back edges to target header blocks, and every header block + // must dominate its merge block. Make a header block first to ensure these + // conditions are met. By definition, it will contain OpLoopMerge, followed + // by a block-ending branch. But we don't want to put any other body/test + // instructions in it, since the body/test may have arbitrary instructions, + // including merges of its own. + builder.setBuildPoint(&blocks.head); + builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); if (node->testFirst() && node->getTest()) { - builder.setBuildPoint(&blocks.head); + spv::Block& test = builder.makeNewBlock(); + builder.createBranch(&test); + + builder.setBuildPoint(&test); node->getTest()->traverse(this); spv::Id condition = builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); - builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); builder.setBuildPoint(&blocks.body); @@ -1411,14 +1421,6 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn node->getTerminal()->traverse(this); builder.createBranch(&blocks.head); } else { - // Spec requires back edges to target header blocks, and every header - // block must dominate its merge block. Make a header block first to - // ensure these conditions are met. By definition, it will contain - // OpLoopMerge, followed by a block-ending branch. But we don't want to - // put any other body instructions in it, since the body may have - // arbitrary instructions, including merges of its own. - builder.setBuildPoint(&blocks.head); - builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); builder.createBranch(&blocks.body); breakForLoop.push(true); diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index 08c07a9e..62da85f3 100755 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -8,66 +8,68 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 39 +// Id's are bound by 40 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 24 27 33 38 + EntryPoint Vertex 4 "main" 25 28 34 39 Source GLSL 130 Name 4 "main" Name 8 "i" - Name 24 "colorOut" - Name 27 "color" - Name 33 "gl_Position" - Name 38 "gl_VertexID" - Decorate 33(gl_Position) BuiltIn Position - Decorate 38(gl_VertexID) BuiltIn VertexId + Name 25 "colorOut" + Name 28 "color" + Name 34 "gl_Position" + Name 39 "gl_VertexID" + Decorate 34(gl_Position) BuiltIn Position + Decorate 39(gl_VertexID) BuiltIn VertexId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 1 - 15: 6(int) Constant 5 - 16: TypeBool - 18: TypeFloat 32 - 19: TypeVector 18(float) 4 - 20: TypeInt 32 0 - 21: 20(int) Constant 6 - 22: TypeArray 19(fvec4) 21 - 23: TypePointer Output 22 - 24(colorOut): 23(ptr) Variable Output - 26: TypePointer Input 19(fvec4) - 27(color): 26(ptr) Variable Input - 29: TypePointer Output 19(fvec4) - 33(gl_Position): 29(ptr) Variable Output - 34: 6(int) Constant 2 - 37: TypePointer Input 6(int) - 38(gl_VertexID): 37(ptr) Variable Input + 16: 6(int) Constant 5 + 17: TypeBool + 19: TypeFloat 32 + 20: TypeVector 19(float) 4 + 21: TypeInt 32 0 + 22: 21(int) Constant 6 + 23: TypeArray 20(fvec4) 22 + 24: TypePointer Output 23 + 25(colorOut): 24(ptr) Variable Output + 27: TypePointer Input 20(fvec4) + 28(color): 27(ptr) Variable Input + 30: TypePointer Output 20(fvec4) + 34(gl_Position): 30(ptr) Variable Output + 35: 6(int) Constant 2 + 38: TypePointer Input 6(int) + 39(gl_VertexID): 38(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 LoopMerge 12 13 None - BranchConditional 17 11 12 + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 18: 17(bool) SLessThan 15 16 + BranchConditional 18 11 12 11: Label - 25: 6(int) Load 8(i) - 28: 19(fvec4) Load 27(color) - 30: 29(ptr) AccessChain 24(colorOut) 25 - Store 30 28 + 26: 6(int) Load 8(i) + 29: 20(fvec4) Load 28(color) + 31: 30(ptr) AccessChain 25(colorOut) 26 + Store 31 29 Branch 13 13: Label - 31: 6(int) Load 8(i) - 32: 6(int) IAdd 31 9 - Store 8(i) 32 + 32: 6(int) Load 8(i) + 33: 6(int) IAdd 32 9 + Store 8(i) 33 Branch 10 12: Label - 35: 29(ptr) AccessChain 24(colorOut) 34 - 36: 19(fvec4) Load 35 - Store 33(gl_Position) 36 + 36: 30(ptr) AccessChain 25(colorOut) 35 + 37: 20(fvec4) Load 36 + Store 34(gl_Position) 37 Return FunctionEnd diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index 33c61386..608ec661 100644 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -5,86 +5,88 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 47 +// Id's are bound by 48 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 45 46 + EntryPoint Vertex 4 "main" 46 47 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 18 "A" - Name 26 "B" - Name 28 "C" - Name 35 "D" - Name 37 "E" - Name 38 "F" - Name 42 "G" - Name 45 "gl_VertexID" - Name 46 "gl_InstanceID" - Decorate 45(gl_VertexID) BuiltIn VertexId - Decorate 46(gl_InstanceID) BuiltIn InstanceId + Name 19 "A" + Name 27 "B" + Name 29 "C" + Name 36 "D" + Name 38 "E" + Name 39 "F" + Name 43 "G" + Name 46 "gl_VertexID" + Name 47 "gl_InstanceID" + Decorate 46(gl_VertexID) BuiltIn VertexId + Decorate 47(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 1 - 21: 6(int) Constant 2 - 30: 6(int) Constant 3 - 39: 6(int) Constant 12 - 43: 6(int) Constant 99 - 44: TypePointer Input 6(int) - 45(gl_VertexID): 44(ptr) Variable Input -46(gl_InstanceID): 44(ptr) Variable Input + 16: 6(int) Constant 10 + 17: TypeBool + 20: 6(int) Constant 1 + 22: 6(int) Constant 2 + 31: 6(int) Constant 3 + 40: 6(int) Constant 12 + 44: 6(int) Constant 99 + 45: TypePointer Input 6(int) + 46(gl_VertexID): 45(ptr) Variable Input +47(gl_InstanceID): 45(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function - 18(A): 7(ptr) Variable Function - 26(B): 7(ptr) Variable Function - 28(C): 7(ptr) Variable Function - 35(D): 7(ptr) Variable Function - 37(E): 7(ptr) Variable Function - 38(F): 7(ptr) Variable Function - 42(G): 7(ptr) Variable Function + 19(A): 7(ptr) Variable Function + 27(B): 7(ptr) Variable Function + 29(C): 7(ptr) Variable Function + 36(D): 7(ptr) Variable Function + 38(E): 7(ptr) Variable Function + 39(F): 7(ptr) Variable Function + 43(G): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 LoopMerge 12 13 None - BranchConditional 17 11 12 + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 18: 17(bool) SLessThan 15 16 + BranchConditional 18 11 12 11: Label - Store 18(A) 19 - 20: 6(int) Load 8(i) - 22: 6(int) SMod 20 21 - 23: 16(bool) IEqual 22 9 - SelectionMerge 25 None - BranchConditional 23 24 25 - 24: Label - Store 26(B) 19 + Store 19(A) 20 + 21: 6(int) Load 8(i) + 23: 6(int) SMod 21 22 + 24: 17(bool) IEqual 23 9 + SelectionMerge 26 None + BranchConditional 24 25 26 + 25: Label + Store 27(B) 20 Branch 13 - 25: Label - 29: 6(int) Load 8(i) - 31: 6(int) SMod 29 30 - 32: 16(bool) IEqual 31 9 - SelectionMerge 34 None - BranchConditional 32 33 34 - 33: Label - Store 35(D) 19 + 26: Label + 30: 6(int) Load 8(i) + 32: 6(int) SMod 30 31 + 33: 17(bool) IEqual 32 9 + SelectionMerge 35 None + BranchConditional 33 34 35 + 34: Label + Store 36(D) 20 Branch 12 - 34: Label - Store 38(F) 39 + 35: Label + Store 39(F) 40 Branch 13 13: Label - 40: 6(int) Load 8(i) - 41: 6(int) IAdd 40 19 - Store 8(i) 41 + 41: 6(int) Load 8(i) + 42: 6(int) IAdd 41 20 + Store 8(i) 42 Branch 10 12: Label - Store 42(G) 43 + Store 43(G) 44 Return FunctionEnd diff --git a/Test/baseResults/spv.for-nobody.vert.out b/Test/baseResults/spv.for-nobody.vert.out index 231e3ac1..820dd5ec 100644 --- a/Test/baseResults/spv.for-nobody.vert.out +++ b/Test/baseResults/spv.for-nobody.vert.out @@ -7,53 +7,55 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 27 +// Id's are bound by 28 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 22 25 26 + EntryPoint Vertex 4 "main" 23 26 27 Source GLSL 450 Name 4 "main" Name 8 "i" - Name 22 "r" - Name 25 "gl_VertexID" - Name 26 "gl_InstanceID" - Decorate 22(r) Location 0 - Decorate 25(gl_VertexID) BuiltIn VertexId - Decorate 26(gl_InstanceID) BuiltIn InstanceId + Name 23 "r" + Name 26 "gl_VertexID" + Name 27 "gl_InstanceID" + Decorate 23(r) Location 0 + Decorate 26(gl_VertexID) BuiltIn VertexId + Decorate 27(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 1 - 21: TypePointer Output 6(int) - 22(r): 21(ptr) Variable Output - 24: TypePointer Input 6(int) - 25(gl_VertexID): 24(ptr) Variable Input -26(gl_InstanceID): 24(ptr) Variable Input + 16: 6(int) Constant 10 + 17: TypeBool + 20: 6(int) Constant 1 + 22: TypePointer Output 6(int) + 23(r): 22(ptr) Variable Output + 25: TypePointer Input 6(int) + 26(gl_VertexID): 25(ptr) Variable Input +27(gl_InstanceID): 25(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 LoopMerge 12 13 None - BranchConditional 17 11 12 + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 18: 17(bool) SLessThan 15 16 + BranchConditional 18 11 12 11: Label Branch 13 13: Label - 18: 6(int) Load 8(i) - 20: 6(int) IAdd 18 19 - Store 8(i) 20 + 19: 6(int) Load 8(i) + 21: 6(int) IAdd 19 20 + Store 8(i) 21 Branch 10 12: Label - 23: 6(int) Load 8(i) - Store 22(r) 23 + 24: 6(int) Load 8(i) + Store 23(r) 24 Return FunctionEnd diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index 570ee5bb..3d090e5b 100755 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -5,50 +5,52 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 26 +// Id's are bound by 27 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 24 25 + EntryPoint Vertex 4 "main" 25 26 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 18 "j" - Name 24 "gl_VertexID" - Name 25 "gl_InstanceID" - Decorate 24(gl_VertexID) BuiltIn VertexId - Decorate 25(gl_InstanceID) BuiltIn InstanceId + Name 19 "j" + Name 25 "gl_VertexID" + Name 26 "gl_InstanceID" + Decorate 25(gl_VertexID) BuiltIn VertexId + Decorate 26(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 12 - 21: 6(int) Constant 1 - 23: TypePointer Input 6(int) - 24(gl_VertexID): 23(ptr) Variable Input -25(gl_InstanceID): 23(ptr) Variable Input + 16: 6(int) Constant 10 + 17: TypeBool + 20: 6(int) Constant 12 + 22: 6(int) Constant 1 + 24: TypePointer Input 6(int) + 25(gl_VertexID): 24(ptr) Variable Input +26(gl_InstanceID): 24(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function - 18(j): 7(ptr) Variable Function + 19(j): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 LoopMerge 12 13 None - BranchConditional 17 11 12 + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 18: 17(bool) SLessThan 15 16 + BranchConditional 18 11 12 11: Label - Store 18(j) 19 + Store 19(j) 20 Branch 13 13: Label - 20: 6(int) Load 8(i) - 22: 6(int) IAdd 20 21 - Store 8(i) 22 + 21: 6(int) Load 8(i) + 23: 6(int) IAdd 21 22 + Store 8(i) 23 Branch 10 12: Label Return diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 95a795aa..9e68e6b2 100755 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -5,30 +5,30 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 127 +// Id's are bound by 132 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 36 101 + EntryPoint Fragment 4 "main" 11 37 105 ExecutionMode 4 OriginLowerLeft Source GLSL 130 Name 4 "main" Name 9 "color" Name 11 "BaseColor" Name 15 "i" - Name 23 "Count" - Name 28 "bigColor" - Name 36 "gl_FragColor" - Name 39 "sum" - Name 41 "i" - Name 52 "v4" - Name 62 "i" - Name 69 "tv4" - Name 86 "r" - Name 92 "i" - Name 101 "f" - Name 114 "i" + Name 24 "Count" + Name 29 "bigColor" + Name 37 "gl_FragColor" + Name 40 "sum" + Name 42 "i" + Name 54 "v4" + Name 64 "i" + Name 72 "tv4" + Name 89 "r" + Name 95 "i" + Name 105 "f" + Name 118 "i" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -39,166 +39,176 @@ Linked fragment stage: 13: TypeInt 32 1 14: TypePointer Function 13(int) 16: 13(int) Constant 0 - 22: TypePointer UniformConstant 13(int) - 23(Count): 22(ptr) Variable UniformConstant - 25: TypeBool - 27: TypePointer UniformConstant 7(fvec4) - 28(bigColor): 27(ptr) Variable UniformConstant - 33: 13(int) Constant 1 - 35: TypePointer Output 7(fvec4) -36(gl_FragColor): 35(ptr) Variable Output - 38: TypePointer Function 6(float) - 40: 6(float) Constant 0 - 47: 13(int) Constant 4 - 49: TypeInt 32 0 - 50: TypeVector 49(int) 4 - 51: TypePointer UniformConstant 50(ivec4) - 52(v4): 51(ptr) Variable UniformConstant - 54: TypePointer UniformConstant 49(int) - 74: 49(int) Constant 4 - 87: TypeVector 6(float) 3 - 100: TypePointer Input 6(float) - 101(f): 100(ptr) Variable Input - 103: 49(int) Constant 3 - 120: 13(int) Constant 16 + 23: TypePointer UniformConstant 13(int) + 24(Count): 23(ptr) Variable UniformConstant + 26: TypeBool + 28: TypePointer UniformConstant 7(fvec4) + 29(bigColor): 28(ptr) Variable UniformConstant + 34: 13(int) Constant 1 + 36: TypePointer Output 7(fvec4) +37(gl_FragColor): 36(ptr) Variable Output + 39: TypePointer Function 6(float) + 41: 6(float) Constant 0 + 49: 13(int) Constant 4 + 51: TypeInt 32 0 + 52: TypeVector 51(int) 4 + 53: TypePointer UniformConstant 52(ivec4) + 54(v4): 53(ptr) Variable UniformConstant + 56: TypePointer UniformConstant 51(int) + 77: 51(int) Constant 4 + 90: TypeVector 6(float) 3 + 104: TypePointer Input 6(float) + 105(f): 104(ptr) Variable Input + 107: 51(int) Constant 3 + 125: 13(int) Constant 16 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function 15(i): 14(ptr) Variable Function - 39(sum): 38(ptr) Variable Function - 41(i): 14(ptr) Variable Function - 62(i): 14(ptr) Variable Function - 69(tv4): 8(ptr) Variable Function - 86(r): 8(ptr) Variable Function - 92(i): 14(ptr) Variable Function - 114(i): 14(ptr) Variable Function + 40(sum): 39(ptr) Variable Function + 42(i): 14(ptr) Variable Function + 64(i): 14(ptr) Variable Function + 72(tv4): 8(ptr) Variable Function + 89(r): 8(ptr) Variable Function + 95(i): 14(ptr) Variable Function + 118(i): 14(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 Store 15(i) 16 Branch 17 17: Label - 21: 13(int) Load 15(i) - 24: 13(int) Load 23(Count) - 26: 25(bool) SLessThan 21 24 LoopMerge 19 20 None - BranchConditional 26 18 19 + Branch 21 + 21: Label + 22: 13(int) Load 15(i) + 25: 13(int) Load 24(Count) + 27: 26(bool) SLessThan 22 25 + BranchConditional 27 18 19 18: Label - 29: 7(fvec4) Load 28(bigColor) - 30: 7(fvec4) Load 9(color) - 31: 7(fvec4) FAdd 30 29 - Store 9(color) 31 + 30: 7(fvec4) Load 29(bigColor) + 31: 7(fvec4) Load 9(color) + 32: 7(fvec4) FAdd 31 30 + Store 9(color) 32 Branch 20 20: Label - 32: 13(int) Load 15(i) - 34: 13(int) IAdd 32 33 - Store 15(i) 34 + 33: 13(int) Load 15(i) + 35: 13(int) IAdd 33 34 + Store 15(i) 35 Branch 17 19: Label - 37: 7(fvec4) Load 9(color) - Store 36(gl_FragColor) 37 - Store 39(sum) 40 - Store 41(i) 16 - Branch 42 - 42: Label - 46: 13(int) Load 41(i) - 48: 25(bool) SLessThan 46 47 - LoopMerge 44 45 None - BranchConditional 48 43 44 - 43: Label - 53: 13(int) Load 41(i) - 55: 54(ptr) AccessChain 52(v4) 53 - 56: 49(int) Load 55 - 57: 6(float) ConvertUToF 56 - 58: 6(float) Load 39(sum) - 59: 6(float) FAdd 58 57 - Store 39(sum) 59 - Branch 45 - 45: Label - 60: 13(int) Load 41(i) - 61: 13(int) IAdd 60 33 - Store 41(i) 61 - Branch 42 - 44: Label - Store 62(i) 16 - Branch 63 - 63: Label - 67: 13(int) Load 62(i) - 68: 25(bool) SLessThan 67 47 - LoopMerge 65 66 None - BranchConditional 68 64 65 - 64: Label - 70: 13(int) Load 62(i) - 71: 13(int) Load 62(i) - 72: 54(ptr) AccessChain 52(v4) 71 - 73: 49(int) Load 72 - 75: 49(int) IMul 73 74 - 76: 6(float) ConvertUToF 75 - 77: 38(ptr) AccessChain 69(tv4) 70 - Store 77 76 - Branch 66 - 66: Label - 78: 13(int) Load 62(i) - 79: 13(int) IAdd 78 33 - Store 62(i) 79 - Branch 63 + 38: 7(fvec4) Load 9(color) + Store 37(gl_FragColor) 38 + Store 40(sum) 41 + Store 42(i) 16 + Branch 43 + 43: Label + LoopMerge 45 46 None + Branch 47 + 47: Label + 48: 13(int) Load 42(i) + 50: 26(bool) SLessThan 48 49 + BranchConditional 50 44 45 + 44: Label + 55: 13(int) Load 42(i) + 57: 56(ptr) AccessChain 54(v4) 55 + 58: 51(int) Load 57 + 59: 6(float) ConvertUToF 58 + 60: 6(float) Load 40(sum) + 61: 6(float) FAdd 60 59 + Store 40(sum) 61 + Branch 46 + 46: Label + 62: 13(int) Load 42(i) + 63: 13(int) IAdd 62 34 + Store 42(i) 63 + Branch 43 + 45: Label + Store 64(i) 16 + Branch 65 65: Label - 80: 6(float) Load 39(sum) - 81: 7(fvec4) CompositeConstruct 80 80 80 80 - 82: 7(fvec4) Load 69(tv4) - 83: 7(fvec4) FAdd 81 82 - 84: 7(fvec4) Load 36(gl_FragColor) - 85: 7(fvec4) FAdd 84 83 - Store 36(gl_FragColor) 85 - 88: 7(fvec4) Load 11(BaseColor) - 89: 87(fvec3) VectorShuffle 88 88 0 1 2 - 90: 7(fvec4) Load 86(r) - 91: 7(fvec4) VectorShuffle 90 89 4 5 6 3 - Store 86(r) 91 - Store 92(i) 16 - Branch 93 - 93: Label - 97: 13(int) Load 92(i) - 98: 13(int) Load 23(Count) - 99: 25(bool) SLessThan 97 98 - LoopMerge 95 96 None - BranchConditional 99 94 95 - 94: Label - 102: 6(float) Load 101(f) - 104: 38(ptr) AccessChain 86(r) 103 - Store 104 102 + LoopMerge 67 68 None + Branch 69 + 69: Label + 70: 13(int) Load 64(i) + 71: 26(bool) SLessThan 70 49 + BranchConditional 71 66 67 + 66: Label + 73: 13(int) Load 64(i) + 74: 13(int) Load 64(i) + 75: 56(ptr) AccessChain 54(v4) 74 + 76: 51(int) Load 75 + 78: 51(int) IMul 76 77 + 79: 6(float) ConvertUToF 78 + 80: 39(ptr) AccessChain 72(tv4) 73 + Store 80 79 + Branch 68 + 68: Label + 81: 13(int) Load 64(i) + 82: 13(int) IAdd 81 34 + Store 64(i) 82 + Branch 65 + 67: Label + 83: 6(float) Load 40(sum) + 84: 7(fvec4) CompositeConstruct 83 83 83 83 + 85: 7(fvec4) Load 72(tv4) + 86: 7(fvec4) FAdd 84 85 + 87: 7(fvec4) Load 37(gl_FragColor) + 88: 7(fvec4) FAdd 87 86 + Store 37(gl_FragColor) 88 + 91: 7(fvec4) Load 11(BaseColor) + 92: 90(fvec3) VectorShuffle 91 91 0 1 2 + 93: 7(fvec4) Load 89(r) + 94: 7(fvec4) VectorShuffle 93 92 4 5 6 3 + Store 89(r) 94 + Store 95(i) 16 + Branch 96 + 96: Label + LoopMerge 98 99 None + Branch 100 + 100: Label + 101: 13(int) Load 95(i) + 102: 13(int) Load 24(Count) + 103: 26(bool) SLessThan 101 102 + BranchConditional 103 97 98 + 97: Label + 106: 6(float) Load 105(f) + 108: 39(ptr) AccessChain 89(r) 107 + Store 108 106 + Branch 99 + 99: Label + 109: 13(int) Load 95(i) + 110: 13(int) IAdd 109 34 + Store 95(i) 110 Branch 96 - 96: Label - 105: 13(int) Load 92(i) - 106: 13(int) IAdd 105 33 - Store 92(i) 106 - Branch 93 - 95: Label - 107: 7(fvec4) Load 86(r) - 108: 87(fvec3) VectorShuffle 107 107 0 1 2 - 109: 7(fvec4) Load 36(gl_FragColor) - 110: 87(fvec3) VectorShuffle 109 109 0 1 2 - 111: 87(fvec3) FAdd 110 108 - 112: 7(fvec4) Load 36(gl_FragColor) - 113: 7(fvec4) VectorShuffle 112 111 4 5 6 3 - Store 36(gl_FragColor) 113 - Store 114(i) 16 - Branch 115 - 115: Label - 119: 13(int) Load 114(i) - 121: 25(bool) SLessThan 119 120 - LoopMerge 117 118 None - BranchConditional 121 116 117 - 116: Label - 122: 6(float) Load 101(f) - 123: 7(fvec4) Load 36(gl_FragColor) - 124: 7(fvec4) VectorTimesScalar 123 122 - Store 36(gl_FragColor) 124 - Branch 118 - 118: Label - 125: 13(int) Load 114(i) - 126: 13(int) IAdd 125 47 - Store 114(i) 126 - Branch 115 - 117: Label + 98: Label + 111: 7(fvec4) Load 89(r) + 112: 90(fvec3) VectorShuffle 111 111 0 1 2 + 113: 7(fvec4) Load 37(gl_FragColor) + 114: 90(fvec3) VectorShuffle 113 113 0 1 2 + 115: 90(fvec3) FAdd 114 112 + 116: 7(fvec4) Load 37(gl_FragColor) + 117: 7(fvec4) VectorShuffle 116 115 4 5 6 3 + Store 37(gl_FragColor) 117 + Store 118(i) 16 + Branch 119 + 119: Label + LoopMerge 121 122 None + Branch 123 + 123: Label + 124: 13(int) Load 118(i) + 126: 26(bool) SLessThan 124 125 + BranchConditional 126 120 121 + 120: Label + 127: 6(float) Load 105(f) + 128: 7(fvec4) Load 37(gl_FragColor) + 129: 7(fvec4) VectorTimesScalar 128 127 + Store 37(gl_FragColor) 129 + Branch 122 + 122: Label + 130: 13(int) Load 118(i) + 131: 13(int) IAdd 130 49 + Store 118(i) 131 + Branch 119 + 121: Label Return FunctionEnd diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index e419231e..1b5ef924 100755 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -8,12 +8,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 137 +// Id's are bound by 138 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 40 97 107 + EntryPoint Fragment 4 "main" 40 98 108 ExecutionMode 4 OriginLowerLeft Source GLSL 130 Name 4 "main" @@ -38,14 +38,14 @@ Linked fragment stage: Name 68 "x" Name 70 "localArray" Name 75 "i" - Name 83 "a" - Name 89 "condition" - Name 97 "color" - Name 107 "gl_FragColor" - Name 127 "samp2D" - Name 133 "foo" - Name 134 "foo2" - Name 136 "uFloatArray" + Name 84 "a" + Name 90 "condition" + Name 98 "color" + Name 108 "gl_FragColor" + Name 128 "samp2D" + Name 134 "foo" + Name 135 "foo2" + Name 137 "uFloatArray" 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -80,26 +80,26 @@ Linked fragment stage: 48: TypePointer Function 47 52: TypePointer Function 6(int) 69: 6(int) Constant 5 - 81: 6(int) Constant 16 - 85: 7(float) Constant 0 - 89(condition): 20(ptr) Variable UniformConstant - 95: 6(int) Constant 3 - 96: TypePointer Input 9(fvec4) - 97(color): 96(ptr) Variable Input - 99: TypePointer Function 9(fvec4) - 101: 32(int) Constant 1 - 104: 32(int) Constant 2 - 106: TypePointer Output 9(fvec4) -107(gl_FragColor): 106(ptr) Variable Output - 124: TypeImage 7(float) 2D sampled format:Unknown - 125: TypeSampledImage 124 - 126: TypePointer UniformConstant 125 - 127(samp2D): 126(ptr) Variable UniformConstant - 132: TypePointer UniformConstant 8(s1) - 133(foo): 132(ptr) Variable UniformConstant - 134(foo2): 17(ptr) Variable UniformConstant - 135: TypePointer UniformConstant 34 -136(uFloatArray): 135(ptr) Variable UniformConstant + 82: 6(int) Constant 16 + 86: 7(float) Constant 0 + 90(condition): 20(ptr) Variable UniformConstant + 96: 6(int) Constant 3 + 97: TypePointer Input 9(fvec4) + 98(color): 97(ptr) Variable Input + 100: TypePointer Function 9(fvec4) + 102: 32(int) Constant 1 + 105: 32(int) Constant 2 + 107: TypePointer Output 9(fvec4) +108(gl_FragColor): 107(ptr) Variable Output + 125: TypeImage 7(float) 2D sampled format:Unknown + 126: TypeSampledImage 125 + 127: TypePointer UniformConstant 126 + 128(samp2D): 127(ptr) Variable UniformConstant + 133: TypePointer UniformConstant 8(s1) + 134(foo): 133(ptr) Variable UniformConstant + 135(foo2): 17(ptr) Variable UniformConstant + 136: TypePointer UniformConstant 34 +137(uFloatArray): 136(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 12(locals2): 11(ptr) Variable Function @@ -108,7 +108,7 @@ Linked fragment stage: 68(x): 52(ptr) Variable Function 70(localArray): 35(ptr) Variable Function 75(i): 52(ptr) Variable Function - 83(a): 35(ptr) Variable Function + 84(a): 35(ptr) Variable Function 18: 17(ptr) AccessChain 15(foo3) 16 19: 10(s2) Load 18 Store 12(locals2) 19 @@ -161,57 +161,59 @@ Linked fragment stage: Store 75(i) 16 Branch 76 76: Label - 80: 6(int) Load 75(i) - 82: 23(bool) SLessThan 80 81 LoopMerge 78 79 None - BranchConditional 82 77 78 + Branch 80 + 80: Label + 81: 6(int) Load 75(i) + 83: 23(bool) SLessThan 81 82 + BranchConditional 83 77 78 77: Label - 84: 6(int) Load 75(i) - 86: 30(ptr) AccessChain 83(a) 84 - Store 86 85 + 85: 6(int) Load 75(i) + 87: 30(ptr) AccessChain 84(a) 85 + Store 87 86 Branch 79 79: Label - 87: 6(int) Load 75(i) - 88: 6(int) IAdd 87 28 - Store 75(i) 88 + 88: 6(int) Load 75(i) + 89: 6(int) IAdd 88 28 + Store 75(i) 89 Branch 76 78: Label - 90: 6(int) Load 89(condition) - 91: 23(bool) IEqual 90 28 - SelectionMerge 93 None - BranchConditional 91 92 93 - 92: Label - 94: 34 Load 70(localArray) - Store 83(a) 94 - Branch 93 - 93: Label - 98: 9(fvec4) Load 97(color) - 100: 99(ptr) AccessChain 12(locals2) 95 - Store 100 98 - 102: 42(ptr) AccessChain 40(coord) 101 - 103: 7(float) Load 102 - 105: 30(ptr) AccessChain 12(locals2) 95 104 - Store 105 103 - 108: 99(ptr) AccessChain 12(locals2) 95 - 109: 9(fvec4) Load 108 - 110: 30(ptr) AccessChain 36(localFArray) 37 - 111: 7(float) Load 110 - 112: 30(ptr) AccessChain 12(locals2) 27 28 - 113: 7(float) Load 112 - 114: 7(float) FAdd 111 113 - 115: 6(int) Load 68(x) - 116: 30(ptr) AccessChain 70(localArray) 115 - 117: 7(float) Load 116 - 118: 7(float) FAdd 114 117 - 119: 6(int) Load 68(x) - 120: 30(ptr) AccessChain 83(a) 119 - 121: 7(float) Load 120 - 122: 7(float) FAdd 118 121 - 123: 9(fvec4) VectorTimesScalar 109 122 - 128: 125 Load 127(samp2D) - 129: 38(fvec2) Load 40(coord) - 130: 9(fvec4) ImageSampleImplicitLod 128 129 - 131: 9(fvec4) FMul 123 130 - Store 107(gl_FragColor) 131 + 91: 6(int) Load 90(condition) + 92: 23(bool) IEqual 91 28 + SelectionMerge 94 None + BranchConditional 92 93 94 + 93: Label + 95: 34 Load 70(localArray) + Store 84(a) 95 + Branch 94 + 94: Label + 99: 9(fvec4) Load 98(color) + 101: 100(ptr) AccessChain 12(locals2) 96 + Store 101 99 + 103: 42(ptr) AccessChain 40(coord) 102 + 104: 7(float) Load 103 + 106: 30(ptr) AccessChain 12(locals2) 96 105 + Store 106 104 + 109: 100(ptr) AccessChain 12(locals2) 96 + 110: 9(fvec4) Load 109 + 111: 30(ptr) AccessChain 36(localFArray) 37 + 112: 7(float) Load 111 + 113: 30(ptr) AccessChain 12(locals2) 27 28 + 114: 7(float) Load 113 + 115: 7(float) FAdd 112 114 + 116: 6(int) Load 68(x) + 117: 30(ptr) AccessChain 70(localArray) 116 + 118: 7(float) Load 117 + 119: 7(float) FAdd 115 118 + 120: 6(int) Load 68(x) + 121: 30(ptr) AccessChain 84(a) 120 + 122: 7(float) Load 121 + 123: 7(float) FAdd 119 122 + 124: 9(fvec4) VectorTimesScalar 110 123 + 129: 126 Load 128(samp2D) + 130: 38(fvec2) Load 40(coord) + 131: 9(fvec4) ImageSampleImplicitLod 129 130 + 132: 9(fvec4) FMul 124 131 + Store 108(gl_FragColor) 132 Return FunctionEnd diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index 98d2878b..3cf68a06 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -7,70 +7,70 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 720 +// Id's are bound by 743 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 597 + EntryPoint Fragment 4 "main" 11 616 ExecutionMode 4 OriginLowerLeft Source GLSL 130 Name 4 "main" Name 9 "color" Name 11 "BaseColor" - Name 52 "d" - Name 56 "bigColor" - Name 69 "bigColor1_1" - Name 102 "d2" - Name 110 "d3" - Name 114 "bigColor1_2" - Name 126 "bigColor1_3" - Name 132 "d4" - Name 143 "i" - Name 151 "Count" - Name 154 "bigColor2" - Name 165 "bigColor3" - Name 173 "i" - Name 188 "i" - Name 223 "i" - Name 245 "i" - Name 269 "i" - Name 297 "bigColor4" - Name 333 "bigColor5" - Name 339 "d5" - Name 355 "d6" - Name 368 "bigColor6" - Name 404 "d7" - Name 435 "bigColor7" - Name 454 "d8" - Name 496 "d9" - Name 527 "d10" - Name 535 "d11" - Name 545 "d12" - Name 570 "bigColor8" - Name 597 "gl_FragColor" - Name 605 "d14" - Name 610 "d15" - Name 629 "d16" - Name 666 "d18" - Name 677 "d17" - Name 703 "d13" - Name 704 "d19" - Name 705 "d20" - Name 706 "d21" - Name 707 "d22" - Name 708 "d23" - Name 709 "d24" - Name 710 "d25" - Name 711 "d26" - Name 712 "d27" - Name 713 "d28" - Name 714 "d29" - Name 715 "d30" - Name 716 "d31" - Name 717 "d32" - Name 718 "d33" - Name 719 "d34" + Name 54 "d" + Name 58 "bigColor" + Name 72 "bigColor1_1" + Name 107 "d2" + Name 115 "d3" + Name 119 "bigColor1_2" + Name 132 "bigColor1_3" + Name 138 "d4" + Name 149 "i" + Name 158 "Count" + Name 161 "bigColor2" + Name 172 "bigColor3" + Name 180 "i" + Name 196 "i" + Name 232 "i" + Name 255 "i" + Name 280 "i" + Name 309 "bigColor4" + Name 345 "bigColor5" + Name 351 "d5" + Name 367 "d6" + Name 381 "bigColor6" + Name 419 "d7" + Name 451 "bigColor7" + Name 470 "d8" + Name 513 "d9" + Name 545 "d10" + Name 553 "d11" + Name 563 "d12" + Name 589 "bigColor8" + Name 616 "gl_FragColor" + Name 625 "d14" + Name 630 "d15" + Name 650 "d16" + Name 688 "d18" + Name 699 "d17" + Name 726 "d13" + Name 727 "d19" + Name 728 "d20" + Name 729 "d21" + Name 730 "d22" + Name 731 "d23" + Name 732 "d24" + Name 733 "d25" + Name 734 "d26" + Name 735 "d27" + Name 736 "d28" + Name 737 "d29" + Name 738 "d30" + Name 739 "d31" + Name 740 "d32" + Name 741 "d33" + Name 742 "d34" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -78,1021 +78,1067 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 17: TypeBool - 18: 17(bool) ConstantTrue - 19: TypeInt 32 0 - 20: 19(int) Constant 0 - 21: TypePointer Function 6(float) - 24: 6(float) Constant 1051260355 - 28: 7(fvec4) ConstantComposite 24 24 24 24 - 34: 6(float) Constant 1059648963 - 38: 7(fvec4) ConstantComposite 34 34 34 34 - 51: TypePointer UniformConstant 6(float) - 52(d): 51(ptr) Variable UniformConstant - 55: TypePointer UniformConstant 7(fvec4) - 56(bigColor): 55(ptr) Variable UniformConstant - 64: 19(int) Constant 2 - 69(bigColor1_1): 55(ptr) Variable UniformConstant - 73: 19(int) Constant 3 - 90: 6(float) Constant 1109917696 - 93: 6(float) Constant 1065353216 - 102(d2): 51(ptr) Variable UniformConstant - 107: 19(int) Constant 1 - 110(d3): 51(ptr) Variable UniformConstant -114(bigColor1_2): 55(ptr) Variable UniformConstant -126(bigColor1_3): 55(ptr) Variable UniformConstant - 132(d4): 51(ptr) Variable UniformConstant - 141: TypeInt 32 1 - 142: TypePointer Function 141(int) - 144: 141(int) Constant 0 - 150: TypePointer UniformConstant 141(int) - 151(Count): 150(ptr) Variable UniformConstant - 154(bigColor2): 55(ptr) Variable UniformConstant - 159: 141(int) Constant 1 - 165(bigColor3): 55(ptr) Variable UniformConstant - 179: 141(int) Constant 42 - 194: 141(int) Constant 100 - 198: 6(float) Constant 1101004800 - 229: 141(int) Constant 120 - 297(bigColor4): 55(ptr) Variable UniformConstant - 333(bigColor5): 55(ptr) Variable UniformConstant - 339(d5): 51(ptr) Variable UniformConstant - 355(d6): 51(ptr) Variable UniformConstant - 368(bigColor6): 55(ptr) Variable UniformConstant - 404(d7): 51(ptr) Variable UniformConstant - 430: 6(float) Constant 0 - 435(bigColor7): 55(ptr) Variable UniformConstant - 454(d8): 51(ptr) Variable UniformConstant - 471: 6(float) Constant 1073741824 - 496(d9): 51(ptr) Variable UniformConstant - 512: 6(float) Constant 1084227584 - 527(d10): 51(ptr) Variable UniformConstant - 535(d11): 51(ptr) Variable UniformConstant - 545(d12): 51(ptr) Variable UniformConstant - 568: 6(float) Constant 1092616192 - 570(bigColor8): 55(ptr) Variable UniformConstant - 596: TypePointer Output 7(fvec4) -597(gl_FragColor): 596(ptr) Variable Output - 605(d14): 51(ptr) Variable UniformConstant - 610(d15): 51(ptr) Variable UniformConstant - 629(d16): 51(ptr) Variable UniformConstant - 666(d18): 51(ptr) Variable UniformConstant - 677(d17): 51(ptr) Variable UniformConstant - 703(d13): 51(ptr) Variable UniformConstant - 704(d19): 51(ptr) Variable UniformConstant - 705(d20): 51(ptr) Variable UniformConstant - 706(d21): 51(ptr) Variable UniformConstant - 707(d22): 51(ptr) Variable UniformConstant - 708(d23): 51(ptr) Variable UniformConstant - 709(d24): 51(ptr) Variable UniformConstant - 710(d25): 51(ptr) Variable UniformConstant - 711(d26): 51(ptr) Variable UniformConstant - 712(d27): 51(ptr) Variable UniformConstant - 713(d28): 51(ptr) Variable UniformConstant - 714(d29): 51(ptr) Variable UniformConstant - 715(d30): 51(ptr) Variable UniformConstant - 716(d31): 51(ptr) Variable UniformConstant - 717(d32): 51(ptr) Variable UniformConstant - 718(d33): 51(ptr) Variable UniformConstant - 719(d34): 51(ptr) Variable UniformConstant + 18: TypeBool + 19: 18(bool) ConstantTrue + 20: TypeInt 32 0 + 21: 20(int) Constant 0 + 22: TypePointer Function 6(float) + 25: 6(float) Constant 1051260355 + 29: 7(fvec4) ConstantComposite 25 25 25 25 + 35: 6(float) Constant 1059648963 + 39: 7(fvec4) ConstantComposite 35 35 35 35 + 53: TypePointer UniformConstant 6(float) + 54(d): 53(ptr) Variable UniformConstant + 57: TypePointer UniformConstant 7(fvec4) + 58(bigColor): 57(ptr) Variable UniformConstant + 67: 20(int) Constant 2 + 72(bigColor1_1): 57(ptr) Variable UniformConstant + 76: 20(int) Constant 3 + 94: 6(float) Constant 1109917696 + 97: 6(float) Constant 1065353216 + 107(d2): 53(ptr) Variable UniformConstant + 112: 20(int) Constant 1 + 115(d3): 53(ptr) Variable UniformConstant +119(bigColor1_2): 57(ptr) Variable UniformConstant +132(bigColor1_3): 57(ptr) Variable UniformConstant + 138(d4): 53(ptr) Variable UniformConstant + 147: TypeInt 32 1 + 148: TypePointer Function 147(int) + 150: 147(int) Constant 0 + 157: TypePointer UniformConstant 147(int) + 158(Count): 157(ptr) Variable UniformConstant + 161(bigColor2): 57(ptr) Variable UniformConstant + 166: 147(int) Constant 1 + 172(bigColor3): 57(ptr) Variable UniformConstant + 187: 147(int) Constant 42 + 203: 147(int) Constant 100 + 207: 6(float) Constant 1101004800 + 239: 147(int) Constant 120 + 309(bigColor4): 57(ptr) Variable UniformConstant + 345(bigColor5): 57(ptr) Variable UniformConstant + 351(d5): 53(ptr) Variable UniformConstant + 367(d6): 53(ptr) Variable UniformConstant + 381(bigColor6): 57(ptr) Variable UniformConstant + 419(d7): 53(ptr) Variable UniformConstant + 446: 6(float) Constant 0 + 451(bigColor7): 57(ptr) Variable UniformConstant + 470(d8): 53(ptr) Variable UniformConstant + 487: 6(float) Constant 1073741824 + 513(d9): 53(ptr) Variable UniformConstant + 529: 6(float) Constant 1084227584 + 545(d10): 53(ptr) Variable UniformConstant + 553(d11): 53(ptr) Variable UniformConstant + 563(d12): 53(ptr) Variable UniformConstant + 587: 6(float) Constant 1092616192 + 589(bigColor8): 57(ptr) Variable UniformConstant + 615: TypePointer Output 7(fvec4) +616(gl_FragColor): 615(ptr) Variable Output + 625(d14): 53(ptr) Variable UniformConstant + 630(d15): 53(ptr) Variable UniformConstant + 650(d16): 53(ptr) Variable UniformConstant + 688(d18): 53(ptr) Variable UniformConstant + 699(d17): 53(ptr) Variable UniformConstant + 726(d13): 53(ptr) Variable UniformConstant + 727(d19): 53(ptr) Variable UniformConstant + 728(d20): 53(ptr) Variable UniformConstant + 729(d21): 53(ptr) Variable UniformConstant + 730(d22): 53(ptr) Variable UniformConstant + 731(d23): 53(ptr) Variable UniformConstant + 732(d24): 53(ptr) Variable UniformConstant + 733(d25): 53(ptr) Variable UniformConstant + 734(d26): 53(ptr) Variable UniformConstant + 735(d27): 53(ptr) Variable UniformConstant + 736(d28): 53(ptr) Variable UniformConstant + 737(d29): 53(ptr) Variable UniformConstant + 738(d30): 53(ptr) Variable UniformConstant + 739(d31): 53(ptr) Variable UniformConstant + 740(d32): 53(ptr) Variable UniformConstant + 741(d33): 53(ptr) Variable UniformConstant + 742(d34): 53(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function - 143(i): 142(ptr) Variable Function - 173(i): 142(ptr) Variable Function - 188(i): 142(ptr) Variable Function - 223(i): 142(ptr) Variable Function - 245(i): 142(ptr) Variable Function - 269(i): 142(ptr) Variable Function + 149(i): 148(ptr) Variable Function + 180(i): 148(ptr) Variable Function + 196(i): 148(ptr) Variable Function + 232(i): 148(ptr) Variable Function + 255(i): 148(ptr) Variable Function + 280(i): 148(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 Branch 13 13: Label LoopMerge 15 16 None - BranchConditional 18 14 15 + Branch 17 + 17: Label + BranchConditional 19 14 15 14: Label - 22: 21(ptr) AccessChain 9(color) 20 - 23: 6(float) Load 22 - 25: 17(bool) FOrdLessThan 23 24 - SelectionMerge 27 None - BranchConditional 25 26 27 - 26: Label - 29: 7(fvec4) Load 9(color) - 30: 7(fvec4) FAdd 29 28 - Store 9(color) 30 + 23: 22(ptr) AccessChain 9(color) 21 + 24: 6(float) Load 23 + 26: 18(bool) FOrdLessThan 24 25 + SelectionMerge 28 None + BranchConditional 26 27 28 + 27: Label + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 Branch 15 - 27: Label - 32: 21(ptr) AccessChain 9(color) 20 - 33: 6(float) Load 32 - 35: 17(bool) FOrdLessThan 33 34 - SelectionMerge 37 None - BranchConditional 35 36 37 - 36: Label - 39: 7(fvec4) Load 9(color) - 40: 7(fvec4) FAdd 39 38 - Store 9(color) 40 + 28: Label + 33: 22(ptr) AccessChain 9(color) 21 + 34: 6(float) Load 33 + 36: 18(bool) FOrdLessThan 34 35 + SelectionMerge 38 None + BranchConditional 36 37 38 + 37: Label + 40: 7(fvec4) Load 9(color) + 41: 7(fvec4) FAdd 40 39 + Store 9(color) 41 Branch 15 - 37: Label - 42: 7(fvec4) Load 9(color) - 43: 7(fvec4) FAdd 42 28 - Store 9(color) 43 + 38: Label + 43: 7(fvec4) Load 9(color) + 44: 7(fvec4) FAdd 43 29 + Store 9(color) 44 Branch 15 16: Label Branch 13 15: Label - Branch 45 - 45: Label - 49: 21(ptr) AccessChain 9(color) 20 - 50: 6(float) Load 49 - 53: 6(float) Load 52(d) - 54: 17(bool) FOrdLessThan 50 53 - LoopMerge 47 48 None - BranchConditional 54 46 47 - 46: Label - 57: 7(fvec4) Load 56(bigColor) - 58: 7(fvec4) Load 9(color) - 59: 7(fvec4) FAdd 58 57 - Store 9(color) 59 - Branch 48 - 48: Label - Branch 45 - 47: Label - Branch 60 - 60: Label - 65: 21(ptr) AccessChain 9(color) 64 - 66: 6(float) Load 65 - 67: 6(float) Load 52(d) - 68: 17(bool) FOrdLessThan 66 67 - LoopMerge 62 63 None - BranchConditional 68 61 62 - 61: Label - 70: 7(fvec4) Load 69(bigColor1_1) - 71: 7(fvec4) Load 9(color) - 72: 7(fvec4) FAdd 71 70 - Store 9(color) 72 - 74: 21(ptr) AccessChain 9(color) 73 - 75: 6(float) Load 74 - 76: 6(float) Load 52(d) - 77: 17(bool) FOrdLessThan 75 76 - SelectionMerge 79 None - BranchConditional 77 78 79 - 78: Label - Branch 63 - 79: Label - 81: 7(fvec4) Load 69(bigColor1_1) - 82: 7(fvec4) Load 9(color) - 83: 7(fvec4) FAdd 82 81 - Store 9(color) 83 - Branch 63 - 63: Label - Branch 60 + Branch 46 + 46: Label + LoopMerge 48 49 None + Branch 50 + 50: Label + 51: 22(ptr) AccessChain 9(color) 21 + 52: 6(float) Load 51 + 55: 6(float) Load 54(d) + 56: 18(bool) FOrdLessThan 52 55 + BranchConditional 56 47 48 + 47: Label + 59: 7(fvec4) Load 58(bigColor) + 60: 7(fvec4) Load 9(color) + 61: 7(fvec4) FAdd 60 59 + Store 9(color) 61 + Branch 49 + 49: Label + Branch 46 + 48: Label + Branch 62 62: Label - Branch 84 - 84: Label - 88: 21(ptr) AccessChain 9(color) 20 - 89: 6(float) Load 88 - 91: 17(bool) FOrdLessThan 89 90 - LoopMerge 86 87 None - BranchConditional 91 85 86 - 85: Label - 92: 7(fvec4) Load 9(color) - 94: 7(fvec4) CompositeConstruct 93 93 93 93 - 95: 7(fvec4) FAdd 92 94 - Store 9(color) 95 + LoopMerge 64 65 None + Branch 66 + 66: Label + 68: 22(ptr) AccessChain 9(color) 67 + 69: 6(float) Load 68 + 70: 6(float) Load 54(d) + 71: 18(bool) FOrdLessThan 69 70 + BranchConditional 71 63 64 + 63: Label + 73: 7(fvec4) Load 72(bigColor1_1) + 74: 7(fvec4) Load 9(color) + 75: 7(fvec4) FAdd 74 73 + Store 9(color) 75 + 77: 22(ptr) AccessChain 9(color) 76 + 78: 6(float) Load 77 + 79: 6(float) Load 54(d) + 80: 18(bool) FOrdLessThan 78 79 + SelectionMerge 82 None + BranchConditional 80 81 82 + 81: Label + Branch 65 + 82: Label + 84: 7(fvec4) Load 72(bigColor1_1) + 85: 7(fvec4) Load 9(color) + 86: 7(fvec4) FAdd 85 84 + Store 9(color) 86 + Branch 65 + 65: Label + Branch 62 + 64: Label + Branch 87 + 87: Label + LoopMerge 89 90 None + Branch 91 + 91: Label + 92: 22(ptr) AccessChain 9(color) 21 + 93: 6(float) Load 92 + 95: 18(bool) FOrdLessThan 93 94 + BranchConditional 95 88 89 + 88: Label + 96: 7(fvec4) Load 9(color) + 98: 7(fvec4) CompositeConstruct 97 97 97 97 + 99: 7(fvec4) FAdd 96 98 + Store 9(color) 99 + Branch 90 + 90: Label Branch 87 - 87: Label - Branch 84 - 86: Label - Branch 96 - 96: Label - 100: 21(ptr) AccessChain 9(color) 73 - 101: 6(float) Load 100 - 103: 6(float) Load 102(d2) - 104: 17(bool) FOrdLessThan 101 103 - SelectionMerge 106 None - BranchConditional 104 105 106 - 105: Label - 108: 21(ptr) AccessChain 9(color) 107 - 109: 6(float) Load 108 - 111: 6(float) Load 110(d3) - 112: 17(bool) FOrdLessThan 109 111 - Branch 106 - 106: Label - 113: 17(bool) Phi 104 96 112 105 - LoopMerge 98 99 None - BranchConditional 113 97 98 - 97: Label - 115: 7(fvec4) Load 114(bigColor1_2) - 116: 7(fvec4) Load 9(color) - 117: 7(fvec4) FAdd 116 115 - Store 9(color) 117 - Branch 99 - 99: Label - Branch 96 - 98: Label - Branch 118 - 118: Label - 122: 21(ptr) AccessChain 9(color) 64 - 123: 6(float) Load 122 - 124: 6(float) Load 110(d3) - 125: 17(bool) FOrdLessThan 123 124 - LoopMerge 120 121 None - BranchConditional 125 119 120 - 119: Label - 127: 7(fvec4) Load 126(bigColor1_3) - 128: 7(fvec4) Load 9(color) - 129: 7(fvec4) FAdd 128 127 - Store 9(color) 129 - 130: 21(ptr) AccessChain 9(color) 107 - 131: 6(float) Load 130 - 133: 6(float) Load 132(d4) - 134: 17(bool) FOrdLessThan 131 133 - SelectionMerge 136 None - BranchConditional 134 135 136 - 135: Label - Branch 120 - 136: Label - 138: 7(fvec4) Load 126(bigColor1_3) - 139: 7(fvec4) Load 9(color) - 140: 7(fvec4) FAdd 139 138 - Store 9(color) 140 - Branch 121 - 121: Label - Branch 118 - 120: Label - Store 143(i) 144 - Branch 145 - 145: Label - 149: 141(int) Load 143(i) - 152: 141(int) Load 151(Count) - 153: 17(bool) SLessThan 149 152 - LoopMerge 147 148 None - BranchConditional 153 146 147 - 146: Label - 155: 7(fvec4) Load 154(bigColor2) - 156: 7(fvec4) Load 9(color) - 157: 7(fvec4) FAdd 156 155 - Store 9(color) 157 - Branch 148 - 148: Label - 158: 141(int) Load 143(i) - 160: 141(int) IAdd 158 159 - Store 143(i) 160 - Branch 145 - 147: Label - Branch 161 - 161: Label - LoopMerge 163 164 None - Branch 162 - 162: Label - 166: 7(fvec4) Load 165(bigColor3) - 167: 7(fvec4) Load 9(color) - 168: 7(fvec4) FAdd 167 166 - Store 9(color) 168 - Branch 164 - 164: Label - 169: 21(ptr) AccessChain 9(color) 20 - 170: 6(float) Load 169 - 171: 6(float) Load 102(d2) - 172: 17(bool) FOrdLessThan 170 171 - BranchConditional 172 161 163 - 163: Label - Store 173(i) 144 - Branch 174 - 174: Label - 178: 141(int) Load 173(i) - 180: 17(bool) SLessThan 178 179 - LoopMerge 176 177 None - BranchConditional 180 175 176 - 175: Label - 181: 6(float) Load 110(d3) - 182: 21(ptr) AccessChain 9(color) 64 - 183: 6(float) Load 182 - 184: 6(float) FAdd 183 181 - 185: 21(ptr) AccessChain 9(color) 64 - Store 185 184 - Branch 177 - 177: Label - 186: 141(int) Load 173(i) - 187: 141(int) IAdd 186 159 - Store 173(i) 187 - Branch 174 - 176: Label - Store 188(i) 144 - Branch 189 - 189: Label - 193: 141(int) Load 188(i) - 195: 17(bool) SLessThan 193 194 - LoopMerge 191 192 None - BranchConditional 195 190 191 - 190: Label - 196: 21(ptr) AccessChain 9(color) 64 - 197: 6(float) Load 196 - 199: 17(bool) FOrdLessThan 197 198 - SelectionMerge 201 None - BranchConditional 199 200 205 - 200: Label - 202: 21(ptr) AccessChain 9(color) 20 - 203: 6(float) Load 202 - 204: 6(float) FAdd 203 93 - Store 202 204 - Branch 201 - 205: Label - 206: 21(ptr) AccessChain 9(color) 107 - 207: 6(float) Load 206 - 208: 6(float) FAdd 207 93 - Store 206 208 - Branch 201 - 201: Label - 209: 21(ptr) AccessChain 9(color) 73 - 210: 6(float) Load 209 - 211: 17(bool) FOrdLessThan 210 198 - SelectionMerge 213 None - BranchConditional 211 212 213 - 212: Label - 214: 21(ptr) AccessChain 9(color) 64 - 215: 6(float) Load 214 - 216: 21(ptr) AccessChain 9(color) 107 - 217: 6(float) Load 216 - 218: 17(bool) FOrdGreaterThan 215 217 - SelectionMerge 220 None - BranchConditional 218 219 220 - 219: Label - Branch 220 - 220: Label - Branch 213 - 213: Label - Branch 192 - 192: Label - 221: 141(int) Load 188(i) - 222: 141(int) IAdd 221 159 - Store 188(i) 222 - Branch 189 - 191: Label - Store 223(i) 144 - Branch 224 - 224: Label - 228: 141(int) Load 223(i) - 230: 17(bool) SLessThan 228 229 - LoopMerge 226 227 None - BranchConditional 230 225 226 - 225: Label - 231: 21(ptr) AccessChain 9(color) 64 - 232: 6(float) Load 231 - 233: 17(bool) FOrdLessThan 232 198 - SelectionMerge 235 None - BranchConditional 233 234 239 - 234: Label - 236: 21(ptr) AccessChain 9(color) 20 - 237: 6(float) Load 236 - 238: 6(float) FAdd 237 93 - Store 236 238 - Branch 235 - 239: Label - 240: 21(ptr) AccessChain 9(color) 107 - 241: 6(float) Load 240 - 242: 6(float) FAdd 241 93 - Store 240 242 - Branch 235 - 235: Label - Branch 227 - 227: Label - 243: 141(int) Load 223(i) - 244: 141(int) IAdd 243 159 - Store 223(i) 244 - Branch 224 - 226: Label - Store 245(i) 144 - Branch 246 - 246: Label - 250: 141(int) Load 245(i) - 251: 17(bool) SLessThan 250 179 - LoopMerge 248 249 None - BranchConditional 251 247 248 - 247: Label - 252: 6(float) Load 110(d3) - 253: 21(ptr) AccessChain 9(color) 64 - 254: 6(float) Load 253 - 255: 6(float) FAdd 254 252 - 256: 21(ptr) AccessChain 9(color) 64 - Store 256 255 - 257: 21(ptr) AccessChain 9(color) 20 - 258: 6(float) Load 257 - 259: 6(float) Load 132(d4) - 260: 17(bool) FOrdLessThan 258 259 - SelectionMerge 262 None - BranchConditional 260 261 262 - 261: Label - Branch 249 - 262: Label - 264: 21(ptr) AccessChain 9(color) 73 + 89: Label + Branch 100 + 100: Label + LoopMerge 102 103 None + Branch 104 + 104: Label + 105: 22(ptr) AccessChain 9(color) 76 + 106: 6(float) Load 105 + 108: 6(float) Load 107(d2) + 109: 18(bool) FOrdLessThan 106 108 + SelectionMerge 111 None + BranchConditional 109 110 111 + 110: Label + 113: 22(ptr) AccessChain 9(color) 112 + 114: 6(float) Load 113 + 116: 6(float) Load 115(d3) + 117: 18(bool) FOrdLessThan 114 116 + Branch 111 + 111: Label + 118: 18(bool) Phi 109 104 117 110 + BranchConditional 118 101 102 + 101: Label + 120: 7(fvec4) Load 119(bigColor1_2) + 121: 7(fvec4) Load 9(color) + 122: 7(fvec4) FAdd 121 120 + Store 9(color) 122 + Branch 103 + 103: Label + Branch 100 + 102: Label + Branch 123 + 123: Label + LoopMerge 125 126 None + Branch 127 + 127: Label + 128: 22(ptr) AccessChain 9(color) 67 + 129: 6(float) Load 128 + 130: 6(float) Load 115(d3) + 131: 18(bool) FOrdLessThan 129 130 + BranchConditional 131 124 125 + 124: Label + 133: 7(fvec4) Load 132(bigColor1_3) + 134: 7(fvec4) Load 9(color) + 135: 7(fvec4) FAdd 134 133 + Store 9(color) 135 + 136: 22(ptr) AccessChain 9(color) 112 + 137: 6(float) Load 136 + 139: 6(float) Load 138(d4) + 140: 18(bool) FOrdLessThan 137 139 + SelectionMerge 142 None + BranchConditional 140 141 142 + 141: Label + Branch 125 + 142: Label + 144: 7(fvec4) Load 132(bigColor1_3) + 145: 7(fvec4) Load 9(color) + 146: 7(fvec4) FAdd 145 144 + Store 9(color) 146 + Branch 126 + 126: Label + Branch 123 + 125: Label + Store 149(i) 150 + Branch 151 + 151: Label + LoopMerge 153 154 None + Branch 155 + 155: Label + 156: 147(int) Load 149(i) + 159: 147(int) Load 158(Count) + 160: 18(bool) SLessThan 156 159 + BranchConditional 160 152 153 + 152: Label + 162: 7(fvec4) Load 161(bigColor2) + 163: 7(fvec4) Load 9(color) + 164: 7(fvec4) FAdd 163 162 + Store 9(color) 164 + Branch 154 + 154: Label + 165: 147(int) Load 149(i) + 167: 147(int) IAdd 165 166 + Store 149(i) 167 + Branch 151 + 153: Label + Branch 168 + 168: Label + LoopMerge 170 171 None + Branch 169 + 169: Label + 173: 7(fvec4) Load 172(bigColor3) + 174: 7(fvec4) Load 9(color) + 175: 7(fvec4) FAdd 174 173 + Store 9(color) 175 + Branch 171 + 171: Label + 176: 22(ptr) AccessChain 9(color) 21 + 177: 6(float) Load 176 + 178: 6(float) Load 107(d2) + 179: 18(bool) FOrdLessThan 177 178 + BranchConditional 179 168 170 + 170: Label + Store 180(i) 150 + Branch 181 + 181: Label + LoopMerge 183 184 None + Branch 185 + 185: Label + 186: 147(int) Load 180(i) + 188: 18(bool) SLessThan 186 187 + BranchConditional 188 182 183 + 182: Label + 189: 6(float) Load 115(d3) + 190: 22(ptr) AccessChain 9(color) 67 + 191: 6(float) Load 190 + 192: 6(float) FAdd 191 189 + 193: 22(ptr) AccessChain 9(color) 67 + Store 193 192 + Branch 184 + 184: Label + 194: 147(int) Load 180(i) + 195: 147(int) IAdd 194 166 + Store 180(i) 195 + Branch 181 + 183: Label + Store 196(i) 150 + Branch 197 + 197: Label + LoopMerge 199 200 None + Branch 201 + 201: Label + 202: 147(int) Load 196(i) + 204: 18(bool) SLessThan 202 203 + BranchConditional 204 198 199 + 198: Label + 205: 22(ptr) AccessChain 9(color) 67 + 206: 6(float) Load 205 + 208: 18(bool) FOrdLessThan 206 207 + SelectionMerge 210 None + BranchConditional 208 209 214 + 209: Label + 211: 22(ptr) AccessChain 9(color) 21 + 212: 6(float) Load 211 + 213: 6(float) FAdd 212 97 + Store 211 213 + Branch 210 + 214: Label + 215: 22(ptr) AccessChain 9(color) 112 + 216: 6(float) Load 215 + 217: 6(float) FAdd 216 97 + Store 215 217 + Branch 210 + 210: Label + 218: 22(ptr) AccessChain 9(color) 76 + 219: 6(float) Load 218 + 220: 18(bool) FOrdLessThan 219 207 + SelectionMerge 222 None + BranchConditional 220 221 222 + 221: Label + 223: 22(ptr) AccessChain 9(color) 67 + 224: 6(float) Load 223 + 225: 22(ptr) AccessChain 9(color) 112 + 226: 6(float) Load 225 + 227: 18(bool) FOrdGreaterThan 224 226 + SelectionMerge 229 None + BranchConditional 227 228 229 + 228: Label + Branch 229 + 229: Label + Branch 222 + 222: Label + Branch 200 + 200: Label + 230: 147(int) Load 196(i) + 231: 147(int) IAdd 230 166 + Store 196(i) 231 + Branch 197 + 199: Label + Store 232(i) 150 + Branch 233 + 233: Label + LoopMerge 235 236 None + Branch 237 + 237: Label + 238: 147(int) Load 232(i) + 240: 18(bool) SLessThan 238 239 + BranchConditional 240 234 235 + 234: Label + 241: 22(ptr) AccessChain 9(color) 67 + 242: 6(float) Load 241 + 243: 18(bool) FOrdLessThan 242 207 + SelectionMerge 245 None + BranchConditional 243 244 249 + 244: Label + 246: 22(ptr) AccessChain 9(color) 21 + 247: 6(float) Load 246 + 248: 6(float) FAdd 247 97 + Store 246 248 + Branch 245 + 249: Label + 250: 22(ptr) AccessChain 9(color) 112 + 251: 6(float) Load 250 + 252: 6(float) FAdd 251 97 + Store 250 252 + Branch 245 + 245: Label + Branch 236 + 236: Label + 253: 147(int) Load 232(i) + 254: 147(int) IAdd 253 166 + Store 232(i) 254 + Branch 233 + 235: Label + Store 255(i) 150 + Branch 256 + 256: Label + LoopMerge 258 259 None + Branch 260 + 260: Label + 261: 147(int) Load 255(i) + 262: 18(bool) SLessThan 261 187 + BranchConditional 262 257 258 + 257: Label + 263: 6(float) Load 115(d3) + 264: 22(ptr) AccessChain 9(color) 67 265: 6(float) Load 264 - 266: 6(float) FAdd 265 93 - Store 264 266 - Branch 249 - 249: Label - 267: 141(int) Load 245(i) - 268: 141(int) IAdd 267 159 - Store 245(i) 268 - Branch 246 - 248: Label - Store 269(i) 144 - Branch 270 - 270: Label - 274: 141(int) Load 269(i) - 275: 17(bool) SLessThan 274 179 - LoopMerge 272 273 None - BranchConditional 275 271 272 - 271: Label - 276: 6(float) Load 110(d3) - 277: 21(ptr) AccessChain 9(color) 64 - 278: 6(float) Load 277 - 279: 6(float) FAdd 278 276 - 280: 21(ptr) AccessChain 9(color) 64 - Store 280 279 - 281: 21(ptr) AccessChain 9(color) 20 - 282: 6(float) Load 281 - 283: 6(float) Load 132(d4) - 284: 17(bool) FOrdLessThan 282 283 - SelectionMerge 286 None - BranchConditional 284 285 286 - 285: Label - Branch 272 - 286: Label - 288: 21(ptr) AccessChain 9(color) 73 - 289: 6(float) Load 288 - 290: 6(float) FAdd 289 93 - Store 288 290 - Branch 273 + 266: 6(float) FAdd 265 263 + 267: 22(ptr) AccessChain 9(color) 67 + Store 267 266 + 268: 22(ptr) AccessChain 9(color) 21 + 269: 6(float) Load 268 + 270: 6(float) Load 138(d4) + 271: 18(bool) FOrdLessThan 269 270 + SelectionMerge 273 None + BranchConditional 271 272 273 + 272: Label + Branch 259 273: Label - 291: 141(int) Load 269(i) - 292: 141(int) IAdd 291 159 - Store 269(i) 292 - Branch 270 - 272: Label - Branch 293 - 293: Label - LoopMerge 295 296 None - Branch 294 - 294: Label - 298: 7(fvec4) Load 297(bigColor4) - 299: 7(fvec4) Load 9(color) - 300: 7(fvec4) FAdd 299 298 - Store 9(color) 300 - 301: 21(ptr) AccessChain 9(color) 20 - 302: 6(float) Load 301 - 303: 6(float) Load 132(d4) - 304: 17(bool) FOrdLessThan 302 303 - SelectionMerge 306 None - BranchConditional 304 305 306 - 305: Label - Branch 296 + 275: 22(ptr) AccessChain 9(color) 76 + 276: 6(float) Load 275 + 277: 6(float) FAdd 276 97 + Store 275 277 + Branch 259 + 259: Label + 278: 147(int) Load 255(i) + 279: 147(int) IAdd 278 166 + Store 255(i) 279 + Branch 256 + 258: Label + Store 280(i) 150 + Branch 281 + 281: Label + LoopMerge 283 284 None + Branch 285 + 285: Label + 286: 147(int) Load 280(i) + 287: 18(bool) SLessThan 286 187 + BranchConditional 287 282 283 + 282: Label + 288: 6(float) Load 115(d3) + 289: 22(ptr) AccessChain 9(color) 67 + 290: 6(float) Load 289 + 291: 6(float) FAdd 290 288 + 292: 22(ptr) AccessChain 9(color) 67 + Store 292 291 + 293: 22(ptr) AccessChain 9(color) 21 + 294: 6(float) Load 293 + 295: 6(float) Load 138(d4) + 296: 18(bool) FOrdLessThan 294 295 + SelectionMerge 298 None + BranchConditional 296 297 298 + 297: Label + Branch 283 + 298: Label + 300: 22(ptr) AccessChain 9(color) 76 + 301: 6(float) Load 300 + 302: 6(float) FAdd 301 97 + Store 300 302 + Branch 284 + 284: Label + 303: 147(int) Load 280(i) + 304: 147(int) IAdd 303 166 + Store 280(i) 304 + Branch 281 + 283: Label + Branch 305 + 305: Label + LoopMerge 307 308 None + Branch 306 306: Label - 308: 21(ptr) AccessChain 9(color) 107 - 309: 6(float) Load 308 - 310: 6(float) Load 132(d4) - 311: 17(bool) FOrdLessThan 309 310 - SelectionMerge 313 None - BranchConditional 311 312 319 - 312: Label - 314: 6(float) Load 132(d4) - 315: 21(ptr) AccessChain 9(color) 107 - 316: 6(float) Load 315 - 317: 6(float) FAdd 316 314 - 318: 21(ptr) AccessChain 9(color) 107 - Store 318 317 - Branch 313 - 319: Label - 320: 6(float) Load 132(d4) - 321: 21(ptr) AccessChain 9(color) 20 - 322: 6(float) Load 321 - 323: 6(float) FAdd 322 320 - 324: 21(ptr) AccessChain 9(color) 20 - Store 324 323 - Branch 313 - 313: Label - Branch 296 - 296: Label - 325: 21(ptr) AccessChain 9(color) 64 - 326: 6(float) Load 325 - 327: 6(float) Load 132(d4) - 328: 17(bool) FOrdLessThan 326 327 - BranchConditional 328 293 295 - 295: Label - Branch 329 - 329: Label - LoopMerge 331 332 None - Branch 330 - 330: Label - 334: 7(fvec4) Load 333(bigColor5) - 335: 7(fvec4) Load 9(color) - 336: 7(fvec4) FAdd 335 334 - Store 9(color) 336 - 337: 21(ptr) AccessChain 9(color) 107 + 310: 7(fvec4) Load 309(bigColor4) + 311: 7(fvec4) Load 9(color) + 312: 7(fvec4) FAdd 311 310 + Store 9(color) 312 + 313: 22(ptr) AccessChain 9(color) 21 + 314: 6(float) Load 313 + 315: 6(float) Load 138(d4) + 316: 18(bool) FOrdLessThan 314 315 + SelectionMerge 318 None + BranchConditional 316 317 318 + 317: Label + Branch 308 + 318: Label + 320: 22(ptr) AccessChain 9(color) 112 + 321: 6(float) Load 320 + 322: 6(float) Load 138(d4) + 323: 18(bool) FOrdLessThan 321 322 + SelectionMerge 325 None + BranchConditional 323 324 331 + 324: Label + 326: 6(float) Load 138(d4) + 327: 22(ptr) AccessChain 9(color) 112 + 328: 6(float) Load 327 + 329: 6(float) FAdd 328 326 + 330: 22(ptr) AccessChain 9(color) 112 + Store 330 329 + Branch 325 + 331: Label + 332: 6(float) Load 138(d4) + 333: 22(ptr) AccessChain 9(color) 21 + 334: 6(float) Load 333 + 335: 6(float) FAdd 334 332 + 336: 22(ptr) AccessChain 9(color) 21 + Store 336 335 + Branch 325 + 325: Label + Branch 308 + 308: Label + 337: 22(ptr) AccessChain 9(color) 67 338: 6(float) Load 337 - 340: 6(float) Load 339(d5) - 341: 17(bool) FOrdLessThan 338 340 - SelectionMerge 343 None - BranchConditional 341 342 343 - 342: Label - 344: 6(float) Load 339(d5) - 345: 21(ptr) AccessChain 9(color) 107 - 346: 6(float) Load 345 - 347: 6(float) FAdd 346 344 - 348: 21(ptr) AccessChain 9(color) 107 - Store 348 347 - Branch 343 - 343: Label - Branch 332 - 332: Label - 349: 21(ptr) AccessChain 9(color) 20 + 339: 6(float) Load 138(d4) + 340: 18(bool) FOrdLessThan 338 339 + BranchConditional 340 305 307 + 307: Label + Branch 341 + 341: Label + LoopMerge 343 344 None + Branch 342 + 342: Label + 346: 7(fvec4) Load 345(bigColor5) + 347: 7(fvec4) Load 9(color) + 348: 7(fvec4) FAdd 347 346 + Store 9(color) 348 + 349: 22(ptr) AccessChain 9(color) 112 350: 6(float) Load 349 - 351: 6(float) Load 339(d5) - 352: 17(bool) FOrdLessThan 350 351 - BranchConditional 352 329 331 - 331: Label - 353: 21(ptr) AccessChain 9(color) 20 - 354: 6(float) Load 353 - 356: 6(float) Load 355(d6) - 357: 17(bool) FOrdLessThan 354 356 - SelectionMerge 359 None - BranchConditional 357 358 372 - 358: Label - Branch 360 - 360: Label - 364: 21(ptr) AccessChain 9(color) 107 - 365: 6(float) Load 364 - 366: 6(float) Load 355(d6) - 367: 17(bool) FOrdLessThan 365 366 - LoopMerge 362 363 None - BranchConditional 367 361 362 - 361: Label - 369: 7(fvec4) Load 368(bigColor6) - 370: 7(fvec4) Load 9(color) - 371: 7(fvec4) FAdd 370 369 - Store 9(color) 371 - Branch 363 - 363: Label - Branch 360 - 362: Label - Branch 359 + 352: 6(float) Load 351(d5) + 353: 18(bool) FOrdLessThan 350 352 + SelectionMerge 355 None + BranchConditional 353 354 355 + 354: Label + 356: 6(float) Load 351(d5) + 357: 22(ptr) AccessChain 9(color) 112 + 358: 6(float) Load 357 + 359: 6(float) FAdd 358 356 + 360: 22(ptr) AccessChain 9(color) 112 + Store 360 359 + Branch 355 + 355: Label + Branch 344 + 344: Label + 361: 22(ptr) AccessChain 9(color) 21 + 362: 6(float) Load 361 + 363: 6(float) Load 351(d5) + 364: 18(bool) FOrdLessThan 362 363 + BranchConditional 364 341 343 + 343: Label + 365: 22(ptr) AccessChain 9(color) 21 + 366: 6(float) Load 365 + 368: 6(float) Load 367(d6) + 369: 18(bool) FOrdLessThan 366 368 + SelectionMerge 371 None + BranchConditional 369 370 385 + 370: Label + Branch 372 372: Label - Branch 373 - 373: Label - 377: 21(ptr) AccessChain 9(color) 64 + LoopMerge 374 375 None + Branch 376 + 376: Label + 377: 22(ptr) AccessChain 9(color) 112 378: 6(float) Load 377 - 379: 6(float) Load 355(d6) - 380: 17(bool) FOrdLessThan 378 379 - LoopMerge 375 376 None - BranchConditional 380 374 375 - 374: Label - 381: 51(ptr) AccessChain 368(bigColor6) 64 - 382: 6(float) Load 381 - 383: 21(ptr) AccessChain 9(color) 64 - 384: 6(float) Load 383 - 385: 6(float) FAdd 384 382 - 386: 21(ptr) AccessChain 9(color) 64 - Store 386 385 - Branch 376 - 376: Label - Branch 373 - 375: Label - Branch 359 - 359: Label - 387: 21(ptr) AccessChain 9(color) 20 - 388: 6(float) Load 387 - 389: 6(float) Load 355(d6) - 390: 17(bool) FOrdLessThan 388 389 - SelectionMerge 392 None - BranchConditional 390 391 410 - 391: Label - Branch 393 - 393: Label - 397: 21(ptr) AccessChain 9(color) 107 - 398: 6(float) Load 397 - 399: 6(float) Load 355(d6) - 400: 17(bool) FOrdLessThan 398 399 - LoopMerge 395 396 None - BranchConditional 400 394 395 - 394: Label - 401: 7(fvec4) Load 368(bigColor6) - 402: 7(fvec4) Load 9(color) - 403: 7(fvec4) FAdd 402 401 - Store 9(color) 403 - 405: 6(float) Load 404(d7) - 406: 17(bool) FOrdLessThan 405 93 - SelectionMerge 408 None - BranchConditional 406 407 408 - 407: Label - Branch 395 - 408: Label - Branch 396 - 396: Label - Branch 393 - 395: Label - Branch 392 - 410: Label + 379: 6(float) Load 367(d6) + 380: 18(bool) FOrdLessThan 378 379 + BranchConditional 380 373 374 + 373: Label + 382: 7(fvec4) Load 381(bigColor6) + 383: 7(fvec4) Load 9(color) + 384: 7(fvec4) FAdd 383 382 + Store 9(color) 384 + Branch 375 + 375: Label + Branch 372 + 374: Label + Branch 371 + 385: Label + Branch 386 + 386: Label + LoopMerge 388 389 None + Branch 390 + 390: Label + 391: 22(ptr) AccessChain 9(color) 67 + 392: 6(float) Load 391 + 393: 6(float) Load 367(d6) + 394: 18(bool) FOrdLessThan 392 393 + BranchConditional 394 387 388 + 387: Label + 395: 53(ptr) AccessChain 381(bigColor6) 67 + 396: 6(float) Load 395 + 397: 22(ptr) AccessChain 9(color) 67 + 398: 6(float) Load 397 + 399: 6(float) FAdd 398 396 + 400: 22(ptr) AccessChain 9(color) 67 + Store 400 399 + Branch 389 + 389: Label + Branch 386 + 388: Label + Branch 371 + 371: Label + 401: 22(ptr) AccessChain 9(color) 21 + 402: 6(float) Load 401 + 403: 6(float) Load 367(d6) + 404: 18(bool) FOrdLessThan 402 403 + SelectionMerge 406 None + BranchConditional 404 405 425 + 405: Label + Branch 407 + 407: Label + LoopMerge 409 410 None Branch 411 411: Label - 415: 21(ptr) AccessChain 9(color) 64 - 416: 6(float) Load 415 - 417: 6(float) Load 355(d6) - 418: 17(bool) FOrdLessThan 416 417 - LoopMerge 413 414 None - BranchConditional 418 412 413 - 412: Label - 419: 51(ptr) AccessChain 368(bigColor6) 64 - 420: 6(float) Load 419 - 421: 21(ptr) AccessChain 9(color) 64 - 422: 6(float) Load 421 - 423: 6(float) FAdd 422 420 - 424: 21(ptr) AccessChain 9(color) 64 - Store 424 423 - Branch 414 - 414: Label - Branch 411 - 413: Label - Branch 392 - 392: Label - Branch 425 - 425: Label - LoopMerge 427 428 None - Branch 426 - 426: Label - 429: 6(float) Load 404(d7) - 431: 17(bool) FOrdLessThan 429 430 - SelectionMerge 433 None - BranchConditional 431 432 433 - 432: Label - Branch 427 - 433: Label - 436: 7(fvec4) Load 435(bigColor7) - 437: 7(fvec4) Load 9(color) - 438: 7(fvec4) FAdd 437 436 - Store 9(color) 438 - 439: 6(float) Load 404(d7) - 440: 17(bool) FOrdLessThan 439 93 - SelectionMerge 442 None - BranchConditional 440 441 442 - 441: Label - 443: 21(ptr) AccessChain 9(color) 64 - 444: 6(float) Load 443 - 445: 6(float) FAdd 444 93 - Store 443 445 - Branch 427 + 412: 22(ptr) AccessChain 9(color) 112 + 413: 6(float) Load 412 + 414: 6(float) Load 367(d6) + 415: 18(bool) FOrdLessThan 413 414 + BranchConditional 415 408 409 + 408: Label + 416: 7(fvec4) Load 381(bigColor6) + 417: 7(fvec4) Load 9(color) + 418: 7(fvec4) FAdd 417 416 + Store 9(color) 418 + 420: 6(float) Load 419(d7) + 421: 18(bool) FOrdLessThan 420 97 + SelectionMerge 423 None + BranchConditional 421 422 423 + 422: Label + Branch 409 + 423: Label + Branch 410 + 410: Label + Branch 407 + 409: Label + Branch 406 + 425: Label + Branch 426 + 426: Label + LoopMerge 428 429 None + Branch 430 + 430: Label + 431: 22(ptr) AccessChain 9(color) 67 + 432: 6(float) Load 431 + 433: 6(float) Load 367(d6) + 434: 18(bool) FOrdLessThan 432 433 + BranchConditional 434 427 428 + 427: Label + 435: 53(ptr) AccessChain 381(bigColor6) 67 + 436: 6(float) Load 435 + 437: 22(ptr) AccessChain 9(color) 67 + 438: 6(float) Load 437 + 439: 6(float) FAdd 438 436 + 440: 22(ptr) AccessChain 9(color) 67 + Store 440 439 + Branch 429 + 429: Label + Branch 426 + 428: Label + Branch 406 + 406: Label + Branch 441 + 441: Label + LoopMerge 443 444 None + Branch 442 442: Label - 447: 7(fvec4) Load 11(BaseColor) - 448: 7(fvec4) Load 9(color) - 449: 7(fvec4) FAdd 448 447 - Store 9(color) 449 - Branch 428 - 428: Label - BranchConditional 18 425 427 - 427: Label - Branch 450 - 450: Label - LoopMerge 452 453 None - Branch 451 - 451: Label - 455: 6(float) Load 454(d8) - 456: 17(bool) FOrdLessThan 455 430 + 445: 6(float) Load 419(d7) + 447: 18(bool) FOrdLessThan 445 446 + SelectionMerge 449 None + BranchConditional 447 448 449 + 448: Label + Branch 443 + 449: Label + 452: 7(fvec4) Load 451(bigColor7) + 453: 7(fvec4) Load 9(color) + 454: 7(fvec4) FAdd 453 452 + Store 9(color) 454 + 455: 6(float) Load 419(d7) + 456: 18(bool) FOrdLessThan 455 97 SelectionMerge 458 None BranchConditional 456 457 458 457: Label - Branch 452 + 459: 22(ptr) AccessChain 9(color) 67 + 460: 6(float) Load 459 + 461: 6(float) FAdd 460 97 + Store 459 461 + Branch 443 458: Label - 460: 7(fvec4) Load 435(bigColor7) - 461: 7(fvec4) Load 9(color) - 462: 7(fvec4) FAdd 461 460 - Store 9(color) 462 - 463: 6(float) Load 454(d8) - 464: 17(bool) FOrdLessThan 463 93 - SelectionMerge 466 None - BranchConditional 464 465 466 - 465: Label - 467: 21(ptr) AccessChain 9(color) 64 - 468: 6(float) Load 467 - 469: 6(float) FAdd 468 93 - Store 467 469 - 470: 6(float) Load 454(d8) - 472: 17(bool) FOrdLessThan 470 471 - SelectionMerge 474 None - BranchConditional 472 473 478 - 473: Label - 475: 21(ptr) AccessChain 9(color) 107 - 476: 6(float) Load 475 - 477: 6(float) FAdd 476 93 - Store 475 477 - Branch 474 - 478: Label - 479: 21(ptr) AccessChain 9(color) 20 - 480: 6(float) Load 479 - 481: 6(float) FAdd 480 93 - Store 479 481 - Branch 474 - 474: Label - Branch 452 + 463: 7(fvec4) Load 11(BaseColor) + 464: 7(fvec4) Load 9(color) + 465: 7(fvec4) FAdd 464 463 + Store 9(color) 465 + Branch 444 + 444: Label + BranchConditional 19 441 443 + 443: Label + Branch 466 466: Label - 483: 7(fvec4) Load 11(BaseColor) - 484: 7(fvec4) Load 9(color) - 485: 7(fvec4) FAdd 484 483 - Store 9(color) 485 - Branch 453 - 453: Label - 486: 21(ptr) AccessChain 9(color) 64 - 487: 6(float) Load 486 - 488: 6(float) Load 454(d8) - 489: 17(bool) FOrdLessThan 487 488 - BranchConditional 489 450 452 - 452: Label - Branch 490 - 490: Label - 494: 21(ptr) AccessChain 9(color) 73 - 495: 6(float) Load 494 - 497: 6(float) Load 496(d9) - 498: 17(bool) FOrdLessThan 495 497 - LoopMerge 492 493 None - BranchConditional 498 491 492 - 491: Label - 499: 6(float) Load 496(d9) - 500: 6(float) Load 454(d8) - 501: 17(bool) FOrdGreaterThan 499 500 - SelectionMerge 503 None - BranchConditional 501 502 503 - 502: Label - 504: 21(ptr) AccessChain 9(color) 20 - 505: 6(float) Load 504 - 506: 6(float) Load 404(d7) - 507: 17(bool) FOrdLessThanEqual 505 506 - SelectionMerge 509 None - BranchConditional 507 508 509 - 508: Label - 510: 21(ptr) AccessChain 9(color) 64 - 511: 6(float) Load 510 - 513: 17(bool) FOrdEqual 511 512 - SelectionMerge 515 None - BranchConditional 513 514 519 - 514: Label - 516: 21(ptr) AccessChain 9(color) 73 - 517: 6(float) Load 516 - 518: 6(float) FAdd 517 93 - Store 516 518 - Branch 515 - 519: Label - Branch 492 - 515: Label - Branch 509 - 509: Label - Branch 503 - 503: Label - Branch 493 - 493: Label - Branch 490 - 492: Label - Branch 521 - 521: Label - 525: 21(ptr) AccessChain 9(color) 64 - 526: 6(float) Load 525 - 528: 6(float) Load 527(d10) - 529: 17(bool) FOrdLessThan 526 528 - LoopMerge 523 524 None - BranchConditional 529 522 523 - 522: Label - 530: 21(ptr) AccessChain 9(color) 107 - 531: 6(float) Load 530 - 532: 6(float) FAdd 531 93 - Store 530 532 - 533: 21(ptr) AccessChain 9(color) 107 - 534: 6(float) Load 533 - 536: 6(float) Load 535(d11) - 537: 17(bool) FOrdLessThan 534 536 - SelectionMerge 539 None - BranchConditional 537 538 539 - 538: Label - 540: 21(ptr) AccessChain 9(color) 64 - 541: 6(float) Load 540 - 542: 6(float) FAdd 541 93 - Store 540 542 - 543: 21(ptr) AccessChain 9(color) 73 - 544: 6(float) Load 543 - 546: 6(float) Load 545(d12) - 547: 17(bool) FOrdLessThan 544 546 - SelectionMerge 549 None - BranchConditional 547 548 553 - 548: Label - 550: 21(ptr) AccessChain 9(color) 73 - 551: 6(float) Load 550 - 552: 6(float) FAdd 551 93 - Store 550 552 - Branch 549 - 553: Label - 554: 21(ptr) AccessChain 9(color) 20 - 555: 6(float) Load 554 - 556: 6(float) FAdd 555 93 - Store 554 556 - Branch 549 - 549: Label - Branch 524 + LoopMerge 468 469 None + Branch 467 + 467: Label + 471: 6(float) Load 470(d8) + 472: 18(bool) FOrdLessThan 471 446 + SelectionMerge 474 None + BranchConditional 472 473 474 + 473: Label + Branch 468 + 474: Label + 476: 7(fvec4) Load 451(bigColor7) + 477: 7(fvec4) Load 9(color) + 478: 7(fvec4) FAdd 477 476 + Store 9(color) 478 + 479: 6(float) Load 470(d8) + 480: 18(bool) FOrdLessThan 479 97 + SelectionMerge 482 None + BranchConditional 480 481 482 + 481: Label + 483: 22(ptr) AccessChain 9(color) 67 + 484: 6(float) Load 483 + 485: 6(float) FAdd 484 97 + Store 483 485 + 486: 6(float) Load 470(d8) + 488: 18(bool) FOrdLessThan 486 487 + SelectionMerge 490 None + BranchConditional 488 489 494 + 489: Label + 491: 22(ptr) AccessChain 9(color) 112 + 492: 6(float) Load 491 + 493: 6(float) FAdd 492 97 + Store 491 493 + Branch 490 + 494: Label + 495: 22(ptr) AccessChain 9(color) 21 + 496: 6(float) Load 495 + 497: 6(float) FAdd 496 97 + Store 495 497 + Branch 490 + 490: Label + Branch 468 + 482: Label + 499: 7(fvec4) Load 11(BaseColor) + 500: 7(fvec4) Load 9(color) + 501: 7(fvec4) FAdd 500 499 + Store 9(color) 501 + Branch 469 + 469: Label + 502: 22(ptr) AccessChain 9(color) 67 + 503: 6(float) Load 502 + 504: 6(float) Load 470(d8) + 505: 18(bool) FOrdLessThan 503 504 + BranchConditional 505 466 468 + 468: Label + Branch 506 + 506: Label + LoopMerge 508 509 None + Branch 510 + 510: Label + 511: 22(ptr) AccessChain 9(color) 76 + 512: 6(float) Load 511 + 514: 6(float) Load 513(d9) + 515: 18(bool) FOrdLessThan 512 514 + BranchConditional 515 507 508 + 507: Label + 516: 6(float) Load 513(d9) + 517: 6(float) Load 470(d8) + 518: 18(bool) FOrdGreaterThan 516 517 + SelectionMerge 520 None + BranchConditional 518 519 520 + 519: Label + 521: 22(ptr) AccessChain 9(color) 21 + 522: 6(float) Load 521 + 523: 6(float) Load 419(d7) + 524: 18(bool) FOrdLessThanEqual 522 523 + SelectionMerge 526 None + BranchConditional 524 525 526 + 525: Label + 527: 22(ptr) AccessChain 9(color) 67 + 528: 6(float) Load 527 + 530: 18(bool) FOrdEqual 528 529 + SelectionMerge 532 None + BranchConditional 530 531 536 + 531: Label + 533: 22(ptr) AccessChain 9(color) 76 + 534: 6(float) Load 533 + 535: 6(float) FAdd 534 97 + Store 533 535 + Branch 532 + 536: Label + Branch 508 + 532: Label + Branch 526 + 526: Label + Branch 520 + 520: Label + Branch 509 + 509: Label + Branch 506 + 508: Label + Branch 538 + 538: Label + LoopMerge 540 541 None + Branch 542 + 542: Label + 543: 22(ptr) AccessChain 9(color) 67 + 544: 6(float) Load 543 + 546: 6(float) Load 545(d10) + 547: 18(bool) FOrdLessThan 544 546 + BranchConditional 547 539 540 539: Label - 558: 7(fvec4) Load 9(color) - 559: 7(fvec4) CompositeConstruct 93 93 93 93 - 560: 7(fvec4) FAdd 558 559 - Store 9(color) 560 - Branch 523 - 524: Label - Branch 521 - 523: Label - Branch 562 - 562: Label - 566: 21(ptr) AccessChain 9(color) 20 - 567: 6(float) Load 566 - 569: 17(bool) FOrdLessThan 567 568 - LoopMerge 564 565 None - BranchConditional 569 563 564 - 563: Label - 571: 7(fvec4) Load 570(bigColor8) - 572: 7(fvec4) Load 9(color) - 573: 7(fvec4) FAdd 572 571 - Store 9(color) 573 - 574: 21(ptr) AccessChain 9(color) 64 - 575: 6(float) Load 574 - 576: 6(float) Load 454(d8) - 577: 17(bool) FOrdLessThan 575 576 - SelectionMerge 579 None - BranchConditional 577 578 579 - 578: Label - 580: 21(ptr) AccessChain 9(color) 73 - 581: 6(float) Load 580 - 582: 6(float) Load 355(d6) - 583: 17(bool) FOrdLessThan 581 582 - SelectionMerge 585 None - BranchConditional 583 584 585 - 584: Label - Branch 565 - 585: Label - Branch 579 - 579: Label - 587: 51(ptr) AccessChain 570(bigColor8) 20 - 588: 6(float) Load 587 - 589: 21(ptr) AccessChain 9(color) 107 - 590: 6(float) Load 589 - 591: 6(float) FAdd 590 588 - 592: 21(ptr) AccessChain 9(color) 107 - Store 592 591 - Branch 565 - 565: Label - Branch 562 - 564: Label - 593: 7(fvec4) Load 9(color) - 594: 7(fvec4) CompositeConstruct 93 93 93 93 - 595: 7(fvec4) FAdd 593 594 - Store 9(color) 595 - 598: 7(fvec4) Load 9(color) - Store 597(gl_FragColor) 598 - Branch 599 - 599: Label - 603: 21(ptr) AccessChain 9(color) 20 - 604: 6(float) Load 603 - 606: 6(float) Load 605(d14) - 607: 17(bool) FOrdLessThan 604 606 - LoopMerge 601 602 None - BranchConditional 607 600 601 - 600: Label - 608: 21(ptr) AccessChain 9(color) 107 + 548: 22(ptr) AccessChain 9(color) 112 + 549: 6(float) Load 548 + 550: 6(float) FAdd 549 97 + Store 548 550 + 551: 22(ptr) AccessChain 9(color) 112 + 552: 6(float) Load 551 + 554: 6(float) Load 553(d11) + 555: 18(bool) FOrdLessThan 552 554 + SelectionMerge 557 None + BranchConditional 555 556 557 + 556: Label + 558: 22(ptr) AccessChain 9(color) 67 + 559: 6(float) Load 558 + 560: 6(float) FAdd 559 97 + Store 558 560 + 561: 22(ptr) AccessChain 9(color) 76 + 562: 6(float) Load 561 + 564: 6(float) Load 563(d12) + 565: 18(bool) FOrdLessThan 562 564 + SelectionMerge 567 None + BranchConditional 565 566 571 + 566: Label + 568: 22(ptr) AccessChain 9(color) 76 + 569: 6(float) Load 568 + 570: 6(float) FAdd 569 97 + Store 568 570 + Branch 567 + 571: Label + 572: 22(ptr) AccessChain 9(color) 21 + 573: 6(float) Load 572 + 574: 6(float) FAdd 573 97 + Store 572 574 + Branch 567 + 567: Label + Branch 541 + 557: Label + 576: 7(fvec4) Load 9(color) + 577: 7(fvec4) CompositeConstruct 97 97 97 97 + 578: 7(fvec4) FAdd 576 577 + Store 9(color) 578 + Branch 540 + 541: Label + Branch 538 + 540: Label + Branch 580 + 580: Label + LoopMerge 582 583 None + Branch 584 + 584: Label + 585: 22(ptr) AccessChain 9(color) 21 + 586: 6(float) Load 585 + 588: 18(bool) FOrdLessThan 586 587 + BranchConditional 588 581 582 + 581: Label + 590: 7(fvec4) Load 589(bigColor8) + 591: 7(fvec4) Load 9(color) + 592: 7(fvec4) FAdd 591 590 + Store 9(color) 592 + 593: 22(ptr) AccessChain 9(color) 67 + 594: 6(float) Load 593 + 595: 6(float) Load 470(d8) + 596: 18(bool) FOrdLessThan 594 595 + SelectionMerge 598 None + BranchConditional 596 597 598 + 597: Label + 599: 22(ptr) AccessChain 9(color) 76 + 600: 6(float) Load 599 + 601: 6(float) Load 367(d6) + 602: 18(bool) FOrdLessThan 600 601 + SelectionMerge 604 None + BranchConditional 602 603 604 + 603: Label + Branch 583 + 604: Label + Branch 598 + 598: Label + 606: 53(ptr) AccessChain 589(bigColor8) 21 + 607: 6(float) Load 606 + 608: 22(ptr) AccessChain 9(color) 112 609: 6(float) Load 608 - 611: 6(float) Load 610(d15) - 612: 17(bool) FOrdLessThan 609 611 - SelectionMerge 614 None - BranchConditional 612 613 616 - 613: Label + 610: 6(float) FAdd 609 607 + 611: 22(ptr) AccessChain 9(color) 112 + Store 611 610 + Branch 583 + 583: Label + Branch 580 + 582: Label + 612: 7(fvec4) Load 9(color) + 613: 7(fvec4) CompositeConstruct 97 97 97 97 + 614: 7(fvec4) FAdd 612 613 + Store 9(color) 614 + 617: 7(fvec4) Load 9(color) + Store 616(gl_FragColor) 617 + Branch 618 + 618: Label + LoopMerge 620 621 None + Branch 622 + 622: Label + 623: 22(ptr) AccessChain 9(color) 21 + 624: 6(float) Load 623 + 626: 6(float) Load 625(d14) + 627: 18(bool) FOrdLessThan 624 626 + BranchConditional 627 619 620 + 619: Label + 628: 22(ptr) AccessChain 9(color) 112 + 629: 6(float) Load 628 + 631: 6(float) Load 630(d15) + 632: 18(bool) FOrdLessThan 629 631 + SelectionMerge 634 None + BranchConditional 632 633 636 + 633: Label Return - 616: Label - 617: 7(fvec4) Load 9(color) - 618: 7(fvec4) CompositeConstruct 93 93 93 93 - 619: 7(fvec4) FAdd 617 618 - Store 9(color) 619 - Branch 614 - 614: Label - Branch 602 - 602: Label - Branch 599 - 601: Label - 620: 7(fvec4) Load 9(color) - 621: 7(fvec4) CompositeConstruct 93 93 93 93 - 622: 7(fvec4) FAdd 620 621 - Store 9(color) 622 - Branch 623 - 623: Label - 627: 21(ptr) AccessChain 9(color) 73 - 628: 6(float) Load 627 - 630: 6(float) Load 629(d16) - 631: 17(bool) FOrdLessThan 628 630 - LoopMerge 625 626 None - BranchConditional 631 624 625 - 624: Label - 632: 21(ptr) AccessChain 9(color) 73 - 633: 6(float) Load 632 - 634: 6(float) FAdd 633 93 - Store 632 634 - Branch 626 - 626: Label - Branch 623 - 625: Label - Branch 635 - 635: Label - 639: 21(ptr) AccessChain 9(color) 73 - 640: 6(float) Load 639 - 641: 6(float) Load 102(d2) - 642: 17(bool) FOrdLessThan 640 641 - SelectionMerge 644 None - BranchConditional 642 643 644 - 643: Label - 645: 21(ptr) AccessChain 9(color) 107 - 646: 6(float) Load 645 - 647: 6(float) Load 110(d3) - 648: 17(bool) FOrdLessThan 646 647 - Branch 644 - 644: Label - 649: 17(bool) Phi 642 635 648 643 - LoopMerge 637 638 None - BranchConditional 649 636 637 - 636: Label - 650: 7(fvec4) Load 114(bigColor1_2) - 651: 7(fvec4) Load 9(color) - 652: 7(fvec4) FAdd 651 650 - Store 9(color) 652 - 653: 21(ptr) AccessChain 9(color) 64 + 636: Label + 637: 7(fvec4) Load 9(color) + 638: 7(fvec4) CompositeConstruct 97 97 97 97 + 639: 7(fvec4) FAdd 637 638 + Store 9(color) 639 + Branch 634 + 634: Label + Branch 621 + 621: Label + Branch 618 + 620: Label + 640: 7(fvec4) Load 9(color) + 641: 7(fvec4) CompositeConstruct 97 97 97 97 + 642: 7(fvec4) FAdd 640 641 + Store 9(color) 642 + Branch 643 + 643: Label + LoopMerge 645 646 None + Branch 647 + 647: Label + 648: 22(ptr) AccessChain 9(color) 76 + 649: 6(float) Load 648 + 651: 6(float) Load 650(d16) + 652: 18(bool) FOrdLessThan 649 651 + BranchConditional 652 644 645 + 644: Label + 653: 22(ptr) AccessChain 9(color) 76 654: 6(float) Load 653 - 655: 6(float) Load 110(d3) - 656: 17(bool) FOrdLessThan 654 655 - SelectionMerge 658 None - BranchConditional 656 657 658 - 657: Label - Return - 658: Label - Branch 638 - 638: Label - Branch 635 - 637: Label + 655: 6(float) FAdd 654 97 + Store 653 655 + Branch 646 + 646: Label + Branch 643 + 645: Label + Branch 656 + 656: Label + LoopMerge 658 659 None Branch 660 660: Label - LoopMerge 662 663 None - Branch 661 - 661: Label - 664: 21(ptr) AccessChain 9(color) 107 - 665: 6(float) Load 664 - 667: 6(float) Load 666(d18) - 668: 17(bool) FOrdLessThan 665 667 - SelectionMerge 670 None - BranchConditional 668 669 670 - 669: Label - Return - 670: Label - 672: 7(fvec4) Load 9(color) - 673: 7(fvec4) CompositeConstruct 93 93 93 93 - 674: 7(fvec4) FAdd 672 673 + 661: 22(ptr) AccessChain 9(color) 76 + 662: 6(float) Load 661 + 663: 6(float) Load 107(d2) + 664: 18(bool) FOrdLessThan 662 663 + SelectionMerge 666 None + BranchConditional 664 665 666 + 665: Label + 667: 22(ptr) AccessChain 9(color) 112 + 668: 6(float) Load 667 + 669: 6(float) Load 115(d3) + 670: 18(bool) FOrdLessThan 668 669 + Branch 666 + 666: Label + 671: 18(bool) Phi 664 660 670 665 + BranchConditional 671 657 658 + 657: Label + 672: 7(fvec4) Load 119(bigColor1_2) + 673: 7(fvec4) Load 9(color) + 674: 7(fvec4) FAdd 673 672 Store 9(color) 674 - Branch 663 - 663: Label - 675: 21(ptr) AccessChain 9(color) 20 + 675: 22(ptr) AccessChain 9(color) 67 676: 6(float) Load 675 - 678: 6(float) Load 677(d17) - 679: 17(bool) FOrdLessThan 676 678 - BranchConditional 679 660 662 - 662: Label - Branch 680 + 677: 6(float) Load 115(d3) + 678: 18(bool) FOrdLessThan 676 677 + SelectionMerge 680 None + BranchConditional 678 679 680 + 679: Label + Return 680: Label - 684: 21(ptr) AccessChain 9(color) 107 - 685: 6(float) Load 684 - 686: 6(float) Load 629(d16) - 687: 17(bool) FOrdLessThan 685 686 - LoopMerge 682 683 None - BranchConditional 687 681 682 - 681: Label - 688: 21(ptr) AccessChain 9(color) 73 - 689: 6(float) Load 688 - 690: 6(float) Load 629(d16) - 691: 17(bool) FOrdLessThan 689 690 - SelectionMerge 693 None - BranchConditional 691 692 695 - 692: Label - Kill - 695: Label - 696: 7(fvec4) Load 9(color) - 697: 7(fvec4) CompositeConstruct 93 93 93 93 - 698: 7(fvec4) FAdd 696 697 - Store 9(color) 698 - Branch 693 - 693: Label - Branch 683 - 683: Label - Branch 680 + Branch 659 + 659: Label + Branch 656 + 658: Label + Branch 682 682: Label - 699: 7(fvec4) Load 9(color) - 700: 7(fvec4) CompositeConstruct 93 93 93 93 - 701: 7(fvec4) FAdd 699 700 - Store 9(color) 701 - 702: 7(fvec4) Load 9(color) - Store 597(gl_FragColor) 702 + LoopMerge 684 685 None + Branch 683 + 683: Label + 686: 22(ptr) AccessChain 9(color) 112 + 687: 6(float) Load 686 + 689: 6(float) Load 688(d18) + 690: 18(bool) FOrdLessThan 687 689 + SelectionMerge 692 None + BranchConditional 690 691 692 + 691: Label + Return + 692: Label + 694: 7(fvec4) Load 9(color) + 695: 7(fvec4) CompositeConstruct 97 97 97 97 + 696: 7(fvec4) FAdd 694 695 + Store 9(color) 696 + Branch 685 + 685: Label + 697: 22(ptr) AccessChain 9(color) 21 + 698: 6(float) Load 697 + 700: 6(float) Load 699(d17) + 701: 18(bool) FOrdLessThan 698 700 + BranchConditional 701 682 684 + 684: Label + Branch 702 + 702: Label + LoopMerge 704 705 None + Branch 706 + 706: Label + 707: 22(ptr) AccessChain 9(color) 112 + 708: 6(float) Load 707 + 709: 6(float) Load 650(d16) + 710: 18(bool) FOrdLessThan 708 709 + BranchConditional 710 703 704 + 703: Label + 711: 22(ptr) AccessChain 9(color) 76 + 712: 6(float) Load 711 + 713: 6(float) Load 650(d16) + 714: 18(bool) FOrdLessThan 712 713 + SelectionMerge 716 None + BranchConditional 714 715 718 + 715: Label + Kill + 718: Label + 719: 7(fvec4) Load 9(color) + 720: 7(fvec4) CompositeConstruct 97 97 97 97 + 721: 7(fvec4) FAdd 719 720 + Store 9(color) 721 + Branch 716 + 716: Label + Branch 705 + 705: Label + Branch 702 + 704: Label + 722: 7(fvec4) Load 9(color) + 723: 7(fvec4) CompositeConstruct 97 97 97 97 + 724: 7(fvec4) FAdd 722 723 + Store 9(color) 724 + 725: 7(fvec4) Load 9(color) + Store 616(gl_FragColor) 725 Return FunctionEnd diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index e1bf0859..7de618ff 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -7,12 +7,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 187 +// Id's are bound by 188 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 140 + EntryPoint Fragment 4 "main" 11 141 ExecutionMode 4 OriginLowerLeft Source GLSL 130 Name 4 "main" @@ -20,51 +20,51 @@ Linked fragment stage: Name 11 "BaseColor" Name 18 "bigColor4" Name 28 "d4" - Name 80 "d13" - Name 140 "gl_FragColor" - Name 142 "bigColor" - Name 143 "bigColor1_1" - Name 144 "bigColor1_2" - Name 145 "bigColor1_3" - Name 146 "bigColor2" - Name 147 "bigColor3" - Name 148 "bigColor5" - Name 149 "bigColor6" - Name 150 "bigColor7" - Name 151 "bigColor8" - Name 152 "d" - Name 153 "d2" - Name 154 "d3" - Name 155 "d5" - Name 156 "d6" - Name 157 "d7" - Name 158 "d8" - Name 159 "d9" - Name 160 "d10" - Name 161 "d11" - Name 162 "d12" - Name 163 "d14" - Name 164 "d15" - Name 165 "d16" - Name 166 "d17" - Name 167 "d18" - Name 168 "d19" - Name 169 "d20" - Name 170 "d21" - Name 171 "d22" - Name 172 "d23" - Name 173 "d24" - Name 174 "d25" - Name 175 "d26" - Name 176 "d27" - Name 177 "d28" - Name 178 "d29" - Name 179 "d30" - Name 180 "d31" - Name 181 "d32" - Name 182 "d33" - Name 183 "d34" - Name 186 "Count" + Name 81 "d13" + Name 141 "gl_FragColor" + Name 143 "bigColor" + Name 144 "bigColor1_1" + Name 145 "bigColor1_2" + Name 146 "bigColor1_3" + Name 147 "bigColor2" + Name 148 "bigColor3" + Name 149 "bigColor5" + Name 150 "bigColor6" + Name 151 "bigColor7" + Name 152 "bigColor8" + Name 153 "d" + Name 154 "d2" + Name 155 "d3" + Name 156 "d5" + Name 157 "d6" + Name 158 "d7" + Name 159 "d8" + Name 160 "d9" + Name 161 "d10" + Name 162 "d11" + Name 163 "d12" + Name 164 "d14" + Name 165 "d15" + Name 166 "d16" + Name 167 "d17" + Name 168 "d18" + Name 169 "d19" + Name 170 "d20" + Name 171 "d21" + Name 172 "d22" + Name 173 "d23" + Name 174 "d24" + Name 175 "d25" + Name 176 "d26" + Name 177 "d27" + Name 178 "d28" + Name 179 "d29" + Name 180 "d30" + Name 181 "d31" + Name 182 "d32" + Name 183 "d33" + Name 184 "d34" + Name 187 "Count" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -84,55 +84,55 @@ Linked fragment stage: 35: 22(int) Constant 2 48: 6(float) Constant 1065353216 51: 22(int) Constant 1 - 77: 22(int) Constant 3 - 80(d13): 27(ptr) Variable UniformConstant - 139: TypePointer Output 7(fvec4) -140(gl_FragColor): 139(ptr) Variable Output - 142(bigColor): 17(ptr) Variable UniformConstant -143(bigColor1_1): 17(ptr) Variable UniformConstant -144(bigColor1_2): 17(ptr) Variable UniformConstant -145(bigColor1_3): 17(ptr) Variable UniformConstant - 146(bigColor2): 17(ptr) Variable UniformConstant - 147(bigColor3): 17(ptr) Variable UniformConstant - 148(bigColor5): 17(ptr) Variable UniformConstant - 149(bigColor6): 17(ptr) Variable UniformConstant - 150(bigColor7): 17(ptr) Variable UniformConstant - 151(bigColor8): 17(ptr) Variable UniformConstant - 152(d): 27(ptr) Variable UniformConstant - 153(d2): 27(ptr) Variable UniformConstant - 154(d3): 27(ptr) Variable UniformConstant - 155(d5): 27(ptr) Variable UniformConstant - 156(d6): 27(ptr) Variable UniformConstant - 157(d7): 27(ptr) Variable UniformConstant - 158(d8): 27(ptr) Variable UniformConstant - 159(d9): 27(ptr) Variable UniformConstant - 160(d10): 27(ptr) Variable UniformConstant - 161(d11): 27(ptr) Variable UniformConstant - 162(d12): 27(ptr) Variable UniformConstant - 163(d14): 27(ptr) Variable UniformConstant - 164(d15): 27(ptr) Variable UniformConstant - 165(d16): 27(ptr) Variable UniformConstant - 166(d17): 27(ptr) Variable UniformConstant - 167(d18): 27(ptr) Variable UniformConstant - 168(d19): 27(ptr) Variable UniformConstant - 169(d20): 27(ptr) Variable UniformConstant - 170(d21): 27(ptr) Variable UniformConstant - 171(d22): 27(ptr) Variable UniformConstant - 172(d23): 27(ptr) Variable UniformConstant - 173(d24): 27(ptr) Variable UniformConstant - 174(d25): 27(ptr) Variable UniformConstant - 175(d26): 27(ptr) Variable UniformConstant - 176(d27): 27(ptr) Variable UniformConstant - 177(d28): 27(ptr) Variable UniformConstant - 178(d29): 27(ptr) Variable UniformConstant - 179(d30): 27(ptr) Variable UniformConstant - 180(d31): 27(ptr) Variable UniformConstant - 181(d32): 27(ptr) Variable UniformConstant - 182(d33): 27(ptr) Variable UniformConstant - 183(d34): 27(ptr) Variable UniformConstant - 184: TypeInt 32 1 - 185: TypePointer UniformConstant 184(int) - 186(Count): 185(ptr) Variable UniformConstant + 78: 22(int) Constant 3 + 81(d13): 27(ptr) Variable UniformConstant + 140: TypePointer Output 7(fvec4) +141(gl_FragColor): 140(ptr) Variable Output + 143(bigColor): 17(ptr) Variable UniformConstant +144(bigColor1_1): 17(ptr) Variable UniformConstant +145(bigColor1_2): 17(ptr) Variable UniformConstant +146(bigColor1_3): 17(ptr) Variable UniformConstant + 147(bigColor2): 17(ptr) Variable UniformConstant + 148(bigColor3): 17(ptr) Variable UniformConstant + 149(bigColor5): 17(ptr) Variable UniformConstant + 150(bigColor6): 17(ptr) Variable UniformConstant + 151(bigColor7): 17(ptr) Variable UniformConstant + 152(bigColor8): 17(ptr) Variable UniformConstant + 153(d): 27(ptr) Variable UniformConstant + 154(d2): 27(ptr) Variable UniformConstant + 155(d3): 27(ptr) Variable UniformConstant + 156(d5): 27(ptr) Variable UniformConstant + 157(d6): 27(ptr) Variable UniformConstant + 158(d7): 27(ptr) Variable UniformConstant + 159(d8): 27(ptr) Variable UniformConstant + 160(d9): 27(ptr) Variable UniformConstant + 161(d10): 27(ptr) Variable UniformConstant + 162(d11): 27(ptr) Variable UniformConstant + 163(d12): 27(ptr) Variable UniformConstant + 164(d14): 27(ptr) Variable UniformConstant + 165(d15): 27(ptr) Variable UniformConstant + 166(d16): 27(ptr) Variable UniformConstant + 167(d17): 27(ptr) Variable UniformConstant + 168(d18): 27(ptr) Variable UniformConstant + 169(d19): 27(ptr) Variable UniformConstant + 170(d20): 27(ptr) Variable UniformConstant + 171(d21): 27(ptr) Variable UniformConstant + 172(d22): 27(ptr) Variable UniformConstant + 173(d23): 27(ptr) Variable UniformConstant + 174(d24): 27(ptr) Variable UniformConstant + 175(d25): 27(ptr) Variable UniformConstant + 176(d26): 27(ptr) Variable UniformConstant + 177(d27): 27(ptr) Variable UniformConstant + 178(d28): 27(ptr) Variable UniformConstant + 179(d29): 27(ptr) Variable UniformConstant + 180(d30): 27(ptr) Variable UniformConstant + 181(d31): 27(ptr) Variable UniformConstant + 182(d32): 27(ptr) Variable UniformConstant + 183(d33): 27(ptr) Variable UniformConstant + 184(d34): 27(ptr) Variable UniformConstant + 185: TypeInt 32 1 + 186: TypePointer UniformConstant 185(int) + 187(Count): 186(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -207,95 +207,97 @@ Linked fragment stage: 15: Label Branch 73 73: Label - 78: 24(ptr) AccessChain 9(color) 77 - 79: 6(float) Load 78 - 81: 6(float) Load 80(d13) - 82: 30(bool) FOrdLessThan 79 81 LoopMerge 75 76 None - BranchConditional 82 74 75 + Branch 77 + 77: Label + 79: 24(ptr) AccessChain 9(color) 78 + 80: 6(float) Load 79 + 82: 6(float) Load 81(d13) + 83: 30(bool) FOrdLessThan 80 82 + BranchConditional 83 74 75 74: Label - 83: 24(ptr) AccessChain 9(color) 35 - 84: 6(float) Load 83 - 85: 6(float) Load 80(d13) - 86: 30(bool) FOrdLessThan 84 85 - SelectionMerge 88 None - BranchConditional 86 87 92 - 87: Label - 89: 7(fvec4) Load 9(color) - 90: 7(fvec4) CompositeConstruct 48 48 48 48 - 91: 7(fvec4) FAdd 89 90 - Store 9(color) 91 - Branch 88 - 92: Label - 93: 7(fvec4) Load 9(color) - 94: 7(fvec4) CompositeConstruct 48 48 48 48 - 95: 7(fvec4) FSub 93 94 - Store 9(color) 95 - Branch 88 - 88: Label - 96: 7(fvec4) Load 18(bigColor4) - 97: 7(fvec4) Load 9(color) - 98: 7(fvec4) FAdd 97 96 - Store 9(color) 98 - 99: 24(ptr) AccessChain 9(color) 23 - 100: 6(float) Load 99 - 101: 6(float) Load 28(d4) - 102: 30(bool) FOrdLessThan 100 101 - SelectionMerge 104 None - BranchConditional 102 103 104 - 103: Label - 105: 24(ptr) AccessChain 9(color) 35 - 106: 6(float) Load 105 - 107: 6(float) FAdd 106 34 - 108: 24(ptr) AccessChain 9(color) 35 - Store 108 107 + 84: 24(ptr) AccessChain 9(color) 35 + 85: 6(float) Load 84 + 86: 6(float) Load 81(d13) + 87: 30(bool) FOrdLessThan 85 86 + SelectionMerge 89 None + BranchConditional 87 88 93 + 88: Label + 90: 7(fvec4) Load 9(color) + 91: 7(fvec4) CompositeConstruct 48 48 48 48 + 92: 7(fvec4) FAdd 90 91 + Store 9(color) 92 + Branch 89 + 93: Label + 94: 7(fvec4) Load 9(color) + 95: 7(fvec4) CompositeConstruct 48 48 48 48 + 96: 7(fvec4) FSub 94 95 + Store 9(color) 96 + Branch 89 + 89: Label + 97: 7(fvec4) Load 18(bigColor4) + 98: 7(fvec4) Load 9(color) + 99: 7(fvec4) FAdd 98 97 + Store 9(color) 99 + 100: 24(ptr) AccessChain 9(color) 23 + 101: 6(float) Load 100 + 102: 6(float) Load 28(d4) + 103: 30(bool) FOrdLessThan 101 102 + SelectionMerge 105 None + BranchConditional 103 104 105 + 104: Label + 106: 24(ptr) AccessChain 9(color) 35 + 107: 6(float) Load 106 + 108: 6(float) FAdd 107 34 109: 24(ptr) AccessChain 9(color) 35 - 110: 6(float) Load 109 - 111: 6(float) Load 28(d4) - 112: 30(bool) FOrdLessThan 110 111 - SelectionMerge 114 None - BranchConditional 112 113 114 - 113: Label - 115: 24(ptr) AccessChain 9(color) 23 - 116: 6(float) Load 115 - 117: 6(float) FAdd 116 48 - Store 115 117 + Store 109 108 + 110: 24(ptr) AccessChain 9(color) 35 + 111: 6(float) Load 110 + 112: 6(float) Load 28(d4) + 113: 30(bool) FOrdLessThan 111 112 + SelectionMerge 115 None + BranchConditional 113 114 115 + 114: Label + 116: 24(ptr) AccessChain 9(color) 23 + 117: 6(float) Load 116 + 118: 6(float) FAdd 117 48 + Store 116 118 Branch 76 - 114: Label - Branch 104 - 104: Label - 119: 24(ptr) AccessChain 9(color) 51 - 120: 6(float) Load 119 - 121: 6(float) Load 28(d4) - 122: 30(bool) FOrdLessThan 120 121 - SelectionMerge 124 None - BranchConditional 122 123 130 - 123: Label - 125: 6(float) Load 28(d4) - 126: 24(ptr) AccessChain 9(color) 51 - 127: 6(float) Load 126 - 128: 6(float) FAdd 127 125 - 129: 24(ptr) AccessChain 9(color) 51 - Store 129 128 - Branch 124 - 130: Label - 131: 6(float) Load 28(d4) - 132: 24(ptr) AccessChain 9(color) 23 - 133: 6(float) Load 132 - 134: 6(float) FAdd 133 131 - 135: 24(ptr) AccessChain 9(color) 23 - Store 135 134 - Branch 124 - 124: Label + 115: Label + Branch 105 + 105: Label + 120: 24(ptr) AccessChain 9(color) 51 + 121: 6(float) Load 120 + 122: 6(float) Load 28(d4) + 123: 30(bool) FOrdLessThan 121 122 + SelectionMerge 125 None + BranchConditional 123 124 131 + 124: Label + 126: 6(float) Load 28(d4) + 127: 24(ptr) AccessChain 9(color) 51 + 128: 6(float) Load 127 + 129: 6(float) FAdd 128 126 + 130: 24(ptr) AccessChain 9(color) 51 + Store 130 129 + Branch 125 + 131: Label + 132: 6(float) Load 28(d4) + 133: 24(ptr) AccessChain 9(color) 23 + 134: 6(float) Load 133 + 135: 6(float) FAdd 134 132 + 136: 24(ptr) AccessChain 9(color) 23 + Store 136 135 + Branch 125 + 125: Label Branch 76 76: Label Branch 73 75: Label - 136: 7(fvec4) Load 9(color) - 137: 7(fvec4) CompositeConstruct 48 48 48 48 - 138: 7(fvec4) FAdd 136 137 - Store 9(color) 138 - 141: 7(fvec4) Load 9(color) - Store 140(gl_FragColor) 141 + 137: 7(fvec4) Load 9(color) + 138: 7(fvec4) CompositeConstruct 48 48 48 48 + 139: 7(fvec4) FAdd 137 138 + Store 9(color) 139 + 142: 7(fvec4) Load 9(color) + Store 141(gl_FragColor) 142 Return FunctionEnd diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index efd2df07..74f4463a 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -10,12 +10,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 267 +// Id's are bound by 269 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 75 225 + EntryPoint Fragment 4 "main" 75 227 ExecutionMode 4 OriginLowerLeft Source ESSL 310 Name 4 "main" @@ -33,24 +33,24 @@ Linked fragment stage: Name 75 "x" Name 129 "d" Name 155 "i" - Name 174 "j" - Name 225 "color" - Name 231 "v" - Name 232 "param" + Name 175 "j" + Name 227 "color" + Name 233 "v" Name 234 "param" Name 236 "param" - Name 244 "param" + Name 238 "param" Name 246 "param" Name 248 "param" + Name 250 "param" Decorate 60(local) RelaxedPrecision Decorate 62(c) RelaxedPrecision Decorate 73(f) RelaxedPrecision Decorate 75(x) RelaxedPrecision Decorate 129(d) RelaxedPrecision Decorate 155(i) RelaxedPrecision - Decorate 174(j) RelaxedPrecision - Decorate 225(color) RelaxedPrecision - Decorate 231(v) RelaxedPrecision + Decorate 175(j) RelaxedPrecision + Decorate 227(color) RelaxedPrecision + Decorate 233(v) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -71,31 +71,31 @@ Linked fragment stage: 75(x): 74(ptr) Variable Input 129(d): 61(ptr) Variable UniformConstant 156: 9(int) Constant 0 - 162: 9(int) Constant 10 - 163: TypeBool - 175: 9(int) Constant 20 - 181: 9(int) Constant 30 - 186: 6(float) Constant 1120429670 - 206: 6(float) Constant 1079739679 - 224: TypePointer Output 6(float) - 225(color): 224(ptr) Variable Output - 230: TypePointer UniformConstant 7(fvec4) - 231(v): 230(ptr) Variable UniformConstant - 239: TypeInt 32 0 - 240: 239(int) Constant 1 - 251: 239(int) Constant 2 + 163: 9(int) Constant 10 + 164: TypeBool + 176: 9(int) Constant 20 + 183: 9(int) Constant 30 + 188: 6(float) Constant 1120429670 + 208: 6(float) Constant 1079739679 + 226: TypePointer Output 6(float) + 227(color): 226(ptr) Variable Output + 232: TypePointer UniformConstant 7(fvec4) + 233(v): 232(ptr) Variable UniformConstant + 241: TypeInt 32 0 + 242: 241(int) Constant 1 + 253: 241(int) Constant 2 4(main): 2 Function None 3 5: Label 60(local): 10(ptr) Variable Function 73(f): 72(ptr) Variable Function 155(i): 10(ptr) Variable Function - 174(j): 10(ptr) Variable Function - 232(param): 8(ptr) Variable Function + 175(j): 10(ptr) Variable Function 234(param): 8(ptr) Variable Function - 236(param): 10(ptr) Variable Function - 244(param): 8(ptr) Variable Function + 236(param): 8(ptr) Variable Function + 238(param): 10(ptr) Variable Function 246(param): 8(ptr) Variable Function - 248(param): 10(ptr) Variable Function + 248(param): 8(ptr) Variable Function + 250(param): 10(ptr) Variable Function 63: 9(int) Load 62(c) Store 60(local) 63 64: 9(int) Load 60(local) @@ -218,134 +218,138 @@ Linked fragment stage: Store 155(i) 156 Branch 157 157: Label - 161: 9(int) Load 155(i) - 164: 163(bool) SLessThan 161 162 LoopMerge 159 160 None - BranchConditional 164 158 159 + Branch 161 + 161: Label + 162: 9(int) Load 155(i) + 165: 164(bool) SLessThan 162 163 + BranchConditional 165 158 159 158: Label - 165: 9(int) Load 62(c) - SelectionMerge 169 None - Switch 165 168 - case 1: 166 - case 2: 167 - 168: Label - 200: 6(float) Load 75(x) - 201: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 200 - 202: 6(float) Load 73(f) - 203: 6(float) FAdd 202 201 - Store 73(f) 203 - Branch 169 - 166: Label - 170: 6(float) Load 75(x) - 171: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 170 - 172: 6(float) Load 73(f) - 173: 6(float) FAdd 172 171 - Store 73(f) 173 - Store 174(j) 175 - Branch 176 - 176: Label - 180: 9(int) Load 174(j) - 182: 163(bool) SLessThan 180 181 - LoopMerge 178 179 None - BranchConditional 182 177 178 - 177: Label - 183: 6(float) Load 73(f) - 184: 6(float) FAdd 183 48 - Store 73(f) 184 - 185: 6(float) Load 73(f) - 187: 163(bool) FOrdLessThan 185 186 - SelectionMerge 189 None - BranchConditional 187 188 189 - 188: Label - Branch 178 - 189: Label - Branch 179 - 179: Label - 191: 9(int) Load 174(j) - 192: 9(int) IAdd 191 65 - Store 174(j) 192 - Branch 176 - 178: Label - Branch 169 + 166: 9(int) Load 62(c) + SelectionMerge 170 None + Switch 166 169 + case 1: 167 + case 2: 168 + 169: Label + 202: 6(float) Load 75(x) + 203: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 202 + 204: 6(float) Load 73(f) + 205: 6(float) FAdd 204 203 + Store 73(f) 205 + Branch 170 167: Label - 194: 6(float) Load 75(x) - 195: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 194 - 196: 6(float) Load 73(f) - 197: 6(float) FAdd 196 195 - Store 73(f) 197 - Branch 169 - 169: Label - 205: 6(float) Load 73(f) - 207: 163(bool) FOrdLessThan 205 206 - SelectionMerge 209 None - BranchConditional 207 208 209 - 208: Label + 171: 6(float) Load 75(x) + 172: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 171 + 173: 6(float) Load 73(f) + 174: 6(float) FAdd 173 172 + Store 73(f) 174 + Store 175(j) 176 + Branch 177 + 177: Label + LoopMerge 179 180 None + Branch 181 + 181: Label + 182: 9(int) Load 175(j) + 184: 164(bool) SLessThan 182 183 + BranchConditional 184 178 179 + 178: Label + 185: 6(float) Load 73(f) + 186: 6(float) FAdd 185 48 + Store 73(f) 186 + 187: 6(float) Load 73(f) + 189: 164(bool) FOrdLessThan 187 188 + SelectionMerge 191 None + BranchConditional 189 190 191 + 190: Label + Branch 179 + 191: Label + Branch 180 + 180: Label + 193: 9(int) Load 175(j) + 194: 9(int) IAdd 193 65 + Store 175(j) 194 + Branch 177 + 179: Label + Branch 170 + 168: Label + 196: 6(float) Load 75(x) + 197: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 196 + 198: 6(float) Load 73(f) + 199: 6(float) FAdd 198 197 + Store 73(f) 199 + Branch 170 + 170: Label + 207: 6(float) Load 73(f) + 209: 164(bool) FOrdLessThan 207 208 + SelectionMerge 211 None + BranchConditional 209 210 211 + 210: Label Branch 159 - 209: Label + 211: Label Branch 160 160: Label - 211: 9(int) Load 155(i) - 212: 9(int) IAdd 211 65 - Store 155(i) 212 + 213: 9(int) Load 155(i) + 214: 9(int) IAdd 213 65 + Store 155(i) 214 Branch 157 159: Label - 213: 9(int) Load 62(c) - SelectionMerge 216 None - Switch 213 216 - case 1: 214 - case 2: 215 - 214: Label - 217: 6(float) Load 75(x) - 218: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 217 - 219: 6(float) Load 73(f) - 220: 6(float) FAdd 219 218 - Store 73(f) 220 - Branch 216 - 215: Label - Branch 216 - 216: Label - 226: 6(float) Load 73(f) - 227: 9(int) Load 60(local) - 228: 6(float) ConvertSToF 227 - 229: 6(float) FAdd 226 228 - Store 225(color) 229 - 233: 7(fvec4) Load 231(v) - Store 232(param) 233 - 235: 7(fvec4) Load 231(v) + 215: 9(int) Load 62(c) + SelectionMerge 218 None + Switch 215 218 + case 1: 216 + case 2: 217 + 216: Label + 219: 6(float) Load 75(x) + 220: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 219 + 221: 6(float) Load 73(f) + 222: 6(float) FAdd 221 220 + Store 73(f) 222 + Branch 218 + 217: Label + Branch 218 + 218: Label + 228: 6(float) Load 73(f) + 229: 9(int) Load 60(local) + 230: 6(float) ConvertSToF 229 + 231: 6(float) FAdd 228 230 + Store 227(color) 231 + 235: 7(fvec4) Load 233(v) Store 234(param) 235 - 237: 9(int) Load 62(c) + 237: 7(fvec4) Load 233(v) Store 236(param) 237 - 238: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 232(param) 234(param) 236(param) - 241: 6(float) CompositeExtract 238 1 - 242: 6(float) Load 225(color) - 243: 6(float) FAdd 242 241 - Store 225(color) 243 - 245: 7(fvec4) Load 231(v) - Store 244(param) 245 - 247: 7(fvec4) Load 231(v) + 239: 9(int) Load 62(c) + Store 238(param) 239 + 240: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 234(param) 236(param) 238(param) + 243: 6(float) CompositeExtract 240 1 + 244: 6(float) Load 227(color) + 245: 6(float) FAdd 244 243 + Store 227(color) 245 + 247: 7(fvec4) Load 233(v) Store 246(param) 247 - 249: 9(int) Load 62(c) + 249: 7(fvec4) Load 233(v) Store 248(param) 249 - 250: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 244(param) 246(param) 248(param) - 252: 6(float) CompositeExtract 250 2 - 253: 6(float) Load 225(color) - 254: 6(float) FAdd 253 252 - Store 225(color) 254 - 255: 9(int) Load 62(c) - SelectionMerge 258 None - Switch 255 257 - case 0: 256 - 257: Label - Branch 258 - 256: Label - Branch 258 - 258: Label - 262: 9(int) Load 62(c) - SelectionMerge 264 None - Switch 262 263 - 263: Label - Branch 264 - 264: Label + 251: 9(int) Load 62(c) + Store 250(param) 251 + 252: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 246(param) 248(param) 250(param) + 254: 6(float) CompositeExtract 252 2 + 255: 6(float) Load 227(color) + 256: 6(float) FAdd 255 254 + Store 227(color) 256 + 257: 9(int) Load 62(c) + SelectionMerge 260 None + Switch 257 259 + case 0: 258 + 259: Label + Branch 260 + 258: Label + Branch 260 + 260: Label + 264: 9(int) Load 62(c) + SelectionMerge 266 None + Switch 264 265 + 265: Label + Branch 266 + 266: Label Return FunctionEnd 15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index aedd4371..f933dce9 100644 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -5,78 +5,80 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 43 +// Id's are bound by 44 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 41 42 + EntryPoint Vertex 4 "main" 42 43 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 18 "A" - Name 26 "B" - Name 28 "C" - Name 38 "D" - Name 41 "gl_VertexID" - Name 42 "gl_InstanceID" - Decorate 41(gl_VertexID) BuiltIn VertexId - Decorate 42(gl_InstanceID) BuiltIn InstanceId + Name 19 "A" + Name 27 "B" + Name 29 "C" + Name 39 "D" + Name 42 "gl_VertexID" + Name 43 "gl_InstanceID" + Decorate 42(gl_VertexID) BuiltIn VertexId + Decorate 43(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 1 - 21: 6(int) Constant 2 - 30: 6(int) Constant 5 - 39: 6(int) Constant 3 - 40: TypePointer Input 6(int) - 41(gl_VertexID): 40(ptr) Variable Input -42(gl_InstanceID): 40(ptr) Variable Input + 16: 6(int) Constant 10 + 17: TypeBool + 20: 6(int) Constant 1 + 22: 6(int) Constant 2 + 31: 6(int) Constant 5 + 40: 6(int) Constant 3 + 41: TypePointer Input 6(int) + 42(gl_VertexID): 41(ptr) Variable Input +43(gl_InstanceID): 41(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function - 18(A): 7(ptr) Variable Function - 26(B): 7(ptr) Variable Function - 28(C): 7(ptr) Variable Function - 38(D): 7(ptr) Variable Function + 19(A): 7(ptr) Variable Function + 27(B): 7(ptr) Variable Function + 29(C): 7(ptr) Variable Function + 39(D): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 LoopMerge 12 13 None - BranchConditional 17 11 12 + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 18: 17(bool) SLessThan 15 16 + BranchConditional 18 11 12 11: Label - Store 18(A) 19 - 20: 6(int) Load 8(i) - 22: 6(int) SMod 20 21 - 23: 16(bool) IEqual 22 9 - SelectionMerge 25 None - BranchConditional 23 24 25 - 24: Label - Store 26(B) 21 + Store 19(A) 20 + 21: 6(int) Load 8(i) + 23: 6(int) SMod 21 22 + 24: 17(bool) IEqual 23 9 + SelectionMerge 26 None + BranchConditional 24 25 26 + 25: Label + Store 27(B) 22 Branch 13 - 25: Label - 29: 6(int) Load 8(i) - 31: 6(int) SMod 29 30 - 32: 16(bool) IEqual 31 9 - SelectionMerge 34 None - BranchConditional 32 33 34 - 33: Label - Store 26(B) 21 + 26: Label + 30: 6(int) Load 8(i) + 32: 6(int) SMod 30 31 + 33: 17(bool) IEqual 32 9 + SelectionMerge 35 None + BranchConditional 33 34 35 + 34: Label + Store 27(B) 22 Branch 12 - 34: Label - 36: 6(int) Load 8(i) - 37: 6(int) IAdd 36 19 - Store 8(i) 37 + 35: Label + 37: 6(int) Load 8(i) + 38: 6(int) IAdd 37 20 + Store 8(i) 38 Branch 13 13: Label Branch 10 12: Label - Store 38(D) 39 + Store 39(D) 40 Return FunctionEnd diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index 1d6d9da1..f5d13a37 100755 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -5,44 +5,46 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 24 +// Id's are bound by 25 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 22 23 + EntryPoint Vertex 4 "main" 23 24 Source ESSL 300 Name 4 "main" Name 8 "i" - Name 22 "gl_VertexID" - Name 23 "gl_InstanceID" - Decorate 22(gl_VertexID) BuiltIn VertexId - Decorate 23(gl_InstanceID) BuiltIn InstanceId + Name 23 "gl_VertexID" + Name 24 "gl_InstanceID" + Decorate 23(gl_VertexID) BuiltIn VertexId + Decorate 24(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) 9: 6(int) Constant 0 - 15: 6(int) Constant 10 - 16: TypeBool - 19: 6(int) Constant 1 - 21: TypePointer Input 6(int) - 22(gl_VertexID): 21(ptr) Variable Input -23(gl_InstanceID): 21(ptr) Variable Input + 16: 6(int) Constant 10 + 17: TypeBool + 20: 6(int) Constant 1 + 22: TypePointer Input 6(int) + 23(gl_VertexID): 22(ptr) Variable Input +24(gl_InstanceID): 22(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function Store 8(i) 9 Branch 10 10: Label - 14: 6(int) Load 8(i) - 17: 16(bool) SLessThan 14 15 LoopMerge 12 13 None - BranchConditional 17 11 12 + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 18: 17(bool) SLessThan 15 16 + BranchConditional 18 11 12 11: Label - 18: 6(int) Load 8(i) - 20: 6(int) IAdd 18 19 - Store 8(i) 20 + 19: 6(int) Load 8(i) + 21: 6(int) IAdd 19 20 + Store 8(i) 21 Branch 13 13: Label Branch 10 diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index 3975f083..c29ebd37 100755 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -5,20 +5,20 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 35 +// Id's are bound by 36 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 33 + EntryPoint Fragment 4 "main" 11 34 ExecutionMode 4 OriginLowerLeft Source GLSL 110 Name 4 "main" Name 9 "color" Name 11 "BaseColor" - Name 23 "d" - Name 28 "bigColor" - Name 33 "gl_FragColor" + Name 24 "d" + Name 29 "bigColor" + Name 34 "gl_FragColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -26,16 +26,16 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 17: TypeInt 32 0 - 18: 17(int) Constant 0 - 19: TypePointer Function 6(float) - 22: TypePointer UniformConstant 6(float) - 23(d): 22(ptr) Variable UniformConstant - 25: TypeBool - 27: TypePointer UniformConstant 7(fvec4) - 28(bigColor): 27(ptr) Variable UniformConstant - 32: TypePointer Output 7(fvec4) -33(gl_FragColor): 32(ptr) Variable Output + 18: TypeInt 32 0 + 19: 18(int) Constant 0 + 20: TypePointer Function 6(float) + 23: TypePointer UniformConstant 6(float) + 24(d): 23(ptr) Variable UniformConstant + 26: TypeBool + 28: TypePointer UniformConstant 7(fvec4) + 29(bigColor): 28(ptr) Variable UniformConstant + 33: TypePointer Output 7(fvec4) +34(gl_FragColor): 33(ptr) Variable Output 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -43,22 +43,24 @@ Linked fragment stage: Store 9(color) 12 Branch 13 13: Label - 20: 19(ptr) AccessChain 9(color) 18 - 21: 6(float) Load 20 - 24: 6(float) Load 23(d) - 26: 25(bool) FOrdLessThan 21 24 LoopMerge 15 16 None - BranchConditional 26 14 15 + Branch 17 + 17: Label + 21: 20(ptr) AccessChain 9(color) 19 + 22: 6(float) Load 21 + 25: 6(float) Load 24(d) + 27: 26(bool) FOrdLessThan 22 25 + BranchConditional 27 14 15 14: Label - 29: 7(fvec4) Load 28(bigColor) - 30: 7(fvec4) Load 9(color) - 31: 7(fvec4) FAdd 30 29 - Store 9(color) 31 + 30: 7(fvec4) Load 29(bigColor) + 31: 7(fvec4) Load 9(color) + 32: 7(fvec4) FAdd 31 30 + Store 9(color) 32 Branch 16 16: Label Branch 13 15: Label - 34: 7(fvec4) Load 9(color) - Store 33(gl_FragColor) 34 + 35: 7(fvec4) Load 9(color) + Store 34(gl_FragColor) 35 Return FunctionEnd diff --git a/Test/spv.for-notest.vert b/Test/spv.for-notest.vert index 7aff3b30..f40e6664 100644 --- a/Test/spv.for-notest.vert +++ b/Test/spv.for-notest.vert @@ -2,8 +2,5 @@ layout(location=0) out highp int r; void main() { int i; - // This infinite loop results in bad SPIR-V generated, since the merge block - // is dropped as unreachable. It is still useful for testing the rest of the - // code generation. for (i=0; ; i++) { r = i; } } From 2ab5a373d9c420ec97179a248dfd6b2139a0c957 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Wed, 20 Jan 2016 11:54:11 -0500 Subject: [PATCH 35/84] Add Test/spv.for-complex-condition.vert. --- .../spv.for-complex-condition.vert.out | 78 +++++++++++++++++++ Test/spv.for-complex-condition.vert | 7 ++ Test/test-spirv-list | 1 + 3 files changed, 86 insertions(+) create mode 100644 Test/baseResults/spv.for-complex-condition.vert.out create mode 100644 Test/spv.for-complex-condition.vert diff --git a/Test/baseResults/spv.for-complex-condition.vert.out b/Test/baseResults/spv.for-complex-condition.vert.out new file mode 100644 index 00000000..3e0e5a73 --- /dev/null +++ b/Test/baseResults/spv.for-complex-condition.vert.out @@ -0,0 +1,78 @@ +spv.for-complex-condition.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 37 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 18 31 35 36 + Source GLSL 450 + Name 4 "main" + Name 8 "i" + Name 18 "flag" + Name 31 "r" + Name 35 "gl_VertexID" + Name 36 "gl_InstanceID" + Decorate 18(flag) Location 0 + Decorate 31(r) Location 0 + Decorate 35(gl_VertexID) BuiltIn VertexId + Decorate 36(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 9: 6(int) Constant 0 + 17: TypePointer Input 6(int) + 18(flag): 17(ptr) Variable Input + 20: 6(int) Constant 1 + 21: TypeBool + 25: 6(int) Constant 10 + 27: 6(int) Constant 15 + 30: TypePointer Output 6(int) + 31(r): 30(ptr) Variable Output + 35(gl_VertexID): 17(ptr) Variable Input +36(gl_InstanceID): 17(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(i): 7(ptr) Variable Function + 16: 7(ptr) Variable Function + Store 8(i) 9 + Branch 10 + 10: Label + LoopMerge 12 13 None + Branch 14 + 14: Label + 15: 6(int) Load 8(i) + 19: 6(int) Load 18(flag) + 22: 21(bool) IEqual 19 20 + SelectionMerge 24 None + BranchConditional 22 23 26 + 23: Label + Store 16 25 + Branch 24 + 26: Label + Store 16 27 + Branch 24 + 24: Label + 28: 6(int) Load 16 + 29: 21(bool) SLessThan 15 28 + BranchConditional 29 11 12 + 11: Label + 32: 6(int) Load 8(i) + Store 31(r) 32 + Branch 13 + 13: Label + 33: 6(int) Load 8(i) + 34: 6(int) IAdd 33 20 + Store 8(i) 34 + Branch 10 + 12: Label + Return + FunctionEnd diff --git a/Test/spv.for-complex-condition.vert b/Test/spv.for-complex-condition.vert new file mode 100644 index 00000000..81dd6489 --- /dev/null +++ b/Test/spv.for-complex-condition.vert @@ -0,0 +1,7 @@ +#version 450 +layout(location=0) out highp int r; +layout(location=0) in lowp int flag; +void main() { + int i; + for (i=0; i < (flag==1 ? 10 : 15) ; i++) { r = i; } +} diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 838e061a..2182cad9 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -3,6 +3,7 @@ # 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 From 7a53f76d386acd91bd48a2d8ae30a9ebce7f5baf Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Wed, 20 Jan 2016 11:19:27 -0700 Subject: [PATCH 36/84] SPV: Add unary-matrix operations, operating at vector level. --- SPIRV/GlslangToSpv.cpp | 40 ++- Test/baseResults/spv.branch-return.vert.out | 2 +- Test/baseResults/spv.matrix2.frag.out | 266 ++++++++++---------- 3 files changed, 176 insertions(+), 132 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 9d42e3cf..c1743757 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -110,6 +110,7 @@ protected: spv::Id createBinaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison = true); spv::Id createBinaryMatrixOperation(spv::Op, spv::Decoration precision, spv::Id typeId, spv::Id left, spv::Id right); spv::Id createUnaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, spv::Id operand,glslang::TBasicType typeProxy); + spv::Id createUnaryMatrixOperation(spv::Op, spv::Decoration precision, spv::Id typeId, spv::Id operand,glslang::TBasicType typeProxy); spv::Id createConversion(glslang::TOperator op, spv::Decoration precision, spv::Id destTypeId, spv::Id operand); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); @@ -2601,9 +2602,11 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: switch (op) { case glslang::EOpNegative: - if (isFloat) + if (isFloat) { unaryOp = spv::OpFNegate; - else + if (builder.isMatrixType(typeId)) + return createUnaryMatrixOperation(unaryOp, precision, typeId, operand, typeProxy); + } else unaryOp = spv::OpSNegate; break; @@ -2862,6 +2865,39 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: return id; } +// Create a unary operation on a matrix +spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, spv::Decoration precision, spv::Id typeId, spv::Id operand, glslang::TBasicType /* typeProxy */) +{ + // Handle unary operations vector by vector. + // The result type is the same type as the original type. + // The algorithm is to: + // - break the matrix into vectors + // - apply the operation to each vector + // - make a matrix out the vector results + + // get the types sorted out + int numCols = builder.getNumColumns(operand); + int numRows = builder.getNumRows(operand); + spv::Id scalarType = builder.getScalarTypeId(typeId); + spv::Id vecType = builder.makeVectorType(scalarType, numRows); + std::vector results; + + // do each vector op + for (int c = 0; c < numCols; ++c) { + std::vector indexes; + indexes.push_back(c); + spv::Id vec = builder.createCompositeExtract(operand, vecType, indexes); + results.push_back(builder.createUnaryOp(op, vecType, vec)); + builder.setPrecision(results.back(), precision); + } + + // put the pieces together + spv::Id id = builder.createCompositeConstruct(typeId, results); + builder.setPrecision(id, precision); + + return id; +} + spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Decoration precision, spv::Id destType, spv::Id operand) { spv::Op convOp = spv::OpNop; diff --git a/Test/baseResults/spv.branch-return.vert.out b/Test/baseResults/spv.branch-return.vert.out index 75ebefe1..8588d741 100644 --- a/Test/baseResults/spv.branch-return.vert.out +++ b/Test/baseResults/spv.branch-return.vert.out @@ -60,4 +60,4 @@ Linked vertex stage: 33: 29(ptr) AccessChain 19(gl_Position) 28 Store 33 32 Return - FunctionEnd + FunctionEnd diff --git a/Test/baseResults/spv.matrix2.frag.out b/Test/baseResults/spv.matrix2.frag.out index 5deb5394..b1cd71b9 100644 --- a/Test/baseResults/spv.matrix2.frag.out +++ b/Test/baseResults/spv.matrix2.frag.out @@ -5,12 +5,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 213 +// Id's are bound by 221 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 12 16 37 38 65 87 139 150 173 210 211 212 + EntryPoint Fragment 4 "main" 12 16 37 38 65 87 147 158 181 218 219 220 ExecutionMode 4 OriginLowerLeft Source GLSL 150 Name 4 "main" @@ -22,15 +22,15 @@ Linked fragment stage: Name 63 "m44" Name 65 "un34" Name 87 "um43" - Name 139 "um4" - Name 148 "inv" - Name 150 "um2" - Name 171 "inv3" - Name 173 "um3" - Name 182 "inv4" - Name 210 "colorTransform" - Name 211 "m" - Name 212 "n" + Name 147 "um4" + Name 156 "inv" + Name 158 "um2" + Name 179 "inv3" + Name 181 "um3" + Name 190 "inv4" + Name 218 "colorTransform" + Name 219 "m" + Name 220 "n" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -62,35 +62,35 @@ Linked fragment stage: 85: TypeMatrix 14(fvec3) 4 86: TypePointer Input 85 87(um43): 86(ptr) Variable Input - 138: TypePointer Input 61 - 139(um4): 138(ptr) Variable Input - 145: TypeVector 6(float) 2 - 146: TypeMatrix 145(fvec2) 2 - 147: TypePointer Function 146 - 149: TypePointer Input 146 - 150(um2): 149(ptr) Variable Input - 153: TypeInt 32 1 - 154: 153(int) Constant 0 - 155: TypePointer Function 6(float) - 158: 153(int) Constant 1 - 161: 54(int) Constant 1 - 169: TypeMatrix 14(fvec3) 3 - 170: TypePointer Function 169 - 172: TypePointer Input 169 - 173(um3): 172(ptr) Variable Input - 176: 153(int) Constant 2 - 202: 54(int) Constant 3 - 203: TypePointer Output 6(float) -210(colorTransform): 172(ptr) Variable Input - 211(m): 138(ptr) Variable Input - 212(n): 138(ptr) Variable Input + 146: TypePointer Input 61 + 147(um4): 146(ptr) Variable Input + 153: TypeVector 6(float) 2 + 154: TypeMatrix 153(fvec2) 2 + 155: TypePointer Function 154 + 157: TypePointer Input 154 + 158(um2): 157(ptr) Variable Input + 161: TypeInt 32 1 + 162: 161(int) Constant 0 + 163: TypePointer Function 6(float) + 166: 161(int) Constant 1 + 169: 54(int) Constant 1 + 177: TypeMatrix 14(fvec3) 3 + 178: TypePointer Function 177 + 180: TypePointer Input 177 + 181(um3): 180(ptr) Variable Input + 184: 161(int) Constant 2 + 210: 54(int) Constant 3 + 211: TypePointer Output 6(float) +218(colorTransform): 180(ptr) Variable Input + 219(m): 146(ptr) Variable Input + 220(n): 146(ptr) Variable Input 4(main): 2 Function None 3 5: Label 10(m34): 9(ptr) Variable Function 63(m44): 62(ptr) Variable Function - 148(inv): 147(ptr) Variable Function - 171(inv3): 170(ptr) Variable Function - 182(inv4): 62(ptr) Variable Function + 156(inv): 155(ptr) Variable Function + 179(inv3): 178(ptr) Variable Function + 190(inv4): 62(ptr) Variable Function 13: 7(fvec4) Load 12(v) 17: 14(fvec3) Load 16(u) 18: 8 OuterProduct 13 17 @@ -166,100 +166,108 @@ Linked fragment stage: 103: 61 CompositeConstruct 93 96 99 102 Store 63(m44) 103 104: 61 Load 63(m44) - 105: 61 FNegate 104 - 106: 7(fvec4) Load 12(v) - 107: 7(fvec4) MatrixTimesVector 105 106 - 108: 7(fvec4) Load 37(FragColor) - 109: 7(fvec4) FAdd 108 107 - Store 37(FragColor) 109 - 110: 61 Load 63(m44) - 111: 61 Load 63(m44) - 112: 7(fvec4) CompositeExtract 110 0 - 113: 7(fvec4) CompositeExtract 111 0 - 114: 7(fvec4) FMul 112 113 - 115: 7(fvec4) CompositeExtract 110 1 - 116: 7(fvec4) CompositeExtract 111 1 - 117: 7(fvec4) FMul 115 116 - 118: 7(fvec4) CompositeExtract 110 2 - 119: 7(fvec4) CompositeExtract 111 2 - 120: 7(fvec4) FMul 118 119 - 121: 7(fvec4) CompositeExtract 110 3 - 122: 7(fvec4) CompositeExtract 111 3 - 123: 7(fvec4) FMul 121 122 - 124: 61 CompositeConstruct 114 117 120 123 - 125: 7(fvec4) Load 37(FragColor) - 126: 7(fvec4) VectorTimesMatrix 125 124 - Store 37(FragColor) 126 - 127: 85 Load 87(um43) - 128: 8 Transpose 127 - Store 10(m34) 128 - 129: 7(fvec4) Load 37(FragColor) - 130: 8 Load 10(m34) - 131: 14(fvec3) VectorTimesMatrix 129 130 - 132: 6(float) CompositeExtract 131 0 - 133: 6(float) CompositeExtract 131 1 - 134: 6(float) CompositeExtract 131 2 - 135: 7(fvec4) CompositeConstruct 132 133 134 40 - 136: 7(fvec4) Load 37(FragColor) - 137: 7(fvec4) FMul 136 135 - Store 37(FragColor) 137 - 140: 61 Load 139(um4) - 141: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 140 - 142: 7(fvec4) CompositeConstruct 141 141 141 141 - 143: 7(fvec4) Load 37(FragColor) - 144: 7(fvec4) FMul 143 142 - Store 37(FragColor) 144 - 151: 146 Load 150(um2) - 152: 146 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 151 - Store 148(inv) 152 - 156: 155(ptr) AccessChain 148(inv) 154 55 - 157: 6(float) Load 156 - 159: 155(ptr) AccessChain 148(inv) 158 55 - 160: 6(float) Load 159 - 162: 155(ptr) AccessChain 148(inv) 154 161 - 163: 6(float) Load 162 - 164: 155(ptr) AccessChain 148(inv) 158 161 + 105: 7(fvec4) CompositeExtract 104 0 + 106: 7(fvec4) FNegate 105 + 107: 7(fvec4) CompositeExtract 104 1 + 108: 7(fvec4) FNegate 107 + 109: 7(fvec4) CompositeExtract 104 2 + 110: 7(fvec4) FNegate 109 + 111: 7(fvec4) CompositeExtract 104 3 + 112: 7(fvec4) FNegate 111 + 113: 61 CompositeConstruct 106 108 110 112 + 114: 7(fvec4) Load 12(v) + 115: 7(fvec4) MatrixTimesVector 113 114 + 116: 7(fvec4) Load 37(FragColor) + 117: 7(fvec4) FAdd 116 115 + Store 37(FragColor) 117 + 118: 61 Load 63(m44) + 119: 61 Load 63(m44) + 120: 7(fvec4) CompositeExtract 118 0 + 121: 7(fvec4) CompositeExtract 119 0 + 122: 7(fvec4) FMul 120 121 + 123: 7(fvec4) CompositeExtract 118 1 + 124: 7(fvec4) CompositeExtract 119 1 + 125: 7(fvec4) FMul 123 124 + 126: 7(fvec4) CompositeExtract 118 2 + 127: 7(fvec4) CompositeExtract 119 2 + 128: 7(fvec4) FMul 126 127 + 129: 7(fvec4) CompositeExtract 118 3 + 130: 7(fvec4) CompositeExtract 119 3 + 131: 7(fvec4) FMul 129 130 + 132: 61 CompositeConstruct 122 125 128 131 + 133: 7(fvec4) Load 37(FragColor) + 134: 7(fvec4) VectorTimesMatrix 133 132 + Store 37(FragColor) 134 + 135: 85 Load 87(um43) + 136: 8 Transpose 135 + Store 10(m34) 136 + 137: 7(fvec4) Load 37(FragColor) + 138: 8 Load 10(m34) + 139: 14(fvec3) VectorTimesMatrix 137 138 + 140: 6(float) CompositeExtract 139 0 + 141: 6(float) CompositeExtract 139 1 + 142: 6(float) CompositeExtract 139 2 + 143: 7(fvec4) CompositeConstruct 140 141 142 40 + 144: 7(fvec4) Load 37(FragColor) + 145: 7(fvec4) FMul 144 143 + Store 37(FragColor) 145 + 148: 61 Load 147(um4) + 149: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 148 + 150: 7(fvec4) CompositeConstruct 149 149 149 149 + 151: 7(fvec4) Load 37(FragColor) + 152: 7(fvec4) FMul 151 150 + Store 37(FragColor) 152 + 159: 154 Load 158(um2) + 160: 154 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 159 + Store 156(inv) 160 + 164: 163(ptr) AccessChain 156(inv) 162 55 165: 6(float) Load 164 - 166: 7(fvec4) CompositeConstruct 157 160 163 165 - 167: 7(fvec4) Load 37(FragColor) - 168: 7(fvec4) FMul 167 166 - Store 37(FragColor) 168 - 174: 169 Load 173(um3) - 175: 169 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 174 - Store 171(inv3) 175 - 177: 155(ptr) AccessChain 171(inv3) 176 161 - 178: 6(float) Load 177 - 179: 7(fvec4) CompositeConstruct 178 178 178 178 - 180: 7(fvec4) Load 37(FragColor) - 181: 7(fvec4) FMul 180 179 - Store 37(FragColor) 181 - 183: 61 Load 139(um4) - 184: 61 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 183 - Store 182(inv4) 184 - 185: 61 Load 182(inv4) - 186: 7(fvec4) Load 37(FragColor) - 187: 7(fvec4) VectorTimesMatrix 186 185 - Store 37(FragColor) 187 + 167: 163(ptr) AccessChain 156(inv) 166 55 + 168: 6(float) Load 167 + 170: 163(ptr) AccessChain 156(inv) 162 169 + 171: 6(float) Load 170 + 172: 163(ptr) AccessChain 156(inv) 166 169 + 173: 6(float) Load 172 + 174: 7(fvec4) CompositeConstruct 165 168 171 173 + 175: 7(fvec4) Load 37(FragColor) + 176: 7(fvec4) FMul 175 174 + Store 37(FragColor) 176 + 182: 177 Load 181(um3) + 183: 177 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 182 + Store 179(inv3) 183 + 185: 163(ptr) AccessChain 179(inv3) 184 169 + 186: 6(float) Load 185 + 187: 7(fvec4) CompositeConstruct 186 186 186 186 188: 7(fvec4) Load 37(FragColor) - 189: 8 Load 65(un34) - 190: 8 Load 65(un34) - 191: 7(fvec4) CompositeExtract 189 0 - 192: 7(fvec4) CompositeExtract 190 0 - 193: 7(fvec4) FMul 191 192 - 194: 7(fvec4) CompositeExtract 189 1 - 195: 7(fvec4) CompositeExtract 190 1 - 196: 7(fvec4) FMul 194 195 - 197: 7(fvec4) CompositeExtract 189 2 - 198: 7(fvec4) CompositeExtract 190 2 - 199: 7(fvec4) FMul 197 198 - 200: 8 CompositeConstruct 193 196 199 - 201: 14(fvec3) VectorTimesMatrix 188 200 - 204: 203(ptr) AccessChain 37(FragColor) 202 - 205: 6(float) Load 204 - 206: 6(float) CompositeExtract 201 0 - 207: 6(float) CompositeExtract 201 1 - 208: 6(float) CompositeExtract 201 2 - 209: 7(fvec4) CompositeConstruct 206 207 208 205 - Store 37(FragColor) 209 + 189: 7(fvec4) FMul 188 187 + Store 37(FragColor) 189 + 191: 61 Load 147(um4) + 192: 61 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 191 + Store 190(inv4) 192 + 193: 61 Load 190(inv4) + 194: 7(fvec4) Load 37(FragColor) + 195: 7(fvec4) VectorTimesMatrix 194 193 + Store 37(FragColor) 195 + 196: 7(fvec4) Load 37(FragColor) + 197: 8 Load 65(un34) + 198: 8 Load 65(un34) + 199: 7(fvec4) CompositeExtract 197 0 + 200: 7(fvec4) CompositeExtract 198 0 + 201: 7(fvec4) FMul 199 200 + 202: 7(fvec4) CompositeExtract 197 1 + 203: 7(fvec4) CompositeExtract 198 1 + 204: 7(fvec4) FMul 202 203 + 205: 7(fvec4) CompositeExtract 197 2 + 206: 7(fvec4) CompositeExtract 198 2 + 207: 7(fvec4) FMul 205 206 + 208: 8 CompositeConstruct 201 204 207 + 209: 14(fvec3) VectorTimesMatrix 196 208 + 212: 211(ptr) AccessChain 37(FragColor) 210 + 213: 6(float) Load 212 + 214: 6(float) CompositeExtract 209 0 + 215: 6(float) CompositeExtract 209 1 + 216: 6(float) CompositeExtract 209 2 + 217: 7(fvec4) CompositeConstruct 214 215 216 213 + Store 37(FragColor) 217 Return FunctionEnd From 7b9fa25bad300f4919e38ce0295ac2c279ed95cc Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Thu, 21 Jan 2016 18:56:57 -0700 Subject: [PATCH 37/84] SPV: Add recursive distrubition of 'location' across structure members. --- SPIRV/GlslangToSpv.cpp | 20 ++++++++++---- Test/baseResults/spv.430.vert.out | 45 ++++++++++++++++++++++++------- Test/spv.430.vert | 4 +++ 3 files changed, 55 insertions(+), 14 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index c1743757..01f3f903 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -437,15 +437,17 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa child.patch = true; if (parent.sample) child.sample = true; + + child.layoutLocation = parent.layoutLocation; } bool HasNonLayoutQualifiers(const glslang::TQualifier& qualifier) { - // This should list qualifiers that simultaneous satisify: + // This should list qualifiers that simultaneous satisfy: // - struct members can inherit from a struct declaration // - effect decorations on the struct members (note smooth does not, and expecting something like volatile to effect the whole object) // - are not part of the offset/st430/etc or row/column-major layout - return qualifier.invariant || qualifier.nopersp || qualifier.flat || qualifier.centroid || qualifier.patch || qualifier.sample; + return qualifier.invariant || qualifier.nopersp || qualifier.flat || qualifier.centroid || qualifier.patch || qualifier.sample || qualifier.hasLocation(); } // @@ -1528,7 +1530,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty } // Do full recursive conversion of an arbitrary glslang type to a SPIR-V Id. -// explicitLayout can be kept the same throughout the heirarchical recursive walk. +// explicitLayout can be kept the same throughout the hierarchical recursive walk. spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier) { spv::Id spvType = spv::NoResult; @@ -1588,6 +1590,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty int memberDelta = 0; // how much the member's index changes from glslang to SPIR-V, normally 0, except sometimes for blocks if (type.getBasicType() == glslang::EbtBlock) memberRemapper[glslangStruct].resize(glslangStruct->size()); + int locationOffset = 0; // for use across struct members, when they are called recursively for (int i = 0; i < (int)glslangStruct->size(); i++) { glslang::TType& glslangType = *(*glslangStruct)[i].type; if (glslangType.hiddenMember()) { @@ -1600,6 +1603,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // modify just this child's view of the qualifier glslang::TQualifier subQualifier = glslangType.getQualifier(); InheritQualifiers(subQualifier, qualifier); + if (qualifier.hasLocation()) { + subQualifier.layoutLocation += locationOffset; + locationOffset += glslangIntermediate->computeTypeLocationSize(glslangType); + } structFields.push_back(convertGlslangToSpvType(glslangType, explicitLayout, subQualifier)); } } @@ -1611,6 +1618,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // Name and decorate the non-hidden members int offset = -1; + locationOffset = 0; // for use within the members of this struct, right now for (int i = 0; i < (int)glslangStruct->size(); i++) { glslang::TType& glslangType = *(*glslangStruct)[i].type; int member = i; @@ -1628,8 +1636,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty addMemberDecoration(spvType, member, TranslatePrecisionDecoration(glslangType)); addMemberDecoration(spvType, member, TranslateInterpolationDecoration(subQualifier)); addMemberDecoration(spvType, member, TranslateInvariantDecoration(subQualifier)); - if (glslangType.getQualifier().hasLocation()) - builder.addMemberDecoration(spvType, member, spv::DecorationLocation, glslangType.getQualifier().layoutLocation); + if (qualifier.hasLocation()) { + builder.addMemberDecoration(spvType, member, spv::DecorationLocation, qualifier.layoutLocation + locationOffset); + locationOffset += glslangIntermediate->computeTypeLocationSize(glslangType); + } if (glslangType.getQualifier().hasComponent()) builder.addMemberDecoration(spvType, member, spv::DecorationComponent, glslangType.getQualifier().layoutComponent); if (glslangType.getQualifier().hasXfbOffset()) diff --git a/Test/baseResults/spv.430.vert.out b/Test/baseResults/spv.430.vert.out index 186406d5..750fff07 100755 --- a/Test/baseResults/spv.430.vert.out +++ b/Test/baseResults/spv.430.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 63 +// Id's are bound by 69 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 12 23 34 44 45 61 62 + EntryPoint Vertex 4 "main" 12 23 34 44 45 65 67 68 Source GLSL 430 Name 4 "main" Name 10 "gl_PerVertex" @@ -33,8 +33,17 @@ Linked vertex stage: Name 55 "sampb1" Name 58 "sampb2" Name 59 "sampb4" - Name 61 "gl_VertexID" - Name 62 "gl_InstanceID" + Name 62 "S" + MemberName 62(S) 0 "a" + MemberName 62(S) 1 "b" + MemberName 62(S) 2 "c" + Name 63 "SS" + MemberName 63(SS) 0 "b" + MemberName 63(SS) 1 "s" + MemberName 63(SS) 2 "c" + Name 65 "var" + Name 67 "gl_VertexID" + Name 68 "gl_InstanceID" MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance Decorate 10(gl_PerVertex) Block Decorate 34(badorder3) Flat @@ -49,8 +58,20 @@ Linked vertex stage: Decorate 55(sampb1) Binding 4 Decorate 58(sampb2) Binding 5 Decorate 59(sampb4) Binding 31 - Decorate 61(gl_VertexID) BuiltIn VertexId - Decorate 62(gl_InstanceID) BuiltIn InstanceId + MemberDecorate 62(S) 0 Flat + MemberDecorate 62(S) 0 Location 1 + MemberDecorate 62(S) 1 Flat + MemberDecorate 62(S) 1 Location 2 + MemberDecorate 62(S) 2 Flat + MemberDecorate 62(S) 2 Location 3 + MemberDecorate 63(SS) 0 Flat + MemberDecorate 63(SS) 0 Location 0 + MemberDecorate 63(SS) 1 Flat + MemberDecorate 63(SS) 1 Location 1 + MemberDecorate 63(SS) 2 Flat + MemberDecorate 63(SS) 2 Location 4 + Decorate 67(gl_VertexID) BuiltIn VertexId + Decorate 68(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -97,9 +118,15 @@ Linked vertex stage: 57: TypePointer UniformConstant 56 58(sampb2): 57(ptr) Variable UniformConstant 59(sampb4): 54(ptr) Variable UniformConstant - 60: TypePointer Input 13(int) - 61(gl_VertexID): 60(ptr) Variable Input -62(gl_InstanceID): 60(ptr) Variable Input + 60: TypeVector 7(int) 2 + 61: TypeVector 6(float) 3 + 62(S): TypeStruct 6(float) 60(ivec2) 61(fvec3) + 63(SS): TypeStruct 19(fvec4) 62(S) 19(fvec4) + 64: TypePointer Output 63(SS) + 65(var): 64(ptr) Variable Output + 66: TypePointer Input 13(int) + 67(gl_VertexID): 66(ptr) Variable Input +68(gl_InstanceID): 66(ptr) Variable Input 4(main): 2 Function None 3 5: Label 18: 17(ptr) AccessChain 12 14 15 diff --git a/Test/spv.430.vert b/Test/spv.430.vert index 55cb60b1..b5571ccc 100644 --- a/Test/spv.430.vert +++ b/Test/spv.430.vert @@ -30,3 +30,7 @@ layout(binding = 7) uniform anonblock { int aoeu; } ; layout(binding = 4) uniform sampler2D sampb1; layout(binding = 5) uniform sampler2D sampb2[10]; layout(binding = 31) uniform sampler2D sampb4; + +struct S { mediump float a; highp uvec2 b; highp vec3 c; }; +struct SS { vec4 b; S s; vec4 c; }; +layout(location = 0) flat out SS var; From cd26144d24f474e1c0af560cf9970a3e8dc18955 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 22 Jan 2016 09:54:12 -0700 Subject: [PATCH 38/84] SPV: the OpImageTexelPointer sample 0 should be of 0, not literal 0. --- SPIRV/GlslangToSpv.cpp | 5 ++--- Test/baseResults/spv.image.frag.out | 32 ++++++++++++++--------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 01f3f903..2a11d8ee 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -2087,13 +2087,12 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } else if (node->isSparseImage()) { spv::MissingFunctionality("sparse image functions"); return spv::NoResult; - } - else { + } else { // Process image atomic operations // GLSL "IMAGE_PARAMS" will involve in constructing an image texel pointer and this pointer, // as the first source operand, is required by SPIR-V atomic operations. - operands.push_back(sampler.ms ? *(opIt++) : 0); // For non-MS, the value should be 0 + operands.push_back(sampler.ms ? *(opIt++) : builder.makeUintConstant(0)); // For non-MS, the value should be 0 spv::Id resultTypeId = builder.makePointer(spv::StorageClassImage, convertGlslangToSpvType(node->getType())); spv::Id pointer = builder.createOp(spv::OpImageTexelPointer, resultTypeId, operands); diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index 1c9967d2..65103bec 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -346,7 +346,7 @@ Linked fragment stage: ImageWrite 224 225 227 Sample 226 Store 229(ui) 19 233: 6(int) Load 132(ic1D) - 236: 235(ptr) ImageTexelPointer 232(ii1D) 233 0 + 236: 235(ptr) ImageTexelPointer 232(ii1D) 233 19 238: 6(int) AtomicIAdd 236 237 19 234 239: 20(ptr) AccessChain 9(iv) 19 240: 6(int) Load 239 @@ -355,13 +355,13 @@ Linked fragment stage: Store 242 241 246: 29(ivec2) Load 142(ic2D) 249: 18(int) Load 248(value) - 251: 250(ptr) ImageTexelPointer 245(ui2D) 246 0 + 251: 250(ptr) ImageTexelPointer 245(ui2D) 246 19 252: 18(int) AtomicIAdd 251 237 19 249 253: 18(int) Load 229(ui) 254: 18(int) IAdd 253 252 Store 229(ui) 254 255: 6(int) Load 132(ic1D) - 257: 235(ptr) ImageTexelPointer 232(ii1D) 255 0 + 257: 235(ptr) ImageTexelPointer 232(ii1D) 255 19 258: 6(int) AtomicSMin 257 237 19 256 259: 20(ptr) AccessChain 9(iv) 19 260: 6(int) Load 259 @@ -370,13 +370,13 @@ Linked fragment stage: Store 262 261 263: 29(ivec2) Load 142(ic2D) 264: 18(int) Load 248(value) - 265: 250(ptr) ImageTexelPointer 245(ui2D) 263 0 + 265: 250(ptr) ImageTexelPointer 245(ui2D) 263 19 266: 18(int) AtomicUMin 265 237 19 264 267: 18(int) Load 229(ui) 268: 18(int) IAdd 267 266 Store 229(ui) 268 269: 6(int) Load 132(ic1D) - 271: 235(ptr) ImageTexelPointer 232(ii1D) 269 0 + 271: 235(ptr) ImageTexelPointer 232(ii1D) 269 19 272: 6(int) AtomicSMax 271 237 19 270 273: 20(ptr) AccessChain 9(iv) 19 274: 6(int) Load 273 @@ -385,13 +385,13 @@ Linked fragment stage: Store 276 275 277: 29(ivec2) Load 142(ic2D) 278: 18(int) Load 248(value) - 279: 250(ptr) ImageTexelPointer 245(ui2D) 277 0 + 279: 250(ptr) ImageTexelPointer 245(ui2D) 277 19 280: 18(int) AtomicUMax 279 237 19 278 281: 18(int) Load 229(ui) 282: 18(int) IAdd 281 280 Store 229(ui) 282 283: 6(int) Load 132(ic1D) - 285: 235(ptr) ImageTexelPointer 232(ii1D) 283 0 + 285: 235(ptr) ImageTexelPointer 232(ii1D) 283 19 286: 6(int) AtomicAnd 285 237 19 284 287: 20(ptr) AccessChain 9(iv) 19 288: 6(int) Load 287 @@ -400,13 +400,13 @@ Linked fragment stage: Store 290 289 291: 29(ivec2) Load 142(ic2D) 292: 18(int) Load 248(value) - 293: 250(ptr) ImageTexelPointer 245(ui2D) 291 0 + 293: 250(ptr) ImageTexelPointer 245(ui2D) 291 19 294: 18(int) AtomicAnd 293 237 19 292 295: 18(int) Load 229(ui) 296: 18(int) IAdd 295 294 Store 229(ui) 296 297: 6(int) Load 132(ic1D) - 299: 235(ptr) ImageTexelPointer 232(ii1D) 297 0 + 299: 235(ptr) ImageTexelPointer 232(ii1D) 297 19 300: 6(int) AtomicOr 299 237 19 298 301: 20(ptr) AccessChain 9(iv) 19 302: 6(int) Load 301 @@ -415,13 +415,13 @@ Linked fragment stage: Store 304 303 305: 29(ivec2) Load 142(ic2D) 306: 18(int) Load 248(value) - 307: 250(ptr) ImageTexelPointer 245(ui2D) 305 0 + 307: 250(ptr) ImageTexelPointer 245(ui2D) 305 19 308: 18(int) AtomicOr 307 237 19 306 309: 18(int) Load 229(ui) 310: 18(int) IAdd 309 308 Store 229(ui) 310 311: 6(int) Load 132(ic1D) - 313: 235(ptr) ImageTexelPointer 232(ii1D) 311 0 + 313: 235(ptr) ImageTexelPointer 232(ii1D) 311 19 314: 6(int) AtomicXor 313 237 19 312 315: 20(ptr) AccessChain 9(iv) 19 316: 6(int) Load 315 @@ -430,13 +430,13 @@ Linked fragment stage: Store 318 317 319: 29(ivec2) Load 142(ic2D) 320: 18(int) Load 248(value) - 321: 250(ptr) ImageTexelPointer 245(ui2D) 319 0 + 321: 250(ptr) ImageTexelPointer 245(ui2D) 319 19 322: 18(int) AtomicXor 321 237 19 320 323: 18(int) Load 229(ui) 324: 18(int) IAdd 323 322 Store 229(ui) 324 325: 6(int) Load 132(ic1D) - 327: 235(ptr) ImageTexelPointer 232(ii1D) 325 0 + 327: 235(ptr) ImageTexelPointer 232(ii1D) 325 19 328: 6(int) AtomicExchange 327 237 19 326 329: 20(ptr) AccessChain 9(iv) 19 330: 6(int) Load 329 @@ -445,13 +445,13 @@ Linked fragment stage: Store 332 331 333: 29(ivec2) Load 142(ic2D) 334: 18(int) Load 248(value) - 335: 250(ptr) ImageTexelPointer 245(ui2D) 333 0 + 335: 250(ptr) ImageTexelPointer 245(ui2D) 333 19 336: 18(int) AtomicExchange 335 237 19 334 337: 18(int) Load 229(ui) 338: 18(int) IAdd 337 336 Store 229(ui) 338 339: 6(int) Load 132(ic1D) - 342: 235(ptr) ImageTexelPointer 232(ii1D) 339 0 + 342: 235(ptr) ImageTexelPointer 232(ii1D) 339 19 343: 6(int) AtomicCompareExchange 342 237 19 19 341 340 344: 20(ptr) AccessChain 9(iv) 19 345: 6(int) Load 344 @@ -460,7 +460,7 @@ Linked fragment stage: Store 347 346 348: 29(ivec2) Load 142(ic2D) 350: 18(int) Load 248(value) - 351: 250(ptr) ImageTexelPointer 245(ui2D) 348 0 + 351: 250(ptr) ImageTexelPointer 245(ui2D) 348 19 352: 18(int) AtomicCompareExchange 351 237 19 19 350 349 353: 18(int) Load 229(ui) 354: 18(int) IAdd 353 352 From 4889167430a396e856efb5d56e905756a26151f8 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 22 Jan 2016 10:15:03 -0700 Subject: [PATCH 39/84] SPV: Use a more accurate MemorySemanticsAllMemory mask. --- SPIRV/spvIR.h | 12 +++++++++++- Test/baseResults/spv.310.comp.out | 2 +- Test/baseResults/spv.400.tesc.out | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 1501e6bb..98f4971b 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -70,7 +70,17 @@ const Id NoType = 0; const unsigned int BadValue = 0xFFFFFFFF; const Decoration NoPrecision = (Decoration)BadValue; -const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)0x3FF; +const MemorySemanticsMask MemorySemanticsAllMemory = + (MemorySemanticsMask)(MemorySemanticsAcquireMask | + MemorySemanticsReleaseMask | + MemorySemanticsAcquireReleaseMask | + MemorySemanticsSequentiallyConsistentMask | + MemorySemanticsUniformMemoryMask | + MemorySemanticsSubgroupMemoryMask | + MemorySemanticsWorkgroupMemoryMask | + MemorySemanticsCrossWorkgroupMemoryMask | + MemorySemanticsAtomicCounterMemoryMask | + MemorySemanticsImageMemoryMask); // // SPIR-V IR instruction. diff --git a/Test/baseResults/spv.310.comp.out b/Test/baseResults/spv.310.comp.out index 93e49b51..1a34d087 100755 --- a/Test/baseResults/spv.310.comp.out +++ b/Test/baseResults/spv.310.comp.out @@ -45,7 +45,7 @@ Linked compute stage: 3: TypeFunction 2 6: TypeInt 32 0 7: 6(int) Constant 1 - 8: 6(int) Constant 1023 + 8: 6(int) Constant 4062 9: 6(int) Constant 0 10: TypeFloat 32 11: TypeVector 10(float) 3 diff --git a/Test/baseResults/spv.400.tesc.out b/Test/baseResults/spv.400.tesc.out index 02c7a6cf..6905c4a0 100755 --- a/Test/baseResults/spv.400.tesc.out +++ b/Test/baseResults/spv.400.tesc.out @@ -71,7 +71,7 @@ Linked tessellation control stage: 3: TypeFunction 2 6: TypeInt 32 0 7: 6(int) Constant 1 - 8: 6(int) Constant 1023 + 8: 6(int) Constant 4062 9: 6(int) Constant 0 10: TypeInt 32 1 11: TypePointer Function 10(int) From 4bfeed5fe80645c2b8ed383a7b30baa5c4be2399 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 22 Jan 2016 15:40:24 -0700 Subject: [PATCH 40/84] Semantics: Spec. changing to reflect reality of int/uint conversion for |^&. This effects 4.x, where int/uint conversions are done, but not earlier. --- Test/400.frag | 10 + Test/Operations.frag | 44 +-- Test/baseResults/Operations.frag.out | 284 +++++++++++++++++++- glslang/MachineIndependent/Intermediate.cpp | 4 + 4 files changed, 318 insertions(+), 24 deletions(-) diff --git a/Test/400.frag b/Test/400.frag index 059743e4..b7460b4a 100644 --- a/Test/400.frag +++ b/Test/400.frag @@ -185,3 +185,13 @@ void qlod() } struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member + +uniform uint uu; +out int iout; + +void bitwiseConv() +{ + iout = uu & i; + iout += uu ^ i; + iout += i | uu; +} diff --git a/Test/Operations.frag b/Test/Operations.frag index 820048f2..ca06a752 100644 --- a/Test/Operations.frag +++ b/Test/Operations.frag @@ -7,10 +7,10 @@ uniform bvec4 ub41, ub42; uniform float uf; uniform int ui; -#ifdef TEST_POST_110 + uniform uvec4 uuv4; -uniform unsigned int uui; -#endif +uniform uint uui; + void main() { @@ -19,9 +19,9 @@ void main() bool b; bvec4 bv4; int i; -#ifdef TEST_POST_110 + uint u; -#endif + // floating point v = radians(uv4); @@ -51,37 +51,37 @@ void main() v += sign(v); v += floor(v); -#ifdef TEST_POST_110 + v += trunc(v); v += round(v); v += roundEven(v); -#endif + v += ceil(v); v += fract(v); v += mod(v, v); v += mod(v, v.x); -#ifdef TEST_POST_110 + v += modf(v, v); -#endif + v += min(v, uv4); v += max(v, uv4); v += clamp(v, uv4, uv4); v += mix(v,v,v); -#ifdef TEST_POST_110 - v += mix(v,v,ub); - v += intBitsToFloat(v); - v += uintBitsToFloat(v); - v += fma(v); + + v += mix(v,v,bv4); + v += intBitsToFloat(ivec4(i)); + v += uintBitsToFloat(uv4); + v += fma(v,v,v); v += frexp(v); v += ldexp(v); v += unpackUnorm2x16(v); v += unpackUnorm4x8(v); v += unpackSnorm4x8(v); -#endif + v += step(v,v); v += smoothstep(v,v,v); @@ -96,7 +96,7 @@ void main() v += fwidth(v); //noise*(v); -#ifdef TEST_POST_110 + // signed integer i += abs(ui); i += sign(i); @@ -118,15 +118,15 @@ void main() u += floatsBitToInt(v); u += packUnorm2x16(v); u += packUnorm4x8(v); - u += packSnorm4x8(v); - u += floatBitsToUInt(v); -#endif + i += uui & i; // ERRORs, no int/uint conversions before 400 + i += uui ^ i; + i += i | uui; // bool -#ifdef TEST_POST_110 + b = isnan(uf); - b = isinf(v); -#endif + b = isinf(v.y); + b = any(lessThan(v, uv4)); b = (b && any(lessThanEqual(v, uv4))); b = (b && any(greaterThan(v, uv4))); diff --git a/Test/baseResults/Operations.frag.out b/Test/baseResults/Operations.frag.out index 4bf19699..bc12fe0d 100644 --- a/Test/baseResults/Operations.frag.out +++ b/Test/baseResults/Operations.frag.out @@ -1,6 +1,34 @@ Operations.frag +ERROR: 0:76: 'intBitsToFloat' : no matching overloaded function found +ERROR: 0:77: 'uintBitsToFloat' : no matching overloaded function found +ERROR: 0:78: 'fma' : no matching overloaded function found +ERROR: 0:79: 'frexp' : no matching overloaded function found +ERROR: 0:80: 'ldexp' : no matching overloaded function found +ERROR: 0:81: 'unpackUnorm2x16' : no matching overloaded function found +ERROR: 0:82: 'unpackUnorm4x8' : no matching overloaded function found +ERROR: 0:83: 'unpackSnorm4x8' : no matching overloaded function found +ERROR: 0:107: 'floatsBitsToInt' : no matching overloaded function found +ERROR: 0:108: 'packUnorm2x16' : no matching overloaded function found +ERROR: 0:109: 'packUnorm4x8' : no matching overloaded function found +ERROR: 0:110: 'packSnorm4x8' : no matching overloaded function found +ERROR: 0:113: 'assign' : cannot convert from 'global float' to 'temp uint' +ERROR: 0:114: 'assign' : cannot convert from 'global float' to 'temp uint' +ERROR: 0:118: 'floatsBitToInt' : no matching overloaded function found +ERROR: 0:118: 'assign' : cannot convert from 'const float' to 'temp uint' +ERROR: 0:119: 'packUnorm2x16' : no matching overloaded function found +ERROR: 0:119: 'assign' : cannot convert from 'const float' to 'temp uint' +ERROR: 0:120: 'packUnorm4x8' : no matching overloaded function found +ERROR: 0:120: 'assign' : cannot convert from 'const float' to 'temp uint' +ERROR: 0:121: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type 'uniform uint' and a right operand of type 'temp int' (or there is no acceptable conversion) +ERROR: 0:121: 'assign' : cannot convert from 'uniform uint' to 'temp int' +ERROR: 0:122: '^' : wrong operand types: no operation '^' exists that takes a left-hand operand of type 'uniform uint' and a right operand of type 'temp int' (or there is no acceptable conversion) +ERROR: 0:122: 'assign' : cannot convert from 'uniform uint' to 'temp int' +ERROR: 0:123: '|' : wrong operand types: no operation '|' exists that takes a left-hand operand of type 'temp int' and a right operand of type 'uniform uint' (or there is no acceptable conversion) +ERROR: 25 compilation errors. No code generated. + + Shader version: 130 -0:? Sequence +ERROR: node is still EOpNull! 0:15 Function Definition: main( (global void) 0:15 Function Parameters: 0:? Sequence @@ -107,6 +135,18 @@ Shader version: 130 0:52 'v' (temp 4-component vector of float) 0:52 Floor (global 4-component vector of float) 0:52 'v' (temp 4-component vector of float) +0:55 add second child into first child (temp 4-component vector of float) +0:55 'v' (temp 4-component vector of float) +0:55 trunc (global 4-component vector of float) +0:55 'v' (temp 4-component vector of float) +0:56 add second child into first child (temp 4-component vector of float) +0:56 'v' (temp 4-component vector of float) +0:56 round (global 4-component vector of float) +0:56 'v' (temp 4-component vector of float) +0:57 add second child into first child (temp 4-component vector of float) +0:57 'v' (temp 4-component vector of float) +0:57 roundEven (global 4-component vector of float) +0:57 'v' (temp 4-component vector of float) 0:60 add second child into first child (temp 4-component vector of float) 0:60 'v' (temp 4-component vector of float) 0:60 Ceiling (global 4-component vector of float) @@ -128,6 +168,11 @@ Shader version: 130 0:63 'v' (temp 4-component vector of float) 0:63 Constant: 0:63 0 (const int) +0:66 add second child into first child (temp 4-component vector of float) +0:66 'v' (temp 4-component vector of float) +0:66 modf (global 4-component vector of float) +0:66 'v' (temp 4-component vector of float) +0:66 'v' (temp 4-component vector of float) 0:69 add second child into first child (temp 4-component vector of float) 0:69 'v' (temp 4-component vector of float) 0:69 min (global 4-component vector of float) @@ -150,6 +195,44 @@ Shader version: 130 0:72 'v' (temp 4-component vector of float) 0:72 'v' (temp 4-component vector of float) 0:72 'v' (temp 4-component vector of float) +0:75 add second child into first child (temp 4-component vector of float) +0:75 'v' (temp 4-component vector of float) +0:75 mix (global 4-component vector of float) +0:75 'v' (temp 4-component vector of float) +0:75 'v' (temp 4-component vector of float) +0:75 'bv4' (temp 4-component vector of bool) +0:76 add second child into first child (temp 4-component vector of float) +0:76 'v' (temp 4-component vector of float) +0:76 Constant: +0:76 0.000000 +0:77 add second child into first child (temp 4-component vector of float) +0:77 'v' (temp 4-component vector of float) +0:77 Constant: +0:77 0.000000 +0:78 add second child into first child (temp 4-component vector of float) +0:78 'v' (temp 4-component vector of float) +0:78 Constant: +0:78 0.000000 +0:79 add second child into first child (temp 4-component vector of float) +0:79 'v' (temp 4-component vector of float) +0:79 Constant: +0:79 0.000000 +0:80 add second child into first child (temp 4-component vector of float) +0:80 'v' (temp 4-component vector of float) +0:80 Constant: +0:80 0.000000 +0:81 add second child into first child (temp 4-component vector of float) +0:81 'v' (temp 4-component vector of float) +0:81 Constant: +0:81 0.000000 +0:82 add second child into first child (temp 4-component vector of float) +0:82 'v' (temp 4-component vector of float) +0:82 Constant: +0:82 0.000000 +0:83 add second child into first child (temp 4-component vector of float) +0:83 'v' (temp 4-component vector of float) +0:83 Constant: +0:83 0.000000 0:86 add second child into first child (temp 4-component vector of float) 0:86 'v' (temp 4-component vector of float) 0:86 step (global 4-component vector of float) @@ -205,6 +288,75 @@ Shader version: 130 0:96 'v' (temp 4-component vector of float) 0:96 fwidth (global 4-component vector of float) 0:96 'v' (temp 4-component vector of float) +0:101 add second child into first child (temp int) +0:101 'i' (temp int) +0:101 Absolute value (global int) +0:101 'ui' (uniform int) +0:102 add second child into first child (temp int) +0:102 'i' (temp int) +0:102 Sign (global int) +0:102 'i' (temp int) +0:103 add second child into first child (temp int) +0:103 'i' (temp int) +0:103 min (global int) +0:103 'i' (temp int) +0:103 'ui' (uniform int) +0:104 add second child into first child (temp int) +0:104 'i' (temp int) +0:104 max (global int) +0:104 'i' (temp int) +0:104 'ui' (uniform int) +0:105 add second child into first child (temp int) +0:105 'i' (temp int) +0:105 clamp (global int) +0:105 'i' (temp int) +0:105 'ui' (uniform int) +0:105 'ui' (uniform int) +0:107 Constant: +0:107 0.000000 +0:108 Constant: +0:108 0.000000 +0:109 Constant: +0:109 0.000000 +0:110 Constant: +0:110 0.000000 +0:113 'u' (temp uint) +0:114 'u' (temp uint) +0:115 add second child into first child (temp uint) +0:115 'u' (temp uint) +0:115 min (global uint) +0:115 'u' (temp uint) +0:115 'uui' (uniform uint) +0:116 add second child into first child (temp uint) +0:116 'u' (temp uint) +0:116 max (global uint) +0:116 'u' (temp uint) +0:116 'uui' (uniform uint) +0:117 add second child into first child (temp uint) +0:117 'u' (temp uint) +0:117 clamp (global uint) +0:117 'u' (temp uint) +0:117 'uui' (uniform uint) +0:117 'uui' (uniform uint) +0:118 'u' (temp uint) +0:119 'u' (temp uint) +0:120 'u' (temp uint) +0:121 'i' (temp int) +0:122 'i' (temp int) +0:123 add second child into first child (temp int) +0:123 'i' (temp int) +0:123 'i' (temp int) +0:127 move second child to first child (temp bool) +0:127 'b' (temp bool) +0:127 isnan (global bool) +0:127 'uf' (uniform float) +0:128 move second child to first child (temp bool) +0:128 'b' (temp bool) +0:128 isinf (global bool) +0:128 direct index (temp float) +0:128 'v' (temp 4-component vector of float) +0:128 Constant: +0:128 1 (const int) 0:130 move second child to first child (temp bool) 0:130 'b' (temp bool) 0:130 any (global bool) @@ -431,13 +583,15 @@ Shader version: 130 0:? 'ub42' (uniform 4-component vector of bool) 0:? 'uf' (uniform float) 0:? 'ui' (uniform int) +0:? 'uuv4' (uniform 4-component vector of uint) +0:? 'uui' (uniform uint) Linked fragment stage: Shader version: 130 -0:? Sequence +ERROR: node is still EOpNull! 0:15 Function Definition: main( (global void) 0:15 Function Parameters: 0:? Sequence @@ -544,6 +698,18 @@ Shader version: 130 0:52 'v' (temp 4-component vector of float) 0:52 Floor (global 4-component vector of float) 0:52 'v' (temp 4-component vector of float) +0:55 add second child into first child (temp 4-component vector of float) +0:55 'v' (temp 4-component vector of float) +0:55 trunc (global 4-component vector of float) +0:55 'v' (temp 4-component vector of float) +0:56 add second child into first child (temp 4-component vector of float) +0:56 'v' (temp 4-component vector of float) +0:56 round (global 4-component vector of float) +0:56 'v' (temp 4-component vector of float) +0:57 add second child into first child (temp 4-component vector of float) +0:57 'v' (temp 4-component vector of float) +0:57 roundEven (global 4-component vector of float) +0:57 'v' (temp 4-component vector of float) 0:60 add second child into first child (temp 4-component vector of float) 0:60 'v' (temp 4-component vector of float) 0:60 Ceiling (global 4-component vector of float) @@ -565,6 +731,11 @@ Shader version: 130 0:63 'v' (temp 4-component vector of float) 0:63 Constant: 0:63 0 (const int) +0:66 add second child into first child (temp 4-component vector of float) +0:66 'v' (temp 4-component vector of float) +0:66 modf (global 4-component vector of float) +0:66 'v' (temp 4-component vector of float) +0:66 'v' (temp 4-component vector of float) 0:69 add second child into first child (temp 4-component vector of float) 0:69 'v' (temp 4-component vector of float) 0:69 min (global 4-component vector of float) @@ -587,6 +758,44 @@ Shader version: 130 0:72 'v' (temp 4-component vector of float) 0:72 'v' (temp 4-component vector of float) 0:72 'v' (temp 4-component vector of float) +0:75 add second child into first child (temp 4-component vector of float) +0:75 'v' (temp 4-component vector of float) +0:75 mix (global 4-component vector of float) +0:75 'v' (temp 4-component vector of float) +0:75 'v' (temp 4-component vector of float) +0:75 'bv4' (temp 4-component vector of bool) +0:76 add second child into first child (temp 4-component vector of float) +0:76 'v' (temp 4-component vector of float) +0:76 Constant: +0:76 0.000000 +0:77 add second child into first child (temp 4-component vector of float) +0:77 'v' (temp 4-component vector of float) +0:77 Constant: +0:77 0.000000 +0:78 add second child into first child (temp 4-component vector of float) +0:78 'v' (temp 4-component vector of float) +0:78 Constant: +0:78 0.000000 +0:79 add second child into first child (temp 4-component vector of float) +0:79 'v' (temp 4-component vector of float) +0:79 Constant: +0:79 0.000000 +0:80 add second child into first child (temp 4-component vector of float) +0:80 'v' (temp 4-component vector of float) +0:80 Constant: +0:80 0.000000 +0:81 add second child into first child (temp 4-component vector of float) +0:81 'v' (temp 4-component vector of float) +0:81 Constant: +0:81 0.000000 +0:82 add second child into first child (temp 4-component vector of float) +0:82 'v' (temp 4-component vector of float) +0:82 Constant: +0:82 0.000000 +0:83 add second child into first child (temp 4-component vector of float) +0:83 'v' (temp 4-component vector of float) +0:83 Constant: +0:83 0.000000 0:86 add second child into first child (temp 4-component vector of float) 0:86 'v' (temp 4-component vector of float) 0:86 step (global 4-component vector of float) @@ -642,6 +851,75 @@ Shader version: 130 0:96 'v' (temp 4-component vector of float) 0:96 fwidth (global 4-component vector of float) 0:96 'v' (temp 4-component vector of float) +0:101 add second child into first child (temp int) +0:101 'i' (temp int) +0:101 Absolute value (global int) +0:101 'ui' (uniform int) +0:102 add second child into first child (temp int) +0:102 'i' (temp int) +0:102 Sign (global int) +0:102 'i' (temp int) +0:103 add second child into first child (temp int) +0:103 'i' (temp int) +0:103 min (global int) +0:103 'i' (temp int) +0:103 'ui' (uniform int) +0:104 add second child into first child (temp int) +0:104 'i' (temp int) +0:104 max (global int) +0:104 'i' (temp int) +0:104 'ui' (uniform int) +0:105 add second child into first child (temp int) +0:105 'i' (temp int) +0:105 clamp (global int) +0:105 'i' (temp int) +0:105 'ui' (uniform int) +0:105 'ui' (uniform int) +0:107 Constant: +0:107 0.000000 +0:108 Constant: +0:108 0.000000 +0:109 Constant: +0:109 0.000000 +0:110 Constant: +0:110 0.000000 +0:113 'u' (temp uint) +0:114 'u' (temp uint) +0:115 add second child into first child (temp uint) +0:115 'u' (temp uint) +0:115 min (global uint) +0:115 'u' (temp uint) +0:115 'uui' (uniform uint) +0:116 add second child into first child (temp uint) +0:116 'u' (temp uint) +0:116 max (global uint) +0:116 'u' (temp uint) +0:116 'uui' (uniform uint) +0:117 add second child into first child (temp uint) +0:117 'u' (temp uint) +0:117 clamp (global uint) +0:117 'u' (temp uint) +0:117 'uui' (uniform uint) +0:117 'uui' (uniform uint) +0:118 'u' (temp uint) +0:119 'u' (temp uint) +0:120 'u' (temp uint) +0:121 'i' (temp int) +0:122 'i' (temp int) +0:123 add second child into first child (temp int) +0:123 'i' (temp int) +0:123 'i' (temp int) +0:127 move second child to first child (temp bool) +0:127 'b' (temp bool) +0:127 isnan (global bool) +0:127 'uf' (uniform float) +0:128 move second child to first child (temp bool) +0:128 'b' (temp bool) +0:128 isinf (global bool) +0:128 direct index (temp float) +0:128 'v' (temp 4-component vector of float) +0:128 Constant: +0:128 1 (const int) 0:130 move second child to first child (temp bool) 0:130 'b' (temp bool) 0:130 any (global bool) @@ -868,4 +1146,6 @@ Shader version: 130 0:? 'ub42' (uniform 4-component vector of bool) 0:? 'uf' (uniform float) 0:? 'ui' (uniform int) +0:? 'uuv4' (uniform 4-component vector of uint) +0:? 'uui' (uniform uint) diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 2e9fa85c..dcd310ea 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -457,6 +457,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpMatrixTimesVector: case EOpMatrixTimesScalar: + case EOpAnd: + case EOpInclusiveOr: + case EOpExclusiveOr: + case EOpFunctionCall: case EOpReturn: case EOpAssign: From f6eae2a54ae148ce35ba2c7eb9b4dd587e399170 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 22 Jan 2016 17:47:22 -0700 Subject: [PATCH 41/84] SPV: Require desktop 140 or ES 310 or above. --- Test/baseResults/spv.100ops.frag.out | 12 +-- Test/baseResults/spv.130.frag.out | 84 +++++++++---------- Test/baseResults/spv.300BuiltIns.vert.out | 82 ++++++++++-------- Test/baseResults/spv.300layout.frag.out | 4 +- Test/baseResults/spv.300layout.vert.out | 4 +- Test/baseResults/spv.300layoutp.vert.out | 4 +- Test/baseResults/spv.always-discard.frag.out | 2 +- Test/baseResults/spv.always-discard2.frag.out | 2 +- Test/baseResults/spv.branch-return.vert.out | 55 +++++++----- Test/baseResults/spv.conversion.frag.out | 2 +- Test/baseResults/spv.dataOut.frag.out | 4 +- Test/baseResults/spv.dataOutIndirect.frag.out | 4 +- Test/baseResults/spv.dataOutIndirect.vert.out | 10 ++- Test/baseResults/spv.discard-dce.frag.out | 2 +- Test/baseResults/spv.do-simple.vert.out | 4 +- .../spv.do-while-continue-break.vert.out | 4 +- Test/baseResults/spv.doWhileLoop.frag.out | 2 +- .../spv.earlyReturnDiscard.frag.out | 2 +- Test/baseResults/spv.flowControl.frag.out | 2 +- .../spv.for-continue-break.vert.out | 4 +- Test/baseResults/spv.for-simple.vert.out | 4 +- Test/baseResults/spv.forLoop.frag.out | 2 +- Test/baseResults/spv.forwardFun.frag.out | 8 +- Test/baseResults/spv.functionCall.frag.out | 4 +- Test/baseResults/spv.length.frag.out | 2 +- Test/baseResults/spv.localAggregates.frag.out | 5 +- Test/baseResults/spv.loops.frag.out | 4 +- Test/baseResults/spv.loopsArtificial.frag.out | 4 +- Test/baseResults/spv.matFun.vert.out | 9 +- Test/baseResults/spv.matrix.frag.out | 2 +- Test/baseResults/spv.nonSquare.vert.out | 17 +++- Test/baseResults/spv.precision.frag.out | 4 +- .../spv.simpleFunctionCall.frag.out | 2 - .../baseResults/spv.structAssignment.frag.out | 4 +- Test/baseResults/spv.structDeref.frag.out | 4 +- Test/baseResults/spv.structure.frag.out | 4 +- Test/baseResults/spv.swizzle.frag.out | 2 +- Test/baseResults/spv.test.vert.out | 9 +- Test/baseResults/spv.texture.frag.out | 5 +- Test/baseResults/spv.texture.vert.out | 9 +- Test/baseResults/spv.types.frag.out | 2 +- Test/baseResults/spv.uint.frag.out | 4 +- Test/baseResults/spv.uniformArray.frag.out | 2 +- .../spv.variableArrayIndex.frag.out | 4 +- Test/baseResults/spv.varyingArray.frag.out | 19 ++--- .../spv.varyingArrayIndirect.frag.out | 19 ++--- Test/baseResults/spv.voidFunction.frag.out | 2 +- .../spv.while-continue-break.vert.out | 4 +- Test/baseResults/spv.while-simple.vert.out | 4 +- Test/baseResults/spv.whileLoop.frag.out | 2 +- Test/spv.100ops.frag | 6 +- Test/spv.130.frag | 5 +- Test/spv.300BuiltIns.vert | 2 +- Test/spv.300layout.frag | 2 +- Test/spv.300layout.vert | 2 +- Test/spv.300layoutp.vert | 2 +- Test/spv.always-discard.frag | 4 +- Test/spv.always-discard2.frag | 4 +- Test/spv.branch-return.vert | 2 +- Test/spv.conversion.frag | 2 +- Test/spv.dataOut.frag | 4 +- Test/spv.dataOutIndirect.frag | 4 +- Test/spv.dataOutIndirect.vert | 4 +- Test/spv.discard-dce.frag | 4 +- Test/spv.do-simple.vert | 2 +- Test/spv.do-while-continue-break.vert | 2 +- Test/spv.doWhileLoop.frag | 4 +- Test/spv.earlyReturnDiscard.frag | 6 +- Test/spv.flowControl.frag | 6 +- Test/spv.for-continue-break.vert | 2 +- Test/spv.for-simple.vert | 2 +- Test/spv.forLoop.frag | 2 +- Test/spv.forwardFun.frag | 4 +- Test/spv.functionCall.frag | 4 +- Test/spv.length.frag | 4 +- Test/spv.localAggregates.frag | 6 +- Test/spv.loops.frag | 4 +- Test/spv.loopsArtificial.frag | 4 +- Test/spv.matFun.vert | 2 +- Test/spv.matrix.frag | 2 +- Test/spv.nonSquare.vert | 2 +- Test/spv.precision.frag | 2 +- Test/spv.simpleFunctionCall.frag | 2 +- Test/spv.structAssignment.frag | 4 +- Test/spv.structDeref.frag | 4 +- Test/spv.structure.frag | 4 +- Test/spv.swizzle.frag | 4 +- Test/spv.test.vert | 2 +- Test/spv.texture.frag | 6 +- Test/spv.texture.vert | 2 +- Test/spv.types.frag | 2 +- Test/spv.uint.frag | 2 +- Test/spv.uniformArray.frag | 2 +- Test/spv.variableArrayIndex.frag | 4 +- Test/spv.varyingArray.frag | 14 ++-- Test/spv.varyingArrayIndirect.frag | 14 ++-- Test/spv.voidFunction.frag | 4 +- Test/spv.while-continue-break.vert | 2 +- Test/spv.while-simple.vert | 2 +- Test/spv.whileLoop.frag | 4 +- glslang/MachineIndependent/ParseHelper.cpp | 2 +- glslang/MachineIndependent/ShaderLang.cpp | 28 +++++-- 102 files changed, 357 insertions(+), 313 deletions(-) diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out index 11391f6a..82342324 100755 --- a/Test/baseResults/spv.100ops.frag.out +++ b/Test/baseResults/spv.100ops.frag.out @@ -1,4 +1,6 @@ spv.100ops.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 36 ExecutionMode 4 OriginLowerLeft - Source ESSL 100 + Source ESSL 310 Name 4 "main" Name 8 "foo(" Name 11 "face1" @@ -20,13 +22,13 @@ Linked fragment stage: Name 17 "z" Name 21 "low" Name 26 "high" - Name 36 "gl_FragColor" + Name 36 "Color" Decorate 11(face1) RelaxedPrecision Decorate 13(face2) RelaxedPrecision Decorate 17(z) RelaxedPrecision Decorate 21(low) RelaxedPrecision Decorate 26(high) RelaxedPrecision - Decorate 36(gl_FragColor) RelaxedPrecision + Decorate 36(Color) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -47,7 +49,7 @@ Linked fragment stage: 28: TypeBool 34: TypeVector 6(float) 4 35: TypePointer Output 34(fvec4) -36(gl_FragColor): 35(ptr) Variable Output + 36(Color): 35(ptr) Variable Output 4(main): 2 Function None 3 5: Label 17(z): 16(ptr) Variable Function @@ -75,7 +77,7 @@ Linked fragment stage: 42: 6(float) FunctionCall 8(foo() 43: 34(fvec4) CompositeConstruct 42 42 42 42 44: 34(fvec4) FAdd 41 43 - Store 36(gl_FragColor) 44 + Store 36(Color) 44 Return FunctionEnd 8(foo(): 6(float) Function None 7 diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index f4fb19b7..7091d5a9 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -1,5 +1,5 @@ spv.130.frag -WARNING: 0:34: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 +WARNING: 0:31: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 Linked fragment stage: @@ -7,14 +7,14 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 214 +// Id's are bound by 213 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 187 + EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 SourceExtension "GL_ARB_gpu_shader5" SourceExtension "GL_ARB_shader_texture_lod" SourceExtension "GL_ARB_shading_language_420pack" @@ -50,21 +50,20 @@ Linked fragment stage: Name 184 "fflat" Name 185 "fsmooth" Name 186 "fnop" - Name 187 "gl_Color" - Name 194 "bounds" - Name 195 "s2D" - Name 196 "s2DR" - Name 200 "s2DRS" - Name 204 "s1D" - Name 205 "s2DS" - Name 207 "f" - Name 209 "v2" - Name 211 "v3" - Name 213 "v4" + Name 193 "bounds" + Name 194 "s2D" + Name 195 "s2DR" + Name 199 "s2DRS" + Name 203 "s1D" + Name 204 "s2DS" + Name 206 "f" + Name 208 "v2" + Name 210 "v3" + Name 212 "v4" Decorate 173(gl_ClipDistance) BuiltIn ClipDistance Decorate 184(fflat) Flat Decorate 186(fnop) NoPerspective - Decorate 194(bounds) Binding 0 + Decorate 193(bounds) Binding 0 2: TypeVoid 3: TypeFunction 2 14: TypeFloat 32 @@ -155,33 +154,32 @@ Linked fragment stage: 184(fflat): 128(ptr) Variable Input 185(fsmooth): 128(ptr) Variable Input 186(fnop): 128(ptr) Variable Input - 187(gl_Color): 78(ptr) Variable Input - 188: 96(int) Constant 3 - 189: TypeArray 26(int) 188 - 190: 26(int) Constant 10 - 191: 26(int) Constant 23 - 192: 26(int) Constant 32 - 193: 189 ConstantComposite 190 191 192 - 194(bounds): 20(ptr) Variable UniformConstant - 195(s2D): 20(ptr) Variable UniformConstant - 196(s2DR): 46(ptr) Variable UniformConstant - 197: TypeImage 14(float) Rect depth sampled format:Unknown - 198: TypeSampledImage 197 - 199: TypePointer UniformConstant 198 - 200(s2DRS): 199(ptr) Variable UniformConstant - 201: TypeImage 14(float) 1D sampled format:Unknown - 202: TypeSampledImage 201 - 203: TypePointer UniformConstant 202 - 204(s1D): 203(ptr) Variable UniformConstant - 205(s2DS): 54(ptr) Variable UniformConstant - 206: TypePointer UniformConstant 14(float) - 207(f): 206(ptr) Variable UniformConstant - 208: TypePointer UniformConstant 23(fvec2) - 209(v2): 208(ptr) Variable UniformConstant - 210: TypePointer UniformConstant 39(fvec3) - 211(v3): 210(ptr) Variable UniformConstant - 212: TypePointer UniformConstant 15(fvec4) - 213(v4): 212(ptr) Variable UniformConstant + 187: 96(int) Constant 3 + 188: TypeArray 26(int) 187 + 189: 26(int) Constant 10 + 190: 26(int) Constant 23 + 191: 26(int) Constant 32 + 192: 188 ConstantComposite 189 190 191 + 193(bounds): 20(ptr) Variable UniformConstant + 194(s2D): 20(ptr) Variable UniformConstant + 195(s2DR): 46(ptr) Variable UniformConstant + 196: TypeImage 14(float) Rect depth sampled format:Unknown + 197: TypeSampledImage 196 + 198: TypePointer UniformConstant 197 + 199(s2DRS): 198(ptr) Variable UniformConstant + 200: TypeImage 14(float) 1D sampled format:Unknown + 201: TypeSampledImage 200 + 202: TypePointer UniformConstant 201 + 203(s1D): 202(ptr) Variable UniformConstant + 204(s2DS): 54(ptr) Variable UniformConstant + 205: TypePointer UniformConstant 14(float) + 206(f): 205(ptr) Variable UniformConstant + 207: TypePointer UniformConstant 23(fvec2) + 208(v2): 207(ptr) Variable UniformConstant + 209: TypePointer UniformConstant 39(fvec3) + 210(v3): 209(ptr) Variable UniformConstant + 211: TypePointer UniformConstant 15(fvec4) + 212(v4): 211(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 168: 165 Load 167(sampC) diff --git a/Test/baseResults/spv.300BuiltIns.vert.out b/Test/baseResults/spv.300BuiltIns.vert.out index de5b61c4..dbe9fa1d 100755 --- a/Test/baseResults/spv.300BuiltIns.vert.out +++ b/Test/baseResults/spv.300BuiltIns.vert.out @@ -1,33 +1,38 @@ spv.300BuiltIns.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 40 +// Id's are bound by 49 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 11 23 25 33 39 - Source ESSL 300 + EntryPoint Vertex 4 "main" 11 24 27 48 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 11 "gl_VertexID" Name 16 "j" - Name 23 "gl_Position" - Name 25 "ps" - Name 33 "gl_PointSize" - Name 39 "gl_InstanceID" + Name 22 "gl_PerVertex" + MemberName 22(gl_PerVertex) 0 "gl_Position" + MemberName 22(gl_PerVertex) 1 "gl_PointSize" + Name 24 "" + Name 27 "ps" + Name 48 "gl_InstanceID" Decorate 8(i) RelaxedPrecision Decorate 11(gl_VertexID) BuiltIn VertexId Decorate 16(j) RelaxedPrecision - Decorate 23(gl_Position) Invariant - Decorate 23(gl_Position) BuiltIn Position - Decorate 25(ps) RelaxedPrecision - Decorate 33(gl_PointSize) BuiltIn PointSize - Decorate 39(gl_InstanceID) BuiltIn InstanceId + MemberDecorate 22(gl_PerVertex) 0 Invariant + MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize + Decorate 22(gl_PerVertex) Block + Decorate 27(ps) RelaxedPrecision + Decorate 48(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -38,13 +43,16 @@ Linked vertex stage: 14: 6(int) Constant 10 20: TypeFloat 32 21: TypeVector 20(float) 4 - 22: TypePointer Output 21(fvec4) - 23(gl_Position): 22(ptr) Variable Output - 24: TypePointer Input 20(float) - 25(ps): 24(ptr) Variable Input - 32: TypePointer Output 20(float) -33(gl_PointSize): 32(ptr) Variable Output -39(gl_InstanceID): 10(ptr) Variable Input +22(gl_PerVertex): TypeStruct 21(fvec4) 20(float) + 23: TypePointer Output 22(gl_PerVertex) + 24: 23(ptr) Variable Output + 25: 6(int) Constant 0 + 26: TypePointer Input 20(float) + 27(ps): 26(ptr) Variable Input + 30: TypePointer Output 21(fvec4) + 38: 6(int) Constant 1 + 40: TypePointer Output 20(float) +48(gl_InstanceID): 10(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function @@ -57,20 +65,26 @@ Linked vertex stage: 18: 6(int) IMul 9 17 19: 6(int) ISub 18 14 Store 16(j) 19 - 26: 20(float) Load 25(ps) - 27: 21(fvec4) CompositeConstruct 26 26 26 26 - Store 23(gl_Position) 27 - 28: 6(int) Load 8(i) - 29: 20(float) ConvertSToF 28 - 30: 21(fvec4) Load 23(gl_Position) - 31: 21(fvec4) VectorTimesScalar 30 29 - Store 23(gl_Position) 31 - 34: 20(float) Load 25(ps) - Store 33(gl_PointSize) 34 - 35: 6(int) Load 16(j) - 36: 20(float) ConvertSToF 35 - 37: 20(float) Load 33(gl_PointSize) - 38: 20(float) FMul 37 36 - Store 33(gl_PointSize) 38 + 28: 20(float) Load 27(ps) + 29: 21(fvec4) CompositeConstruct 28 28 28 28 + 31: 30(ptr) AccessChain 24 25 + Store 31 29 + 32: 6(int) Load 8(i) + 33: 20(float) ConvertSToF 32 + 34: 30(ptr) AccessChain 24 25 + 35: 21(fvec4) Load 34 + 36: 21(fvec4) VectorTimesScalar 35 33 + 37: 30(ptr) AccessChain 24 25 + Store 37 36 + 39: 20(float) Load 27(ps) + 41: 40(ptr) AccessChain 24 38 + Store 41 39 + 42: 6(int) Load 16(j) + 43: 20(float) ConvertSToF 42 + 44: 40(ptr) AccessChain 24 38 + 45: 20(float) Load 44 + 46: 20(float) FMul 45 43 + 47: 40(ptr) AccessChain 24 38 + Store 47 46 Return FunctionEnd diff --git a/Test/baseResults/spv.300layout.frag.out b/Test/baseResults/spv.300layout.frag.out index e08f1e92..2876822e 100755 --- a/Test/baseResults/spv.300layout.frag.out +++ b/Test/baseResults/spv.300layout.frag.out @@ -1,4 +1,6 @@ spv.300layout.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 9 11 15 26 29 ExecutionMode 4 OriginLowerLeft - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 9 "c" Name 11 "color" diff --git a/Test/baseResults/spv.300layout.vert.out b/Test/baseResults/spv.300layout.vert.out index 02e15a71..f940f7aa 100644 --- a/Test/baseResults/spv.300layout.vert.out +++ b/Test/baseResults/spv.300layout.vert.out @@ -1,4 +1,6 @@ spv.300layout.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 9 11 99 101 109 121 129 163 164 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 9 "pos" Name 11 "p" diff --git a/Test/baseResults/spv.300layoutp.vert.out b/Test/baseResults/spv.300layoutp.vert.out index b5580b5c..5baf51fb 100755 --- a/Test/baseResults/spv.300layoutp.vert.out +++ b/Test/baseResults/spv.300layoutp.vert.out @@ -1,4 +1,6 @@ spv.300layoutp.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 9 11 51 53 61 73 81 115 116 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 9 "pos" Name 11 "p" diff --git a/Test/baseResults/spv.always-discard.frag.out b/Test/baseResults/spv.always-discard.frag.out index 73e34bdc..8c19b7b3 100644 --- a/Test/baseResults/spv.always-discard.frag.out +++ b/Test/baseResults/spv.always-discard.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 59 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "white" Name 12 "black" diff --git a/Test/baseResults/spv.always-discard2.frag.out b/Test/baseResults/spv.always-discard2.frag.out index b62d10c4..896382e1 100755 --- a/Test/baseResults/spv.always-discard2.frag.out +++ b/Test/baseResults/spv.always-discard2.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 38 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "white" Name 12 "black" diff --git a/Test/baseResults/spv.branch-return.vert.out b/Test/baseResults/spv.branch-return.vert.out index 8588d741..19bc3e04 100644 --- a/Test/baseResults/spv.branch-return.vert.out +++ b/Test/baseResults/spv.branch-return.vert.out @@ -1,24 +1,31 @@ spv.branch-return.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 35 +// Id's are bound by 39 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 8 19 34 - Source ESSL 300 + EntryPoint Vertex 4 "main" 8 20 38 + Source ESSL 310 Name 4 "main" Name 8 "gl_InstanceID" - Name 19 "gl_Position" - Name 34 "gl_VertexID" + Name 18 "gl_PerVertex" + MemberName 18(gl_PerVertex) 0 "gl_Position" + MemberName 18(gl_PerVertex) 1 "gl_PointSize" + Name 20 "" + Name 38 "gl_VertexID" Decorate 8(gl_InstanceID) BuiltIn InstanceId - Decorate 19(gl_Position) BuiltIn Position - Decorate 34(gl_VertexID) BuiltIn VertexId + MemberDecorate 18(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 18(gl_PerVertex) 1 BuiltIn PointSize + Decorate 18(gl_PerVertex) Block + Decorate 38(gl_VertexID) BuiltIn VertexId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -26,15 +33,18 @@ Linked vertex stage: 8(gl_InstanceID): 7(ptr) Variable Input 16: TypeFloat 32 17: TypeVector 16(float) 4 - 18: TypePointer Output 17(fvec4) - 19(gl_Position): 18(ptr) Variable Output - 20: 16(float) Constant 0 - 21: 17(fvec4) ConstantComposite 20 20 20 20 - 26: 16(float) Constant 1039918957 - 27: TypeInt 32 0 - 28: 27(int) Constant 0 - 29: TypePointer Output 16(float) - 34(gl_VertexID): 7(ptr) Variable Input +18(gl_PerVertex): TypeStruct 17(fvec4) 16(float) + 19: TypePointer Output 18(gl_PerVertex) + 20: 19(ptr) Variable Output + 21: 6(int) Constant 0 + 22: 16(float) Constant 0 + 23: 17(fvec4) ConstantComposite 22 22 22 22 + 24: TypePointer Output 17(fvec4) + 30: 16(float) Constant 1039918957 + 31: TypeInt 32 0 + 32: 31(int) Constant 0 + 33: TypePointer Output 16(float) + 38(gl_VertexID): 7(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9: 6(int) Load 8(gl_InstanceID) @@ -47,17 +57,18 @@ Linked vertex stage: 10: Label Return 11: Label - Store 19(gl_Position) 21 + 25: 24(ptr) AccessChain 20 21 + Store 25 23 Branch 14 12: Label Return 13: Label Return 14: Label - 30: 29(ptr) AccessChain 19(gl_Position) 28 - 31: 16(float) Load 30 - 32: 16(float) FAdd 31 26 - 33: 29(ptr) AccessChain 19(gl_Position) 28 - Store 33 32 + 34: 33(ptr) AccessChain 20 21 32 + 35: 16(float) Load 34 + 36: 16(float) FAdd 35 30 + 37: 33(ptr) AccessChain 20 21 32 + Store 37 36 Return FunctionEnd diff --git a/Test/baseResults/spv.conversion.frag.out b/Test/baseResults/spv.conversion.frag.out index 405e6a80..a88007a1 100755 --- a/Test/baseResults/spv.conversion.frag.out +++ b/Test/baseResults/spv.conversion.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 39 53 157 322 446 448 450 452 454 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "b" Name 11 "u_i" diff --git a/Test/baseResults/spv.dataOut.frag.out b/Test/baseResults/spv.dataOut.frag.out index d96a6eca..67723d4d 100755 --- a/Test/baseResults/spv.dataOut.frag.out +++ b/Test/baseResults/spv.dataOut.frag.out @@ -1,6 +1,4 @@ spv.dataOut.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 16 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 12 "gl_FragData" Name 16 "Color" diff --git a/Test/baseResults/spv.dataOutIndirect.frag.out b/Test/baseResults/spv.dataOutIndirect.frag.out index 26a5f77c..1b22e228 100755 --- a/Test/baseResults/spv.dataOutIndirect.frag.out +++ b/Test/baseResults/spv.dataOutIndirect.frag.out @@ -1,6 +1,4 @@ spv.dataOutIndirect.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 18 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 12 "gl_FragData" Name 15 "i" diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index 62da85f3..c0182b5f 100755 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -1,6 +1,5 @@ spv.dataOutIndirect.vert WARNING: 0:3: attribute deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release Linked vertex stage: @@ -8,21 +7,23 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 40 +// Id's are bound by 41 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 25 28 34 39 - Source GLSL 130 + EntryPoint Vertex 4 "main" 25 28 34 39 40 + Source GLSL 140 Name 4 "main" Name 8 "i" Name 25 "colorOut" Name 28 "color" Name 34 "gl_Position" Name 39 "gl_VertexID" + Name 40 "gl_InstanceID" Decorate 34(gl_Position) BuiltIn Position Decorate 39(gl_VertexID) BuiltIn VertexId + Decorate 40(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -44,6 +45,7 @@ Linked vertex stage: 35: 6(int) Constant 2 38: TypePointer Input 6(int) 39(gl_VertexID): 38(ptr) Variable Input +40(gl_InstanceID): 38(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.discard-dce.frag.out b/Test/baseResults/spv.discard-dce.frag.out index c2a8501a..dd1d6296 100755 --- a/Test/baseResults/spv.discard-dce.frag.out +++ b/Test/baseResults/spv.discard-dce.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 59 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "white" Name 12 "black" diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out index f63f21ac..d3f090f8 100755 --- a/Test/baseResults/spv.do-simple.vert.out +++ b/Test/baseResults/spv.do-simple.vert.out @@ -1,4 +1,6 @@ spv.do-simple.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 22 23 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 22 "gl_VertexID" diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index c8f0b2f9..98fa1849 100644 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -1,4 +1,6 @@ spv.do-while-continue-break.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 44 45 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 14 "A" diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out index 18f32bd0..86423ea7 100755 --- a/Test/baseResults/spv.doWhileLoop.frag.out +++ b/Test/baseResults/spv.doWhileLoop.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 33 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.earlyReturnDiscard.frag.out b/Test/baseResults/spv.earlyReturnDiscard.frag.out index 393a24fc..76888484 100755 --- a/Test/baseResults/spv.earlyReturnDiscard.frag.out +++ b/Test/baseResults/spv.earlyReturnDiscard.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 18 107 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.flowControl.frag.out b/Test/baseResults/spv.flowControl.frag.out index 825a4177..2ca252e7 100755 --- a/Test/baseResults/spv.flowControl.frag.out +++ b/Test/baseResults/spv.flowControl.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 18 37 ExecutionMode 4 OriginLowerLeft - Source GLSL 120 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index 608ec661..f7530b73 100644 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -1,4 +1,6 @@ spv.for-continue-break.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 46 47 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "A" diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index 3d090e5b..c8af4c5b 100755 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -1,4 +1,6 @@ spv.for-simple.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 25 26 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "j" diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 9e68e6b2..1d6c425a 100755 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 37 105 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out index 2000a369..0ce0c2e4 100755 --- a/Test/baseResults/spv.forwardFun.frag.out +++ b/Test/baseResults/spv.forwardFun.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 20 30 ExecutionMode 4 OriginLowerLeft - Source ESSL 100 + Source GLSL 140 Name 4 "main" Name 6 "bar(" Name 10 "unreachableReturn(" @@ -25,12 +25,6 @@ Linked fragment stage: Name 30 "gl_FragColor" Name 36 "d" Name 60 "bigColor" - Decorate 18(color) RelaxedPrecision - Decorate 20(BaseColor) RelaxedPrecision - Decorate 27(f) RelaxedPrecision - Decorate 30(gl_FragColor) RelaxedPrecision - Decorate 36(d) RelaxedPrecision - Decorate 60(bigColor) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out index f2d381db..3e3fbd52 100755 --- a/Test/baseResults/spv.functionCall.frag.out +++ b/Test/baseResults/spv.functionCall.frag.out @@ -1,6 +1,4 @@ spv.functionCall.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 58 69 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 11 "foo(vf4;" Name 10 "bar" diff --git a/Test/baseResults/spv.length.frag.out b/Test/baseResults/spv.length.frag.out index 84d711cc..c7e8ad8f 100755 --- a/Test/baseResults/spv.length.frag.out +++ b/Test/baseResults/spv.length.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 14 26 ExecutionMode 4 OriginLowerLeft - Source GLSL 120 + Source GLSL 140 Name 4 "main" Name 9 "t" Name 14 "v" diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index 1b5ef924..db540dc1 100755 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -1,7 +1,4 @@ spv.localAggregates.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:5: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -15,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 40 98 108 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "s1" MemberName 8(s1) 0 "i" diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index 3cf68a06..994dd96d 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -1,6 +1,4 @@ spv.loops.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 616 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index 7de618ff..7fd04d44 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -1,6 +1,4 @@ spv.loopsArtificial.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 141 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out index bf0a3d1e..1c239d03 100755 --- a/Test/baseResults/spv.matFun.vert.out +++ b/Test/baseResults/spv.matFun.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 96 +// Id's are bound by 97 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 72 76 95 - Source GLSL 130 + EntryPoint Vertex 4 "main" 72 76 95 96 + Source GLSL 140 Name 4 "main" Name 14 "xf(mf33;vf3;" Name 12 "m" @@ -31,8 +31,10 @@ Linked vertex stage: Name 84 "param" Name 86 "param" Name 95 "gl_VertexID" + Name 96 "gl_InstanceID" Decorate 72(gl_Position) BuiltIn Position Decorate 95(gl_VertexID) BuiltIn VertexId + Decorate 96(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -63,6 +65,7 @@ Linked vertex stage: 83(m3): 82(ptr) Variable UniformConstant 94: TypePointer Input 33(int) 95(gl_VertexID): 94(ptr) Variable Input +96(gl_InstanceID): 94(ptr) Variable Input 4(main): 2 Function None 3 5: Label 77(param): 18(ptr) Variable Function diff --git a/Test/baseResults/spv.matrix.frag.out b/Test/baseResults/spv.matrix.frag.out index 4507a2fe..62a1636c 100644 --- a/Test/baseResults/spv.matrix.frag.out +++ b/Test/baseResults/spv.matrix.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 14 28 140 148 166 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 10 "sum34" Name 12 "m1" diff --git a/Test/baseResults/spv.nonSquare.vert.out b/Test/baseResults/spv.nonSquare.vert.out index 51a42682..abc7d362 100755 --- a/Test/baseResults/spv.nonSquare.vert.out +++ b/Test/baseResults/spv.nonSquare.vert.out @@ -1,17 +1,20 @@ spv.nonSquare.vert +WARNING: 0:3: attribute deprecated in version 130; may be removed in future release +WARNING: 0:4: attribute deprecated in version 130; may be removed in future release + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 90 +// Id's are bound by 94 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 12 28 55 - Source GLSL 120 + EntryPoint Vertex 4 "main" 12 28 55 92 93 + Source GLSL 140 Name 4 "main" Name 9 "a" Name 12 "v3" @@ -20,7 +23,11 @@ Linked vertex stage: Name 22 "m32" Name 28 "gl_Position" Name 55 "v4" + Name 92 "gl_VertexID" + Name 93 "gl_InstanceID" Decorate 28(gl_Position) BuiltIn Position + Decorate 92(gl_VertexID) BuiltIn VertexId + Decorate 93(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -83,6 +90,10 @@ Linked vertex stage: 87: 6(float) Constant 1090519040 88: 7(fvec2) ConstantComposite 86 87 89: 79 ConstantComposite 82 84 85 88 + 90: TypeInt 32 1 + 91: TypePointer Input 90(int) + 92(gl_VertexID): 91(ptr) Variable Input +93(gl_InstanceID): 91(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(a): 8(ptr) Variable Function diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out index e120eecd..27e48f1e 100755 --- a/Test/baseResults/spv.precision.frag.out +++ b/Test/baseResults/spv.precision.frag.out @@ -1,4 +1,6 @@ spv.precision.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 23 59 61 73 ExecutionMode 4 OriginLowerLeft - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 12 "foo(vf3;" Name 11 "mv3" diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out index 34bdae06..8018da8e 100755 --- a/Test/baseResults/spv.simpleFunctionCall.frag.out +++ b/Test/baseResults/spv.simpleFunctionCall.frag.out @@ -1,6 +1,4 @@ spv.simpleFunctionCall.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: diff --git a/Test/baseResults/spv.structAssignment.frag.out b/Test/baseResults/spv.structAssignment.frag.out index 9675d88f..8edb4f01 100755 --- a/Test/baseResults/spv.structAssignment.frag.out +++ b/Test/baseResults/spv.structAssignment.frag.out @@ -1,6 +1,4 @@ spv.structAssignment.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 31 44 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "lunarStruct1" MemberName 8(lunarStruct1) 0 "i" diff --git a/Test/baseResults/spv.structDeref.frag.out b/Test/baseResults/spv.structDeref.frag.out index 8d34ea30..ccfda84d 100755 --- a/Test/baseResults/spv.structDeref.frag.out +++ b/Test/baseResults/spv.structDeref.frag.out @@ -1,6 +1,4 @@ spv.structDeref.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 61 99 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "s0" MemberName 8(s0) 0 "i" diff --git a/Test/baseResults/spv.structure.frag.out b/Test/baseResults/spv.structure.frag.out index bcf5222d..866a7bdf 100755 --- a/Test/baseResults/spv.structure.frag.out +++ b/Test/baseResults/spv.structure.frag.out @@ -1,6 +1,4 @@ spv.structure.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 45 54 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "scale" Name 18 "lunarStruct1" diff --git a/Test/baseResults/spv.swizzle.frag.out b/Test/baseResults/spv.swizzle.frag.out index bfefdeab..82137e27 100755 --- a/Test/baseResults/spv.swizzle.frag.out +++ b/Test/baseResults/spv.swizzle.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 30 69 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 8 "blendscale" Name 12 "w" diff --git a/Test/baseResults/spv.test.vert.out b/Test/baseResults/spv.test.vert.out index f4dfd580..ef7fd988 100755 --- a/Test/baseResults/spv.test.vert.out +++ b/Test/baseResults/spv.test.vert.out @@ -7,13 +7,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 27 +// Id's are bound by 28 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 11 15 21 26 - Source GLSL 130 + EntryPoint Vertex 4 "main" 9 11 15 21 26 27 + Source GLSL 140 Name 4 "main" Name 9 "uv" Name 11 "uv_in" @@ -21,8 +21,10 @@ Linked vertex stage: Name 18 "transform" Name 21 "position" Name 26 "gl_VertexID" + Name 27 "gl_InstanceID" Decorate 15(gl_Position) BuiltIn Position Decorate 26(gl_VertexID) BuiltIn VertexId + Decorate 27(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -42,6 +44,7 @@ Linked vertex stage: 24: TypeInt 32 1 25: TypePointer Input 24(int) 26(gl_VertexID): 25(ptr) Variable Input +27(gl_InstanceID): 25(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12: 7(fvec2) Load 11(uv_in) diff --git a/Test/baseResults/spv.texture.frag.out b/Test/baseResults/spv.texture.frag.out index 56279325..0e795191 100755 --- a/Test/baseResults/spv.texture.frag.out +++ b/Test/baseResults/spv.texture.frag.out @@ -1,7 +1,4 @@ spv.texture.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release -WARNING: 0:15: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -15,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 47 276 290 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "blendscale" Name 10 "bias" diff --git a/Test/baseResults/spv.texture.vert.out b/Test/baseResults/spv.texture.vert.out index ec48714e..f081ce0e 100755 --- a/Test/baseResults/spv.texture.vert.out +++ b/Test/baseResults/spv.texture.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 145 +// Id's are bound by 146 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 39 140 144 - Source GLSL 130 + EntryPoint Vertex 4 "main" 39 140 144 145 + Source GLSL 140 Name 4 "main" Name 8 "lod" Name 10 "coords1D" @@ -27,8 +27,10 @@ Linked vertex stage: Name 114 "shadowSampler2D" Name 140 "gl_Position" Name 144 "gl_VertexID" + Name 145 "gl_InstanceID" Decorate 140(gl_Position) BuiltIn Position Decorate 144(gl_VertexID) BuiltIn VertexId + Decorate 145(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -78,6 +80,7 @@ Linked vertex stage: 142: TypeInt 32 1 143: TypePointer Input 142(int) 144(gl_VertexID): 143(ptr) Variable Input +145(gl_InstanceID): 143(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(lod): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.types.frag.out b/Test/baseResults/spv.types.frag.out index 04a66402..5355a8f0 100755 --- a/Test/baseResults/spv.types.frag.out +++ b/Test/baseResults/spv.types.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 94 104 114 124 134 144 154 164 168 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "b" Name 10 "u_b" diff --git a/Test/baseResults/spv.uint.frag.out b/Test/baseResults/spv.uint.frag.out index 3dc929b4..8c732dc8 100755 --- a/Test/baseResults/spv.uint.frag.out +++ b/Test/baseResults/spv.uint.frag.out @@ -1,4 +1,6 @@ spv.uint.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 15 68 77 200 ExecutionMode 4 OriginLowerLeft - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "count" Name 12 "u" diff --git a/Test/baseResults/spv.uniformArray.frag.out b/Test/baseResults/spv.uniformArray.frag.out index 963df924..747aa17e 100755 --- a/Test/baseResults/spv.uniformArray.frag.out +++ b/Test/baseResults/spv.uniformArray.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 47 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "texColor" Name 14 "color" diff --git a/Test/baseResults/spv.variableArrayIndex.frag.out b/Test/baseResults/spv.variableArrayIndex.frag.out index abd39080..3d8162a6 100755 --- a/Test/baseResults/spv.variableArrayIndex.frag.out +++ b/Test/baseResults/spv.variableArrayIndex.frag.out @@ -1,6 +1,4 @@ spv.variableArrayIndex.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 54 63 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "iLocal" Name 10 "Count" diff --git a/Test/baseResults/spv.varyingArray.frag.out b/Test/baseResults/spv.varyingArray.frag.out index 26234e84..91ec96a6 100755 --- a/Test/baseResults/spv.varyingArray.frag.out +++ b/Test/baseResults/spv.varyingArray.frag.out @@ -1,9 +1,4 @@ spv.varyingArray.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:6: varying deprecated in version 130; may be removed in future release -WARNING: 0:8: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -17,11 +12,11 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 19 34 39 45 48 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "texColor" Name 13 "texSampler2D" - Name 19 "gl_TexCoord" + Name 19 "TexCoord" Name 34 "color" Name 39 "alpha" Name 45 "gl_FragColor" @@ -39,7 +34,7 @@ Linked fragment stage: 16: 15(int) Constant 6 17: TypeArray 7(fvec4) 16 18: TypePointer Input 17 - 19(gl_TexCoord): 18(ptr) Variable Input + 19(TexCoord): 18(ptr) Variable Input 20: TypeInt 32 1 21: 20(int) Constant 4 22: TypePointer Input 7(fvec4) @@ -61,9 +56,9 @@ Linked fragment stage: 5: Label 9(texColor): 8(ptr) Variable Function 14: 11 Load 13(texSampler2D) - 23: 22(ptr) AccessChain 19(gl_TexCoord) 21 + 23: 22(ptr) AccessChain 19(TexCoord) 21 24: 7(fvec4) Load 23 - 26: 22(ptr) AccessChain 19(gl_TexCoord) 25 + 26: 22(ptr) AccessChain 19(TexCoord) 25 27: 7(fvec4) Load 26 28: 7(fvec4) FAdd 24 27 30: 6(float) CompositeExtract 28 0 @@ -80,10 +75,10 @@ Linked fragment stage: Store 43 40 50: 22(ptr) AccessChain 48(foo) 49 51: 7(fvec4) Load 50 - 53: 22(ptr) AccessChain 19(gl_TexCoord) 52 + 53: 22(ptr) AccessChain 19(TexCoord) 52 54: 7(fvec4) Load 53 55: 7(fvec4) FAdd 51 54 - 56: 22(ptr) AccessChain 19(gl_TexCoord) 21 + 56: 22(ptr) AccessChain 19(TexCoord) 21 57: 7(fvec4) Load 56 58: 7(fvec4) FAdd 55 57 59: 7(fvec4) Load 9(texColor) diff --git a/Test/baseResults/spv.varyingArrayIndirect.frag.out b/Test/baseResults/spv.varyingArrayIndirect.frag.out index 41ee8657..01b7e43e 100755 --- a/Test/baseResults/spv.varyingArrayIndirect.frag.out +++ b/Test/baseResults/spv.varyingArrayIndirect.frag.out @@ -1,9 +1,4 @@ spv.varyingArrayIndirect.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:6: varying deprecated in version 130; may be removed in future release -WARNING: 0:8: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -17,13 +12,13 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 19 30 45 50 56 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "texColor" Name 13 "texSampler2D" Name 19 "userIn" Name 22 "b" - Name 30 "gl_TexCoord" + Name 30 "TexCoord" Name 31 "a" Name 45 "color" Name 50 "alpha" @@ -49,7 +44,7 @@ Linked fragment stage: 27: 15(int) Constant 6 28: TypeArray 7(fvec4) 27 29: TypePointer Input 28 - 30(gl_TexCoord): 29(ptr) Variable Input + 30(TexCoord): 29(ptr) Variable Input 31(a): 21(ptr) Variable UniformConstant 36: 20(int) Constant 5 40: TypeVector 6(float) 2 @@ -69,10 +64,10 @@ Linked fragment stage: 25: 24(ptr) AccessChain 19(userIn) 23 26: 7(fvec4) Load 25 32: 20(int) Load 31(a) - 33: 24(ptr) AccessChain 30(gl_TexCoord) 32 + 33: 24(ptr) AccessChain 30(TexCoord) 32 34: 7(fvec4) Load 33 35: 7(fvec4) FAdd 26 34 - 37: 24(ptr) AccessChain 30(gl_TexCoord) 36 + 37: 24(ptr) AccessChain 30(TexCoord) 36 38: 7(fvec4) Load 37 39: 7(fvec4) FAdd 35 38 41: 6(float) CompositeExtract 39 0 @@ -87,10 +82,10 @@ Linked fragment stage: 51: 6(float) Load 50(alpha) 54: 53(ptr) AccessChain 9(texColor) 52 Store 54 51 - 58: 24(ptr) AccessChain 30(gl_TexCoord) 57 + 58: 24(ptr) AccessChain 30(TexCoord) 57 59: 7(fvec4) Load 58 60: 20(int) Load 22(b) - 61: 24(ptr) AccessChain 30(gl_TexCoord) 60 + 61: 24(ptr) AccessChain 30(TexCoord) 60 62: 7(fvec4) Load 61 63: 7(fvec4) FAdd 59 62 64: 7(fvec4) Load 9(texColor) diff --git a/Test/baseResults/spv.voidFunction.frag.out b/Test/baseResults/spv.voidFunction.frag.out index 9ef6e8df..6b9179b8 100755 --- a/Test/baseResults/spv.voidFunction.frag.out +++ b/Test/baseResults/spv.voidFunction.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 37 41 ExecutionMode 4 OriginLowerLeft - Source GLSL 120 + Source GLSL 140 Name 4 "main" Name 6 "foo(" Name 8 "foo2(" diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index f933dce9..8086e3b0 100644 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -1,4 +1,6 @@ spv.while-continue-break.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 42 43 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "A" diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index f5d13a37..04f53561 100755 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -1,4 +1,6 @@ spv.while-simple.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 23 24 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 23 "gl_VertexID" diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index c29ebd37..56e2d1c4 100755 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 34 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/spv.100ops.frag b/Test/spv.100ops.frag index b86d0423..b0daf8e2 100644 --- a/Test/spv.100ops.frag +++ b/Test/spv.100ops.frag @@ -1,4 +1,4 @@ -#version 100 +#version 310 es lowp float foo(); @@ -6,6 +6,8 @@ uniform int low, high; lowp float face1 = 11.0; +out lowp vec4 Color; + void main() { int z = 3; @@ -13,7 +15,7 @@ void main() if (2 * low + 1 < high) ++z; - gl_FragColor = face1 * vec4(z) + foo(); + Color = face1 * vec4(z) + foo(); } lowp float face2 = -2.0; diff --git a/Test/spv.130.frag b/Test/spv.130.frag index 0e580e4f..dcbd5be1 100644 --- a/Test/spv.130.frag +++ b/Test/spv.130.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 #extension GL_ARB_texture_gather : enable vec3 a; @@ -15,9 +15,6 @@ noperspective in float fnop; uniform samplerCube sampC; -in vec4 gl_Color; -flat in vec4 gl_Color; - #extension GL_ARB_texture_rectangle : enable uniform sampler2D samp2D; diff --git a/Test/spv.300BuiltIns.vert b/Test/spv.300BuiltIns.vert index c8104de8..0f40c251 100644 --- a/Test/spv.300BuiltIns.vert +++ b/Test/spv.300BuiltIns.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es in mediump float ps; diff --git a/Test/spv.300layout.frag b/Test/spv.300layout.frag index d80de3ab..5b4c56c2 100644 --- a/Test/spv.300layout.frag +++ b/Test/spv.300layout.frag @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es precision mediump float; diff --git a/Test/spv.300layout.vert b/Test/spv.300layout.vert index 38ff374c..d2db127c 100644 --- a/Test/spv.300layout.vert +++ b/Test/spv.300layout.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es layout(location = 7) in vec3 c; layout(LocatioN = 3) in vec4 p; diff --git a/Test/spv.300layoutp.vert b/Test/spv.300layoutp.vert index a0986e47..79d4093c 100644 --- a/Test/spv.300layoutp.vert +++ b/Test/spv.300layoutp.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es layout(location = 7) in vec3 c; layout(LocatioN = 3) in vec4 p; diff --git a/Test/spv.always-discard.frag b/Test/spv.always-discard.frag index cea4ceec..6cd4d04f 100644 --- a/Test/spv.always-discard.frag +++ b/Test/spv.always-discard.frag @@ -1,5 +1,5 @@ -#version 110 -varying vec2 tex_coord; +#version 140 +in vec2 tex_coord; void main (void) { diff --git a/Test/spv.always-discard2.frag b/Test/spv.always-discard2.frag index a619369d..2b125f32 100644 --- a/Test/spv.always-discard2.frag +++ b/Test/spv.always-discard2.frag @@ -1,5 +1,5 @@ -#version 110 -varying vec2 tex_coord; +#version 140 +in vec2 tex_coord; void main (void) { diff --git a/Test/spv.branch-return.vert b/Test/spv.branch-return.vert index 0b5897bf..e7a7e387 100644 --- a/Test/spv.branch-return.vert +++ b/Test/spv.branch-return.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { switch (gl_InstanceID) { case 0: return; diff --git a/Test/spv.conversion.frag b/Test/spv.conversion.frag index f17293b8..dbd14e29 100644 --- a/Test/spv.conversion.frag +++ b/Test/spv.conversion.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform bool u_b; uniform bvec2 u_b2; diff --git a/Test/spv.dataOut.frag b/Test/spv.dataOut.frag index 258f534e..94c6db06 100644 --- a/Test/spv.dataOut.frag +++ b/Test/spv.dataOut.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 -varying vec4 Color; +in vec4 Color; void main() { diff --git a/Test/spv.dataOutIndirect.frag b/Test/spv.dataOutIndirect.frag index d6b8667d..979a9406 100644 --- a/Test/spv.dataOutIndirect.frag +++ b/Test/spv.dataOutIndirect.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 -varying vec4 Color; +in vec4 Color; uniform int i; diff --git a/Test/spv.dataOutIndirect.vert b/Test/spv.dataOutIndirect.vert index 7c647fc0..cb6b7e0d 100644 --- a/Test/spv.dataOutIndirect.vert +++ b/Test/spv.dataOutIndirect.vert @@ -1,7 +1,7 @@ -#version 130 +#version 140 attribute vec4 color; -varying vec4 colorOut[6]; +out vec4 colorOut[6]; void main() { diff --git a/Test/spv.discard-dce.frag b/Test/spv.discard-dce.frag index f2fef4d1..e824f76e 100644 --- a/Test/spv.discard-dce.frag +++ b/Test/spv.discard-dce.frag @@ -1,5 +1,5 @@ -#version 110 -varying vec2 tex_coord; +#version 140 +in vec2 tex_coord; void main (void) { diff --git a/Test/spv.do-simple.vert b/Test/spv.do-simple.vert index a7eba1d2..77677a6d 100644 --- a/Test/spv.do-simple.vert +++ b/Test/spv.do-simple.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; do { diff --git a/Test/spv.do-while-continue-break.vert b/Test/spv.do-while-continue-break.vert index 1aa4bbd4..c085551e 100644 --- a/Test/spv.do-while-continue-break.vert +++ b/Test/spv.do-while-continue-break.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; int A, B, C, D, E, F, G; diff --git a/Test/spv.doWhileLoop.frag b/Test/spv.doWhileLoop.frag index 3d6f93c5..f4b52403 100644 --- a/Test/spv.doWhileLoop.frag +++ b/Test/spv.doWhileLoop.frag @@ -1,7 +1,7 @@ -#version 110 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; void main() diff --git a/Test/spv.earlyReturnDiscard.frag b/Test/spv.earlyReturnDiscard.frag index 718ea72f..d0d15c23 100644 --- a/Test/spv.earlyReturnDiscard.frag +++ b/Test/spv.earlyReturnDiscard.frag @@ -1,10 +1,10 @@ -#version 110 +#version 140 uniform float d; uniform vec4 bigColor, smallColor; uniform vec4 otherColor; -varying float c; +in float c; uniform float threshhold; uniform float threshhold2; @@ -12,7 +12,7 @@ uniform float threshhold3; uniform float minimum; -varying vec4 BaseColor; +in vec4 BaseColor; uniform bool b; diff --git a/Test/spv.flowControl.frag b/Test/spv.flowControl.frag index eaa6fb1d..86046c32 100644 --- a/Test/spv.flowControl.frag +++ b/Test/spv.flowControl.frag @@ -1,11 +1,11 @@ -#version 120 +#version 140 uniform float d; uniform vec4 bigColor, smallColor; uniform vec4 otherColor; -varying float c; -varying vec4 BaseColor; +in float c; +in vec4 BaseColor; void main() { diff --git a/Test/spv.for-continue-break.vert b/Test/spv.for-continue-break.vert index 9044f391..afa31f2b 100644 --- a/Test/spv.for-continue-break.vert +++ b/Test/spv.for-continue-break.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i; int A, B, C, D, E, F, G; diff --git a/Test/spv.for-simple.vert b/Test/spv.for-simple.vert index 7cba22ef..a5be6db2 100644 --- a/Test/spv.for-simple.vert +++ b/Test/spv.for-simple.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i; int j; diff --git a/Test/spv.forLoop.frag b/Test/spv.forLoop.frag index 117ecad1..0da72e19 100644 --- a/Test/spv.forLoop.frag +++ b/Test/spv.forLoop.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform vec4 bigColor; in vec4 BaseColor; diff --git a/Test/spv.forwardFun.frag b/Test/spv.forwardFun.frag index eb105829..c113e85f 100644 --- a/Test/spv.forwardFun.frag +++ b/Test/spv.forwardFun.frag @@ -1,9 +1,9 @@ -#version 100 +#version 140 precision mediump float; uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; void bar(); diff --git a/Test/spv.functionCall.frag b/Test/spv.functionCall.frag index e1fc0e07..bf911fd2 100644 --- a/Test/spv.functionCall.frag +++ b/Test/spv.functionCall.frag @@ -1,7 +1,7 @@ -#version 130 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; float h = 0.0; diff --git a/Test/spv.length.frag b/Test/spv.length.frag index 956d3be8..5221c833 100644 --- a/Test/spv.length.frag +++ b/Test/spv.length.frag @@ -1,8 +1,8 @@ -#version 120 +#version 140 uniform vec4 u[3]; -varying vec2 v[2]; +in vec2 v[2]; void main() { diff --git a/Test/spv.localAggregates.frag b/Test/spv.localAggregates.frag index 9cfa34ee..47224ba3 100644 --- a/Test/spv.localAggregates.frag +++ b/Test/spv.localAggregates.frag @@ -1,8 +1,8 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; -varying vec4 color; +in vec2 coord; +in vec4 color; struct s1 { int i; diff --git a/Test/spv.loops.frag b/Test/spv.loops.frag index ce2d2a0b..b9e960a6 100644 --- a/Test/spv.loops.frag +++ b/Test/spv.loops.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform vec4 bigColor; uniform vec4 bigColor1_1; uniform vec4 bigColor1_2; @@ -11,7 +11,7 @@ uniform vec4 bigColor6; uniform vec4 bigColor7; uniform vec4 bigColor8; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; uniform float d2; diff --git a/Test/spv.loopsArtificial.frag b/Test/spv.loopsArtificial.frag index 2f196af8..05b3dcbc 100644 --- a/Test/spv.loopsArtificial.frag +++ b/Test/spv.loopsArtificial.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform vec4 bigColor; uniform vec4 bigColor1_1; uniform vec4 bigColor1_2; @@ -11,7 +11,7 @@ uniform vec4 bigColor6; uniform vec4 bigColor7; uniform vec4 bigColor8; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; uniform float d2; diff --git a/Test/spv.matFun.vert b/Test/spv.matFun.vert index e5949964..64328d72 100644 --- a/Test/spv.matFun.vert +++ b/Test/spv.matFun.vert @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform mat4 m4; uniform mat3 m3; diff --git a/Test/spv.matrix.frag b/Test/spv.matrix.frag index 095bc83f..c62e9669 100644 --- a/Test/spv.matrix.frag +++ b/Test/spv.matrix.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 in mat3x4 m1; in mat3x4 m2; diff --git a/Test/spv.nonSquare.vert b/Test/spv.nonSquare.vert index 4de21a0c..9ef70559 100644 --- a/Test/spv.nonSquare.vert +++ b/Test/spv.nonSquare.vert @@ -1,4 +1,4 @@ -#version 120 +#version 140 attribute vec3 v3; attribute vec4 v4; diff --git a/Test/spv.precision.frag b/Test/spv.precision.frag index 0c6cb12b..40f790a2 100644 --- a/Test/spv.precision.frag +++ b/Test/spv.precision.frag @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es precision mediump float; in lowp float lowfin; in mediump float mediumfin; diff --git a/Test/spv.simpleFunctionCall.frag b/Test/spv.simpleFunctionCall.frag index 59f0ccd5..a302c334 100644 --- a/Test/spv.simpleFunctionCall.frag +++ b/Test/spv.simpleFunctionCall.frag @@ -1,7 +1,7 @@ #version 150 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; vec4 foo() diff --git a/Test/spv.structAssignment.frag b/Test/spv.structAssignment.frag index 072d6b56..0199e9a8 100644 --- a/Test/spv.structAssignment.frag +++ b/Test/spv.structAssignment.frag @@ -1,7 +1,7 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying mediump vec2 coord; +in mediump vec2 coord; struct lunarStruct1 { int i; diff --git a/Test/spv.structDeref.frag b/Test/spv.structDeref.frag index b702583d..919361e7 100644 --- a/Test/spv.structDeref.frag +++ b/Test/spv.structDeref.frag @@ -1,7 +1,7 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; +in vec2 coord; struct s0 { int i; diff --git a/Test/spv.structure.frag b/Test/spv.structure.frag index 4ed439da..770ad92b 100644 --- a/Test/spv.structure.frag +++ b/Test/spv.structure.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; +in vec2 coord; struct lunarStruct1 { int i; diff --git a/Test/spv.swizzle.frag b/Test/spv.swizzle.frag index 14f507ec..476136fb 100644 --- a/Test/spv.swizzle.frag +++ b/Test/spv.swizzle.frag @@ -1,10 +1,10 @@ -#version 110 +#version 140 uniform float blend; uniform vec4 u; uniform bool p; -varying vec2 t; +in vec2 t; void main() { diff --git a/Test/spv.test.vert b/Test/spv.test.vert index 213c0acd..c1d58aa5 100644 --- a/Test/spv.test.vert +++ b/Test/spv.test.vert @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform mat4 transform; diff --git a/Test/spv.texture.frag b/Test/spv.texture.frag index 1d6a1af7..83de4e31 100644 --- a/Test/spv.texture.frag +++ b/Test/spv.texture.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform sampler1D texSampler1D; uniform sampler2D texSampler2D; @@ -11,8 +11,8 @@ uniform float blend; uniform vec2 scale; uniform vec4 u; -varying vec2 t; -varying vec2 coords2D; +in vec2 t; +in vec2 coords2D; void main() { diff --git a/Test/spv.texture.vert b/Test/spv.texture.vert index a135b9d7..9b03bba0 100644 --- a/Test/spv.texture.vert +++ b/Test/spv.texture.vert @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform sampler1D texSampler1D; uniform sampler2D texSampler2D; diff --git a/Test/spv.types.frag b/Test/spv.types.frag index 48701d89..038ebd4d 100644 --- a/Test/spv.types.frag +++ b/Test/spv.types.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform bool u_b; uniform bvec2 u_b2; diff --git a/Test/spv.uint.frag b/Test/spv.uint.frag index 551ef16f..eea01665 100644 --- a/Test/spv.uint.frag +++ b/Test/spv.uint.frag @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es precision mediump float; flat in uvec2 t; in float f; diff --git a/Test/spv.uniformArray.frag b/Test/spv.uniformArray.frag index 7db28764..11a353a5 100644 --- a/Test/spv.uniformArray.frag +++ b/Test/spv.uniformArray.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform sampler2D texSampler2D; uniform vec3 inColor; uniform vec4 color[6]; diff --git a/Test/spv.variableArrayIndex.frag b/Test/spv.variableArrayIndex.frag index 67fbf93e..2d28c234 100644 --- a/Test/spv.variableArrayIndex.frag +++ b/Test/spv.variableArrayIndex.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; +in vec2 coord; struct lunarStruct1 { int i; diff --git a/Test/spv.varyingArray.frag b/Test/spv.varyingArray.frag index 4bd6f942..f6e043f2 100644 --- a/Test/spv.varyingArray.frag +++ b/Test/spv.varyingArray.frag @@ -1,19 +1,19 @@ -#version 130 +#version 140 uniform sampler2D texSampler2D; -varying vec4 color; -varying float alpha; +in vec4 color; +in float alpha; -varying vec4 gl_TexCoord[6]; +in vec4 TexCoord[6]; -varying vec4 foo[3]; +in vec4 foo[3]; void main() { - vec4 texColor = texture(texSampler2D, vec2(gl_TexCoord[4] + gl_TexCoord[5])); + vec4 texColor = texture(texSampler2D, vec2(TexCoord[4] + TexCoord[5])); texColor += color; texColor.a = alpha; - gl_FragColor = foo[1] + gl_TexCoord[0] + gl_TexCoord[4] + texColor; + gl_FragColor = foo[1] + TexCoord[0] + TexCoord[4] + texColor; } diff --git a/Test/spv.varyingArrayIndirect.frag b/Test/spv.varyingArrayIndirect.frag index e424e6e7..2ab5e205 100644 --- a/Test/spv.varyingArrayIndirect.frag +++ b/Test/spv.varyingArrayIndirect.frag @@ -1,21 +1,21 @@ -#version 130 +#version 140 uniform sampler2D texSampler2D; -varying vec4 color; -varying float alpha; +in vec4 color; +in float alpha; -varying vec4 gl_TexCoord[6]; +in vec4 TexCoord[6]; -varying vec4 userIn[2]; +in vec4 userIn[2]; uniform int a, b; void main() { - vec4 texColor = texture(texSampler2D, vec2(userIn[b] + gl_TexCoord[a] + gl_TexCoord[5])); + vec4 texColor = texture(texSampler2D, vec2(userIn[b] + TexCoord[a] + TexCoord[5])); texColor += color; texColor.a = alpha; - gl_FragColor = gl_TexCoord[0] + gl_TexCoord[b] + texColor + userIn[a]; + gl_FragColor = TexCoord[0] + TexCoord[b] + texColor + userIn[a]; } diff --git a/Test/spv.voidFunction.frag b/Test/spv.voidFunction.frag index 4767f7ab..6658ada2 100644 --- a/Test/spv.voidFunction.frag +++ b/Test/spv.voidFunction.frag @@ -1,7 +1,7 @@ -#version 120 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; float bar = 2.0; diff --git a/Test/spv.while-continue-break.vert b/Test/spv.while-continue-break.vert index 751e265c..c81e8d28 100644 --- a/Test/spv.while-continue-break.vert +++ b/Test/spv.while-continue-break.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; int A, B, C, D; diff --git a/Test/spv.while-simple.vert b/Test/spv.while-simple.vert index 701dc102..0f38325d 100644 --- a/Test/spv.while-simple.vert +++ b/Test/spv.while-simple.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; while (i<10) { diff --git a/Test/spv.whileLoop.frag b/Test/spv.whileLoop.frag index a9541f91..ef577213 100644 --- a/Test/spv.whileLoop.frag +++ b/Test/spv.whileLoop.frag @@ -1,7 +1,7 @@ -#version 110 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; void main() diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 7d952c65..73684938 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1530,7 +1530,7 @@ extern bool PureOperatorBuiltins; // void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermAggregate& callNode) { - // Further maintainance of this function is deprecated, because the "correct" + // Further maintenance of this function is deprecated, because the "correct" // future-oriented design is to not have to do string compares on function names. // If PureOperatorBuiltins == true, then all built-ins should be mapped diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index 3a07691a..a2d7181e 100644 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -111,7 +111,7 @@ enum EPrecisionClass { // A process-global symbol table per version per profile for built-ins common // to multiple stages (languages), and a process-global symbol table per version // per profile per stage for built-ins unique to each stage. They will be sparsely -// populated, so they will only only be generated as needed. +// populated, so they will only be generated as needed. // // Each has a different set of built-ins, and we want to preserve that from // compile to compile. @@ -306,7 +306,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, int spv) glslang::ReleaseGlobalLock(); } -bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNotFirst, int defaultVersion, int& version, EProfile& profile) +bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNotFirst, int defaultVersion, int& version, EProfile& profile, int spv) { const int FirstProfileVersion = 150; bool correct = true; @@ -397,7 +397,24 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines"); } - // A metacheck on the condition of the compiler itself... + // Check for SPIR-V compatibility + if (spv > 0) { + if (profile == EEsProfile) { + if (version < 310) { + correct = false; + infoSink.info.message(EPrefixError, "#version: ES shaders for SPIR-V require version 310 or higher"); + version = 310; + } + } else { + if (version < 140) { + correct = false; + infoSink.info.message(EPrefixError, "#version: Desktop shaders for SPIR-V require version 140 or higher"); + version = 140; + } + } + } + + // A meta check on the condition of the compiler itself... switch (version) { // ES versions @@ -532,7 +549,9 @@ bool ProcessDeferred( version = defaultVersion; profile = defaultProfile; } - bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, version, profile); + + int spv = (messages & EShMsgSpvRules) ? 100 : 0; + bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, version, profile, spv); bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); bool warnVersionNotFirst = false; if (! versionWillBeError && versionNotFirstToken) { @@ -542,7 +561,6 @@ bool ProcessDeferred( versionWillBeError = true; } - int spv = (messages & EShMsgSpvRules) ? 100 : 0; intermediate.setVersion(version); intermediate.setProfile(profile); intermediate.setSpv(spv); From 9d565d9ef802c6984122d182bc1fc477dd5e07ba Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 22 Jan 2016 18:27:05 -0700 Subject: [PATCH 42/84] Todo: removed Todo.txt, and migrated to issues, closing issue #13. --- Todo.txt | 320 ------------------------------------------------------- 1 file changed, 320 deletions(-) delete mode 100644 Todo.txt diff --git a/Todo.txt b/Todo.txt deleted file mode 100644 index 57d1a8fc..00000000 --- a/Todo.txt +++ /dev/null @@ -1,320 +0,0 @@ -Current Compilation Full-Functionality Level: ESSL 1.00-3.00, GLSL 1.10-3.30 - -Key: - + means something got completed - - means something has not yet been done - [Name] means Name is working on it - -Summary of main missing features: - -AEP - + GL_KHR_blend_equation_advanced - + GL_OES_sample_variables - + GL_OES_shader_image_atomic - + GL_OES_shader_multisample_interpolation - + GL_OES_texture_storage_multisample_2d_array - + GL_EXT_geometry_shader - + GL_EXT_geometry_point_size - + GL_EXT_gpu_shader5 - + GL_EXT_primitive_bounding_box - + GL_EXT_shader_io_blocks - + GL_EXT_tessellation_shader - + GL_EXT_tessellation_point_size - + GL_EXT_texture_buffer - + GL_EXT_texture_cube_map_array - -Missing features in ES 3.1 - + Arrays of arrays - + .length() on run-time array - -Missing desktop features that are in EAP - + per-sample shading - - "precise" - -Missing desktop features, non AEP - - subroutines - - built-in functions for type 'double' - - second-generation function-overloading disambiguation algorithm (version 400) - - Preprocessor token pasting (##), ## does macro expansion after pasting not before - + textureQueryLevels and textureQueryLod - -Bugs - - implicitly-sized gl_ClipDistance[] (at least in tessellation shaders) with sizes greater than one are not getting sizes greater than one - -+ create version system - -Link Validation - + provide input config file for setting limits - - also consider spitting out measures of complexity - + ensure no static references thrown away - - generate static use of object even if the only use is to access the length of its array - Cross-stage linking - - type consistency check of uniform and ins <-> outs, both variables and blocks, stage-specific arrayness matching - - location/binding/index check - - mixed es/non-es profiles - - statically consumed input not produced by previous stage - - give error for sharing a packed block - - 1.2: matching initializers for uniforms - - 1.3: only statically used built-ins have to be redeclared as flat - - 1.5: matching between gl_PerVertex blocks and gl_PerFragment blocks - - 1.3: deprecated mixing fixed vertex/fragment stage with programmable fragment/vertex stage. - + 4.0: tessellation primitive, vertices, spacing, order, - - 4.3: compute shader not combined with any other stages - - 4.3: remove cross-version linking restrictions. - - 4.3: Allow mismatches in interpolation and auxiliary qualification across stages. - - 4.4: A stage contains two different blocks, each with no instance name, where the blocks contain a member with the same name. - Intra-stage linking, single shader - + recursion for functions - - limits checking: - + bindings - - number of input/output compononents - + tessellation limits - + tessellation primitive array sizing consistency - + Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords - + Non ES: gl_ClipDistance ... - - ... - + exactly one main - + ES 3.0: fragment outputs all have locations, if more than one - + location aliasing/overlap (except desktop vertex shader inputs) - + binding overlap for atomic counters - + Non ES: geometry shader input array sizes and input layout qualifier declaration - + Non ES: read or write to both gl_ClipVertex and gl_ClipDistance - + Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared - + 1.50: match between all explicit input array sizes and input primitive - + 1.50: at least one geometry shader says input primitive and at least one says output primitive... - + 1.50: at least one geometry shader says max_vertices... - + 1.50: origin_upper_left and pixel_center_integer have to match - - Even the potential for recursion through subroutine uniforms is an error. - - 4.4: An interface contains two different blocks, each with no instance name, where the blocks contain a member with the same name. - - 4.4: component aliasing (except desktop vertex shader inputs) - - 4.4: overlapping transform/feedback offsets, offset/stride overflow checks, and stride matching - Intra-stage linking, multiple shader (Non-ES) - + type consistency check of uniforms, globals, ins, and outs - + value checking of global const initializers - + value checking of uniform initializers - + location match - - block matching - + component/binding/index/offset match check - + compute shader layout(local_size_*) matching - + mixed es/non-es profiles are an error - - binding overlap for atomic counters - - matching redeclarations of interface blocks - - 4.3: implicit array sizing is cross shader within a stage - - 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 - -Shader Functionality to Implement/Finish - ESSL 2.0 (#version 100) - + implement non-inductive loop limitation detection - + implement non-inductive array accesses limitation detection - ESSL 3.0 - - "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions - ESSL 3.1 - + Compute shaders - + Shader storage buffer objects - - Arrays of arrays - + Atomic counters - + Images - + Separate program objects (also known as separate shader objects) - + Explicit uniform locations - + Texture gather - + Bitfield operations - + Integer mix function - + overlapping bindings/offsets and offset post increment - + frexp/ldexp - + packUnorm4x8(),packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8() - + 2DMS samplers and images - + inheritance of memory qualifiers in block members - GLSL 1.2 - + Handle multiple compilation units per stage - + Allow initializers on uniform declarations - + signature matching takes type conversions into account, ambiguity is an error - GLSL 1.3 - + flat redeclaration of built-in variables - - Preprocessor token pasting (##), ## does macro expansion after pasting not before - + non-perspective (linear) interpolation (noperspective) - + add gl_ClipDistance[] to both vertex and fragment shaders - + Deprecated gl_ClipVertex - + deprecate almost all built-in state - + ftransform() is deprecated - + Deprecated built-in vertex inputs (attributes) and some outputs (varyings). - GLSL 1.4 (Non-ES) - + rectangular textures - + track as removed in this release, but present in others: - + Use of gl_ClipVertex. Use gl_ClipDistance instead. - + Built-in vertex shader inputs. - + Built-in uniforms except for depth range parameters - + Built-in interface between vertex and fragment: gl_TexCoord, gl_FogFragCoord, and all the color values. - + Built-in two-sided coloring. - + Fixed functionality for a programmable stage. - + ftransform(). Use invariant outputs instead. - GLSL 1.5 (Non-ES) - + Deprecated gl_MaxVaryingComponents - + Add new minimum maximums for gl_MaxVertexOutputComponents, gl_MaxGeometryInputComponents, gl_MaxGeometryOutputComponents, and gl_MaxFragmentInputComponents, - 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). - + Added geometry shaders. This includes targeting layers in FBO rendering. - + geometry shader layouts: they must be declared, telling the system the primitive input and output types and maximum number of vertices. - + Added geometry shader constants. - + Broaden structure usage to include geometry inputs and geometry outputs. - + texel offset limit checking - + 1.50: geometry shaders: max_vertices must be checked against gl_MaxGeometryOutputVertices (maybe at compile time) - GLSL 3.3 - + Add ARB_explicit_attrib_location extension - + Add ARB_shader_bit_encoding extension - GLSL 4.0 - + tessellation control stage and tessellation evaluation stage. Includes barrier() built-in for synchronization. - + patch in, patch out - + input/output arrays - + unsized array sizing to gl_MaxPatchVertices, including gl_in/gl_out - + built-in variables, functions, and constants verification - + layout qualifiers for primitive types - - 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 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.) - + Added new built-in floating-point functions - + frexp() and ldexp() - + packUnorm2x16(), unpackUnorm2x16(), - + packUnorm4x8(), packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8() - + packDouble2x32() and unpackDouble2x32() - + Add new built-in integer functions - + uaddCarry() and usubBorrow() - + umulExtended() and imulExtended() - + bitfieldExtract() and bitfieldInsert() - + 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 - + 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 - + early_fragment_tests - + 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_FragDepth layout 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. - + 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. - + 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 vec2 instead of vec3 for coordinate in textureGather*(sampler2DRect,...). - + Clarify that textureGatherOffset() can take non-constants for the offsets. - GLSL 4.3 - + Add shader storage buffer objects, as per the ARB_shader_storage_buffer_object extension. This includes - + allowing the last member of a storage buffer block to be an array that does not know its size until render time - + read/write memory shared with the application and other shader invocations - + adding the std430 layout qualifier for shader storage blocks - + add atomic built-ins - + layout(binding=) - - 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: - - All arrays are inherently homogeneous, except for arrays of the new shader storage buffer objects - - 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. - - 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_arrays extension. - + Compute shaders are now supported, as per the GL_ARB_compute_shader extension. - + Added imageSize() built-ins to query the dimensions of an image. - - Allow explicit locations/indexes to be assigned to 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. - + 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_MaxFragmentImageUniforms and gl_MaxCombinedImageUniforms to 8. - - Clarify textureSize() for cube map arrays. - - For layout qualifiers, - + make negative output locations a compile-time error, once integer expressions are allowed in layouts - - make indexes outside the range [0,1] a compile-time error. - + 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. - - Clarify fragment output variables cannot be double precision. - + 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. - + 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 component layout 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. - GLSL 4.5 - + Incorporate the ARB_ES3_1_compatibility extension - + Supports OpenGL ES 310 shaders. - + Adds imageAtomicExchange() built-in function for floating-point images. - + Adds coherent to atomic and image-atomic built-in function parameters. - + Adds gl_HelperInvocation built-in variable to say whether a fragment shader invocation is - only as a helper, so the shader can skip code not needed or harmful when in a helper invocation. - + Adds gl_MaxSamplesbuilt-in constant, and several other built-in constants. - + Adds mix() built-in functions for selection of int, uint, andbool components. - + Incorporate the GL_ARB_shader_texture_image_samples extension to query how many samples are in a multi-sample texture or image. - + Incorporate the GL_ARB_cull_distance extensions to add the built-in variable gl_CullDistance[] , which will cull whole primitives. - + Incorporate the GL_ARB_derivative_control extension From 9df51caba93073eccab1fe506fa43e84719e4b61 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 1 Feb 2016 11:57:33 -0700 Subject: [PATCH 43/84] Fix front-end bug: Constant folding of array-of-struct index op. If a constant object was both an array and a structure, and was indexed with a constant, the arrayness was ignored and the wrong subconstant selected. This fixes that. --- Test/baseResults/constFold.frag.out | 36 +++++++++++++++++++++++++ Test/constFold.frag | 12 +++++++++ glslang/MachineIndependent/Constant.cpp | 15 +++++++---- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/Test/baseResults/constFold.frag.out b/Test/baseResults/constFold.frag.out index c03d865d..f5c3e9c5 100644 --- a/Test/baseResults/constFold.frag.out +++ b/Test/baseResults/constFold.frag.out @@ -270,6 +270,14 @@ ERROR: node is still EOpNull! 0:128 76.000000 0:128 59.000000 0:128 88.000000 +0:138 Function Definition: foo4( (global void) +0:138 Function Parameters: +0:140 Sequence +0:140 Sequence +0:140 move second child to first child (temp int) +0:140 'a' (temp int) +0:140 Constant: +0:140 9 (const int) 0:? Linker Objects 0:? 'a' (const int) 0:? 1 (const int) @@ -356,6 +364,16 @@ ERROR: node is still EOpNull! 0:? 13.000000 0:? 14.000000 0:? 15.000000 +0:? 'a0' (const 3-element array of structure{global int i, global float f, global bool b}) +0:? 3 (const int) +0:? 2.000000 +0:? true (const bool) +0:? 1 (const int) +0:? 5.000000 +0:? true (const bool) +0:? 1 (const int) +0:? 9.000000 +0:? false (const bool) Linked fragment stage: @@ -622,6 +640,14 @@ ERROR: node is still EOpNull! 0:128 76.000000 0:128 59.000000 0:128 88.000000 +0:138 Function Definition: foo4( (global void) +0:138 Function Parameters: +0:140 Sequence +0:140 Sequence +0:140 move second child to first child (temp int) +0:140 'a' (temp int) +0:140 Constant: +0:140 9 (const int) 0:? Linker Objects 0:? 'a' (const int) 0:? 1 (const int) @@ -708,4 +734,14 @@ ERROR: node is still EOpNull! 0:? 13.000000 0:? 14.000000 0:? 15.000000 +0:? 'a0' (const 3-element array of structure{global int i, global float f, global bool b}) +0:? 3 (const int) +0:? 2.000000 +0:? true (const bool) +0:? 1 (const int) +0:? 5.000000 +0:? true (const bool) +0:? 1 (const int) +0:? 9.000000 +0:? false (const bool) diff --git a/Test/constFold.frag b/Test/constFold.frag index 81c718c9..97c3b2b6 100644 --- a/Test/constFold.frag +++ b/Test/constFold.frag @@ -127,3 +127,15 @@ void foo3() { mat3x2 r32 = mm2 * mm32; } + +struct cag { + int i; + float f; + bool b; +}; +const cag a0[3] = cag[3](cag(3, 2.0, true), cag(1, 5.0, true), cag(1, 9.0, false)); + +void foo4() +{ + int a = int(a0[2].f); +} \ No newline at end of file diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp index a0bb8ded..b4d0695c 100644 --- a/glslang/MachineIndependent/Constant.cpp +++ b/glslang/MachineIndependent/Constant.cpp @@ -852,7 +852,7 @@ TIntermTyped* TIntermediate::foldConstructor(TIntermAggregate* aggrNode) // // Constant folding of a bracket (array-style) dereference or struct-like dot -// dereference. Can handle any thing except a multi-character swizzle, though +// dereference. Can handle anything except a multi-character swizzle, though // all swizzles may go to foldSwizzle(). // TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, const TSourceLoc& loc) @@ -861,14 +861,19 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons dereferencedType.getQualifier().storage = EvqConst; TIntermTyped* result = 0; int size = dereferencedType.computeNumComponents(); - + + // arrays, vectors, matrices, all use simple multiplicative math + // while structures need to add up heterogeneous members int start; - if (node->isStruct()) { + if (node->isArray() || ! node->isStruct()) + start = size * index; + else { + // it is a structure + assert(node->isStruct()); start = 0; for (int i = 0; i < index; ++i) start += (*node->getType().getStruct())[i].type->computeNumComponents(); - } else - start = size * index; + } result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc); From 9218759ebb760a19c8e74a9c257fb1c5935c53fc Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 1 Feb 2016 13:45:25 -0700 Subject: [PATCH 44/84] SPV: Address superset of issue #151: missing OpCapability instructions. This commit adds: CapabilityGeometryPointSize CapabilityTessellationPointSize CapabilityClipDistance CapabilityCullDistance CapabilityMultiViewport CapabilityTransformFeedback CapabilityGeometryStreams CapabilityDerivativeControl CapabilityInterpolationFunction --- SPIRV/GlslangToSpv.cpp | 69 +++++++++++++++++++++---- SPIRV/SpvBuilder.h | 5 +- Test/baseResults/spv.130.frag.out | 1 + Test/baseResults/spv.140.frag.out | 1 + Test/baseResults/spv.150.geom.out | 3 ++ Test/baseResults/spv.150.vert.out | 1 + Test/baseResults/spv.330.geom.out | 2 + Test/baseResults/spv.400.frag.out | 1 + Test/baseResults/spv.400.tesc.out | 2 + Test/baseResults/spv.400.tese.out | 2 + Test/baseResults/spv.420.geom.out | 2 + Test/baseResults/spv.430.vert.out | 1 + Test/baseResults/spv.bool.vert.out | 2 + Test/baseResults/spv.interpOps.frag.out | 1 + 14 files changed, 80 insertions(+), 13 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 2a11d8ee..a75c7caf 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -88,6 +88,7 @@ public: void dumpSpv(std::vector& out); protected: + spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable); spv::Id createSpvVariable(const glslang::TIntermSymbol*); spv::Id getSampledType(const glslang::TSampler&); spv::Id convertGlslangToSpvType(const glslang::TType& type); @@ -120,6 +121,7 @@ protected: void addDecoration(spv::Id id, spv::Decoration dec); void addDecoration(spv::Id id, spv::Decoration dec, unsigned value); void addMemberDecoration(spv::Id id, int member, spv::Decoration dec); + void addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value); spv::Id createSpvSpecConstant(const glslang::TIntermTyped&); spv::Id createSpvConstant(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant); bool isTrivialLeaf(const glslang::TIntermTyped* node); @@ -319,7 +321,7 @@ spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qual return (spv::Decoration)spv::BadValue; } -// If glslang type is invaraiant, return SPIR-V invariant decoration. +// If glslang type is invariant, return SPIR-V invariant decoration. spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifier) { if (qualifier.invariant) @@ -329,13 +331,34 @@ spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifie } // Translate glslang built-in variable to SPIR-V built in decoration. -spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn) +spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn) { switch (builtIn) { + case glslang::EbvPointSize: + switch (glslangIntermediate->getStage()) { + case EShLangGeometry: + builder.addCapability(spv::CapabilityGeometryPointSize); + break; + case EShLangTessControl: + case EShLangTessEvaluation: + builder.addCapability(spv::CapabilityTessellationPointSize); + break; + } + return spv::BuiltInPointSize; + + case glslang::EbvClipDistance: + builder.addCapability(spv::CapabilityClipDistance); + return spv::BuiltInClipDistance; + + case glslang::EbvCullDistance: + builder.addCapability(spv::CapabilityCullDistance); + return spv::BuiltInCullDistance; + + case glslang::EbvViewportIndex: + // TODO: builder.addCapability(spv::CapabilityMultiViewport); + return spv::BuiltInViewportIndex; + case glslang::EbvPosition: return spv::BuiltInPosition; - case glslang::EbvPointSize: return spv::BuiltInPointSize; - case glslang::EbvClipDistance: return spv::BuiltInClipDistance; - case glslang::EbvCullDistance: return spv::BuiltInCullDistance; case glslang::EbvVertexId: return spv::BuiltInVertexId; case glslang::EbvInstanceId: return spv::BuiltInInstanceId; case glslang::EbvBaseVertex: @@ -347,7 +370,6 @@ spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn) case glslang::EbvPrimitiveId: return spv::BuiltInPrimitiveId; case glslang::EbvInvocationId: return spv::BuiltInInvocationId; case glslang::EbvLayer: return spv::BuiltInLayer; - case glslang::EbvViewportIndex: return spv::BuiltInViewportIndex; case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner; case glslang::EbvTessLevelOuter: return spv::BuiltInTessLevelOuter; case glslang::EbvTessCoord: return spv::BuiltInTessCoord; @@ -476,8 +498,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls // Add the top-level modes for this shader. - if (glslangIntermediate->getXfbMode()) + if (glslangIntermediate->getXfbMode()) { + builder.addCapability(spv::CapabilityTransformFeedback); builder.addExecutionMode(shaderEntry, spv::ExecutionModeXfb); + } unsigned int mode; switch (glslangIntermediate->getStage()) { @@ -1659,16 +1683,19 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // built-in variable decorations spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangType.getQualifier().builtIn); if (builtIn != spv::BadValue) - builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn); + addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn); } } // Decorate the structure addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); addDecoration(spvType, TranslateBlockDecoration(type)); - if (type.getQualifier().hasStream()) + if (type.getQualifier().hasStream()) { + builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(spvType, spv::DecorationStream, type.getQualifier().layoutStream); + } if (glslangIntermediate->getXfbMode()) { + builder.addCapability(spv::CapabilityTransformFeedback); if (type.getQualifier().hasXfbStride()) builder.addDecoration(spvType, spv::DecorationXfbStride, type.getQualifier().layoutXfbStride); if (type.getQualifier().hasXfbBuffer()) @@ -2787,24 +2814,31 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: unaryOp = spv::OpFwidth; break; case glslang::EOpDPdxFine: + builder.addCapability(spv::CapabilityDerivativeControl); unaryOp = spv::OpDPdxFine; break; case glslang::EOpDPdyFine: + builder.addCapability(spv::CapabilityDerivativeControl); unaryOp = spv::OpDPdyFine; break; case glslang::EOpFwidthFine: + builder.addCapability(spv::CapabilityDerivativeControl); unaryOp = spv::OpFwidthFine; break; case glslang::EOpDPdxCoarse: + builder.addCapability(spv::CapabilityDerivativeControl); unaryOp = spv::OpDPdxCoarse; break; case glslang::EOpDPdyCoarse: + builder.addCapability(spv::CapabilityDerivativeControl); unaryOp = spv::OpDPdyCoarse; break; case glslang::EOpFwidthCoarse: + builder.addCapability(spv::CapabilityDerivativeControl); unaryOp = spv::OpFwidthCoarse; break; case glslang::EOpInterpolateAtCentroid: + builder.addCapability(spv::CapabilityInterpolationFunction); libCall = spv::GLSLstd450InterpolateAtCentroid; break; case glslang::EOpAny: @@ -3180,9 +3214,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: libCall = spv::GLSLstd450Refract; break; case glslang::EOpInterpolateAtSample: + builder.addCapability(spv::CapabilityInterpolationFunction); libCall = spv::GLSLstd450InterpolateAtSample; break; case glslang::EOpInterpolateAtOffset: + builder.addCapability(spv::CapabilityInterpolationFunction); libCall = spv::GLSLstd450InterpolateAtOffset; break; case glslang::EOpAddCarry: @@ -3352,6 +3388,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol if (symbol->getQualifier().hasComponent()) builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent); if (glslangIntermediate->getXfbMode()) { + builder.addCapability(spv::CapabilityTransformFeedback); if (symbol->getQualifier().hasXfbStride()) builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride); if (symbol->getQualifier().hasXfbBuffer()) @@ -3362,13 +3399,16 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier())); - if (symbol->getQualifier().hasStream()) + if (symbol->getQualifier().hasStream()) { + builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(id, spv::DecorationStream, symbol->getQualifier().layoutStream); + } if (symbol->getQualifier().hasSet()) builder.addDecoration(id, spv::DecorationDescriptorSet, symbol->getQualifier().layoutSet); if (symbol->getQualifier().hasBinding()) builder.addDecoration(id, spv::DecorationBinding, symbol->getQualifier().layoutBinding); if (glslangIntermediate->getXfbMode()) { + builder.addCapability(spv::CapabilityTransformFeedback); if (symbol->getQualifier().hasXfbStride()) builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride); if (symbol->getQualifier().hasXfbBuffer()) @@ -3378,7 +3418,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol // built-in variable decorations spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn); if (builtIn != spv::BadValue) - builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); + addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); return id; } @@ -3404,6 +3444,13 @@ void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::De builder.addMemberDecoration(id, (unsigned)member, dec); } +// If 'dec' is valid, add a one-operand decoration to a struct member +void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value) +{ + if (dec != spv::BadValue) + builder.addMemberDecoration(id, (unsigned)member, dec, value); +} + // Make a full tree of instructions to build a SPIR-V specialization constant, // or regularly constant if possible. // diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 33c3ec4b..fbfbfad0 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -55,6 +55,7 @@ #include #include #include +#include namespace spv { @@ -78,7 +79,7 @@ public: memoryModel = mem; } - void addCapability(spv::Capability cap) { capabilities.push_back(cap); } + void addCapability(spv::Capability cap) { capabilities.insert(cap); } // To get a new for anything needing a new one. Id getUniqueId() { return ++uniqueId; } @@ -525,7 +526,7 @@ public: std::vector extensions; AddressingModel addressModel; MemoryModel memoryModel; - std::vector capabilities; + std::set capabilities; int builderNumber; Module module; Block* buildPoint; diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index 7091d5a9..6b47b7dd 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -10,6 +10,7 @@ Linked fragment stage: // Id's are bound by 213 Capability Shader + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index 01b2e472..6028f604 100755 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -8,6 +8,7 @@ Linked fragment stage: // Id's are bound by 101 Capability Shader + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 16 28 33 43 diff --git a/Test/baseResults/spv.150.geom.out b/Test/baseResults/spv.150.geom.out index 31fda5fc..b09f0c04 100755 --- a/Test/baseResults/spv.150.geom.out +++ b/Test/baseResults/spv.150.geom.out @@ -8,6 +8,9 @@ Linked geometry stage: // Id's are bound by 71 Capability Geometry + Capability GeometryPointSize + Capability ClipDistance + Capability GeometryStreams 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Geometry 4 "main" 10 18 29 33 47 49 51 70 diff --git a/Test/baseResults/spv.150.vert.out b/Test/baseResults/spv.150.vert.out index 8767bf80..2a347b40 100755 --- a/Test/baseResults/spv.150.vert.out +++ b/Test/baseResults/spv.150.vert.out @@ -8,6 +8,7 @@ Linked vertex stage: // Id's are bound by 50 Capability Shader + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 13 17 39 48 49 diff --git a/Test/baseResults/spv.330.geom.out b/Test/baseResults/spv.330.geom.out index fb409a9d..55ee35c8 100755 --- a/Test/baseResults/spv.330.geom.out +++ b/Test/baseResults/spv.330.geom.out @@ -8,6 +8,8 @@ Linked geometry stage: // Id's are bound by 32 Capability Geometry + Capability ClipDistance + Capability GeometryStreams 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Geometry 4 "main" 13 20 diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index f0709740..1dcfbd30 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -10,6 +10,7 @@ Linked fragment stage: // Id's are bound by 1104 Capability Shader + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097 diff --git a/Test/baseResults/spv.400.tesc.out b/Test/baseResults/spv.400.tesc.out index 6905c4a0..eea07ce7 100755 --- a/Test/baseResults/spv.400.tesc.out +++ b/Test/baseResults/spv.400.tesc.out @@ -10,6 +10,8 @@ Linked tessellation control stage: // Id's are bound by 93 Capability Tessellation + Capability TessellationPointSize + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint TessellationControl 4 "main" 23 40 43 46 52 66 73 79 83 84 87 88 91 92 diff --git a/Test/baseResults/spv.400.tese.out b/Test/baseResults/spv.400.tese.out index 325da158..03e181ce 100755 --- a/Test/baseResults/spv.400.tese.out +++ b/Test/baseResults/spv.400.tese.out @@ -10,6 +10,8 @@ Linked tessellation evaluation stage: // Id's are bound by 98 Capability Tessellation + Capability TessellationPointSize + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint TessellationEvaluation 4 "main" 21 38 41 47 53 61 68 77 81 82 86 90 93 94 97 diff --git a/Test/baseResults/spv.420.geom.out b/Test/baseResults/spv.420.geom.out index 3ba3dacb..0d659c5b 100644 --- a/Test/baseResults/spv.420.geom.out +++ b/Test/baseResults/spv.420.geom.out @@ -10,6 +10,8 @@ Linked geometry stage: // Id's are bound by 74 Capability Geometry + Capability GeometryPointSize + Capability GeometryStreams 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Geometry 4 "main" 14 23 28 33 46 diff --git a/Test/baseResults/spv.430.vert.out b/Test/baseResults/spv.430.vert.out index 750fff07..2bf2aafd 100755 --- a/Test/baseResults/spv.430.vert.out +++ b/Test/baseResults/spv.430.vert.out @@ -10,6 +10,7 @@ Linked vertex stage: // Id's are bound by 69 Capability Shader + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 12 23 34 44 45 65 67 68 diff --git a/Test/baseResults/spv.bool.vert.out b/Test/baseResults/spv.bool.vert.out index 0fece207..7f85e6b0 100644 --- a/Test/baseResults/spv.bool.vert.out +++ b/Test/baseResults/spv.bool.vert.out @@ -10,6 +10,8 @@ Linked vertex stage: // Id's are bound by 50 Capability Shader + Capability ClipDistance + Capability CullDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 24 48 49 diff --git a/Test/baseResults/spv.interpOps.frag.out b/Test/baseResults/spv.interpOps.frag.out index ef701f02..c132b441 100644 --- a/Test/baseResults/spv.interpOps.frag.out +++ b/Test/baseResults/spv.interpOps.frag.out @@ -10,6 +10,7 @@ Linked fragment stage: // Id's are bound by 101 Capability Shader + Capability InterpolationFunction 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 13 24 33 41 99 From 3bb040b71b45b25227465f0ba8113ea7fcd224bd Mon Sep 17 00:00:00 2001 From: GregF Date: Tue, 5 Jan 2016 08:41:59 -0700 Subject: [PATCH 45/84] spirv-remap: handle OperandImageOperands during remap --- SPIRV/SPVRemapper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 9beba211..2d42f443 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -481,6 +481,7 @@ namespace spv { case spv::OperandExecutionMode: case spv::OperandStorage: case spv::OperandDimensionality: + case spv::OperandImageOperands: case spv::OperandDecoration: case spv::OperandBuiltIn: case spv::OperandSelect: From 796e15ad277b33e4405c1146b06413d57f478c70 Mon Sep 17 00:00:00 2001 From: GregF Date: Tue, 5 Jan 2016 13:00:04 -0700 Subject: [PATCH 46/84] spirv-remap: inhibit loadstore opt if variable ref'd by other instructions --- SPIRV/SPVRemapper.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 2d42f443..3fa233cb 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -727,13 +727,16 @@ namespace spv { const int wordCount = asWordCount(start); // Add local variables to the map - if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) == 4)) + if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) == 4)) { fnLocalVars.insert(asId(start+2)); + return true; + } // Ignore process vars referenced via access chain if ((opCode == spv::OpAccessChain || opCode == spv::OpInBoundsAccessChain) && fnLocalVars.count(asId(start+3)) > 0) { fnLocalVars.erase(asId(start+3)); idMap.erase(asId(start+3)); + return true; } if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) { @@ -748,6 +751,7 @@ namespace spv { fnLocalVars.erase(asId(start+3)); idMap.erase(asId(start+3)); } + return true; } if (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) { @@ -764,11 +768,20 @@ namespace spv { fnLocalVars.erase(asId(start+3)); idMap.erase(asId(start+3)); } + return true; } - return true; + return false; }, - op_fn_nop); + + // If local var id used anywhere else, don't eliminate + [&](spv::Id& id) { + if (fnLocalVars.count(id) > 0) { + fnLocalVars.erase(id); + idMap.erase(id); + } + } + ); process( [&](spv::Op opCode, unsigned start) { From 036a7944e59079067f9efd059fe55a4fd86f5863 Mon Sep 17 00:00:00 2001 From: GregF Date: Tue, 5 Jan 2016 16:41:29 -0700 Subject: [PATCH 47/84] spirv-remap: assert on unhandled OperandClass --- SPIRV/SPVRemapper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 3fa233cb..ff5bb647 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -497,6 +497,7 @@ namespace spv { break; default: + assert(0 && "Unhandled Operand Class"); break; } } From 8548bab1fa3979a6d03da809f719d07d589b201e Mon Sep 17 00:00:00 2001 From: GregF Date: Mon, 1 Feb 2016 16:44:57 -0700 Subject: [PATCH 48/84] spirv-remap: Fixed strings not at end of operands, fixed L/S defect Also added new op classes. --- SPIRV/SPVRemapper.cpp | 118 +++++++++++++++++++++++++++++++----------- SPIRV/SPVRemapper.h | 4 +- 2 files changed, 90 insertions(+), 32 deletions(-) diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index ff5bb647..a6290477 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -140,20 +140,17 @@ namespace spv { } } - bool spirvbin_t::isFlowCtrlOpen(spv::Op opCode) const + bool spirvbin_t::isFlowCtrl(spv::Op opCode) const { switch (opCode) { case spv::OpBranchConditional: - case spv::OpSwitch: return true; - default: return false; - } - } - - bool spirvbin_t::isFlowCtrlClose(spv::Op opCode) const - { - switch (opCode) { + case spv::OpBranch: + case spv::OpSwitch: case spv::OpLoopMerge: - case spv::OpSelectionMerge: return true; + case spv::OpSelectionMerge: + case spv::OpLabel: + case spv::OpFunction: + case spv::OpFunctionEnd: return true; default: return false; } } @@ -468,20 +465,36 @@ namespace spv { } return nextInst; - case spv::OperandLiteralString: - // word += literalStringWords(literalString(word)); // for clarity + case spv::OperandLiteralString: { + const int stringWordCount = literalStringWords(literalString(word)); + word += stringWordCount; + numOperands -= (stringWordCount-1); // -1 because for() header post-decrements + break; + } + + // Execution mode might have extra literal operands. Skip them. + case spv::OperandExecutionMode: return nextInst; - // Single word operands we simply ignore, as they hold no IDs + // Single word operands we simply ignore, as they hold no IDs case spv::OperandLiteralNumber: case spv::OperandSource: case spv::OperandExecutionModel: case spv::OperandAddressing: case spv::OperandMemory: - case spv::OperandExecutionMode: case spv::OperandStorage: case spv::OperandDimensionality: + case spv::OperandSamplerAddressingMode: + case spv::OperandSamplerFilterMode: + case spv::OperandSamplerImageFormat: + case spv::OperandImageChannelOrder: + case spv::OperandImageChannelDataType: case spv::OperandImageOperands: + case spv::OperandFPFastMath: + case spv::OperandFPRoundingMode: + case spv::OperandLinkageType: + case spv::OperandAccessQualifier: + case spv::OperandFuncParamAttr: case spv::OperandDecoration: case spv::OperandBuiltIn: case spv::OperandSelect: @@ -493,6 +506,7 @@ namespace spv { case spv::OperandGroupOperation: case spv::OperandKernelEnqueueFlags: case spv::OperandKernelProfilingInfo: + case spv::OperandCapability: ++word; break; @@ -560,7 +574,7 @@ namespace spv { // Window size for context-sensitive canonicalization values // Emperical best size from a single data set. TODO: Would be a good tunable. - // We essentially performa a little convolution around each instruction, + // We essentially perform a little convolution around each instruction, // to capture the flavor of nearby code, to hopefully match to similar // code in other modules. static const unsigned windowSize = 2; @@ -715,18 +729,23 @@ namespace spv { strip(); // strip out data we decided to eliminate } - // remove bodies of uncalled functions + // optimize loads and stores void spirvbin_t::optLoadStore() { - idset_t fnLocalVars; - // Map of load result IDs to what they load - idmap_t idMap; + idset_t fnLocalVars; // candidates for removal (only locals) + idmap_t idMap; // Map of load result IDs to what they load + blockmap_t blockMap; // Map of IDs to blocks they first appear in + int blockNum = 0; // block count, to avoid crossing flow control // Find all the function local pointers stored at most once, and not via access chains process( [&](spv::Op opCode, unsigned start) { const int wordCount = asWordCount(start); + // Count blocks, so we can avoid crossing flow control + if (isFlowCtrl(opCode)) + ++blockNum; + // Add local variables to the map if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) == 4)) { fnLocalVars.insert(asId(start+2)); @@ -741,27 +760,40 @@ namespace spv { } if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) { - // Avoid loads before stores (TODO: why? Crashes driver, but seems like it shouldn't). - if (idMap.find(asId(start+3)) == idMap.end()) { - fnLocalVars.erase(asId(start+3)); - idMap.erase(asId(start+3)); + const spv::Id varId = asId(start+3); + + // Avoid loads before stores + if (idMap.find(varId) == idMap.end()) { + fnLocalVars.erase(varId); + idMap.erase(varId); } // don't do for volatile references if (wordCount > 4 && (spv[start+4] & spv::MemoryAccessVolatileMask)) { - fnLocalVars.erase(asId(start+3)); - idMap.erase(asId(start+3)); + fnLocalVars.erase(varId); + idMap.erase(varId); } + + // Handle flow control + if (blockMap.find(varId) == blockMap.end()) { + blockMap[varId] = blockNum; // track block we found it in. + } else if (blockMap[varId] != blockNum) { + fnLocalVars.erase(varId); // Ignore if crosses flow control + idMap.erase(varId); + } + return true; } if (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) { - if (idMap.find(asId(start+1)) == idMap.end()) { - idMap[asId(start+1)] = asId(start+2); + const spv::Id varId = asId(start+1); + + if (idMap.find(varId) == idMap.end()) { + idMap[varId] = asId(start+2); } else { // Remove if it has more than one store to the same pointer - fnLocalVars.erase(asId(start+1)); - idMap.erase(asId(start+1)); + fnLocalVars.erase(varId); + idMap.erase(varId); } // don't do for volatile references @@ -769,6 +801,15 @@ namespace spv { fnLocalVars.erase(asId(start+3)); idMap.erase(asId(start+3)); } + + // Handle flow control + if (blockMap.find(varId) == blockMap.end()) { + blockMap[varId] = blockNum; // track block we found it in. + } else if (blockMap[varId] != blockNum) { + fnLocalVars.erase(varId); // Ignore if crosses flow control + idMap.erase(varId); + } + return true; } @@ -792,12 +833,27 @@ namespace spv { }, op_fn_nop); + // Chase replacements to their origins, in case there is a chain such as: + // 2 = store 1 + // 3 = load 2 + // 4 = store 3 + // 5 = load 4 + // We want to replace uses of 5 with 1. + for (const auto& idPair : idMap) { + spv::Id id = idPair.first; + while (idMap.find(id) != idMap.end()) // Chase to end of chain + id = idMap[id]; + + idMap[idPair.first] = id; // replace with final result + } + // Remove the load/store/variables for the ones we've discovered process( [&](spv::Op opCode, unsigned start) { if ((opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) || (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) || (opCode == spv::OpVariable && fnLocalVars.count(asId(start+2)) > 0)) { + stripInst(start); return true; } @@ -805,7 +861,9 @@ namespace spv { return false; }, - [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; } + [&](spv::Id& id) { + if (idMap.find(id) != idMap.end()) id = idMap[id]; + } ); strip(); // strip out data we decided to eliminate diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h index 37f995b6..e5e8e1bd 100755 --- a/SPIRV/SPVRemapper.h +++ b/SPIRV/SPVRemapper.h @@ -131,6 +131,7 @@ private: // Local to global, or global to local ID map typedef std::unordered_map idmap_t; typedef std::unordered_set idset_t; + typedef std::unordered_map blockmap_t; void remap(std::uint32_t opts = DO_EVERYTHING); @@ -164,8 +165,7 @@ private: bool isConstOp(spv::Op opCode) const; bool isTypeOp(spv::Op opCode) const; bool isStripOp(spv::Op opCode) const; - bool isFlowCtrlOpen(spv::Op opCode) const; - bool isFlowCtrlClose(spv::Op opCode) const; + bool isFlowCtrl(spv::Op opCode) const; range_t literalRange(spv::Op opCode) const; range_t typeRange(spv::Op opCode) const; range_t constRange(spv::Op opCode) const; From d5ac538e234f61f087a2a624b1b7ffeeeac55dfb Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Mon, 1 Feb 2016 19:13:06 -0800 Subject: [PATCH 49/84] Fix two new Windows build warnings/errors --- SPIRV/SpvBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index ac6283e8..237496e3 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1464,7 +1464,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b Id boolType = makeBoolType(); Id valueType = getTypeId(value1); - Id resultId; + Id resultId = NoResult; int numConstituents = getNumTypeConstituents(valueType); @@ -1480,6 +1480,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b op = equal ? OpFOrdEqual : OpFOrdNotEqual; break; case OpTypeInt: + default: op = equal ? OpIEqual : OpINotEqual; break; case OpTypeBool: From 32cfd49b68cc408ab6df14c423c6ffd83b644946 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Tue, 2 Feb 2016 12:37:46 -0700 Subject: [PATCH 50/84] SPV: RelaxedPrecision: Plumb this through the full AST->SPV translator. --- SPIRV/GlslangToSpv.cpp | 122 ++++++++++------------ SPIRV/SpvBuilder.cpp | 62 ++++++----- SPIRV/SpvBuilder.h | 31 +++--- Test/baseResults/spv.100ops.frag.out | 16 +++ Test/baseResults/spv.300BuiltIns.vert.out | 4 + Test/baseResults/spv.300layout.frag.out | 6 ++ Test/baseResults/spv.intOps.vert.out | 2 + Test/baseResults/spv.precision.frag.out | 62 ++++++++++- Test/baseResults/spv.switch.frag.out | 122 ++++++++++++++++++++++ Test/baseResults/spv.uint.frag.out | 83 +++++++++++++++ Test/spv.precision.frag | 10 ++ 11 files changed, 411 insertions(+), 109 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index a75c7caf..94e37e8f 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -93,6 +93,7 @@ protected: spv::Id getSampledType(const glslang::TSampler&); spv::Id convertGlslangToSpvType(const glslang::TType& type); spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&); + spv::Id accessChainLoad(const glslang::TType& type); glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const; int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix); int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix); @@ -234,7 +235,6 @@ spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type) switch (type.getQualifier().precision) { case glslang::EpqLow: return spv::DecorationRelaxedPrecision; case glslang::EpqMedium: return spv::DecorationRelaxedPrecision; - case glslang::EpqHigh: return spv::NoPrecision; default: return spv::NoPrecision; } @@ -709,12 +709,12 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T // evaluate the right builder.clearAccessChain(); node->getRight()->traverse(this); - spv::Id rValue = builder.accessChainLoad(convertGlslangToSpvType(node->getRight()->getType())); + spv::Id rValue = accessChainLoad(node->getRight()->getType()); if (node->getOp() != glslang::EOpAssign) { // the left is also an r-value builder.setAccessChain(lValue); - spv::Id leftRValue = builder.accessChainLoad(convertGlslangToSpvType(node->getLeft()->getType())); + spv::Id leftRValue = accessChainLoad(node->getLeft()->getType()); // do the operation rValue = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getType()), @@ -782,7 +782,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T // compute the next index in the chain builder.clearAccessChain(); node->getRight()->traverse(this); - spv::Id index = builder.accessChainLoad(convertGlslangToSpvType(node->getRight()->getType())); + spv::Id index = accessChainLoad(node->getRight()->getType()); // restore the saved access chain builder.setAccessChain(partial); @@ -824,21 +824,20 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T // Assume generic binary op... - // Get the operands + // get right operand builder.clearAccessChain(); node->getLeft()->traverse(this); - spv::Id left = builder.accessChainLoad(convertGlslangToSpvType(node->getLeft()->getType())); + spv::Id left = accessChainLoad(node->getLeft()->getType()); + // get left operand builder.clearAccessChain(); node->getRight()->traverse(this); - spv::Id right = builder.accessChainLoad(convertGlslangToSpvType(node->getRight()->getType())); + spv::Id right = accessChainLoad(node->getRight()->getType()); - spv::Id result; - spv::Decoration precision = TranslatePrecisionDecoration(node->getType()); - - result = createBinaryOperation(node->getOp(), precision, - convertGlslangToSpvType(node->getType()), left, right, - node->getLeft()->getType().getBasicType()); + // get result + spv::Id result = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getType()), + convertGlslangToSpvType(node->getType()), left, right, + node->getLeft()->getType().getBasicType()); builder.clearAccessChain(); if (! result) { @@ -896,7 +895,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI node->getOp() == glslang::EOpInterpolateAtCentroid) operand = builder.accessChainGetLValue(); // Special case l-value operands else - operand = builder.accessChainLoad(convertGlslangToSpvType(node->getOperand()->getType())); + operand = accessChainLoad(node->getOperand()->getType()); spv::Decoration precision = TranslatePrecisionDecoration(node->getType()); @@ -1208,11 +1207,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.clearAccessChain(); left->traverse(this); - spv::Id leftId = builder.accessChainLoad(convertGlslangToSpvType(left->getType())); + spv::Id leftId = accessChainLoad(left->getType()); builder.clearAccessChain(); right->traverse(this); - spv::Id rightId = builder.accessChainLoad(convertGlslangToSpvType(right->getType())); + spv::Id rightId = accessChainLoad(right->getType()); result = createBinaryOperation(binOp, precision, convertGlslangToSpvType(node->getType()), leftId, rightId, @@ -1275,7 +1274,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt if (lvalue) operands.push_back(builder.accessChainGetLValue()); else - operands.push_back(builder.accessChainLoad(convertGlslangToSpvType(glslangOperands[arg]->getAsTyped()->getType()))); + operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } if (atomic) { @@ -1325,13 +1324,13 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang node->getCondition()->traverse(this); // make an "if" based on the value created by the condition - spv::Builder::If ifBuilder(builder.accessChainLoad(convertGlslangToSpvType(node->getCondition()->getType())), builder); + spv::Builder::If ifBuilder(accessChainLoad(node->getCondition()->getType()), builder); if (node->getTrueBlock()) { // emit the "then" statement node->getTrueBlock()->traverse(this); if (result) - builder.createStore(builder.accessChainLoad(convertGlslangToSpvType(node->getTrueBlock()->getAsTyped()->getType())), result); + builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result); } if (node->getFalseBlock()) { @@ -1339,7 +1338,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // emit the "else" statement node->getFalseBlock()->traverse(this); if (result) - builder.createStore(builder.accessChainLoad(convertGlslangToSpvType(node->getFalseBlock()->getAsTyped()->getType())), result); + builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result); } ifBuilder.makeEndIf(); @@ -1360,7 +1359,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T { // emit and get the condition before doing anything with switch node->getCondition()->traverse(this); - spv::Id selector = builder.accessChainLoad(convertGlslangToSpvType(node->getCondition()->getAsTyped()->getType())); + spv::Id selector = accessChainLoad(node->getCondition()->getAsTyped()->getType()); // browse the children to sort out code segments int defaultSegment = -1; @@ -1433,7 +1432,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.setBuildPoint(&test); node->getTest()->traverse(this); spv::Id condition = - builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); + accessChainLoad(node->getTest()->getType()); builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); builder.setBuildPoint(&blocks.body); @@ -1463,7 +1462,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn if (node->getTest()) { node->getTest()->traverse(this); spv::Id condition = - builder.accessChainLoad(convertGlslangToSpvType(node->getTest()->getType())); + accessChainLoad(node->getTest()->getType()); builder.createConditionalBranch(condition, &blocks.head, &blocks.merge); } else { // TODO: unless there was a break/return/discard instruction @@ -1497,7 +1496,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T break; case glslang::EOpReturn: if (node->getExpression()) - builder.makeReturn(false, builder.accessChainLoad(convertGlslangToSpvType(node->getExpression()->getType()))); + builder.makeReturn(false, accessChainLoad(node->getExpression()->getType())); else builder.makeReturn(false); @@ -1765,6 +1764,11 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty return spvType; } +spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) +{ + return builder.accessChainLoad(TranslatePrecisionDecoration(type), convertGlslangToSpvType(type)); +} + // Decide whether or not this type should be // decorated with offsets and strides, and if so // whether std140 or std430 rules should be applied. @@ -1885,6 +1889,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF // copy-in/copy-out semantics. They can be handled though with a pointer to a copy. std::vector paramTypes; + std::vector paramPrecisions; glslang::TIntermSequence& parameters = glslFunction->getSequence()[0]->getAsAggregate()->getSequence(); for (int p = 0; p < (int)parameters.size(); ++p) { @@ -1894,12 +1899,14 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF typeId = builder.makePointer(spv::StorageClassFunction, typeId); else constReadOnlyParameters.insert(parameters[p]->getAsSymbolNode()->getId()); + paramPrecisions.push_back(TranslatePrecisionDecoration(paramType)); paramTypes.push_back(typeId); } spv::Block* functionBlock; - spv::Function *function = builder.makeFunctionEntry(convertGlslangToSpvType(glslFunction->getType()), glslFunction->getName().c_str(), - paramTypes, &functionBlock); + spv::Function *function = builder.makeFunctionEntry(TranslatePrecisionDecoration(glslFunction->getType()), + convertGlslangToSpvType(glslFunction->getType()), + glslFunction->getName().c_str(), paramTypes, paramPrecisions, &functionBlock); // Track function to emit/call later functionMap[glslFunction->getName().c_str()] = function; @@ -2028,7 +2035,7 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (lvalue) arguments.push_back(builder.accessChainGetLValue()); else - arguments.push_back(builder.accessChainLoad(convertGlslangToSpvType(glslangArguments[i]->getAsTyped()->getType()))); + arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType())); } } @@ -2036,7 +2043,7 @@ void TGlslangToSpvTraverser::translateArguments(glslang::TIntermUnary& node, std { builder.clearAccessChain(); node.getOperand()->traverse(this); - arguments.push_back(builder.accessChainLoad(convertGlslangToSpvType(node.getOperand()->getType()))); + arguments.push_back(accessChainLoad(node.getOperand()->getType())); } spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermOperator* node) @@ -2241,19 +2248,19 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg // 1. Evaluate the arguments std::vector lValues; std::vector rValues; - std::vector argTypes; + std::vector argTypes; for (int a = 0; a < (int)glslangArgs.size(); ++a) { // build l-value builder.clearAccessChain(); glslangArgs[a]->traverse(this); - argTypes.push_back(convertGlslangToSpvType(glslangArgs[a]->getAsTyped()->getType())); + argTypes.push_back(&glslangArgs[a]->getAsTyped()->getType()); // keep outputs as l-values, evaluate input-only as r-values if (qualifiers[a] != glslang::EvqConstReadOnly) { // save l-value lValues.push_back(builder.getAccessChain()); } else { // process r-value - rValues.push_back(builder.accessChainLoad(argTypes.back())); + rValues.push_back(accessChainLoad(*argTypes.back())); } } @@ -2273,7 +2280,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) { // need to copy the input into output space builder.setAccessChain(lValues[lValueCount]); - spv::Id copy = builder.accessChainLoad(argTypes[a]); + spv::Id copy = accessChainLoad(*argTypes[a]); builder.createStore(copy, arg); } ++lValueCount; @@ -2286,6 +2293,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg // 3. Make the call. spv::Id result = builder.createFunctionCall(function, spvArgs); + builder.setPrecision(result, TranslatePrecisionDecoration(node->getType())); // 4. Copy back out an "out" arguments. lValueCount = 0; @@ -2446,10 +2454,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv if (needMatchingVectors) builder.promoteScalar(precision, left, right); - spv::Id id = builder.createBinOp(binOp, typeId, left, right); - builder.setPrecision(id, precision); - - return id; + return builder.setPrecision(builder.createBinOp(binOp, typeId, left, right), precision); } if (! comparison) @@ -2514,12 +2519,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv break; } - if (binOp != spv::OpNop) { - spv::Id id = builder.createBinOp(binOp, typeId, left, right); - builder.setPrecision(id, precision); - - return id; - } + if (binOp != spv::OpNop) + return builder.setPrecision(builder.createBinOp(binOp, typeId, left, right), precision); return 0; } @@ -2574,12 +2575,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec break; } - if (firstClass) { - spv::Id id = builder.createBinOp(op, typeId, left, right); - builder.setPrecision(id, precision); - - return id; - } + if (firstClass) + return builder.setPrecision(builder.createBinOp(op, typeId, left, right), precision); // Handle component-wise +, -, *, and / for all combinations of type. // The result type of all of them is the same type as the (a) matrix operand. @@ -2619,9 +2616,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec } // put the pieces together - spv::Id id = builder.createCompositeConstruct(typeId, results); - builder.setPrecision(id, precision); - return id; + return builder.setPrecision(builder.createCompositeConstruct(typeId, results), precision); } default: assert(0); @@ -2899,13 +2894,11 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: if (libCall >= 0) { std::vector args; args.push_back(operand); - id = builder.createBuiltinCall(precision, typeId, stdBuiltins, libCall, args); + id = builder.createBuiltinCall(typeId, stdBuiltins, libCall, args); } else id = builder.createUnaryOp(unaryOp, typeId, operand); - builder.setPrecision(id, precision); - - return id; + return builder.setPrecision(id, precision); } // Create a unary operation on a matrix @@ -2935,10 +2928,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, spv::Deco } // put the pieces together - spv::Id id = builder.createCompositeConstruct(typeId, results); - builder.setPrecision(id, precision); - - return id; + return builder.setPrecision(builder.createCompositeConstruct(typeId, results), precision); } spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Decoration precision, spv::Id destType, spv::Id operand) @@ -3031,9 +3021,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec } else result = builder.createUnaryOp(convOp, destType, operand); - builder.setPrecision(result, precision); - - return result; + return builder.setPrecision(result, precision); } spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vectorSize) @@ -3277,7 +3265,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: // Construct the call arguments, without modifying the original operands vector. // We might need the remaining arguments, e.g. in the EOpFrexp case. std::vector callArguments(operands.begin(), operands.begin() + consumedOperands); - id = builder.createBuiltinCall(precision, typeId, stdBuiltins, libCall, callArguments); + id = builder.createBuiltinCall(typeId, stdBuiltins, libCall, callArguments); } else { switch (consumedOperands) { case 0: @@ -3320,9 +3308,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: break; } - builder.setPrecision(id, precision); - - return id; + return builder.setPrecision(id, precision); } // Intrinsics with no arguments, no return value, and no precision. @@ -3644,7 +3630,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan // emit left operand builder.clearAccessChain(); left.traverse(this); - spv::Id leftId = builder.accessChainLoad(boolTypeId); + spv::Id leftId = builder.accessChainLoad(spv::NoPrecision, boolTypeId); // Operands to accumulate OpPhi operands std::vector phiOperands; @@ -3667,7 +3653,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan // emit right operand as the "then" part of the "if" builder.clearAccessChain(); right.traverse(this); - spv::Id rightId = builder.accessChainLoad(boolTypeId); + spv::Id rightId = builder.accessChainLoad(spv::NoPrecision, boolTypeId); // accumulate left operand's phi information phiOperands.push_back(rightId); diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 237496e3..1594da31 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -192,7 +192,7 @@ Id Builder::makeFloatType(int width) // See makeStructResultType() for non-decorated structs // needed as the result of some instructions, which does // check for duplicates. -Id Builder::makeStructType(std::vector& members, const char* name) +Id Builder::makeStructType(const std::vector& members, const char* name) { // Don't look for previous one, because in the general case, // structs can be duplicated except for decorations. @@ -321,7 +321,7 @@ Id Builder::makeRuntimeArray(Id element) return type->getResultId(); } -Id Builder::makeFunctionType(Id returnType, std::vector& paramTypes) +Id Builder::makeFunctionType(Id returnType, const std::vector& paramTypes) { // try to find it Instruction* type; @@ -805,19 +805,28 @@ Function* Builder::makeMain() Block* entry; std::vector params; + std::vector precisions; - mainFunction = makeFunctionEntry(makeVoidType(), "main", params, &entry); + mainFunction = makeFunctionEntry(NoPrecision, makeVoidType(), "main", params, precisions, &entry); return mainFunction; } // Comments in header -Function* Builder::makeFunctionEntry(Id returnType, const char* name, std::vector& paramTypes, Block **entry) +Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, + const std::vector& paramTypes, const std::vector& precisions, Block **entry) { + // Make the function and initial instructions in it Id typeId = makeFunctionType(returnType, paramTypes); Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size()); Function* function = new Function(getUniqueId(), returnType, typeId, firstParamId, module); + // Set up the precisions + setPrecision(function->getId(), precision); + for (unsigned p = 0; p < (unsigned)precisions.size(); ++p) + setPrecision(firstParamId + p, precisions[p]); + + // CFG if (entry) { *entry = new Block(getUniqueId(), *function); function->addBlock(*entry); @@ -1117,10 +1126,10 @@ Id Builder::createFunctionCall(spv::Function* function, std::vector& ar } // Comments in header -Id Builder::createRvalueSwizzle(Id typeId, Id source, std::vector& channels) +Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, std::vector& channels) { if (channels.size() == 1) - return createCompositeExtract(source, typeId, channels.front()); + return setPrecision(createCompositeExtract(source, typeId, channels.front()), precision); Instruction* swizzle = new Instruction(getUniqueId(), typeId, OpVectorShuffle); assert(isVector(source)); @@ -1130,7 +1139,7 @@ Id Builder::createRvalueSwizzle(Id typeId, Id source, std::vector& cha swizzle->addImmediateOperand(channels[i]); buildPoint->addInstruction(std::unique_ptr(swizzle)); - return swizzle->getResultId(); + return setPrecision(swizzle->getResultId(), precision); } // Comments in header @@ -1178,7 +1187,7 @@ void Builder::promoteScalar(Decoration precision, Id& left, Id& right) } // Comments in header -Id Builder::smearScalar(Decoration /*precision*/, Id scalar, Id vectorType) +Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType) { assert(getNumComponents(scalar) == 1); assert(getTypeId(scalar) == getScalarTypeId(vectorType)); @@ -1192,11 +1201,11 @@ Id Builder::smearScalar(Decoration /*precision*/, Id scalar, Id vectorType) smear->addIdOperand(scalar); buildPoint->addInstruction(std::unique_ptr(smear)); - return smear->getResultId(); + return setPrecision(smear->getResultId(), precision); } // Comments in header -Id Builder::createBuiltinCall(Decoration /*precision*/, Id resultType, Id builtins, int entryPoint, std::vector& args) +Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::vector& args) { Instruction* inst = new Instruction(getUniqueId(), resultType, OpExtInst); inst->addIdOperand(builtins); @@ -1205,6 +1214,7 @@ Id Builder::createBuiltinCall(Decoration /*precision*/, Id resultType, Id builti inst->addIdOperand(args[arg]); buildPoint->addInstruction(std::unique_ptr(inst)); + return inst->getResultId(); } @@ -1386,6 +1396,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, // Decode the return type that was a special structure createStore(createCompositeExtract(resultId, typeId1, 1), parameters.texelOut); resultId = createCompositeExtract(resultId, typeId0, 0); + setPrecision(resultId, precision); } else { // When a smear is needed, do it, as per what was computed // above when resultType was changed to a scalar type. @@ -1492,7 +1503,6 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b if (isScalarType(valueType)) { // scalar resultId = createBinOp(op, boolType, value1, value2); - setPrecision(resultId, precision); } else { // vector resultId = createBinOp(op, makeVectorType(boolType, numConstituents), value1, value2); @@ -1501,7 +1511,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b resultId = createUnaryOp(equal ? OpAll : OpAny, boolType, resultId); } - return resultId; + return setPrecision(resultId, precision); } // Only structs, arrays, and matrices should be left. @@ -1521,7 +1531,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b if (constituent == 0) resultId = subResultId; else - resultId = createBinOp(equal ? OpLogicalAnd : OpLogicalOr, boolType, resultId, subResultId); + resultId = setPrecision(createBinOp(equal ? OpLogicalAnd : OpLogicalOr, boolType, resultId, subResultId), precision); } return resultId; @@ -1543,7 +1553,7 @@ Id Builder::createCompositeConstruct(Id typeId, std::vector& constituents) // Vector or scalar constructor Id Builder::createConstructor(Decoration precision, const std::vector& sources, Id resultTypeId) { - Id result = 0; + Id result = NoResult; unsigned int numTargetComponents = getNumTypeComponents(resultTypeId); unsigned int targetComponent = 0; @@ -1566,7 +1576,7 @@ Id Builder::createConstructor(Decoration precision, const std::vector& sourc if (sourceSize > 1) { std::vector swiz; swiz.push_back(s); - arg = createRvalueSwizzle(scalarTypeId, arg, swiz); + arg = createRvalueSwizzle(precision, scalarTypeId, arg, swiz); } if (numTargetComponents > 1) @@ -1583,9 +1593,7 @@ Id Builder::createConstructor(Decoration precision, const std::vector& sourc if (constituents.size() > 0) result = createCompositeConstruct(resultTypeId, constituents); - setPrecision(result, precision); - - return result; + return setPrecision(result, precision); } // Comments in header @@ -1666,11 +1674,13 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector& std::vector vectorComponents; for (int row = 0; row < numRows; ++row) vectorComponents.push_back(ids[col][row]); - matrixColumns.push_back(createCompositeConstruct(columnTypeId, vectorComponents)); + Id column = createCompositeConstruct(columnTypeId, vectorComponents); + setPrecision(column, precision); + matrixColumns.push_back(column); } // make the matrix - return createCompositeConstruct(resultTypeId, matrixColumns); + return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision); } // Comments in header @@ -1895,7 +1905,7 @@ void Builder::accessChainStore(Id rvalue) } // Comments in header -Id Builder::accessChainLoad(Id resultType) +Id Builder::accessChainLoad(Decoration precision, Id resultType) { Id id; @@ -1904,7 +1914,7 @@ Id Builder::accessChainLoad(Id resultType) transferAccessChainSwizzle(false); if (accessChain.indexChain.size() > 0) { Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType; - + // if all the accesses are constants, we can use OpCompositeExtract std::vector indexes; bool constant = true; @@ -1933,12 +1943,14 @@ Id Builder::accessChainLoad(Id resultType) // load through the access chain id = createLoad(collapseAccessChain()); } + setPrecision(id, precision); } else - id = accessChain.base; + id = accessChain.base; // no precision, it was set when this was defined } else { transferAccessChainSwizzle(true); // load through the access chain id = createLoad(collapseAccessChain()); + setPrecision(id, precision); } // Done, unless there are swizzles to do @@ -1952,12 +1964,12 @@ Id Builder::accessChainLoad(Id resultType) Id swizzledType = getScalarTypeId(getTypeId(id)); if (accessChain.swizzle.size() > 1) swizzledType = makeVectorType(swizzledType, (int)accessChain.swizzle.size()); - id = createRvalueSwizzle(swizzledType, id, accessChain.swizzle); + id = createRvalueSwizzle(precision, swizzledType, id, accessChain.swizzle); } // dynamic single-component selection if (accessChain.component != NoResult) - id = createVectorExtractDynamic(id, resultType, accessChain.component); + id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision); return id; } diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index fbfbfad0..00516c82 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -100,13 +100,13 @@ public: Id makeIntType(int width) { return makeIntegerType(width, true); } Id makeUintType(int width) { return makeIntegerType(width, false); } Id makeFloatType(int width); - Id makeStructType(std::vector& members, const char*); + Id makeStructType(const std::vector& members, const char*); Id makeStructResultType(Id type0, Id type1); Id makeVectorType(Id component, int size); Id makeMatrixType(Id component, int cols, int rows); Id makeArrayType(Id element, unsigned size, int stride); // 0 means no stride decoration Id makeRuntimeArray(Id element); - Id makeFunctionType(Id returnType, std::vector& paramTypes); + Id makeFunctionType(Id returnType, const std::vector& paramTypes); Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format); Id makeSamplerType(); Id makeSampledImageType(Id imageType); @@ -210,7 +210,8 @@ public: // Make a shader-style function, and create its entry block if entry is non-zero. // Return the function, pass back the entry. // The returned pointer is only valid for the lifetime of this builder. - Function* makeFunctionEntry(Id returnType, const char* name, std::vector& paramTypes, Block **entry = 0); + Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, const std::vector& paramTypes, + const std::vector& precisions, Block **entry = 0); // Create a return. An 'implicit' return is one not appearing in the source // code. In the case of an implicit return, no post-return block is inserted. @@ -225,7 +226,7 @@ public: // Create a global or function local or IO variable. Id createVariable(StorageClass, Id type, const char* name = 0); - // Create an imtermediate with an undefined value. + // Create an intermediate with an undefined value. Id createUndefined(Id type); // Store into an Id and return the l-value @@ -262,7 +263,7 @@ public: // Take an rvalue (source) and a set of channels to extract from it to // make a new rvalue, which is returned. - Id createRvalueSwizzle(Id typeId, Id source, std::vector& channels); + Id createRvalueSwizzle(Decoration precision, Id typeId, Id source, std::vector& channels); // Take a copy of an lvalue (target) and a source of components, and set the // source components into the lvalue where the 'channels' say to put them. @@ -270,13 +271,15 @@ public: // (No true lvalue or stores are used.) Id createLvalueSwizzle(Id typeId, Id target, Id source, std::vector& channels); - // If the value passed in is an instruction and the precision is not NoPrecision, - // it gets tagged with the requested precision. - void setPrecision(Id /* value */, Decoration precision) + // If both the id and precision are valid, the id + // gets tagged with the requested precision. + // The passed in id is always the returned id, to simplify use patterns. + Id setPrecision(Id id, Decoration precision) { - if (precision != NoPrecision) { - ;// TODO - } + if (precision != NoPrecision && id != NoResult) + addDecoration(id, precision); + + return id; } // Can smear a scalar to a vector for the following forms: @@ -299,7 +302,7 @@ public: Id smearScalar(Decoration precision, Id scalarVal, Id vectorType); // Create a call to a built-in function. - Id createBuiltinCall(Decoration precision, Id resultType, Id builtins, int entryPoint, std::vector& args); + Id createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::vector& args); // List of parameters used to create a texture operation struct TextureParameters { @@ -330,7 +333,7 @@ public: Id createBitFieldExtractCall(Decoration precision, Id, Id, Id, bool isSigned); Id createBitFieldInsertCall(Decoration precision, Id, Id, Id, Id); - // Reduction comparision for composites: For equal and not-equal resulting in a scalar. + // Reduction comparison for composites: For equal and not-equal resulting in a scalar. Id createCompositeCompare(Decoration precision, Id, Id, bool /* true if for equal, false if for not-equal */); // OpCompositeConstruct @@ -498,7 +501,7 @@ public: void accessChainStore(Id rvalue); // use accessChain and swizzle to load an r-value - Id accessChainLoad(Id ResultType); + Id accessChainLoad(Decoration precision, Id ResultType); // get the direct pointer for an l-value Id accessChainGetLValue(); diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out index 82342324..1d00037c 100755 --- a/Test/baseResults/spv.100ops.frag.out +++ b/Test/baseResults/spv.100ops.frag.out @@ -23,12 +23,28 @@ Linked fragment stage: Name 21 "low" Name 26 "high" Name 36 "Color" + Decorate 8(foo() RelaxedPrecision Decorate 11(face1) RelaxedPrecision Decorate 13(face2) RelaxedPrecision Decorate 17(z) RelaxedPrecision Decorate 21(low) RelaxedPrecision + Decorate 22 RelaxedPrecision + Decorate 23 RelaxedPrecision + Decorate 25 RelaxedPrecision Decorate 26(high) RelaxedPrecision + Decorate 27 RelaxedPrecision + Decorate 32 RelaxedPrecision + Decorate 33 RelaxedPrecision Decorate 36(Color) RelaxedPrecision + Decorate 37 RelaxedPrecision + Decorate 38 RelaxedPrecision + Decorate 39 RelaxedPrecision + Decorate 40 RelaxedPrecision + Decorate 41 RelaxedPrecision + Decorate 42 RelaxedPrecision + Decorate 43 RelaxedPrecision + Decorate 44 RelaxedPrecision + Decorate 45 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.300BuiltIns.vert.out b/Test/baseResults/spv.300BuiltIns.vert.out index dbe9fa1d..a8dd6221 100755 --- a/Test/baseResults/spv.300BuiltIns.vert.out +++ b/Test/baseResults/spv.300BuiltIns.vert.out @@ -32,6 +32,10 @@ Linked vertex stage: MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize Decorate 22(gl_PerVertex) Block Decorate 27(ps) RelaxedPrecision + Decorate 28 RelaxedPrecision + Decorate 32 RelaxedPrecision + Decorate 39 RelaxedPrecision + Decorate 42 RelaxedPrecision Decorate 48(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 diff --git a/Test/baseResults/spv.300layout.frag.out b/Test/baseResults/spv.300layout.frag.out index 2876822e..ed39d5a6 100755 --- a/Test/baseResults/spv.300layout.frag.out +++ b/Test/baseResults/spv.300layout.frag.out @@ -27,11 +27,17 @@ Linked fragment stage: Decorate 9(c) RelaxedPrecision Decorate 9(c) Location 7 Decorate 11(color) RelaxedPrecision + Decorate 12 RelaxedPrecision MemberDecorate 13(S) 0 RelaxedPrecision MemberDecorate 13(S) 1 RelaxedPrecision + Decorate 19 RelaxedPrecision + Decorate 20 RelaxedPrecision Decorate 26(p) RelaxedPrecision Decorate 26(p) Location 3 Decorate 29(pos) RelaxedPrecision + Decorate 30 RelaxedPrecision + Decorate 33 RelaxedPrecision + Decorate 34 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.intOps.vert.out b/Test/baseResults/spv.intOps.vert.out index 799d4cf4..86a52190 100644 --- a/Test/baseResults/spv.intOps.vert.out +++ b/Test/baseResults/spv.intOps.vert.out @@ -46,6 +46,8 @@ Linked vertex stage: Name 247 "v4" Name 268 "gl_VertexID" Name 269 "gl_InstanceID" + Decorate 261 RelaxedPrecision + Decorate 265 RelaxedPrecision Decorate 268(gl_VertexID) BuiltIn VertexId Decorate 269(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out index 27e48f1e..f454b857 100755 --- a/Test/baseResults/spv.precision.frag.out +++ b/Test/baseResults/spv.precision.frag.out @@ -7,12 +7,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 114 +// Id's are bound by 127 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 23 59 61 73 + EntryPoint Fragment 4 "main" 23 59 61 73 116 ExecutionMode 4 OriginLowerLeft Source ESSL 310 Name 4 "main" @@ -35,15 +35,58 @@ Linked fragment stage: Name 73 "mediumfout" Name 104 "ub2" Name 105 "param" + Name 114 "S" + MemberName 114(S) 0 "a" + MemberName 114(S) 1 "b" + Name 116 "s" + Decorate 12(foo(vf3;) RelaxedPrecision + Decorate 11(mv3) RelaxedPrecision Decorate 38(sum) RelaxedPrecision Decorate 40(uniform_medium) RelaxedPrecision + Decorate 41 RelaxedPrecision + Decorate 46 RelaxedPrecision Decorate 48(uniform_low) RelaxedPrecision + Decorate 49 RelaxedPrecision + Decorate 50 RelaxedPrecision + Decorate 51 RelaxedPrecision Decorate 53(arg1) RelaxedPrecision Decorate 55(arg2) RelaxedPrecision Decorate 57(d) RelaxedPrecision Decorate 59(lowfin) RelaxedPrecision + Decorate 60 RelaxedPrecision Decorate 61(mediumfin) RelaxedPrecision + Decorate 62 RelaxedPrecision + Decorate 63 RelaxedPrecision Decorate 73(mediumfout) RelaxedPrecision + Decorate 74 RelaxedPrecision + Decorate 75 RelaxedPrecision + Decorate 76 RelaxedPrecision + Decorate 77 RelaxedPrecision + Decorate 78 RelaxedPrecision + Decorate 79 RelaxedPrecision + Decorate 83 RelaxedPrecision + Decorate 85 RelaxedPrecision + Decorate 87 RelaxedPrecision + Decorate 88 RelaxedPrecision + Decorate 90 RelaxedPrecision + Decorate 91 RelaxedPrecision + Decorate 94 RelaxedPrecision + Decorate 95 RelaxedPrecision + Decorate 96 RelaxedPrecision + Decorate 97 RelaxedPrecision + Decorate 98 RelaxedPrecision + Decorate 99 RelaxedPrecision + Decorate 100 RelaxedPrecision + Decorate 101 RelaxedPrecision + Decorate 102 RelaxedPrecision + Decorate 110 RelaxedPrecision + Decorate 112 RelaxedPrecision + Decorate 113 RelaxedPrecision + MemberDecorate 114(S) 1 RelaxedPrecision + Decorate 120 RelaxedPrecision + Decorate 124 RelaxedPrecision + Decorate 125 RelaxedPrecision + Decorate 126 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -85,6 +128,11 @@ Linked fragment stage: 103: TypePointer UniformConstant 15(bvec2) 104(ub2): 103(ptr) Variable UniformConstant 111: 6(float) Constant 1065353216 + 114(S): TypeStruct 6(float) 6(float) + 115: TypePointer Input 114(S) + 116(s): 115(ptr) Variable Input + 117: 36(int) Constant 0 + 122: 36(int) Constant 1 4(main): 2 Function None 3 5: Label 38(sum): 37(ptr) Variable Function @@ -157,6 +205,16 @@ Linked fragment stage: Store 73(mediumfout) 113 Branch 109 109: Label + 118: 58(ptr) AccessChain 116(s) 117 + 119: 6(float) Load 118 + 120: 21(fvec4) Load 73(mediumfout) + 121: 21(fvec4) VectorTimesScalar 120 119 + Store 73(mediumfout) 121 + 123: 58(ptr) AccessChain 116(s) 122 + 124: 6(float) Load 123 + 125: 21(fvec4) Load 73(mediumfout) + 126: 21(fvec4) VectorTimesScalar 125 124 + Store 73(mediumfout) 126 Return FunctionEnd 12(foo(vf3;): 9(fvec2) Function None 10 diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index 74f4463a..f96ec88f 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -42,15 +42,137 @@ Linked fragment stage: Name 246 "param" Name 248 "param" Name 250 "param" + Decorate 15(foo1(vf4;vf4;i1;) RelaxedPrecision + Decorate 12(v1) RelaxedPrecision + Decorate 13(v2) RelaxedPrecision + Decorate 14(i1) RelaxedPrecision + Decorate 20(foo2(vf4;vf4;i1;) RelaxedPrecision + Decorate 17(v1) RelaxedPrecision + Decorate 18(v2) RelaxedPrecision + Decorate 19(i1) RelaxedPrecision + Decorate 22 RelaxedPrecision + Decorate 27 RelaxedPrecision + Decorate 29 RelaxedPrecision + Decorate 31 RelaxedPrecision + Decorate 32 RelaxedPrecision + Decorate 33 RelaxedPrecision + Decorate 40 RelaxedPrecision + Decorate 46 RelaxedPrecision + Decorate 51 RelaxedPrecision + Decorate 53 RelaxedPrecision + Decorate 54 RelaxedPrecision + Decorate 55 RelaxedPrecision Decorate 60(local) RelaxedPrecision Decorate 62(c) RelaxedPrecision + Decorate 63 RelaxedPrecision + Decorate 64 RelaxedPrecision + Decorate 66 RelaxedPrecision + Decorate 67 RelaxedPrecision Decorate 73(f) RelaxedPrecision Decorate 75(x) RelaxedPrecision + Decorate 76 RelaxedPrecision + Decorate 77 RelaxedPrecision + Decorate 79 RelaxedPrecision + Decorate 80 RelaxedPrecision + Decorate 82 RelaxedPrecision + Decorate 83 RelaxedPrecision + Decorate 85 RelaxedPrecision + Decorate 90 RelaxedPrecision + Decorate 91 RelaxedPrecision + Decorate 92 RelaxedPrecision + Decorate 93 RelaxedPrecision + Decorate 94 RelaxedPrecision + Decorate 95 RelaxedPrecision + Decorate 96 RelaxedPrecision + Decorate 97 RelaxedPrecision + Decorate 99 RelaxedPrecision + Decorate 100 RelaxedPrecision + Decorate 101 RelaxedPrecision + Decorate 102 RelaxedPrecision + Decorate 104 RelaxedPrecision + Decorate 108 RelaxedPrecision + Decorate 109 RelaxedPrecision + Decorate 110 RelaxedPrecision + Decorate 111 RelaxedPrecision + Decorate 113 RelaxedPrecision + Decorate 114 RelaxedPrecision + Decorate 115 RelaxedPrecision + Decorate 116 RelaxedPrecision + Decorate 119 RelaxedPrecision + Decorate 124 RelaxedPrecision + Decorate 125 RelaxedPrecision + Decorate 126 RelaxedPrecision + Decorate 127 RelaxedPrecision Decorate 129(d) RelaxedPrecision + Decorate 130 RelaxedPrecision + Decorate 134 RelaxedPrecision + Decorate 135 RelaxedPrecision + Decorate 136 RelaxedPrecision + Decorate 137 RelaxedPrecision + Decorate 138 RelaxedPrecision + Decorate 139 RelaxedPrecision + Decorate 140 RelaxedPrecision + Decorate 142 RelaxedPrecision + Decorate 143 RelaxedPrecision + Decorate 144 RelaxedPrecision + Decorate 145 RelaxedPrecision + Decorate 146 RelaxedPrecision + Decorate 150 RelaxedPrecision + Decorate 151 RelaxedPrecision + Decorate 152 RelaxedPrecision + Decorate 153 RelaxedPrecision Decorate 155(i) RelaxedPrecision + Decorate 162 RelaxedPrecision + Decorate 166 RelaxedPrecision + Decorate 171 RelaxedPrecision + Decorate 172 RelaxedPrecision + Decorate 173 RelaxedPrecision + Decorate 174 RelaxedPrecision Decorate 175(j) RelaxedPrecision + Decorate 182 RelaxedPrecision + Decorate 185 RelaxedPrecision + Decorate 186 RelaxedPrecision + Decorate 187 RelaxedPrecision + Decorate 193 RelaxedPrecision + Decorate 194 RelaxedPrecision + Decorate 196 RelaxedPrecision + Decorate 197 RelaxedPrecision + Decorate 198 RelaxedPrecision + Decorate 199 RelaxedPrecision + Decorate 202 RelaxedPrecision + Decorate 203 RelaxedPrecision + Decorate 204 RelaxedPrecision + Decorate 205 RelaxedPrecision + Decorate 207 RelaxedPrecision + Decorate 213 RelaxedPrecision + Decorate 214 RelaxedPrecision + Decorate 215 RelaxedPrecision + Decorate 219 RelaxedPrecision + Decorate 220 RelaxedPrecision + Decorate 221 RelaxedPrecision + Decorate 222 RelaxedPrecision Decorate 227(color) RelaxedPrecision + Decorate 228 RelaxedPrecision + Decorate 229 RelaxedPrecision + Decorate 230 RelaxedPrecision + Decorate 231 RelaxedPrecision Decorate 233(v) RelaxedPrecision + Decorate 235 RelaxedPrecision + Decorate 237 RelaxedPrecision + Decorate 239 RelaxedPrecision + Decorate 240 RelaxedPrecision + Decorate 243 RelaxedPrecision + Decorate 244 RelaxedPrecision + Decorate 245 RelaxedPrecision + Decorate 247 RelaxedPrecision + Decorate 249 RelaxedPrecision + Decorate 251 RelaxedPrecision + Decorate 252 RelaxedPrecision + Decorate 254 RelaxedPrecision + Decorate 255 RelaxedPrecision + Decorate 256 RelaxedPrecision + Decorate 257 RelaxedPrecision + Decorate 264 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.uint.frag.out b/Test/baseResults/spv.uint.frag.out index 8c732dc8..4ac9c58f 100755 --- a/Test/baseResults/spv.uint.frag.out +++ b/Test/baseResults/spv.uint.frag.out @@ -41,19 +41,102 @@ Linked fragment stage: Decorate 12(u) RelaxedPrecision Decorate 15(t) RelaxedPrecision Decorate 15(t) Flat + Decorate 19 RelaxedPrecision + Decorate 21 RelaxedPrecision + Decorate 27 RelaxedPrecision + Decorate 28 RelaxedPrecision + Decorate 32 RelaxedPrecision + Decorate 33 RelaxedPrecision + Decorate 38 RelaxedPrecision + Decorate 39 RelaxedPrecision + Decorate 43 RelaxedPrecision + Decorate 44 RelaxedPrecision + Decorate 48 RelaxedPrecision + Decorate 49 RelaxedPrecision + Decorate 53 RelaxedPrecision + Decorate 54 RelaxedPrecision Decorate 55(shiftedii) RelaxedPrecision Decorate 57(shiftedui) RelaxedPrecision Decorate 59(shiftediu) RelaxedPrecision Decorate 60(shifteduu) RelaxedPrecision + Decorate 61 RelaxedPrecision + Decorate 62 RelaxedPrecision Decorate 68(c) RelaxedPrecision Decorate 72(usampler) RelaxedPrecision + Decorate 73 RelaxedPrecision Decorate 77(tc) RelaxedPrecision + Decorate 78 RelaxedPrecision + Decorate 79 RelaxedPrecision + Decorate 80 RelaxedPrecision + Decorate 81 RelaxedPrecision + Decorate 85 RelaxedPrecision + Decorate 86 RelaxedPrecision + Decorate 88 RelaxedPrecision + Decorate 89 RelaxedPrecision + Decorate 90 RelaxedPrecision + Decorate 91 RelaxedPrecision + Decorate 92 RelaxedPrecision + Decorate 97 RelaxedPrecision + Decorate 98 RelaxedPrecision + Decorate 101 RelaxedPrecision + Decorate 102 RelaxedPrecision + Decorate 105 RelaxedPrecision Decorate 111(af) RelaxedPrecision + Decorate 112 RelaxedPrecision + Decorate 113 RelaxedPrecision + Decorate 116 RelaxedPrecision Decorate 118(ai) RelaxedPrecision + Decorate 119 RelaxedPrecision + Decorate 120 RelaxedPrecision + Decorate 121 RelaxedPrecision + Decorate 122 RelaxedPrecision + Decorate 124 RelaxedPrecision + Decorate 125 RelaxedPrecision + Decorate 126 RelaxedPrecision + Decorate 127 RelaxedPrecision + Decorate 128 RelaxedPrecision + Decorate 129 RelaxedPrecision + Decorate 130 RelaxedPrecision + Decorate 131 RelaxedPrecision + Decorate 135 RelaxedPrecision + Decorate 136 RelaxedPrecision + Decorate 140 RelaxedPrecision + Decorate 141 RelaxedPrecision + Decorate 145 RelaxedPrecision + Decorate 146 RelaxedPrecision + Decorate 150 RelaxedPrecision + Decorate 151 RelaxedPrecision Decorate 152(mask1) RelaxedPrecision Decorate 154(mask2) RelaxedPrecision Decorate 156(mask3) RelaxedPrecision + Decorate 157 RelaxedPrecision + Decorate 159 RelaxedPrecision Decorate 160(mask4) RelaxedPrecision + Decorate 162 RelaxedPrecision + Decorate 163 RelaxedPrecision + Decorate 167 RelaxedPrecision + Decorate 168 RelaxedPrecision + Decorate 169 RelaxedPrecision + Decorate 170 RelaxedPrecision + Decorate 171 RelaxedPrecision + Decorate 175 RelaxedPrecision + Decorate 176 RelaxedPrecision + Decorate 177 RelaxedPrecision + Decorate 178 RelaxedPrecision + Decorate 179 RelaxedPrecision + Decorate 180 RelaxedPrecision + Decorate 184 RelaxedPrecision + Decorate 185 RelaxedPrecision + Decorate 186 RelaxedPrecision + Decorate 187 RelaxedPrecision + Decorate 188 RelaxedPrecision + Decorate 192 RelaxedPrecision + Decorate 193 RelaxedPrecision + Decorate 194 RelaxedPrecision + Decorate 195 RelaxedPrecision + Decorate 196 RelaxedPrecision + Decorate 197 RelaxedPrecision + Decorate 198 RelaxedPrecision Decorate 200(f) RelaxedPrecision Decorate 202(v) RelaxedPrecision Decorate 204(i) RelaxedPrecision diff --git a/Test/spv.precision.frag b/Test/spv.precision.frag index 40f790a2..997e4ead 100644 --- a/Test/spv.precision.frag +++ b/Test/spv.precision.frag @@ -23,6 +23,13 @@ bool boolfun(bvec2 bv2) return bv2 == bvec2(false, true); } +struct S { + highp float a; + lowp float b; +}; + +in S s; + void main() { lowp int sum = uniform_medium + uniform_high; @@ -47,4 +54,7 @@ void main() if (boolfun(ub2)) ++mediumfout; + + mediumfout *= s.a; + mediumfout *= s.b; } From ba5685a3322427d0f22f0757d02ea4a8d128948c Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Tue, 2 Feb 2016 15:59:12 -0700 Subject: [PATCH 51/84] Semantics: Map noise*() to an operator for PureOperatorBuiltins mode. Fixes issue #157. --- Test/120.vert | 8 + Test/baseResults/120.vert.out | 360 +++++++++++++--------- glslang/Include/intermediate.h | 2 + glslang/MachineIndependent/Initialize.cpp | 5 + glslang/MachineIndependent/intermOut.cpp | 2 + 5 files changed, 230 insertions(+), 147 deletions(-) diff --git a/Test/120.vert b/Test/120.vert index cc7a8723..b7724b43 100644 --- a/Test/120.vert +++ b/Test/120.vert @@ -139,6 +139,14 @@ void foo2() bool b = any(lessThan(v4, attv4)); // tests aggregate arg to unary built-in } +void noise() +{ + float f1 = noise1(1.0); + vec2 f2 = noise2(vec2(1.0)); + vec3 f3 = noise3(vec3(1.0)); + vec4 f4 = noise4(vec4(1.0)); +} + // version 130 features uniform int c; diff --git a/Test/baseResults/120.vert.out b/Test/baseResults/120.vert.out index 4c069094..6c63744f 100644 --- a/Test/baseResults/120.vert.out +++ b/Test/baseResults/120.vert.out @@ -45,39 +45,39 @@ ERROR: 0:108: 'overloadE' : no matching overloaded function found ERROR: 0:111: 'overloadE' : no matching overloaded function found ERROR: 0:117: 'overloadF' : no matching overloaded function found ERROR: 0:121: 'gl_TexCoord array size' : must be less than gl_MaxTextureCoords (32) -ERROR: 0:157: 'switch' : Reserved word. -ERROR: 0:163: 'default' : Reserved word. -ERROR: 0:157: 'switch statements' : not supported for this version or the enabled extensions -ERROR: 0:168: 'bit shift left' : not supported for this version or the enabled extensions -ERROR: 0:168: 'bit shift right' : not supported for this version or the enabled extensions -ERROR: 0:168: 'bitwise and' : not supported for this version or the enabled extensions -ERROR: 0:168: 'bitwise inclusive or' : not supported for this version or the enabled extensions -ERROR: 0:171: 'modf' : no matching overloaded function found -ERROR: 0:171: '=' : cannot convert from 'const float' to 'temp 3-component vector of float' -ERROR: 0:172: 'trunc' : no matching overloaded function found -ERROR: 0:173: 'round' : no matching overloaded function found -ERROR: 0:173: '=' : cannot convert from 'const float' to 'temp 2-component vector of float' -ERROR: 0:174: 'roundEven' : no matching overloaded function found -ERROR: 0:174: '=' : cannot convert from 'const float' to 'temp 2-component vector of float' -ERROR: 0:175: 'isnan' : no matching overloaded function found -ERROR: 0:175: '=' : cannot convert from 'const float' to 'temp 2-component vector of bool' -ERROR: 0:176: 'isinf' : no matching overloaded function found -ERROR: 0:176: '=' : cannot convert from 'const float' to 'temp 4-component vector of bool' -ERROR: 0:178: 'sinh' : no matching overloaded function found -ERROR: 0:179: 'cosh' : no matching overloaded function found -ERROR: 0:179: 'tanh' : no matching overloaded function found -ERROR: 0:180: 'c4D' : undeclared identifier -ERROR: 0:180: 'asinh' : no matching overloaded function found -ERROR: 0:180: 'acosh' : no matching overloaded function found -ERROR: 0:181: 'atanh' : no matching overloaded function found -ERROR: 0:183: 'gl_VertexID' : undeclared identifier -ERROR: 0:183: '=' : cannot convert from 'temp float' to 'temp int' -ERROR: 0:184: 'gl_ClipDistance' : undeclared identifier -ERROR: 0:184: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector -ERROR: 0:184: 'assign' : l-value required (can't modify a const) -ERROR: 0:190: 'token pasting (##)' : not supported for this version or the enabled extensions -ERROR: 0:190: '##' : token pasting not implemented (internal error) -ERROR: 0:190: '' : syntax error +ERROR: 0:165: 'switch' : Reserved word. +ERROR: 0:171: 'default' : Reserved word. +ERROR: 0:165: 'switch statements' : not supported for this version or the enabled extensions +ERROR: 0:176: 'bit shift left' : not supported for this version or the enabled extensions +ERROR: 0:176: 'bit shift right' : not supported for this version or the enabled extensions +ERROR: 0:176: 'bitwise and' : not supported for this version or the enabled extensions +ERROR: 0:176: 'bitwise inclusive or' : not supported for this version or the enabled extensions +ERROR: 0:179: 'modf' : no matching overloaded function found +ERROR: 0:179: '=' : cannot convert from 'const float' to 'temp 3-component vector of float' +ERROR: 0:180: 'trunc' : no matching overloaded function found +ERROR: 0:181: 'round' : no matching overloaded function found +ERROR: 0:181: '=' : cannot convert from 'const float' to 'temp 2-component vector of float' +ERROR: 0:182: 'roundEven' : no matching overloaded function found +ERROR: 0:182: '=' : cannot convert from 'const float' to 'temp 2-component vector of float' +ERROR: 0:183: 'isnan' : no matching overloaded function found +ERROR: 0:183: '=' : cannot convert from 'const float' to 'temp 2-component vector of bool' +ERROR: 0:184: 'isinf' : no matching overloaded function found +ERROR: 0:184: '=' : cannot convert from 'const float' to 'temp 4-component vector of bool' +ERROR: 0:186: 'sinh' : no matching overloaded function found +ERROR: 0:187: 'cosh' : no matching overloaded function found +ERROR: 0:187: 'tanh' : no matching overloaded function found +ERROR: 0:188: 'c4D' : undeclared identifier +ERROR: 0:188: 'asinh' : no matching overloaded function found +ERROR: 0:188: 'acosh' : no matching overloaded function found +ERROR: 0:189: 'atanh' : no matching overloaded function found +ERROR: 0:191: 'gl_VertexID' : undeclared identifier +ERROR: 0:191: '=' : cannot convert from 'temp float' to 'temp int' +ERROR: 0:192: 'gl_ClipDistance' : undeclared identifier +ERROR: 0:192: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector +ERROR: 0:192: 'assign' : l-value required (can't modify a const) +ERROR: 0:198: 'token pasting (##)' : not supported for this version or the enabled extensions +ERROR: 0:198: '##' : token pasting not implemented (internal error) +ERROR: 0:198: '' : syntax error ERROR: 79 compilation errors. No code generated. @@ -314,66 +314,99 @@ ERROR: node is still EOpNull! 0:139 Compare Less Than (global 4-component vector of bool) 0:139 'v4' (temp 4-component vector of float) 0:139 'attv4' (in 4-component vector of float) -0:154 Function Definition: foo213( (global void) -0:154 Function Parameters: -0:156 Sequence -0:156 Sequence -0:156 move second child to first child (temp float) -0:156 'f' (temp float) -0:156 Constant: -0:156 3.000000 -0:157 switch -0:157 condition -0:157 'c' (uniform int) -0:157 body -0:157 Sequence -0:158 case: with expression -0:158 Constant: -0:158 1 (const int) +0:142 Function Definition: noise( (global void) +0:142 Function Parameters: +0:144 Sequence +0:144 Sequence +0:144 move second child to first child (temp float) +0:144 'f1' (temp float) +0:144 noise (global float) +0:144 Constant: +0:144 1.000000 +0:145 Sequence +0:145 move second child to first child (temp 2-component vector of float) +0:145 'f2' (temp 2-component vector of float) +0:145 noise (global 2-component vector of float) +0:145 Constant: +0:145 1.000000 +0:145 1.000000 +0:146 Sequence +0:146 move second child to first child (temp 3-component vector of float) +0:146 'f3' (temp 3-component vector of float) +0:146 noise (global 3-component vector of float) +0:146 Constant: +0:146 1.000000 +0:146 1.000000 +0:146 1.000000 +0:147 Sequence +0:147 move second child to first child (temp 4-component vector of float) +0:147 'f4' (temp 4-component vector of float) +0:147 noise (global 4-component vector of float) +0:147 Constant: +0:147 1.000000 +0:147 1.000000 +0:147 1.000000 +0:147 1.000000 +0:162 Function Definition: foo213( (global void) +0:162 Function Parameters: +0:164 Sequence +0:164 Sequence +0:164 move second child to first child (temp float) +0:164 'f' (temp float) +0:164 Constant: +0:164 3.000000 +0:165 switch +0:165 condition +0:165 'c' (uniform int) +0:165 body +0:165 Sequence +0:166 case: with expression +0:166 Constant: +0:166 1 (const int) 0:? Sequence -0:159 move second child to first child (temp float) -0:159 'f' (temp float) -0:159 sine (global float) -0:159 'f' (temp float) -0:160 Branch: Break -0:161 case: with expression -0:161 Constant: -0:161 2 (const int) +0:167 move second child to first child (temp float) +0:167 'f' (temp float) +0:167 sine (global float) +0:167 'f' (temp float) +0:168 Branch: Break +0:169 case: with expression +0:169 Constant: +0:169 2 (const int) 0:? Sequence -0:162 move second child to first child (temp float) -0:162 'f' (temp float) -0:162 component-wise multiply (temp float) -0:162 'f' (temp float) -0:162 'f' (temp float) -0:163 default: +0:170 move second child to first child (temp float) +0:170 'f' (temp float) +0:170 component-wise multiply (temp float) +0:170 'f' (temp float) +0:170 'f' (temp float) +0:171 default: 0:? Sequence -0:164 move second child to first child (temp float) -0:164 'f' (temp float) -0:164 Constant: -0:164 3.000000 -0:168 inclusive-or (temp int) -0:168 left-shift (temp int) -0:168 'i' (temp int) -0:168 Constant: -0:168 3 (const int) -0:168 Constant: -0:168 69 (const int) -0:172 Sequence -0:172 move second child to first child (temp float) -0:172 't' (temp float) -0:172 Constant: -0:172 0.000000 -0:178 Constant: -0:178 0.000000 -0:180 Constant: -0:180 0.000000 -0:181 Constant: -0:181 0.000000 -0:184 move second child to first child (temp float) -0:184 Constant: -0:184 0.000000 -0:184 Constant: -0:184 0.300000 +0:172 move second child to first child (temp float) +0:172 'f' (temp float) +0:172 Constant: +0:172 3.000000 +0:176 inclusive-or (temp int) +0:176 left-shift (temp int) +0:176 'i' (temp int) +0:176 Constant: +0:176 3 (const int) +0:176 Constant: +0:176 69 (const int) +0:180 Sequence +0:180 move second child to first child (temp float) +0:180 't' (temp float) +0:180 Constant: +0:180 0.000000 +0:186 Constant: +0:186 0.000000 +0:188 Constant: +0:188 0.000000 +0:189 Constant: +0:189 0.000000 +0:192 move second child to first child (temp float) +0:192 Constant: +0:192 0.000000 +0:192 Constant: +0:192 0.300000 0:? Linker Objects 0:? 'i' (in 4-component vector of float) 0:? 'o' (smooth out 4-component vector of float) @@ -633,66 +666,99 @@ ERROR: node is still EOpNull! 0:139 Compare Less Than (global 4-component vector of bool) 0:139 'v4' (temp 4-component vector of float) 0:139 'attv4' (in 4-component vector of float) -0:154 Function Definition: foo213( (global void) -0:154 Function Parameters: -0:156 Sequence -0:156 Sequence -0:156 move second child to first child (temp float) -0:156 'f' (temp float) -0:156 Constant: -0:156 3.000000 -0:157 switch -0:157 condition -0:157 'c' (uniform int) -0:157 body -0:157 Sequence -0:158 case: with expression -0:158 Constant: -0:158 1 (const int) +0:142 Function Definition: noise( (global void) +0:142 Function Parameters: +0:144 Sequence +0:144 Sequence +0:144 move second child to first child (temp float) +0:144 'f1' (temp float) +0:144 noise (global float) +0:144 Constant: +0:144 1.000000 +0:145 Sequence +0:145 move second child to first child (temp 2-component vector of float) +0:145 'f2' (temp 2-component vector of float) +0:145 noise (global 2-component vector of float) +0:145 Constant: +0:145 1.000000 +0:145 1.000000 +0:146 Sequence +0:146 move second child to first child (temp 3-component vector of float) +0:146 'f3' (temp 3-component vector of float) +0:146 noise (global 3-component vector of float) +0:146 Constant: +0:146 1.000000 +0:146 1.000000 +0:146 1.000000 +0:147 Sequence +0:147 move second child to first child (temp 4-component vector of float) +0:147 'f4' (temp 4-component vector of float) +0:147 noise (global 4-component vector of float) +0:147 Constant: +0:147 1.000000 +0:147 1.000000 +0:147 1.000000 +0:147 1.000000 +0:162 Function Definition: foo213( (global void) +0:162 Function Parameters: +0:164 Sequence +0:164 Sequence +0:164 move second child to first child (temp float) +0:164 'f' (temp float) +0:164 Constant: +0:164 3.000000 +0:165 switch +0:165 condition +0:165 'c' (uniform int) +0:165 body +0:165 Sequence +0:166 case: with expression +0:166 Constant: +0:166 1 (const int) 0:? Sequence -0:159 move second child to first child (temp float) -0:159 'f' (temp float) -0:159 sine (global float) -0:159 'f' (temp float) -0:160 Branch: Break -0:161 case: with expression -0:161 Constant: -0:161 2 (const int) +0:167 move second child to first child (temp float) +0:167 'f' (temp float) +0:167 sine (global float) +0:167 'f' (temp float) +0:168 Branch: Break +0:169 case: with expression +0:169 Constant: +0:169 2 (const int) 0:? Sequence -0:162 move second child to first child (temp float) -0:162 'f' (temp float) -0:162 component-wise multiply (temp float) -0:162 'f' (temp float) -0:162 'f' (temp float) -0:163 default: +0:170 move second child to first child (temp float) +0:170 'f' (temp float) +0:170 component-wise multiply (temp float) +0:170 'f' (temp float) +0:170 'f' (temp float) +0:171 default: 0:? Sequence -0:164 move second child to first child (temp float) -0:164 'f' (temp float) -0:164 Constant: -0:164 3.000000 -0:168 inclusive-or (temp int) -0:168 left-shift (temp int) -0:168 'i' (temp int) -0:168 Constant: -0:168 3 (const int) -0:168 Constant: -0:168 69 (const int) -0:172 Sequence -0:172 move second child to first child (temp float) -0:172 't' (temp float) -0:172 Constant: -0:172 0.000000 -0:178 Constant: -0:178 0.000000 -0:180 Constant: -0:180 0.000000 -0:181 Constant: -0:181 0.000000 -0:184 move second child to first child (temp float) -0:184 Constant: -0:184 0.000000 -0:184 Constant: -0:184 0.300000 +0:172 move second child to first child (temp float) +0:172 'f' (temp float) +0:172 Constant: +0:172 3.000000 +0:176 inclusive-or (temp int) +0:176 left-shift (temp int) +0:176 'i' (temp int) +0:176 Constant: +0:176 3 (const int) +0:176 Constant: +0:176 69 (const int) +0:180 Sequence +0:180 move second child to first child (temp float) +0:180 't' (temp float) +0:180 Constant: +0:180 0.000000 +0:186 Constant: +0:186 0.000000 +0:188 Constant: +0:188 0.000000 +0:189 Constant: +0:189 0.000000 +0:192 move second child to first child (temp float) +0:192 Constant: +0:192 0.000000 +0:192 Constant: +0:192 0.300000 0:? Linker Objects 0:? 'i' (in 4-component vector of float) 0:? 'o' (smooth out 4-component vector of float) diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index cf701776..54bd96e1 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -238,6 +238,8 @@ enum TOperator { EOpFtransform, + EOpNoise, + EOpEmitVertex, // geometry only EOpEndPrimitive, // geometry only EOpEmitStreamVertex, // geometry only diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 089751b1..4b0c0153 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -3696,6 +3696,11 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua symbolTable.relateToOperator("textureGatherOffset", EOpTextureGatherOffset); symbolTable.relateToOperator("textureGatherOffsets", EOpTextureGatherOffsets); + symbolTable.relateToOperator("noise1", EOpNoise); + symbolTable.relateToOperator("noise2", EOpNoise); + symbolTable.relateToOperator("noise3", EOpNoise); + symbolTable.relateToOperator("noise4", EOpNoise); + if (spv == 0 && (IncludeLegacy(version, profile, spv) || (profile == EEsProfile && version == 100))) { symbolTable.relateToOperator("ftransform", EOpFtransform); diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index d319c6f5..dd0769f5 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -318,6 +318,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpFindLSB: out.debug << "findLSB"; break; case EOpFindMSB: out.debug << "findMSB"; break; + case EOpNoise: out.debug << "noise"; break; + default: out.debug.message(EPrefixError, "Bad unary op"); } From f947debf70f626ab2fd9dd1339be5f3d1ce8c671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Osztrogon=C3=A1c?= Date: Fri, 5 Feb 2016 07:40:35 -0800 Subject: [PATCH 52/84] Fix typo in an include guard. --- SPIRV/spirv.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp index 0cc43aa4..65331d24 100755 --- a/SPIRV/spirv.hpp +++ b/SPIRV/spirv.hpp @@ -39,8 +39,8 @@ // "Mask" in their name, and a parallel enum that has the shift // amount (1 << x) for each corresponding enumerant. -#ifndef spirv_H -#define spirv_H +#ifndef spirv_HPP +#define spirv_HPP namespace spv { @@ -874,5 +874,4 @@ inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfil } // end namespace spv -#endif // #ifndef spirv_H - +#endif // #ifndef spirv_HPP From 103bef9d74d768f0690ed53f52681baead384d1e Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 8 Feb 2016 21:38:15 -0700 Subject: [PATCH 53/84] SPV: Handle GLSL bool loads from a uniform buffer as a conversion from int -> bool. SPIR-V bool is abstract; it has no bit pattern for storage with transparent memory. OpenGL's convention is a bool in a uniform buffer is 32-bit int with non-0 being 'true'. --- SPIRV/GlslangToSpv.cpp | 21 ++++++- SPIRV/SpvBuilder.cpp | 33 +++++++++++ SPIRV/SpvBuilder.h | 4 ++ Test/baseResults/spv.aggOps.frag.out | 89 +++++++++++++--------------- 4 files changed, 96 insertions(+), 51 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 94e37e8f..2a3ce8ec 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1570,7 +1570,12 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeFloatType(64); break; case glslang::EbtBool: - spvType = builder.makeBoolType(); + // "transparent" bool doesn't exist in SPIR-V. The GLSL convention is + // a 32-bit int where non-0 means true. + if (explicitLayout != glslang::ElpNone) + spvType = builder.makeUintType(32); + else + spvType = builder.makeBoolType(); break; case glslang::EbtInt: spvType = builder.makeIntType(32); @@ -1764,9 +1769,21 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty return spvType; } +// Wrap the builder's accessChainLoad to: +// - localize handling of RelaxedPrecision +// - use the SPIR-V inferred type instead of another conversion of the glslang type +// (avoids unnecessary work and possible type punning for structures) +// - do conversion of concrete to abstract type spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) { - return builder.accessChainLoad(TranslatePrecisionDecoration(type), convertGlslangToSpvType(type)); + spv::Id nominalTypeId = builder.accessChainGetInferredType(); + spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), nominalTypeId); + + // Need to convert to abstract types when necessary + if (builder.isScalarType(nominalTypeId) && type.getBasicType() == glslang::EbtBool && nominalTypeId != builder.makeBoolType()) + loadedId = builder.createBinOp(spv::OpINotEqual, builder.makeBoolType(), loadedId, builder.makeUintConstant(0)); + + return loadedId; } // Decide whether or not this type should be diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 1594da31..b2cafbf2 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1990,6 +1990,39 @@ Id Builder::accessChainGetLValue() return lvalue; } +// comment in header +Id Builder::accessChainGetInferredType() +{ + // anything to operate on? + if (accessChain.base == NoResult) + return NoType; + Id type = getTypeId(accessChain.base); + + // do initial dereference + if (! accessChain.isRValue) + type = getContainedTypeId(type); + + // dereference each index + for (auto deref : accessChain.indexChain) { + if (isStructType(type)) + type = getContainedTypeId(type, getConstantScalar(deref)); + else + type = getContainedTypeId(type); + } + + // dereference swizzle + if (accessChain.swizzle.size() == 1) + type = getContainedTypeId(type); + else if (accessChain.swizzle.size() > 1) + type = makeVectorType(getContainedTypeId(type), accessChain.swizzle.size()); + + // dereference component selection + if (accessChain.component) + type = getContainedTypeId(type); + + return type; +} + void Builder::dump(std::vector& out) const { // Header, before first instructions: diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 00516c82..92ddac9e 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -506,6 +506,10 @@ public: // get the direct pointer for an l-value Id accessChainGetLValue(); + // Get the inferred SPIR-V type of the result of the current access chain, + // based on the type of the base and the chain of dereferences. + Id accessChainGetInferredType(); + void dump(std::vector&) const; void createBranch(Block* block); diff --git a/Test/baseResults/spv.aggOps.frag.out b/Test/baseResults/spv.aggOps.frag.out index 124c8fb8..abac3874 100644 --- a/Test/baseResults/spv.aggOps.frag.out +++ b/Test/baseResults/spv.aggOps.frag.out @@ -7,12 +7,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 380 +// Id's are bound by 378 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 16 41 90 376 + EntryPoint Fragment 4 "main" 16 41 90 374 ExecutionMode 4 OriginLowerLeft Source GLSL 450 Name 4 "main" @@ -42,15 +42,8 @@ Linked fragment stage: Name 343 "bn" MemberName 343(bn) 0 "foo2a" Name 345 "bi" - Name 347 "s1" - MemberName 347(s1) 0 "i" - MemberName 347(s1) 1 "f" - Name 348 "s2" - MemberName 348(s2) 0 "i" - MemberName 348(s2) 1 "f" - MemberName 348(s2) 2 "s1_1" - Name 376 "color" - Name 379 "foo1" + Name 374 "color" + Name 377 "foo1" MemberDecorate 341(s1) 0 Offset 0 MemberDecorate 341(s1) 1 Offset 4 MemberDecorate 342(s2) 0 Offset 0 @@ -108,14 +101,12 @@ Linked fragment stage: 344: TypePointer Uniform 343(bn) 345(bi): 344(ptr) Variable Uniform 346: 6(int) Constant 0 - 347(s1): TypeStruct 6(int) 7(float) - 348(s2): TypeStruct 6(int) 7(float) 347(s1) - 349: TypePointer Uniform 342(s2) - 372: 7(float) Constant 1090519040 - 375: TypePointer Output 14(fvec4) - 376(color): 375(ptr) Variable Output - 378: TypePointer UniformConstant 8(s1) - 379(foo1): 378(ptr) Variable UniformConstant + 347: TypePointer Uniform 342(s2) + 370: 7(float) Constant 1090519040 + 373: TypePointer Output 14(fvec4) + 374(color): 373(ptr) Variable Output + 376: TypePointer UniformConstant 8(s1) + 377(foo1): 376(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 13(a): 12(ptr) Variable Function @@ -439,35 +430,35 @@ Linked fragment stage: Store 82(v) 340 Branch 337 337: Label - 350: 349(ptr) AccessChain 345(bi) 346 - 351: 342(s2) Load 350 - 352: 55(s2) Load 57(foo2a) - 353: 6(int) CompositeExtract 351 0 - 354: 6(int) CompositeExtract 352 0 - 355: 61(bool) INotEqual 353 354 - 356: 7(float) CompositeExtract 351 1 - 357: 7(float) CompositeExtract 352 1 - 358: 61(bool) FOrdNotEqual 356 357 - 359: 61(bool) LogicalOr 355 358 - 360: 341(s1) CompositeExtract 351 2 - 361: 8(s1) CompositeExtract 352 2 - 362: 6(int) CompositeExtract 360 0 - 363: 6(int) CompositeExtract 361 0 - 364: 61(bool) INotEqual 362 363 - 365: 7(float) CompositeExtract 360 1 - 366: 7(float) CompositeExtract 361 1 - 367: 61(bool) FOrdNotEqual 365 366 - 368: 61(bool) LogicalOr 364 367 - 369: 61(bool) LogicalOr 359 368 - SelectionMerge 371 None - BranchConditional 369 370 371 - 370: Label - 373: 14(fvec4) Load 82(v) - 374: 14(fvec4) VectorTimesScalar 373 372 - Store 82(v) 374 - Branch 371 - 371: Label - 377: 14(fvec4) Load 82(v) - Store 376(color) 377 + 348: 347(ptr) AccessChain 345(bi) 346 + 349: 342(s2) Load 348 + 350: 55(s2) Load 57(foo2a) + 351: 6(int) CompositeExtract 349 0 + 352: 6(int) CompositeExtract 350 0 + 353: 61(bool) INotEqual 351 352 + 354: 7(float) CompositeExtract 349 1 + 355: 7(float) CompositeExtract 350 1 + 356: 61(bool) FOrdNotEqual 354 355 + 357: 61(bool) LogicalOr 353 356 + 358: 341(s1) CompositeExtract 349 2 + 359: 8(s1) CompositeExtract 350 2 + 360: 6(int) CompositeExtract 358 0 + 361: 6(int) CompositeExtract 359 0 + 362: 61(bool) INotEqual 360 361 + 363: 7(float) CompositeExtract 358 1 + 364: 7(float) CompositeExtract 359 1 + 365: 61(bool) FOrdNotEqual 363 364 + 366: 61(bool) LogicalOr 362 365 + 367: 61(bool) LogicalOr 357 366 + SelectionMerge 369 None + BranchConditional 367 368 369 + 368: Label + 371: 14(fvec4) Load 82(v) + 372: 14(fvec4) VectorTimesScalar 371 370 + Store 82(v) 372 + Branch 369 + 369: Label + 375: 14(fvec4) Load 82(v) + Store 374(color) 375 Return FunctionEnd From 3c52207e8aa67548a2aca489e16f1d845de4a8e9 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sun, 14 Feb 2016 17:11:15 -0700 Subject: [PATCH 54/84] SPV capabilities: Add int16, int64, float16, and float64. --- SPIRV/SpvBuilder.cpp | 24 ++++++++++++++++++++++++ Test/baseResults/spv.400.frag.out | 1 + Test/baseResults/spv.double.comp.out | 1 + 3 files changed, 26 insertions(+) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index b2cafbf2..a14eb00c 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -165,6 +165,18 @@ Id Builder::makeIntegerType(int width, bool hasSign) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + // deal with capabilities + switch (width) { + case 16: + addCapability(CapabilityInt16); + break; + case 64: + addCapability(CapabilityInt64); + break; + default: + break; + } + return type->getResultId(); } @@ -185,6 +197,18 @@ Id Builder::makeFloatType(int width) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + // deal with capabilities + switch (width) { + case 16: + addCapability(CapabilityFloat16); + break; + case 64: + addCapability(CapabilityFloat64); + break; + default: + break; + } + return type->getResultId(); } diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index 1dcfbd30..e43527c1 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -10,6 +10,7 @@ Linked fragment stage: // Id's are bound by 1104 Capability Shader + Capability Float64 Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 diff --git a/Test/baseResults/spv.double.comp.out b/Test/baseResults/spv.double.comp.out index e78065dc..52ed78c5 100755 --- a/Test/baseResults/spv.double.comp.out +++ b/Test/baseResults/spv.double.comp.out @@ -10,6 +10,7 @@ Linked compute stage: // Id's are bound by 62 Capability Shader + Capability Float64 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint GLCompute 4 "main" 26 33 From b0364dcc3e5e110ad8ef9a938a0cbf2dd9003122 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sun, 14 Feb 2016 17:37:30 -0700 Subject: [PATCH 55/84] SPV Capabilities: Image types. SampledBuffer ImageBuffer Sampled1D Image1D SampledCubeArray ImageCubeArray SampledRect ImageRect InputAttachment ImageMSArray StorageImageMultisample --- SPIRV/SpvBuilder.cpp | 42 +++++++++++++++++++ Test/baseResults/spv.130.frag.out | 3 ++ Test/baseResults/spv.140.frag.out | 2 + Test/baseResults/spv.400.frag.out | 1 + Test/baseResults/spv.image.frag.out | 5 +++ Test/baseResults/spv.newTexture.frag.out | 2 + Test/baseResults/spv.queryL.frag.out | 4 ++ Test/baseResults/spv.sparseTexture.frag.out | 2 + .../spv.sparseTextureClamp.frag.out | 2 + Test/baseResults/spv.texture.frag.out | 1 + Test/baseResults/spv.texture.vert.out | 1 + 11 files changed, 65 insertions(+) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index a14eb00c..ca2017b8 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -406,6 +406,48 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + // deal with capabilities + switch (dim) { + case DimBuffer: + if (sampled) + addCapability(CapabilitySampledBuffer); + else + addCapability(CapabilityImageBuffer); + break; + case Dim1D: + if (sampled) + addCapability(CapabilitySampled1D); + else + addCapability(CapabilityImage1D); + break; + case DimCube: + if (arrayed) { + if (sampled) + addCapability(CapabilitySampledCubeArray); + else + addCapability(CapabilityImageCubeArray); + } + break; + case DimRect: + if (sampled) + addCapability(CapabilitySampledRect); + else + addCapability(CapabilityImageRect); + break; + case DimSubpassData: + addCapability(CapabilityInputAttachment); + break; + default: + break; + } + + if (ms) { + if (arrayed) + addCapability(CapabilityImageMSArray); + if (! sampled) + addCapability(CapabilityStorageImageMultisample); + } + return type->getResultId(); } diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index 6b47b7dd..a9d568b4 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -11,6 +11,9 @@ Linked fragment stage: Capability Shader Capability ClipDistance + Capability SampledRect + Capability Sampled1D + Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index 6028f604..74ba071d 100755 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -9,6 +9,8 @@ Linked fragment stage: Capability Shader Capability ClipDistance + Capability SampledRect + Capability SampledBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 16 28 33 43 diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index e43527c1..81ae28e2 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -12,6 +12,7 @@ Linked fragment stage: Capability Shader Capability Float64 Capability ClipDistance + Capability SampledRect 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097 diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index 65103bec..ff538f7e 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -10,6 +10,11 @@ Linked fragment stage: // Id's are bound by 372 Capability Shader + Capability SampledRect + Capability Sampled1D + Capability SampledCubeArray + Capability SampledBuffer + Capability ImageMSArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 356 diff --git a/Test/baseResults/spv.newTexture.frag.out b/Test/baseResults/spv.newTexture.frag.out index 41972bbb..97b0771a 100755 --- a/Test/baseResults/spv.newTexture.frag.out +++ b/Test/baseResults/spv.newTexture.frag.out @@ -10,6 +10,8 @@ Linked fragment stage: // Id's are bound by 278 Capability Shader + Capability SampledRect + Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 26 29 55 81 84 91 247 277 diff --git a/Test/baseResults/spv.queryL.frag.out b/Test/baseResults/spv.queryL.frag.out index d72730a5..9013b96a 100755 --- a/Test/baseResults/spv.queryL.frag.out +++ b/Test/baseResults/spv.queryL.frag.out @@ -10,6 +10,10 @@ Linked fragment stage: // Id's are bound by 237 Capability Shader + Capability SampledRect + Capability Sampled1D + Capability SampledCubeArray + Capability SampledBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out index 24209e08..6af0a6ca 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -10,6 +10,8 @@ Linked fragment stage: // Id's are bound by 399 Capability Shader + Capability SampledRect + Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 384 diff --git a/Test/baseResults/spv.sparseTextureClamp.frag.out b/Test/baseResults/spv.sparseTextureClamp.frag.out index 42fc27aa..cd23d663 100644 --- a/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -10,6 +10,8 @@ Linked fragment stage: // Id's are bound by 360 Capability Shader + Capability SampledRect + Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 345 diff --git a/Test/baseResults/spv.texture.frag.out b/Test/baseResults/spv.texture.frag.out index 0e795191..91a6832c 100755 --- a/Test/baseResults/spv.texture.frag.out +++ b/Test/baseResults/spv.texture.frag.out @@ -8,6 +8,7 @@ Linked fragment stage: // Id's are bound by 291 Capability Shader + Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 47 276 290 diff --git a/Test/baseResults/spv.texture.vert.out b/Test/baseResults/spv.texture.vert.out index f081ce0e..23cf7542 100755 --- a/Test/baseResults/spv.texture.vert.out +++ b/Test/baseResults/spv.texture.vert.out @@ -8,6 +8,7 @@ Linked vertex stage: // Id's are bound by 146 Capability Shader + Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 39 140 144 145 From 5e80113939d0e9591f1fa4e4c2dd9a1559d7e1b8 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 15 Feb 2016 11:09:46 -0700 Subject: [PATCH 56/84] SPV Capabilities: SampleRateShading, SparseResidency, MinLod, and ImageQuery. --- SPIRV/GlslangToSpv.cpp | 23 ++++++++++++++----- SPIRV/SpvBuilder.cpp | 9 ++++++++ Test/baseResults/spv.130.frag.out | 1 + Test/baseResults/spv.140.frag.out | 1 + Test/baseResults/spv.image.frag.out | 1 + Test/baseResults/spv.newTexture.frag.out | 1 + Test/baseResults/spv.queryL.frag.out | 1 + Test/baseResults/spv.sparseTexture.frag.out | 1 + .../spv.sparseTextureClamp.frag.out | 2 ++ 9 files changed, 34 insertions(+), 6 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 2a3ce8ec..c3ae56eb 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -88,6 +88,7 @@ public: void dumpSpv(std::vector& out); protected: + spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier); spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable); spv::Id createSpvVariable(const glslang::TIntermSymbol*); spv::Id getSampledType(const glslang::TSampler&); @@ -301,7 +302,7 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T // Translate glslang type to SPIR-V interpolation decorations. // Returns spv::Decoration(spv::BadValue) when no decoration // should be applied. -spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier) +spv::Decoration TGlslangToSpvTraverser::TranslateInterpolationDecoration(const glslang::TQualifier& qualifier) { if (qualifier.smooth) { // Smooth decoration doesn't exist in SPIR-V 1.0 @@ -315,9 +316,10 @@ spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qual return spv::DecorationFlat; else if (qualifier.centroid) return spv::DecorationCentroid; - else if (qualifier.sample) + else if (qualifier.sample) { + builder.addCapability(spv::CapabilitySampleRateShading); return spv::DecorationSample; - else + } else return (spv::Decoration)spv::BadValue; } @@ -358,6 +360,18 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI // TODO: builder.addCapability(spv::CapabilityMultiViewport); return spv::BuiltInViewportIndex; + case glslang::EbvSampleId: + builder.addCapability(spv::CapabilitySampleRateShading); + return spv::BuiltInSampleId; + + case glslang::EbvSamplePosition: + builder.addCapability(spv::CapabilitySampleRateShading); + return spv::BuiltInSamplePosition; + + case glslang::EbvSampleMask: + builder.addCapability(spv::CapabilitySampleRateShading); + return spv::BuiltInSampleMask; + case glslang::EbvPosition: return spv::BuiltInPosition; case glslang::EbvVertexId: return spv::BuiltInVertexId; case glslang::EbvInstanceId: return spv::BuiltInInstanceId; @@ -377,9 +391,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvFragCoord: return spv::BuiltInFragCoord; case glslang::EbvPointCoord: return spv::BuiltInPointCoord; case glslang::EbvFace: return spv::BuiltInFrontFacing; - case glslang::EbvSampleId: return spv::BuiltInSampleId; - case glslang::EbvSamplePosition: return spv::BuiltInSamplePosition; - case glslang::EbvSampleMask: return spv::BuiltInSampleMask; case glslang::EbvFragDepth: return spv::BuiltInFragDepth; case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation; case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups; diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index ca2017b8..10ba32ce 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1340,6 +1340,9 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, texArgs[numArgs++] = parameters.sample; } if (parameters.lodClamp) { + // capability if this bit is used + addCapability(CapabilityMinLod); + mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask); texArgs[numArgs++] = parameters.lodClamp; } @@ -1459,6 +1462,9 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, Id resultId = textureInst->getResultId(); if (sparse) { + // set capability + addCapability(CapabilitySparseResidency); + // Decode the return type that was a special structure createStore(createCompositeExtract(resultId, typeId1, 1), parameters.texelOut); resultId = createCompositeExtract(resultId, typeId0, 0); @@ -1476,6 +1482,9 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, // Comments in header Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters) { + // All these need a capability + addCapability(CapabilityImageQuery); + // Figure out the result type Id resultType = 0; switch (opCode) { diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index a9d568b4..ad8ecc78 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -14,6 +14,7 @@ Linked fragment stage: Capability SampledRect Capability Sampled1D Capability SampledCubeArray + Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index 74ba071d..288272e2 100755 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -11,6 +11,7 @@ Linked fragment stage: Capability ClipDistance Capability SampledRect Capability SampledBuffer + Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 16 28 33 43 diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index ff538f7e..04e023a7 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -15,6 +15,7 @@ Linked fragment stage: Capability SampledCubeArray Capability SampledBuffer Capability ImageMSArray + Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 356 diff --git a/Test/baseResults/spv.newTexture.frag.out b/Test/baseResults/spv.newTexture.frag.out index 97b0771a..6ef94708 100755 --- a/Test/baseResults/spv.newTexture.frag.out +++ b/Test/baseResults/spv.newTexture.frag.out @@ -12,6 +12,7 @@ Linked fragment stage: Capability Shader Capability SampledRect Capability SampledCubeArray + Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 26 29 55 81 84 91 247 277 diff --git a/Test/baseResults/spv.queryL.frag.out b/Test/baseResults/spv.queryL.frag.out index 9013b96a..b347ce89 100755 --- a/Test/baseResults/spv.queryL.frag.out +++ b/Test/baseResults/spv.queryL.frag.out @@ -14,6 +14,7 @@ Linked fragment stage: Capability Sampled1D Capability SampledCubeArray Capability SampledBuffer + Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out index 6af0a6ca..04e8e92d 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -11,6 +11,7 @@ Linked fragment stage: Capability Shader Capability SampledRect + Capability SparseResidency Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 diff --git a/Test/baseResults/spv.sparseTextureClamp.frag.out b/Test/baseResults/spv.sparseTextureClamp.frag.out index cd23d663..6bf60a81 100644 --- a/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -11,6 +11,8 @@ Linked fragment stage: Capability Shader Capability SampledRect + Capability SparseResidency + Capability MinLod Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 From 5d0fa9781bb9f17bab14a35b12c192c4fc93f5e2 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 15 Feb 2016 11:57:00 -0700 Subject: [PATCH 57/84] SPV Capabilities: StorageImageExtendedFormats, StorageImageReadWithoutFormat, and StorageImageWriteWithoutFormat. --- SPIRV/GlslangToSpv.cpp | 49 +++++++++++++++++--- SPIRV/SpvBuilder.h | 1 + Test/baseResults/spv.image.frag.out | 69 +++++++++++++++++------------ Test/spv.image.frag | 6 ++- 4 files changed, 90 insertions(+), 35 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index c3ae56eb..81509975 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -90,6 +90,7 @@ public: protected: spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier); spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable); + spv::ImageFormat TranslateImageFormat(const glslang::TType& type); spv::Id createSpvVariable(const glslang::TIntermSymbol*); spv::Id getSampledType(const glslang::TSampler&); spv::Id convertGlslangToSpvType(const glslang::TType& type); @@ -404,10 +405,48 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI } // Translate glslang image layout format to SPIR-V image format. -spv::ImageFormat TranslateImageFormat(const glslang::TType& type) +spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TType& type) { assert(type.getBasicType() == glslang::EbtSampler); + // Check for capabilities + switch (type.getQualifier().layoutFormat) { + case glslang::ElfRg32f: + case glslang::ElfRg16f: + case glslang::ElfR11fG11fB10f: + case glslang::ElfR16f: + case glslang::ElfRgba16: + case glslang::ElfRgb10A2: + case glslang::ElfRg16: + case glslang::ElfRg8: + case glslang::ElfR16: + case glslang::ElfR8: + case glslang::ElfRgba16Snorm: + case glslang::ElfRg16Snorm: + case glslang::ElfRg8Snorm: + case glslang::ElfR16Snorm: + case glslang::ElfR8Snorm: + + case glslang::ElfRg32i: + case glslang::ElfRg16i: + case glslang::ElfRg8i: + case glslang::ElfR16i: + case glslang::ElfR8i: + + case glslang::ElfRgb10a2ui: + case glslang::ElfRg32ui: + case glslang::ElfRg16ui: + case glslang::ElfRg8ui: + case glslang::ElfR16ui: + case glslang::ElfR8ui: + builder.addCapability(spv::CapabilityStorageImageExtendedFormats); + break; + + default: + break; + } + + // do the translation switch (type.getQualifier().layoutFormat) { case glslang::ElfNone: return spv::ImageFormatUnknown; case glslang::ElfRgba32f: return spv::ImageFormatRgba32f; @@ -2137,6 +2176,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO operands.push_back(*opIt); } return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands); + if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) + builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); } else if (node->getOp() == glslang::EOpImageStore) { if (sampler.ms) { operands.push_back(*(opIt + 1)); @@ -2145,6 +2186,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } else operands.push_back(*opIt); builder.createNoResultOp(spv::OpImageWrite, operands); + if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) + builder.addCapability(spv::CapabilityStorageImageWriteWithoutFormat); return spv::NoResult; } else if (node->isSparseImage()) { spv::MissingFunctionality("sparse image functions"); @@ -2894,10 +2937,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: return createAtomicOperation(op, precision, typeId, operands, typeProxy); } - case glslang::EOpImageLoad: - unaryOp = spv::OpImageRead; - break; - case glslang::EOpBitFieldReverse: unaryOp = spv::OpBitReverse; break; diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 92ddac9e..074f8d24 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -124,6 +124,7 @@ public: Id getContainedTypeId(Id typeId) const; Id getContainedTypeId(Id typeId, int) const; StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); } + ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); } bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index 04e023a7..ca9c588d 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -7,7 +7,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 372 +// Id's are bound by 378 Capability Shader Capability SampledRect @@ -15,10 +15,12 @@ Linked fragment stage: Capability SampledCubeArray Capability SampledBuffer Capability ImageMSArray + Capability StorageImageExtendedFormats Capability ImageQuery + Capability StorageImageWriteWithoutFormat 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 356 + EntryPoint Fragment 4 "main" 362 ExecutionMode 4 OriginLowerLeft Source GLSL 450 Name 4 "main" @@ -42,8 +44,9 @@ Linked fragment stage: Name 232 "ii1D" Name 245 "ui2D" Name 248 "value" - Name 356 "fragData" - Name 371 "ic4D" + Name 357 "wo2D" + Name 362 "fragData" + Name 377 "ic4D" Decorate 15(i1D) Binding 0 Decorate 27(i2D) Binding 1 Decorate 38(i3D) Binding 2 @@ -57,6 +60,7 @@ Linked fragment stage: Decorate 108(i2DMSArray) Binding 10 Decorate 232(ii1D) Binding 11 Decorate 245(ui2D) Binding 12 + Decorate 357(wo2D) Binding 1 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -90,7 +94,7 @@ Linked fragment stage: 70: TypeImage 12(float) 1D array nonsampled format:Rgba32f 71: TypePointer UniformConstant 70 72(i1DArray): 71(ptr) Variable UniformConstant - 80: TypeImage 12(float) 2D array nonsampled format:Rgba32f + 80: TypeImage 12(float) 2D array nonsampled format:Rg16 81: TypePointer UniformConstant 80 82(i2DArray): 81(ptr) Variable UniformConstant 87: TypeImage 12(float) Buffer nonsampled format:Rgba32f @@ -138,18 +142,21 @@ Linked fragment stage: 340: 6(int) Constant 18 341: 6(int) Constant 17 349: 18(int) Constant 19 - 355: TypePointer Output 125(fvec4) - 356(fragData): 355(ptr) Variable Output - 362: TypeBool - 369: TypeVector 6(int) 4 - 370: TypePointer UniformConstant 369(ivec4) - 371(ic4D): 370(ptr) Variable UniformConstant + 355: TypeImage 12(float) 2D nonsampled format:Unknown + 356: TypePointer UniformConstant 355 + 357(wo2D): 356(ptr) Variable UniformConstant + 361: TypePointer Output 125(fvec4) + 362(fragData): 361(ptr) Variable Output + 368: TypeBool + 375: TypeVector 6(int) 4 + 376: TypePointer UniformConstant 375(ivec4) + 377(ic4D): 376(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 9(iv): 8(ptr) Variable Function 127(v): 126(ptr) Variable Function 229(ui): 228(ptr) Variable Function - 357: 126(ptr) Variable Function + 363: 126(ptr) Variable Function Store 9(iv) 11 16: 13 Load 15(i1D) 17: 6(int) ImageQuerySize 16 @@ -471,22 +478,26 @@ Linked fragment stage: 353: 18(int) Load 229(ui) 354: 18(int) IAdd 353 352 Store 229(ui) 354 - 358: 18(int) Load 229(ui) - 359: 20(ptr) AccessChain 9(iv) 237 - 360: 6(int) Load 359 - 361: 18(int) Bitcast 360 - 363: 362(bool) INotEqual 358 361 - SelectionMerge 365 None - BranchConditional 363 364 367 - 364: Label - 366: 125(fvec4) Load 127(v) - Store 357 366 - Branch 365 - 367: Label - Store 357 129 - Branch 365 - 365: Label - 368: 125(fvec4) Load 357 - Store 356(fragData) 368 + 358: 355 Load 357(wo2D) + 359: 29(ivec2) Load 142(ic2D) + 360: 125(fvec4) Load 127(v) + ImageWrite 358 359 360 + 364: 18(int) Load 229(ui) + 365: 20(ptr) AccessChain 9(iv) 237 + 366: 6(int) Load 365 + 367: 18(int) Bitcast 366 + 369: 368(bool) INotEqual 364 367 + SelectionMerge 371 None + BranchConditional 369 370 373 + 370: Label + 372: 125(fvec4) Load 127(v) + Store 363 372 + Branch 371 + 373: Label + Store 363 129 + Branch 371 + 371: Label + 374: 125(fvec4) Load 363 + Store 362(fragData) 374 Return FunctionEnd diff --git a/Test/spv.image.frag b/Test/spv.image.frag index 2ced0acf..433687dc 100644 --- a/Test/spv.image.frag +++ b/Test/spv.image.frag @@ -7,7 +7,7 @@ layout(rgba32f, binding = 3) uniform imageCube iCube; layout(rgba32f, binding = 4) uniform imageCubeArray iCubeArray; layout(rgba32f, binding = 5) uniform image2DRect i2DRect; layout(rgba32f, binding = 6) uniform image1DArray i1DArray; -layout(rgba32f, binding = 7) uniform image2DArray i2DArray; +layout(rg16, binding = 7) uniform image2DArray i2DArray; layout(rgba32f, binding = 8) uniform imageBuffer iBuffer; layout(rgba32f, binding = 9) uniform image2DMS i2DMS; layout(rgba32f, binding = 10) uniform image2DMSArray i2DMSArray; @@ -15,6 +15,8 @@ layout(rgba32f, binding = 10) uniform image2DMSArray i2DMSArray; layout(r32i, binding = 11) uniform iimage1D ii1D; layout(r32ui, binding = 12) uniform uimage2D ui2D; +writeonly layout(binding = 1) uniform image2D wo2D; + uniform int ic1D; uniform ivec2 ic2D; uniform ivec3 ic3D; @@ -84,6 +86,8 @@ void main() iv.x += imageAtomicCompSwap(ii1D, ic1D, 18, 17); ui += imageAtomicCompSwap(ui2D, ic2D, 19u, value); + imageStore(wo2D, ic2D, v); + fragData = ui != iv.y ? v : vec4(0.0); } From 019f08fcd8dc787a6b49a20a65fc4c890f822bcb Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 15 Feb 2016 15:40:42 -0700 Subject: [PATCH 58/84] SPV: Fix issue #159: use ExplicitLod forms for non-fragment stages. --- SPIRV/GlslangToSpv.cpp | 9 +++++-- SPIRV/SpvBuilder.cpp | 22 +++++++++------- SPIRV/SpvBuilder.h | 2 +- Test/baseResults/spv.150.vert.out | 42 ++++++++++++++++++++++--------- Test/spv.150.vert | 13 +++++----- 5 files changed, 57 insertions(+), 31 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 81509975..ed86cc2d 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -2236,6 +2236,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO params.coords = arguments[1]; int extraArgs = 0; + bool noImplicitLod = false; // sort out where Dref is coming from if (cubeCompare) { @@ -2257,7 +2258,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (cracked.lod) { params.lod = arguments[2]; ++extraArgs; - } else if (sampler.ms) { + } else if (glslangIntermediate->getStage() != EShLangFragment) { + // we need to invent the default lod for an explicit lod instruction for a non-fragment stage + noImplicitLod = true; + } + if (sampler.ms) { params.sample = arguments[2]; // For MS, "sample" should be specified ++extraArgs; } @@ -2295,7 +2300,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } - return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), sparse, cracked.fetch, cracked.proj, cracked.gather, params); + return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params); } spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 10ba32ce..2d6e50ec 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1286,7 +1286,7 @@ Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::v // Accept all parameters needed to create a texture instruction. // Create the correct instruction based on the inputs, and make the call. -Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, const TextureParameters& parameters) +Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters) { static const int maxTextureArgs = 10; Id texArgs[maxTextureArgs] = {}; @@ -1295,7 +1295,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, // Set up the fixed arguments // int numArgs = 0; - bool xplicit = false; + bool explicitLod = false; texArgs[numArgs++] = parameters.sampler; texArgs[numArgs++] = parameters.coords; if (parameters.Dref) @@ -1316,13 +1316,18 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, if (parameters.lod) { mask = (ImageOperandsMask)(mask | ImageOperandsLodMask); texArgs[numArgs++] = parameters.lod; - xplicit = true; - } - if (parameters.gradX) { + explicitLod = true; + } else if (parameters.gradX) { mask = (ImageOperandsMask)(mask | ImageOperandsGradMask); texArgs[numArgs++] = parameters.gradX; texArgs[numArgs++] = parameters.gradY; - xplicit = true; + explicitLod = true; + } else if (noImplicitLod && ! fetch && ! gather) { + // have to explicitly use lod of 0 if not allowed to have them be implicit, and + // we would otherwise be about to issue an implicit instruction + mask = (ImageOperandsMask)(mask | ImageOperandsLodMask); + texArgs[numArgs++] = makeFloatConstant(0.0); + explicitLod = true; } if (parameters.offset) { if (isConstant(parameters.offset)) @@ -1354,8 +1359,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, // // Set up the instruction // - Op opCode; - opCode = OpImageSampleImplicitLod; + Op opCode = OpNop; // All paths below need to set this if (fetch) { if (sparse) opCode = OpImageSparseFetch; @@ -1372,7 +1376,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, opCode = OpImageSparseGather; else opCode = OpImageGather; - } else if (xplicit) { + } else if (explicitLod) { if (parameters.Dref) { if (proj) if (sparse) diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 074f8d24..b2daffb6 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -323,7 +323,7 @@ public: }; // Select the correct texture operation based on all inputs, and emit the correct instruction - Id createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, const TextureParameters&); + Id createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicit, const TextureParameters&); // Emit the OpTextureQuery* instruction that was passed in. // Figure out the right return value and type, and return it. diff --git a/Test/baseResults/spv.150.vert.out b/Test/baseResults/spv.150.vert.out index 2a347b40..3e86aec2 100755 --- a/Test/baseResults/spv.150.vert.out +++ b/Test/baseResults/spv.150.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 50 +// Id's are bound by 67 Capability Shader Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 13 17 39 48 49 + EntryPoint Vertex 4 "main" 13 17 39 65 66 Source GLSL 150 Name 4 "main" Name 11 "gl_PerVertex" @@ -30,16 +30,17 @@ Linked vertex stage: MemberName 37(s2) 1 "d" Name 39 "s2out" Name 41 "i" - Name 46 "ui" - Name 48 "gl_VertexID" - Name 49 "gl_InstanceID" + Name 48 "s2D" + Name 63 "ui" + Name 65 "gl_VertexID" + Name 66 "gl_InstanceID" MemberDecorate 11(gl_PerVertex) 0 Invariant MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance Decorate 11(gl_PerVertex) Block - Decorate 48(gl_VertexID) BuiltIn VertexId - Decorate 49(gl_InstanceID) BuiltIn InstanceId + Decorate 65(gl_VertexID) BuiltIn VertexId + Decorate 66(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -70,11 +71,22 @@ Linked vertex stage: 38: TypePointer Output 37(s2) 39(s2out): 38(ptr) Variable Output 40: TypePointer Function 14(int) - 45: TypePointer UniformConstant 14(int) - 46(ui): 45(ptr) Variable UniformConstant - 47: TypePointer Input 14(int) - 48(gl_VertexID): 47(ptr) Variable Input -49(gl_InstanceID): 47(ptr) Variable Input + 45: TypeImage 6(float) 2D sampled format:Unknown + 46: TypeSampledImage 45 + 47: TypePointer UniformConstant 46 + 48(s2D): 47(ptr) Variable UniformConstant + 50: TypeVector 6(float) 2 + 51: 6(float) Constant 1056964608 + 52: 50(fvec2) ConstantComposite 51 51 + 53: 6(float) Constant 0 + 56: TypeVector 6(float) 3 + 57: 56(fvec3) ConstantComposite 51 51 51 + 60: 6(float) Constant 1078774989 + 62: TypePointer UniformConstant 14(int) + 63(ui): 62(ptr) Variable UniformConstant + 64: TypePointer Input 14(int) + 65(gl_VertexID): 64(ptr) Variable Input +66(gl_InstanceID): 64(ptr) Variable Input 4(main): 2 Function None 3 5: Label 41(i): 40(ptr) Variable Function @@ -92,5 +104,11 @@ Linked vertex stage: 43: 6(float) Load 23(ps) 44: 25(ptr) AccessChain 39(s2out) 21 42 27 27 33 Store 44 43 + 49: 46 Load 48(s2D) + 54: 7(fvec4) ImageSampleExplicitLod 49 52 Lod 53 + 55: 46 Load 48(s2D) + 58: 7(fvec4) ImageSampleProjExplicitLod 55 57 Lod 53 + 59: 46 Load 48(s2D) + 61: 7(fvec4) ImageSampleExplicitLod 59 52 Lod 60 Return FunctionEnd diff --git a/Test/spv.150.vert b/Test/spv.150.vert index 065275f8..686b14b0 100644 --- a/Test/spv.150.vert +++ b/Test/spv.150.vert @@ -4,6 +4,7 @@ in vec4 iv4; uniform float ps; uniform int ui; +uniform sampler2D s2D; invariant gl_Position; @@ -27,13 +28,11 @@ void main() gl_ClipDistance[2] = iv4.x; int i; s2out.d[i].b[2].w = ps; - - // test recovery from nonsupported built-ins - //float n1 = noise1(2.4); - //n1 = noise1(vec4(n1)); - //vec2 n2 = noise2(vec3(n1)); - //vec3 n3 = noise3(n2); - //vec4 n4 = noise4(n3); + + // test non-implicit lod + texture(s2D, vec2(0.5)); + textureProj(s2D, vec3(0.5)); + textureLod(s2D, vec2(0.5), 3.2); } out float gl_ClipDistance[4]; From 6c292d3ba78533fed7b5ec46bb93b53419cf6535 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 15 Feb 2016 20:58:50 -0700 Subject: [PATCH 59/84] SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl). --- SPIRV/GLSL.std.450.h | 12 +- SPIRV/GlslangToSpv.cpp | 174 +- SPIRV/SPVRemapper.cpp | 2 +- SPIRV/SpvBuilder.cpp | 82 +- SPIRV/SpvBuilder.h | 7 +- SPIRV/disassemble.cpp | 2 +- SPIRV/doc.cpp | 32 +- SPIRV/doc.h | 2 +- SPIRV/spirv.hpp | 1756 +++++++------- Test/baseResults/310.comp.out | 2 +- Test/baseResults/420.vert.out | 4 +- Test/baseResults/430.comp.out | 2 +- Test/baseResults/430.vert.out | 2 +- Test/baseResults/constErrors.frag.out | 5 +- Test/baseResults/nonVulkan.frag.out | 30 + Test/baseResults/specExamples.vert.out | 2 +- Test/baseResults/spv.100ops.frag.out | 67 +- Test/baseResults/spv.130.frag.out | 31 +- Test/baseResults/spv.140.frag.out | 7 +- Test/baseResults/spv.150.vert.out | 111 +- Test/baseResults/spv.300BuiltIns.vert.out | 131 +- Test/baseResults/spv.300layout.frag.out | 2 +- Test/baseResults/spv.300layout.vert.out | 208 +- Test/baseResults/spv.300layoutp.vert.out | 184 +- Test/baseResults/spv.310.comp.out | 16 +- Test/baseResults/spv.400.frag.out | 6 +- Test/baseResults/spv.420.geom.out | 10 +- Test/baseResults/spv.430.vert.out | 157 +- Test/baseResults/spv.AofA.frag.out | 20 +- Test/baseResults/spv.Operations.frag.out | 319 +-- Test/baseResults/spv.accessChain.frag.out | 9 +- Test/baseResults/spv.aggOps.frag.out | 594 ++--- Test/baseResults/spv.always-discard.frag.out | 2 +- Test/baseResults/spv.always-discard2.frag.out | 2 +- Test/baseResults/spv.atomic.comp.out | 321 ++- Test/baseResults/spv.bitCast.frag.out | 60 +- Test/baseResults/spv.bool.vert.out | 60 +- Test/baseResults/spv.branch-return.vert.out | 15 +- .../spv.conditionalDiscard.frag.out | 3 +- Test/baseResults/spv.conversion.frag.out | 58 +- Test/baseResults/spv.dataOut.frag.out | 2 +- Test/baseResults/spv.dataOutIndirect.frag.out | 43 +- Test/baseResults/spv.dataOutIndirect.vert.out | 11 +- Test/baseResults/spv.deepRvalue.frag.out | 3 +- Test/baseResults/spv.depthOut.frag.out | 2 +- Test/baseResults/spv.discard-dce.frag.out | 2 +- Test/baseResults/spv.do-simple.vert.out | 11 +- .../spv.do-while-continue-break.vert.out | 11 +- Test/baseResults/spv.doWhileLoop.frag.out | 53 +- Test/baseResults/spv.double.comp.out | 18 +- .../spv.earlyReturnDiscard.frag.out | 274 ++- Test/baseResults/spv.flowControl.frag.out | 86 +- .../spv.for-complex-condition.vert.out | 10 +- .../spv.for-continue-break.vert.out | 11 +- Test/baseResults/spv.for-nobody.vert.out | 11 +- Test/baseResults/spv.for-notest.vert.out | 11 +- Test/baseResults/spv.for-simple.vert.out | 11 +- Test/baseResults/spv.forLoop.frag.out | 327 +-- Test/baseResults/spv.forwardFun.frag.out | 15 +- Test/baseResults/spv.functionCall.frag.out | 19 +- .../spv.functionSemantics.frag.out | 8 +- Test/baseResults/spv.image.frag.out | 43 +- Test/baseResults/spv.intOps.vert.out | 10 +- Test/baseResults/spv.interpOps.frag.out | 83 +- Test/baseResults/spv.layoutNested.vert.out | 11 +- Test/baseResults/spv.length.frag.out | 6 +- Test/baseResults/spv.localAggregates.frag.out | 412 ++-- Test/baseResults/spv.loops.frag.out | 2008 ++++++++--------- Test/baseResults/spv.loopsArtificial.frag.out | 468 ++-- Test/baseResults/spv.matFun.vert.out | 110 +- Test/baseResults/spv.matrix.frag.out | 2 +- Test/baseResults/spv.matrix2.frag.out | 2 +- .../spv.merge-unreachable.frag.out | 2 +- Test/baseResults/spv.newTexture.frag.out | 20 +- Test/baseResults/spv.nonSquare.vert.out | 19 +- Test/baseResults/spv.precision.frag.out | 14 +- Test/baseResults/spv.prepost.frag.out | 2 +- Test/baseResults/spv.pushConstant.vert.out | 68 + Test/baseResults/spv.qualifiers.vert.out | 12 +- Test/baseResults/spv.queryL.frag.out | 22 +- Test/baseResults/spv.separate.frag.out | 427 ++++ Test/baseResults/spv.set.vert.out | 13 +- Test/baseResults/spv.shiftOps.frag.out | 24 +- Test/baseResults/spv.shortCircuit.frag.out | 376 +-- .../spv.simpleFunctionCall.frag.out | 10 +- Test/baseResults/spv.simpleMat.vert.out | 17 +- Test/baseResults/spv.sparseTexture.frag.out | 33 +- .../spv.sparseTextureClamp.frag.out | 31 +- Test/baseResults/spv.specConstant.comp.out | 55 + Test/baseResults/spv.specConstant.vert.out | 124 + .../baseResults/spv.structAssignment.frag.out | 17 +- Test/baseResults/spv.structDeref.frag.out | 25 +- Test/baseResults/spv.structure.frag.out | 15 +- Test/baseResults/spv.subpass.frag.out | 123 + Test/baseResults/spv.switch.frag.out | 16 +- Test/baseResults/spv.swizzle.frag.out | 19 +- Test/baseResults/spv.test.frag.out | 95 +- Test/baseResults/spv.test.vert.out | 16 +- Test/baseResults/spv.texture.frag.out | 33 +- Test/baseResults/spv.texture.vert.out | 18 +- Test/baseResults/spv.types.frag.out | 464 ++-- Test/baseResults/spv.uint.frag.out | 19 +- Test/baseResults/spv.uniformArray.frag.out | 21 +- .../spv.variableArrayIndex.frag.out | 247 +- Test/baseResults/spv.varyingArray.frag.out | 3 +- .../spv.varyingArrayIndirect.frag.out | 13 +- Test/baseResults/spv.voidFunction.frag.out | 25 +- .../spv.while-continue-break.vert.out | 11 +- Test/baseResults/spv.while-simple.vert.out | 11 +- Test/baseResults/spv.whileLoop.frag.out | 33 +- Test/baseResults/vulkan.comp.out | 11 + Test/baseResults/vulkan.frag.out | 42 + Test/baseResults/vulkan.vert.out | 32 + Test/nonVulkan.frag | 5 + Test/spv.100ops.frag | 4 +- Test/spv.130.frag | 5 - Test/spv.150.vert | 4 +- Test/spv.300BuiltIns.vert | 7 +- Test/spv.300layout.vert | 2 +- Test/spv.300layoutp.vert | 4 +- Test/spv.420.geom | 4 +- Test/spv.430.vert | 4 +- Test/spv.AofA.frag | 2 +- Test/spv.Operations.frag | 17 +- Test/spv.accessChain.frag | 2 +- Test/spv.aggOps.frag | 14 +- Test/spv.atomic.comp | 4 +- Test/spv.bitCast.frag | 24 +- Test/spv.branch-return.vert | 2 +- Test/spv.conversion.frag | 34 +- Test/spv.dataOutIndirect.frag | 6 +- Test/spv.doWhileLoop.frag | 4 +- Test/spv.double.comp | 2 +- Test/spv.earlyReturnDiscard.frag | 16 +- Test/spv.flowControl.frag | 6 +- Test/spv.forLoop.frag | 6 +- Test/spv.forwardFun.frag | 4 +- Test/spv.functionCall.frag | 6 +- Test/spv.functionSemantics.frag | 2 +- Test/spv.image.frag | 12 +- Test/spv.interpOps.frag | 4 +- Test/spv.length.frag | 2 +- Test/spv.localAggregates.frag | 12 +- Test/spv.loops.frag | 76 +- Test/spv.loopsArtificial.frag | 63 +- Test/spv.matFun.vert | 10 +- Test/spv.nonSquare.vert | 6 +- Test/spv.precision.frag | 8 +- Test/spv.pushConstant.vert | 17 + Test/spv.separate.frag | 95 + Test/spv.shiftOps.frag | 9 +- Test/spv.shortCircuit.frag | 14 +- Test/spv.simpleFunctionCall.frag | 2 - Test/spv.simpleMat.vert | 2 +- Test/spv.sparseTexture.frag | 8 +- Test/spv.sparseTextureClamp.frag | 8 +- Test/spv.specConstant.comp | 13 + Test/spv.specConstant.vert | 43 + Test/spv.structAssignment.frag | 6 +- Test/spv.structDeref.frag | 10 +- Test/spv.structure.frag | 4 +- Test/spv.subpass.frag | 29 + Test/spv.switch.frag | 4 +- Test/spv.swizzle.frag | 6 +- Test/spv.test.frag | 6 +- Test/spv.test.vert | 2 +- Test/spv.texture.frag | 6 +- Test/spv.types.frag | 35 +- Test/spv.uint.frag | 6 +- Test/spv.uniformArray.frag | 7 +- Test/spv.variableArrayIndex.frag | 11 +- Test/spv.varyingArrayIndirect.frag | 2 +- Test/spv.voidFunction.frag | 6 +- Test/spv.whileLoop.frag | 4 +- Test/test-spirv-list | 10 +- Test/testlist | 2 + Test/vulkan.comp | 12 + Test/vulkan.frag | 69 + Test/vulkan.vert | 37 + glslang/Include/BaseTypes.h | 4 + glslang/Include/Types.h | 172 +- glslang/Include/arrays.h | 97 +- glslang/Include/intermediate.h | 29 +- glslang/Include/revision.h | 4 +- glslang/MachineIndependent/Initialize.cpp | 149 +- glslang/MachineIndependent/Initialize.h | 11 +- glslang/MachineIndependent/IntermTraverse.cpp | 2 +- glslang/MachineIndependent/Intermediate.cpp | 65 +- glslang/MachineIndependent/ParseHelper.cpp | 315 ++- glslang/MachineIndependent/ParseHelper.h | 17 +- glslang/MachineIndependent/Scan.cpp | 95 + glslang/MachineIndependent/ShaderLang.cpp | 58 +- glslang/MachineIndependent/SymbolTable.cpp | 9 +- glslang/MachineIndependent/Versions.cpp | 37 +- glslang/MachineIndependent/Versions.h | 1 + glslang/MachineIndependent/glslang.y | 243 +- glslang/MachineIndependent/intermOut.cpp | 15 + glslang/MachineIndependent/linkValidate.cpp | 22 + .../MachineIndependent/localintermediate.h | 22 +- glslang/Public/ShaderLang.h | 2 +- 200 files changed, 7841 insertions(+), 5577 deletions(-) create mode 100644 Test/baseResults/nonVulkan.frag.out create mode 100644 Test/baseResults/spv.pushConstant.vert.out create mode 100644 Test/baseResults/spv.separate.frag.out create mode 100644 Test/baseResults/spv.specConstant.comp.out create mode 100644 Test/baseResults/spv.specConstant.vert.out create mode 100644 Test/baseResults/spv.subpass.frag.out mode change 100755 => 100644 Test/baseResults/spv.uniformArray.frag.out create mode 100644 Test/baseResults/vulkan.comp.out create mode 100644 Test/baseResults/vulkan.frag.out create mode 100644 Test/baseResults/vulkan.vert.out create mode 100644 Test/nonVulkan.frag create mode 100644 Test/spv.pushConstant.vert create mode 100644 Test/spv.separate.frag create mode 100644 Test/spv.specConstant.comp create mode 100644 Test/spv.specConstant.vert create mode 100644 Test/spv.subpass.frag create mode 100644 Test/vulkan.comp create mode 100644 Test/vulkan.frag create mode 100644 Test/vulkan.vert diff --git a/SPIRV/GLSL.std.450.h b/SPIRV/GLSL.std.450.h index d1c9b5c1..df31092b 100755 --- a/SPIRV/GLSL.std.450.h +++ b/SPIRV/GLSL.std.450.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2015 The Khronos Group Inc. +** Copyright (c) 2014-2016 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), @@ -27,8 +27,8 @@ #ifndef GLSLstd450_H #define GLSLstd450_H -const int GLSLstd450Version = 99; -const int GLSLstd450Revision = 3; +static const int GLSLstd450Version = 100; +static const int GLSLstd450Revision = 1; enum GLSLstd450 { GLSLstd450Bad = 0, // Don't use @@ -83,7 +83,7 @@ enum GLSLstd450 { GLSLstd450UClamp = 44, GLSLstd450SClamp = 45, GLSLstd450FMix = 46, - GLSLstd450IMix = 47, + GLSLstd450IMix = 47, // Reserved GLSLstd450Step = 48, GLSLstd450SmoothStep = 49, @@ -121,6 +121,10 @@ enum GLSLstd450 { GLSLstd450InterpolateAtSample = 77, GLSLstd450InterpolateAtOffset = 78, + GLSLstd450NMin = 79, + GLSLstd450NMax = 80, + GLSLstd450NClamp = 81, + GLSLstd450Count }; diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index ed86cc2d..864902cc 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1,5 +1,6 @@ // -//Copyright (C) 2014 LunarG, Inc. +//Copyright (C) 2014-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -95,6 +96,7 @@ protected: spv::Id getSampledType(const glslang::TSampler&); spv::Id convertGlslangToSpvType(const glslang::TType& type); spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&); + spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim); spv::Id accessChainLoad(const glslang::TType& type); glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const; int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix); @@ -195,6 +197,8 @@ spv::StorageClass TranslateStorageClass(const glslang::TType& type) else if (type.getQualifier().isPipeOutput()) return spv::StorageClassOutput; else if (type.getQualifier().isUniformOrBuffer()) { + if (type.getQualifier().layoutPushConstant) + return spv::StorageClassPushConstant; if (type.getBasicType() == glslang::EbtBlock) return spv::StorageClassUniform; else if (type.getBasicType() == glslang::EbtAtomicUint) @@ -225,6 +229,7 @@ spv::Dim TranslateDimensionality(const glslang::TSampler& sampler) case glslang::EsdCube: return spv::DimCube; case glslang::EsdRect: return spv::DimRect; case glslang::EsdBuffer: return spv::DimBuffer; + case glslang::EsdSubpass: return spv::DimSubpassData; default: assert(0); return spv::Dim2D; @@ -376,6 +381,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvPosition: return spv::BuiltInPosition; case glslang::EbvVertexId: return spv::BuiltInVertexId; case glslang::EbvInstanceId: return spv::BuiltInInstanceId; + case glslang::EbvVertexIndex: return spv::BuiltInVertexIndex; + case glslang::EbvInstanceIndex: return spv::BuiltInInstanceIndex; case glslang::EbvBaseVertex: case glslang::EbvBaseInstance: case glslang::EbvDrawId: @@ -492,6 +499,25 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy } } +// Return whether or not the given type is something that should be tied to a +// descriptor set. +bool IsDescriptorResource(const glslang::TType& type) +{ + // uniform and buffer blocks are included + if (type.getBasicType() == glslang::EbtBlock) + return type.getQualifier().isUniformOrBuffer(); + + // non block... + // basically samplerXXX/subpass/sampler/texture are all included + // if they are the global-scope-class, not the function parameter + // (or local, if they ever exist) class. + if (type.getBasicType() == glslang::EbtSampler) + return type.getQualifier().isUniformOrBuffer(); + + // None of the above. + return false; +} + void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& parent) { if (child.layoutMatrix == glslang::ElmNone) @@ -708,7 +734,7 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) } // Only process non-linkage-only nodes for generating actual static uses - if (! linkageOnly) { + if (! linkageOnly || symbol->getQualifier().isSpecConstant()) { // Prepare to generate code for the access // L-value chains will be computed left to right. We're on the symbol now, @@ -717,10 +743,14 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) builder.clearAccessChain(); // For now, we consider all user variables as being in memory, so they are pointers, - // except for "const in" arguments to a function, which are an intermediate object. - // See comments in handleUserFunctionCall(). - glslang::TStorageQualifier qualifier = symbol->getQualifier().storage; - if (qualifier == glslang::EvqConstReadOnly && constReadOnlyParameters.find(symbol->getId()) != constReadOnlyParameters.end()) + // except for + // A) "const in" arguments to a function, which are an intermediate object. + // See comments in handleUserFunctionCall(). + // B) Specialization constants (normal constant don't even come in as a variable), + // These are also pure R-values. + glslang::TQualifier qualifier = symbol->getQualifier(); + if ((qualifier.storage == glslang::EvqConstReadOnly && constReadOnlyParameters.find(symbol->getId()) != constReadOnlyParameters.end()) || + qualifier.isSpecConstant()) builder.setAccessChainRValue(id); else builder.setAccessChainLValue(id); @@ -1110,9 +1140,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt { if (node->isUserDefined()) result = handleUserFunctionCall(node); - assert(result); - builder.clearAccessChain(); - builder.setAccessChainRValue(result); + //assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done + if (result) { + builder.clearAccessChain(); + builder.setAccessChainRValue(result); + } else + spv::MissingFunctionality("missing user function; linker needs to catch that"); return false; } @@ -1157,12 +1190,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructUVec3: case glslang::EOpConstructUVec4: case glslang::EOpConstructStruct: + case glslang::EOpConstructTextureSampler: { std::vector arguments; translateArguments(*node, arguments); spv::Id resultTypeId = convertGlslangToSpvType(node->getType()); spv::Id constructed; - if (node->getOp() == glslang::EOpConstructStruct || node->getType().isArray()) { + if (node->getOp() == glslang::EOpConstructTextureSampler) + constructed = builder.createOp(spv::OpSampledImage, resultTypeId, arguments); + else if (node->getOp() == glslang::EOpConstructStruct || node->getType().isArray()) { std::vector constituents; for (int c = 0; c < (int)arguments.size(); ++c) constituents.push_back(arguments[c]); @@ -1640,11 +1676,17 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtSampler: { const glslang::TSampler& sampler = type.getSampler(); - // an image is present, make its type - spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms, - sampler.image ? 2 : 1, TranslateImageFormat(type)); - if (! sampler.image) { - spvType = builder.makeSampledImageType(spvType); + if (sampler.sampler) { + // pure sampler + spvType = builder.makeSamplerType(); + } else { + // an image is present, make its type + spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms, + sampler.image ? 2 : 1, TranslateImageFormat(type)); + if (sampler.combined) { + // already has both image and sampler, make the combined type + spvType = builder.makeSampledImageType(spvType); + } } } break; @@ -1790,12 +1832,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // make the arrays for (int dim = type.getArraySizes()->getNumDims() - 1; dim > 0; --dim) { - int size = type.getArraySizes()->getDimSize(dim); - assert(size > 0); - spvType = builder.makeArrayType(spvType, size, stride); + spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), dim), stride); if (stride > 0) builder.addDecoration(spvType, spv::DecorationArrayStride, stride); - stride *= size; + stride *= type.getArraySizes()->getDimSize(dim); } } else { // single-dimensional array, and don't yet have stride @@ -1810,7 +1850,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeRuntimeArray(spvType); } else { assert(type.getOuterArraySize() > 0); - spvType = builder.makeArrayType(spvType, type.getOuterArraySize(), stride); + spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride); } if (stride > 0) builder.addDecoration(spvType, spv::DecorationArrayStride, stride); @@ -1819,6 +1859,26 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty return spvType; } +// Turn the expression forming the array size into an id. +// This is not quite trivial, because of specialization constants. +// Sometimes, a raw constant is turned into an Id, and sometimes +// a specialization constant expression is. +spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim) +{ + // First, see if this is sized with a node, meaning a specialization constant: + glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim); + if (specNode != nullptr) { + builder.clearAccessChain(); + specNode->traverse(this); + return accessChainLoad(specNode->getAsTyped()->getType()); + } + + // Otherwise, need a compile-time (front end) size, get it: + int size = arraySizes.getDimSize(dim); + assert(size > 0); + return builder.makeUintConstant(size); +} + // Wrap the builder's accessChainLoad to: // - localize handling of RelaxedPrecision // - use the SPIR-V inferred type instead of another conversion of the glslang type @@ -1891,7 +1951,7 @@ int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, gl // 'currentOffset' should be passed in already initialized, ready to modify, and reflecting // the migration of data from nextOffset -> currentOffset. It should be -1 on the first call. // -1 means a non-forced member offset (no decoration needed). -void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset, +void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& /*structType*/, const glslang::TType& memberType, int& currentOffset, int& nextOffset, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout) { // this will get a positive value when deemed necessary @@ -2169,6 +2229,24 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO std::vector operands; auto opIt = arguments.begin(); operands.push_back(*(opIt++)); + + // Handle subpass operations + // TODO: GLSL should change to have the "MS" only on the type rather than the + // built-in function. + if (cracked.subpass) { + // add on the (0,0) coordinate + spv::Id zero = builder.makeIntConstant(0); + std::vector comps; + comps.push_back(zero); + comps.push_back(zero); + operands.push_back(builder.makeCompositeConstant(builder.makeVectorType(builder.makeIntType(32), 2), comps)); + if (sampler.ms) { + operands.push_back(spv::ImageOperandsSampleMask); + operands.push_back(*(opIt++)); + } + return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands); + } + operands.push_back(*(opIt++)); if (node->getOp() == glslang::EOpImageLoad) { if (sampler.ms) { @@ -3109,7 +3187,7 @@ spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vector } // For glslang ops that map to SPV atomic opCodes -spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) +spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { spv::Op opCode = spv::OpNop; @@ -3244,8 +3322,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: case glslang::EOpMix: if (isFloat) libCall = spv::GLSLstd450FMix; - else - libCall = spv::GLSLstd450IMix; + else { + opCode = spv::OpSelect; + spv::MissingFunctionality("translating integer mix to OpSelect"); + } builder.promoteScalar(precision, operands.front(), operands.back()); break; case glslang::EOpStep: @@ -3439,6 +3519,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol if (! symbol->getType().isStruct()) { addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier())); + if (symbol->getType().getQualifier().hasSpecConstantId()) + addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId); if (symbol->getQualifier().hasLocation()) builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation); if (symbol->getQualifier().hasIndex()) @@ -3463,8 +3545,14 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } if (symbol->getQualifier().hasSet()) builder.addDecoration(id, spv::DecorationDescriptorSet, symbol->getQualifier().layoutSet); + else if (IsDescriptorResource(symbol->getType())) { + // default to 0 + builder.addDecoration(id, spv::DecorationDescriptorSet, 0); + } if (symbol->getQualifier().hasBinding()) builder.addDecoration(id, spv::DecorationBinding, symbol->getQualifier().layoutBinding); + if (symbol->getQualifier().hasAttachment()) + builder.addDecoration(id, spv::DecorationInputAttachmentIndex, symbol->getQualifier().layoutAttachment); if (glslangIntermediate->getXfbMode()) { builder.addCapability(spv::CapabilityTransformFeedback); if (symbol->getQualifier().hasXfbStride()) @@ -3510,7 +3598,7 @@ void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::De } // Make a full tree of instructions to build a SPIR-V specialization constant, -// or regularly constant if possible. +// or regular constant if possible. // // TBD: this is not yet done, nor verified to be the best design, it does do the leaf symbols though // @@ -3523,10 +3611,38 @@ spv::Id TGlslangToSpvTraverser::createSpvSpecConstant(const glslang::TIntermType { assert(node.getQualifier().storage == glslang::EvqConst); - // hand off to the non-spec-constant path - assert(node.getAsConstantUnion() != nullptr || node.getAsSymbolNode() != nullptr); - int nextConst = 0; - return createSpvConstant(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(), nextConst, false); + if (! node.getQualifier().specConstant) { + // hand off to the non-spec-constant path + assert(node.getAsConstantUnion() != nullptr || node.getAsSymbolNode() != nullptr); + int nextConst = 0; + return createSpvConstant(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(), + nextConst, false); + } + + // We now know we have a specialization constant to build + + if (node.getAsSymbolNode() && node.getQualifier().hasSpecConstantId()) { + // this is a direct literal assigned to a layout(constant_id=) declaration + int nextConst = 0; + return createSpvConstant(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(), + nextConst, true); + } else { + // gl_WorkgroupSize is a special case until the front-end handles hierarchical specialization constants, + // even then, it's specialization ids are handled by special case syntax in GLSL: layout(local_size_x = ... + if (node.getType().getQualifier().builtIn == glslang::EbvWorkGroupSize) { + std::vector dimConstId; + for (int dim = 0; dim < 3; ++dim) { + bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); + dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); + if (specConst) + addDecoration(dimConstId.back(), spv::DecorationSpecId, glslangIntermediate->getLocalSizeSpecId(dim)); + } + return builder.makeCompositeConstant(builder.makeVectorType(builder.makeUintType(32), 3), dimConstId, true); + } else { + spv::MissingFunctionality("specialization-constant expression trees"); + return spv::NoResult; + } + } } // Use 'consts' as the flattened glslang source of scalar constants to recursively diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index a6290477..965867ef 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -437,7 +437,7 @@ namespace spv { } // Store IDs from instruction in our map - for (int op = 0; op < spv::InstructionDesc[opCode].operands.getNum(); ++op, --numOperands) { + for (int op = 0; numOperands > 0; ++op, --numOperands) { switch (spv::InstructionDesc[opCode].operands.getClass(op)) { case spv::OperandId: idFn(asId(word++)); diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 2d6e50ec..c6699444 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1,5 +1,6 @@ // -//Copyright (C) 2014 LunarG, Inc. +//Copyright (C) 2014-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -308,11 +309,9 @@ Id Builder::makeMatrixType(Id component, int cols, int rows) // TODO: performance: track arrays per stride // If a stride is supplied (non-zero) make an array. // If no stride (0), reuse previous array types. -Id Builder::makeArrayType(Id element, unsigned size, int stride) +// 'size' is an Id of a constant or specialization constant of the array size +Id Builder::makeArrayType(Id element, Id sizeId, int stride) { - // First, we need a constant instruction for the size - Id sizeId = makeUintConstant(size); - Instruction* type; if (stride == 0) { // try to find existing type @@ -518,8 +517,12 @@ int Builder::getNumTypeConstituents(Id typeId) const return 1; case OpTypeVector: case OpTypeMatrix: - case OpTypeArray: return instr->getImmediateOperand(1); + case OpTypeArray: + { + Id lengthId = instr->getImmediateOperand(1); + return module.getInstruction(lengthId)->getImmediateOperand(0); + } case OpTypeStruct: return instr->getNumOperands(); default: @@ -647,16 +650,19 @@ Id Builder::makeBoolConstant(bool b, bool specConstant) Instruction* constant; Op opcode = specConstant ? (b ? OpSpecConstantTrue : OpSpecConstantFalse) : (b ? OpConstantTrue : OpConstantFalse); - // See if we already made it - Id existing = 0; - for (int i = 0; i < (int)groupedConstants[OpTypeBool].size(); ++i) { - constant = groupedConstants[OpTypeBool][i]; - if (constant->getTypeId() == typeId && constant->getOpCode() == opcode) - existing = constant->getResultId(); - } + // See if we already made it. Applies only to regular constants, because specialization constants + // must remain distinct for the purpose of applying a SpecId decoration. + if (! specConstant) { + Id existing = 0; + for (int i = 0; i < (int)groupedConstants[OpTypeBool].size(); ++i) { + constant = groupedConstants[OpTypeBool][i]; + if (constant->getTypeId() == typeId && constant->getOpCode() == opcode) + existing = constant->getResultId(); + } - if (existing) - return existing; + if (existing) + return existing; + } // Make it Instruction* c = new Instruction(getUniqueId(), typeId, opcode); @@ -670,9 +676,14 @@ Id Builder::makeBoolConstant(bool b, bool specConstant) Id Builder::makeIntConstant(Id typeId, unsigned value, bool specConstant) { Op opcode = specConstant ? OpSpecConstant : OpConstant; - Id existing = findScalarConstant(OpTypeInt, opcode, typeId, value); - if (existing) - return existing; + + // See if we already made it. Applies only to regular constants, because specialization constants + // must remain distinct for the purpose of applying a SpecId decoration. + if (! specConstant) { + Id existing = findScalarConstant(OpTypeInt, opcode, typeId, value); + if (existing) + return existing; + } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); @@ -688,9 +699,14 @@ Id Builder::makeFloatConstant(float f, bool specConstant) Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(32); unsigned value = *(unsigned int*)&f; - Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value); - if (existing) - return existing; + + // See if we already made it. Applies only to regular constants, because specialization constants + // must remain distinct for the purpose of applying a SpecId decoration. + if (! specConstant) { + Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value); + if (existing) + return existing; + } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); @@ -708,9 +724,14 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) unsigned long long value = *(unsigned long long*)&d; unsigned op1 = value & 0xFFFFFFFF; unsigned op2 = value >> 32; - Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, op1, op2); - if (existing) - return existing; + + // See if we already made it. Applies only to regular constants, because specialization constants + // must remain distinct for the purpose of applying a SpecId decoration. + if (! specConstant) { + Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, op1, op2); + if (existing) + return existing; + } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(op1); @@ -751,8 +772,9 @@ Id Builder::findCompositeConstant(Op typeClass, std::vector& comps) const } // Comments in header -Id Builder::makeCompositeConstant(Id typeId, std::vector& members) +Id Builder::makeCompositeConstant(Id typeId, std::vector& members, bool specConstant) { + Op opcode = specConstant ? OpSpecConstantComposite : OpConstantComposite; assert(typeId); Op typeClass = getTypeClass(typeId); @@ -767,11 +789,13 @@ Id Builder::makeCompositeConstant(Id typeId, std::vector& members) return makeFloatConstant(0.0); } - Id existing = findCompositeConstant(typeClass, members); - if (existing) - return existing; + if (! specConstant) { + Id existing = findCompositeConstant(typeClass, members); + if (existing) + return existing; + } - Instruction* c = new Instruction(getUniqueId(), typeId, OpConstantComposite); + Instruction* c = new Instruction(getUniqueId(), typeId, opcode); for (int op = 0; op < (int)members.size(); ++op) c->addIdOperand(members[op]); constantsTypesGlobals.push_back(std::unique_ptr(c)); diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index b2daffb6..d6dc6121 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -1,5 +1,6 @@ // -//Copyright (C) 2014 LunarG, Inc. +//Copyright (C) 2014-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -104,7 +105,7 @@ public: Id makeStructResultType(Id type0, Id type1); Id makeVectorType(Id component, int size); Id makeMatrixType(Id component, int cols, int rows); - Id makeArrayType(Id element, unsigned size, int stride); // 0 means no stride decoration + Id makeArrayType(Id element, Id sizeId, int stride); // 0 stride means no stride decoration Id makeRuntimeArray(Id element); Id makeFunctionType(Id returnType, const std::vector& paramTypes); Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format); @@ -189,7 +190,7 @@ public: Id makeDoubleConstant(double d, bool specConstant = false); // Turn the array of constants into a proper spv constant of the requested type. - Id makeCompositeConstant(Id type, std::vector& comps); + Id makeCompositeConstant(Id type, std::vector& comps, bool specConst = false); // Methods for adding information outside the CFG. Instruction* addEntryPoint(ExecutionModel, Function*, const char* name); diff --git a/SPIRV/disassemble.cpp b/SPIRV/disassemble.cpp index 08f905ef..b2d30bec 100755 --- a/SPIRV/disassemble.cpp +++ b/SPIRV/disassemble.cpp @@ -473,6 +473,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, else out << OperandClassParams[operandClass].getName(stream[word++]); --numOperands; + break; } } @@ -531,7 +532,6 @@ void GLSLstd450GetDebugNames(const char** names) names[GLSLstd450SClamp] = "SClamp"; names[GLSLstd450UClamp] = "UClamp"; names[GLSLstd450FMix] = "FMix"; - names[GLSLstd450IMix] = "IMix"; names[GLSLstd450Step] = "Step"; names[GLSLstd450SmoothStep] = "SmoothStep"; names[GLSLstd450Fma] = "Fma"; diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp index 64a55f99..7cf1c87f 100755 --- a/SPIRV/doc.cpp +++ b/SPIRV/doc.cpp @@ -712,7 +712,7 @@ const char* KernelProfilingInfoString(int info) } } -const int CapabilityCeiling = 57; +const int CapabilityCeiling = 58; const char* CapabilityString(int info) { @@ -775,6 +775,7 @@ const char* CapabilityString(int info) case 54: return "GeometryStreams"; case 55: return "StorageImageReadWithoutFormat"; case 56: return "StorageImageWriteWithoutFormat"; + case 57: return "MultiViewport"; case CapabilityCeiling: default: return "Bad"; @@ -1104,6 +1105,7 @@ const char* OpcodeString(int op) case 317: return "OpNoLine"; case 318: return "OpAtomicFlagTestAndSet"; case 319: return "OpAtomicFlagClear"; + case 320: return "OpImageSparseRead"; case OpcodeCeiling: default: @@ -1311,7 +1313,6 @@ void Parameterize() CapabilityParams[CapabilityTessellation].caps.push_back(CapabilityShader); CapabilityParams[CapabilityVector16].caps.push_back(CapabilityKernel); CapabilityParams[CapabilityFloat16Buffer].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityFloat16].caps.push_back(CapabilityFloat16Buffer); CapabilityParams[CapabilityInt64Atomics].caps.push_back(CapabilityInt64); CapabilityParams[CapabilityImageBasic].caps.push_back(CapabilityKernel); CapabilityParams[CapabilityImageReadWrite].caps.push_back(CapabilityImageBasic); @@ -1353,6 +1354,7 @@ void Parameterize() CapabilityParams[CapabilityGeometryStreams].caps.push_back(CapabilityGeometry); CapabilityParams[CapabilityStorageImageReadWithoutFormat].caps.push_back(CapabilityShader); CapabilityParams[CapabilityStorageImageWriteWithoutFormat].caps.push_back(CapabilityShader); + CapabilityParams[CapabilityMultiViewport].caps.push_back(CapabilityGeometry); AddressingParams[AddressingModelPhysical32].caps.push_back(CapabilityAddresses); AddressingParams[AddressingModelPhysical64].caps.push_back(CapabilityAddresses); @@ -1362,7 +1364,7 @@ void Parameterize() MemoryParams[MemoryModelOpenCL].caps.push_back(CapabilityKernel); MemorySemanticsParams[MemorySemanticsUniformMemoryShift].caps.push_back(CapabilityShader); - MemorySemanticsParams[MemorySemanticsAtomicCounterMemoryShift].caps.push_back(CapabilityShader); + MemorySemanticsParams[MemorySemanticsAtomicCounterMemoryShift].caps.push_back(CapabilityAtomicStorage); ExecutionModelParams[ExecutionModelVertex].caps.push_back(CapabilityShader); ExecutionModelParams[ExecutionModelTessellationControl].caps.push_back(CapabilityTessellation); @@ -1528,7 +1530,7 @@ void Parameterize() DecorationParams[DecorationFlat].caps.push_back(CapabilityShader); DecorationParams[DecorationPatch].caps.push_back(CapabilityTessellation); DecorationParams[DecorationCentroid].caps.push_back(CapabilityShader); - DecorationParams[DecorationSample].caps.push_back(CapabilityShader); + DecorationParams[DecorationSample].caps.push_back(CapabilitySampleRateShading); DecorationParams[DecorationInvariant].caps.push_back(CapabilityShader); DecorationParams[DecorationConstant].caps.push_back(CapabilityKernel); DecorationParams[DecorationUniform].caps.push_back(CapabilityShader); @@ -1537,14 +1539,14 @@ void Parameterize() DecorationParams[DecorationStream].caps.push_back(CapabilityGeometryStreams); DecorationParams[DecorationLocation].caps.push_back(CapabilityShader); DecorationParams[DecorationComponent].caps.push_back(CapabilityShader); + DecorationParams[DecorationOffset].caps.push_back(CapabilityShader); DecorationParams[DecorationIndex].caps.push_back(CapabilityShader); DecorationParams[DecorationBinding].caps.push_back(CapabilityShader); DecorationParams[DecorationDescriptorSet].caps.push_back(CapabilityShader); DecorationParams[DecorationXfbBuffer].caps.push_back(CapabilityTransformFeedback); DecorationParams[DecorationXfbStride].caps.push_back(CapabilityTransformFeedback); DecorationParams[DecorationArrayStride].caps.push_back(CapabilityShader); - DecorationParams[DecorationMatrixStride].caps.push_back(CapabilityShader); - DecorationParams[DecorationBuiltIn].caps.push_back(CapabilityShader); + DecorationParams[DecorationMatrixStride].caps.push_back(CapabilityMatrix); DecorationParams[DecorationFuncParamAttr].caps.push_back(CapabilityKernel); DecorationParams[DecorationFPRoundingMode].caps.push_back(CapabilityKernel); DecorationParams[DecorationFPFastMathMode].caps.push_back(CapabilityKernel); @@ -1556,8 +1558,8 @@ void Parameterize() BuiltInParams[BuiltInPosition].caps.push_back(CapabilityShader); BuiltInParams[BuiltInPointSize].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInClipDistance].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInCullDistance].caps.push_back(CapabilityShader); + BuiltInParams[BuiltInClipDistance].caps.push_back(CapabilityClipDistance); + BuiltInParams[BuiltInCullDistance].caps.push_back(CapabilityCullDistance); BuiltInParams[BuiltInVertexId].caps.push_back(CapabilityShader); BuiltInParams[BuiltInVertexId].desc = "Vertex ID, which takes on values 0, 1, 2, . . . ."; @@ -1576,7 +1578,7 @@ void Parameterize() BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityGeometry); BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityTessellation); BuiltInParams[BuiltInLayer].caps.push_back(CapabilityGeometry); - BuiltInParams[BuiltInViewportIndex].caps.push_back(CapabilityGeometry); + BuiltInParams[BuiltInViewportIndex].caps.push_back(CapabilityMultiViewport); BuiltInParams[BuiltInTessLevelOuter].caps.push_back(CapabilityTessellation); BuiltInParams[BuiltInTessLevelInner].caps.push_back(CapabilityTessellation); BuiltInParams[BuiltInTessCoord].caps.push_back(CapabilityTessellation); @@ -1584,9 +1586,9 @@ void Parameterize() BuiltInParams[BuiltInFragCoord].caps.push_back(CapabilityShader); BuiltInParams[BuiltInPointCoord].caps.push_back(CapabilityShader); BuiltInParams[BuiltInFrontFacing].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInSampleId].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInSamplePosition].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInSampleMask].caps.push_back(CapabilityShader); + BuiltInParams[BuiltInSampleId].caps.push_back(CapabilitySampleRateShading); + BuiltInParams[BuiltInSamplePosition].caps.push_back(CapabilitySampleRateShading); + BuiltInParams[BuiltInSampleMask].caps.push_back(CapabilitySampleRateShading); BuiltInParams[BuiltInFragDepth].caps.push_back(CapabilityShader); BuiltInParams[BuiltInHelperInvocation].caps.push_back(CapabilityShader); BuiltInParams[BuiltInWorkDim].caps.push_back(CapabilityKernel); @@ -1962,6 +1964,12 @@ void Parameterize() InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); InstructionDesc[OpImageSparseDrefGather].capabilities.push_back(CapabilitySparseResidency); + InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseRead].capabilities.push_back(CapabilitySparseResidency); + InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); InstructionDesc[OpImageSparseTexelsResident].capabilities.push_back(CapabilitySparseResidency); diff --git a/SPIRV/doc.h b/SPIRV/doc.h index accdd65d..948b6fe0 100755 --- a/SPIRV/doc.h +++ b/SPIRV/doc.h @@ -243,7 +243,7 @@ protected: int resultPresent : 1; }; -const int OpcodeCeiling = 320; +const int OpcodeCeiling = 321; // The set of objects that hold all the instruction/operand // parameterization information. diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp index 65331d24..5620aba7 100755 --- a/SPIRV/spirv.hpp +++ b/SPIRV/spirv.hpp @@ -1,877 +1,879 @@ -// Copyright (c) 2014-2015 The Khronos Group Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and/or associated documentation files (the "Materials"), -// to deal in the Materials without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Materials, and to permit persons to whom the -// Materials are furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Materials. -// -// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS -// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// -// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS -// IN THE MATERIALS. - -// This header is automatically generated by the same tool that creates -// the Binary Section of the SPIR-V specification. - -// Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python -// -// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL -// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL -// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL -// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] -// -// Some tokens act like mask values, which can be OR'd together, -// while others are mutually exclusive. The mask-like ones have -// "Mask" in their name, and a parallel enum that has the shift -// amount (1 << x) for each corresponding enumerant. - -#ifndef spirv_HPP -#define spirv_HPP - -namespace spv { - -typedef unsigned int Id; - -#define SPV_VERSION 10000 -#define SPV_REVISION 2 - -static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010000; -static const unsigned int Revision = 2; -static const unsigned int OpCodeMask = 0xffff; -static const unsigned int WordCountShift = 16; - -enum SourceLanguage { - SourceLanguageUnknown = 0, - SourceLanguageESSL = 1, - SourceLanguageGLSL = 2, - SourceLanguageOpenCL_C = 3, - SourceLanguageOpenCL_CPP = 4, -}; - -enum ExecutionModel { - ExecutionModelVertex = 0, - ExecutionModelTessellationControl = 1, - ExecutionModelTessellationEvaluation = 2, - ExecutionModelGeometry = 3, - ExecutionModelFragment = 4, - ExecutionModelGLCompute = 5, - ExecutionModelKernel = 6, -}; - -enum AddressingModel { - AddressingModelLogical = 0, - AddressingModelPhysical32 = 1, - AddressingModelPhysical64 = 2, -}; - -enum MemoryModel { - MemoryModelSimple = 0, - MemoryModelGLSL450 = 1, - MemoryModelOpenCL = 2, -}; - -enum ExecutionMode { - ExecutionModeInvocations = 0, - ExecutionModeSpacingEqual = 1, - ExecutionModeSpacingFractionalEven = 2, - ExecutionModeSpacingFractionalOdd = 3, - ExecutionModeVertexOrderCw = 4, - ExecutionModeVertexOrderCcw = 5, - ExecutionModePixelCenterInteger = 6, - ExecutionModeOriginUpperLeft = 7, - ExecutionModeOriginLowerLeft = 8, - ExecutionModeEarlyFragmentTests = 9, - ExecutionModePointMode = 10, - ExecutionModeXfb = 11, - ExecutionModeDepthReplacing = 12, - ExecutionModeDepthGreater = 14, - ExecutionModeDepthLess = 15, - ExecutionModeDepthUnchanged = 16, - ExecutionModeLocalSize = 17, - ExecutionModeLocalSizeHint = 18, - ExecutionModeInputPoints = 19, - ExecutionModeInputLines = 20, - ExecutionModeInputLinesAdjacency = 21, - ExecutionModeTriangles = 22, - ExecutionModeInputTrianglesAdjacency = 23, - ExecutionModeQuads = 24, - ExecutionModeIsolines = 25, - ExecutionModeOutputVertices = 26, - ExecutionModeOutputPoints = 27, - ExecutionModeOutputLineStrip = 28, - ExecutionModeOutputTriangleStrip = 29, - ExecutionModeVecTypeHint = 30, - ExecutionModeContractionOff = 31, -}; - -enum StorageClass { - StorageClassUniformConstant = 0, - StorageClassInput = 1, - StorageClassUniform = 2, - StorageClassOutput = 3, - StorageClassWorkgroup = 4, - StorageClassCrossWorkgroup = 5, - StorageClassPrivate = 6, - StorageClassFunction = 7, - StorageClassGeneric = 8, - StorageClassPushConstant = 9, - StorageClassAtomicCounter = 10, - StorageClassImage = 11, -}; - -enum Dim { - Dim1D = 0, - Dim2D = 1, - Dim3D = 2, - DimCube = 3, - DimRect = 4, - DimBuffer = 5, - DimSubpassData = 6, -}; - -enum SamplerAddressingMode { - SamplerAddressingModeNone = 0, - SamplerAddressingModeClampToEdge = 1, - SamplerAddressingModeClamp = 2, - SamplerAddressingModeRepeat = 3, - SamplerAddressingModeRepeatMirrored = 4, -}; - -enum SamplerFilterMode { - SamplerFilterModeNearest = 0, - SamplerFilterModeLinear = 1, -}; - -enum ImageFormat { - ImageFormatUnknown = 0, - ImageFormatRgba32f = 1, - ImageFormatRgba16f = 2, - ImageFormatR32f = 3, - ImageFormatRgba8 = 4, - ImageFormatRgba8Snorm = 5, - ImageFormatRg32f = 6, - ImageFormatRg16f = 7, - ImageFormatR11fG11fB10f = 8, - ImageFormatR16f = 9, - ImageFormatRgba16 = 10, - ImageFormatRgb10A2 = 11, - ImageFormatRg16 = 12, - ImageFormatRg8 = 13, - ImageFormatR16 = 14, - ImageFormatR8 = 15, - ImageFormatRgba16Snorm = 16, - ImageFormatRg16Snorm = 17, - ImageFormatRg8Snorm = 18, - ImageFormatR16Snorm = 19, - ImageFormatR8Snorm = 20, - ImageFormatRgba32i = 21, - ImageFormatRgba16i = 22, - ImageFormatRgba8i = 23, - ImageFormatR32i = 24, - ImageFormatRg32i = 25, - ImageFormatRg16i = 26, - ImageFormatRg8i = 27, - ImageFormatR16i = 28, - ImageFormatR8i = 29, - ImageFormatRgba32ui = 30, - ImageFormatRgba16ui = 31, - ImageFormatRgba8ui = 32, - ImageFormatR32ui = 33, - ImageFormatRgb10a2ui = 34, - ImageFormatRg32ui = 35, - ImageFormatRg16ui = 36, - ImageFormatRg8ui = 37, - ImageFormatR16ui = 38, - ImageFormatR8ui = 39, -}; - -enum ImageChannelOrder { - ImageChannelOrderR = 0, - ImageChannelOrderA = 1, - ImageChannelOrderRG = 2, - ImageChannelOrderRA = 3, - ImageChannelOrderRGB = 4, - ImageChannelOrderRGBA = 5, - ImageChannelOrderBGRA = 6, - ImageChannelOrderARGB = 7, - ImageChannelOrderIntensity = 8, - ImageChannelOrderLuminance = 9, - ImageChannelOrderRx = 10, - ImageChannelOrderRGx = 11, - ImageChannelOrderRGBx = 12, - ImageChannelOrderDepth = 13, - ImageChannelOrderDepthStencil = 14, - ImageChannelOrdersRGB = 15, - ImageChannelOrdersRGBx = 16, - ImageChannelOrdersRGBA = 17, - ImageChannelOrdersBGRA = 18, -}; - -enum ImageChannelDataType { - ImageChannelDataTypeSnormInt8 = 0, - ImageChannelDataTypeSnormInt16 = 1, - ImageChannelDataTypeUnormInt8 = 2, - ImageChannelDataTypeUnormInt16 = 3, - ImageChannelDataTypeUnormShort565 = 4, - ImageChannelDataTypeUnormShort555 = 5, - ImageChannelDataTypeUnormInt101010 = 6, - ImageChannelDataTypeSignedInt8 = 7, - ImageChannelDataTypeSignedInt16 = 8, - ImageChannelDataTypeSignedInt32 = 9, - ImageChannelDataTypeUnsignedInt8 = 10, - ImageChannelDataTypeUnsignedInt16 = 11, - ImageChannelDataTypeUnsignedInt32 = 12, - ImageChannelDataTypeHalfFloat = 13, - ImageChannelDataTypeFloat = 14, - ImageChannelDataTypeUnormInt24 = 15, - ImageChannelDataTypeUnormInt101010_2 = 16, -}; - -enum ImageOperandsShift { - ImageOperandsBiasShift = 0, - ImageOperandsLodShift = 1, - ImageOperandsGradShift = 2, - ImageOperandsConstOffsetShift = 3, - ImageOperandsOffsetShift = 4, - ImageOperandsConstOffsetsShift = 5, - ImageOperandsSampleShift = 6, - ImageOperandsMinLodShift = 7, -}; - -enum ImageOperandsMask { - ImageOperandsMaskNone = 0, - ImageOperandsBiasMask = 0x00000001, - ImageOperandsLodMask = 0x00000002, - ImageOperandsGradMask = 0x00000004, - ImageOperandsConstOffsetMask = 0x00000008, - ImageOperandsOffsetMask = 0x00000010, - ImageOperandsConstOffsetsMask = 0x00000020, - ImageOperandsSampleMask = 0x00000040, - ImageOperandsMinLodMask = 0x00000080, -}; - -enum FPFastMathModeShift { - FPFastMathModeNotNaNShift = 0, - FPFastMathModeNotInfShift = 1, - FPFastMathModeNSZShift = 2, - FPFastMathModeAllowRecipShift = 3, - FPFastMathModeFastShift = 4, -}; - -enum FPFastMathModeMask { - FPFastMathModeMaskNone = 0, - FPFastMathModeNotNaNMask = 0x00000001, - FPFastMathModeNotInfMask = 0x00000002, - FPFastMathModeNSZMask = 0x00000004, - FPFastMathModeAllowRecipMask = 0x00000008, - FPFastMathModeFastMask = 0x00000010, -}; - -enum FPRoundingMode { - FPRoundingModeRTE = 0, - FPRoundingModeRTZ = 1, - FPRoundingModeRTP = 2, - FPRoundingModeRTN = 3, -}; - -enum LinkageType { - LinkageTypeExport = 0, - LinkageTypeImport = 1, -}; - -enum AccessQualifier { - AccessQualifierReadOnly = 0, - AccessQualifierWriteOnly = 1, - AccessQualifierReadWrite = 2, -}; - -enum FunctionParameterAttribute { - FunctionParameterAttributeZext = 0, - FunctionParameterAttributeSext = 1, - FunctionParameterAttributeByVal = 2, - FunctionParameterAttributeSret = 3, - FunctionParameterAttributeNoAlias = 4, - FunctionParameterAttributeNoCapture = 5, - FunctionParameterAttributeNoWrite = 6, - FunctionParameterAttributeNoReadWrite = 7, -}; - -enum Decoration { - DecorationRelaxedPrecision = 0, - DecorationSpecId = 1, - DecorationBlock = 2, - DecorationBufferBlock = 3, - DecorationRowMajor = 4, - DecorationColMajor = 5, - DecorationArrayStride = 6, - DecorationMatrixStride = 7, - DecorationGLSLShared = 8, - DecorationGLSLPacked = 9, - DecorationCPacked = 10, - DecorationBuiltIn = 11, - DecorationNoPerspective = 13, - DecorationFlat = 14, - DecorationPatch = 15, - DecorationCentroid = 16, - DecorationSample = 17, - DecorationInvariant = 18, - DecorationRestrict = 19, - DecorationAliased = 20, - DecorationVolatile = 21, - DecorationConstant = 22, - DecorationCoherent = 23, - DecorationNonWritable = 24, - DecorationNonReadable = 25, - DecorationUniform = 26, - DecorationSaturatedConversion = 28, - DecorationStream = 29, - DecorationLocation = 30, - DecorationComponent = 31, - DecorationIndex = 32, - DecorationBinding = 33, - DecorationDescriptorSet = 34, - DecorationOffset = 35, - DecorationXfbBuffer = 36, - DecorationXfbStride = 37, - DecorationFuncParamAttr = 38, - DecorationFPRoundingMode = 39, - DecorationFPFastMathMode = 40, - DecorationLinkageAttributes = 41, - DecorationNoContraction = 42, - DecorationInputAttachmentIndex = 43, - DecorationAlignment = 44, -}; - -enum BuiltIn { - BuiltInPosition = 0, - BuiltInPointSize = 1, - BuiltInClipDistance = 3, - BuiltInCullDistance = 4, - BuiltInVertexId = 5, - BuiltInInstanceId = 6, - BuiltInPrimitiveId = 7, - BuiltInInvocationId = 8, - BuiltInLayer = 9, - BuiltInViewportIndex = 10, - BuiltInTessLevelOuter = 11, - BuiltInTessLevelInner = 12, - BuiltInTessCoord = 13, - BuiltInPatchVertices = 14, - BuiltInFragCoord = 15, - BuiltInPointCoord = 16, - BuiltInFrontFacing = 17, - BuiltInSampleId = 18, - BuiltInSamplePosition = 19, - BuiltInSampleMask = 20, - BuiltInFragDepth = 22, - BuiltInHelperInvocation = 23, - BuiltInNumWorkgroups = 24, - BuiltInWorkgroupSize = 25, - BuiltInWorkgroupId = 26, - BuiltInLocalInvocationId = 27, - BuiltInGlobalInvocationId = 28, - BuiltInLocalInvocationIndex = 29, - BuiltInWorkDim = 30, - BuiltInGlobalSize = 31, - BuiltInEnqueuedWorkgroupSize = 32, - BuiltInGlobalOffset = 33, - BuiltInGlobalLinearId = 34, - BuiltInSubgroupSize = 36, - BuiltInSubgroupMaxSize = 37, - BuiltInNumSubgroups = 38, - BuiltInNumEnqueuedSubgroups = 39, - BuiltInSubgroupId = 40, - BuiltInSubgroupLocalInvocationId = 41, - BuiltInVertexIndex = 42, - BuiltInInstanceIndex = 43, -}; - -enum SelectionControlShift { - SelectionControlFlattenShift = 0, - SelectionControlDontFlattenShift = 1, -}; - -enum SelectionControlMask { - SelectionControlMaskNone = 0, - SelectionControlFlattenMask = 0x00000001, - SelectionControlDontFlattenMask = 0x00000002, -}; - -enum LoopControlShift { - LoopControlUnrollShift = 0, - LoopControlDontUnrollShift = 1, -}; - -enum LoopControlMask { - LoopControlMaskNone = 0, - LoopControlUnrollMask = 0x00000001, - LoopControlDontUnrollMask = 0x00000002, -}; - -enum FunctionControlShift { - FunctionControlInlineShift = 0, - FunctionControlDontInlineShift = 1, - FunctionControlPureShift = 2, - FunctionControlConstShift = 3, -}; - -enum FunctionControlMask { - FunctionControlMaskNone = 0, - FunctionControlInlineMask = 0x00000001, - FunctionControlDontInlineMask = 0x00000002, - FunctionControlPureMask = 0x00000004, - FunctionControlConstMask = 0x00000008, -}; - -enum MemorySemanticsShift { - MemorySemanticsAcquireShift = 1, - MemorySemanticsReleaseShift = 2, - MemorySemanticsAcquireReleaseShift = 3, - MemorySemanticsSequentiallyConsistentShift = 4, - MemorySemanticsUniformMemoryShift = 6, - MemorySemanticsSubgroupMemoryShift = 7, - MemorySemanticsWorkgroupMemoryShift = 8, - MemorySemanticsCrossWorkgroupMemoryShift = 9, - MemorySemanticsAtomicCounterMemoryShift = 10, - MemorySemanticsImageMemoryShift = 11, -}; - -enum MemorySemanticsMask { - MemorySemanticsMaskNone = 0, - MemorySemanticsAcquireMask = 0x00000002, - MemorySemanticsReleaseMask = 0x00000004, - MemorySemanticsAcquireReleaseMask = 0x00000008, - MemorySemanticsSequentiallyConsistentMask = 0x00000010, - MemorySemanticsUniformMemoryMask = 0x00000040, - MemorySemanticsSubgroupMemoryMask = 0x00000080, - MemorySemanticsWorkgroupMemoryMask = 0x00000100, - MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, - MemorySemanticsAtomicCounterMemoryMask = 0x00000400, - MemorySemanticsImageMemoryMask = 0x00000800, -}; - -enum MemoryAccessShift { - MemoryAccessVolatileShift = 0, - MemoryAccessAlignedShift = 1, - MemoryAccessNontemporalShift = 2, -}; - -enum MemoryAccessMask { - MemoryAccessMaskNone = 0, - MemoryAccessVolatileMask = 0x00000001, - MemoryAccessAlignedMask = 0x00000002, - MemoryAccessNontemporalMask = 0x00000004, -}; - -enum Scope { - ScopeCrossDevice = 0, - ScopeDevice = 1, - ScopeWorkgroup = 2, - ScopeSubgroup = 3, - ScopeInvocation = 4, -}; - -enum GroupOperation { - GroupOperationReduce = 0, - GroupOperationInclusiveScan = 1, - GroupOperationExclusiveScan = 2, -}; - -enum KernelEnqueueFlags { - KernelEnqueueFlagsNoWait = 0, - KernelEnqueueFlagsWaitKernel = 1, - KernelEnqueueFlagsWaitWorkGroup = 2, -}; - -enum KernelProfilingInfoShift { - KernelProfilingInfoCmdExecTimeShift = 0, -}; - -enum KernelProfilingInfoMask { - KernelProfilingInfoMaskNone = 0, - KernelProfilingInfoCmdExecTimeMask = 0x00000001, -}; - -enum Capability { - CapabilityMatrix = 0, - CapabilityShader = 1, - CapabilityGeometry = 2, - CapabilityTessellation = 3, - CapabilityAddresses = 4, - CapabilityLinkage = 5, - CapabilityKernel = 6, - CapabilityVector16 = 7, - CapabilityFloat16Buffer = 8, - CapabilityFloat16 = 9, - CapabilityFloat64 = 10, - CapabilityInt64 = 11, - CapabilityInt64Atomics = 12, - CapabilityImageBasic = 13, - CapabilityImageReadWrite = 14, - CapabilityImageMipmap = 15, - CapabilityPipes = 17, - CapabilityGroups = 18, - CapabilityDeviceEnqueue = 19, - CapabilityLiteralSampler = 20, - CapabilityAtomicStorage = 21, - CapabilityInt16 = 22, - CapabilityTessellationPointSize = 23, - CapabilityGeometryPointSize = 24, - CapabilityImageGatherExtended = 25, - CapabilityStorageImageMultisample = 27, - CapabilityUniformBufferArrayDynamicIndexing = 28, - CapabilitySampledImageArrayDynamicIndexing = 29, - CapabilityStorageBufferArrayDynamicIndexing = 30, - CapabilityStorageImageArrayDynamicIndexing = 31, - CapabilityClipDistance = 32, - CapabilityCullDistance = 33, - CapabilityImageCubeArray = 34, - CapabilitySampleRateShading = 35, - CapabilityImageRect = 36, - CapabilitySampledRect = 37, - CapabilityGenericPointer = 38, - CapabilityInt8 = 39, - CapabilityInputAttachment = 40, - CapabilitySparseResidency = 41, - CapabilityMinLod = 42, - CapabilitySampled1D = 43, - CapabilityImage1D = 44, - CapabilitySampledCubeArray = 45, - CapabilitySampledBuffer = 46, - CapabilityImageBuffer = 47, - CapabilityImageMSArray = 48, - CapabilityStorageImageExtendedFormats = 49, - CapabilityImageQuery = 50, - CapabilityDerivativeControl = 51, - CapabilityInterpolationFunction = 52, - CapabilityTransformFeedback = 53, - CapabilityGeometryStreams = 54, - CapabilityStorageImageReadWithoutFormat = 55, - CapabilityStorageImageWriteWithoutFormat = 56, -}; - -enum Op { - OpNop = 0, - OpUndef = 1, - OpSourceContinued = 2, - OpSource = 3, - OpSourceExtension = 4, - OpName = 5, - OpMemberName = 6, - OpString = 7, - OpLine = 8, - OpExtension = 10, - OpExtInstImport = 11, - OpExtInst = 12, - OpMemoryModel = 14, - OpEntryPoint = 15, - OpExecutionMode = 16, - OpCapability = 17, - OpTypeVoid = 19, - OpTypeBool = 20, - OpTypeInt = 21, - OpTypeFloat = 22, - OpTypeVector = 23, - OpTypeMatrix = 24, - OpTypeImage = 25, - OpTypeSampler = 26, - OpTypeSampledImage = 27, - OpTypeArray = 28, - OpTypeRuntimeArray = 29, - OpTypeStruct = 30, - OpTypeOpaque = 31, - OpTypePointer = 32, - OpTypeFunction = 33, - OpTypeEvent = 34, - OpTypeDeviceEvent = 35, - OpTypeReserveId = 36, - OpTypeQueue = 37, - OpTypePipe = 38, - OpTypeForwardPointer = 39, - OpConstantTrue = 41, - OpConstantFalse = 42, - OpConstant = 43, - OpConstantComposite = 44, - OpConstantSampler = 45, - OpConstantNull = 46, - OpSpecConstantTrue = 48, - OpSpecConstantFalse = 49, - OpSpecConstant = 50, - OpSpecConstantComposite = 51, - OpSpecConstantOp = 52, - OpFunction = 54, - OpFunctionParameter = 55, - OpFunctionEnd = 56, - OpFunctionCall = 57, - OpVariable = 59, - OpImageTexelPointer = 60, - OpLoad = 61, - OpStore = 62, - OpCopyMemory = 63, - OpCopyMemorySized = 64, - OpAccessChain = 65, - OpInBoundsAccessChain = 66, - OpPtrAccessChain = 67, - OpArrayLength = 68, - OpGenericPtrMemSemantics = 69, - OpInBoundsPtrAccessChain = 70, - OpDecorate = 71, - OpMemberDecorate = 72, - OpDecorationGroup = 73, - OpGroupDecorate = 74, - OpGroupMemberDecorate = 75, - OpVectorExtractDynamic = 77, - OpVectorInsertDynamic = 78, - OpVectorShuffle = 79, - OpCompositeConstruct = 80, - OpCompositeExtract = 81, - OpCompositeInsert = 82, - OpCopyObject = 83, - OpTranspose = 84, - OpSampledImage = 86, - OpImageSampleImplicitLod = 87, - OpImageSampleExplicitLod = 88, - OpImageSampleDrefImplicitLod = 89, - OpImageSampleDrefExplicitLod = 90, - OpImageSampleProjImplicitLod = 91, - OpImageSampleProjExplicitLod = 92, - OpImageSampleProjDrefImplicitLod = 93, - OpImageSampleProjDrefExplicitLod = 94, - OpImageFetch = 95, - OpImageGather = 96, - OpImageDrefGather = 97, - OpImageRead = 98, - OpImageWrite = 99, - OpImage = 100, - OpImageQueryFormat = 101, - OpImageQueryOrder = 102, - OpImageQuerySizeLod = 103, - OpImageQuerySize = 104, - OpImageQueryLod = 105, - OpImageQueryLevels = 106, - OpImageQuerySamples = 107, - OpConvertFToU = 109, - OpConvertFToS = 110, - OpConvertSToF = 111, - OpConvertUToF = 112, - OpUConvert = 113, - OpSConvert = 114, - OpFConvert = 115, - OpQuantizeToF16 = 116, - OpConvertPtrToU = 117, - OpSatConvertSToU = 118, - OpSatConvertUToS = 119, - OpConvertUToPtr = 120, - OpPtrCastToGeneric = 121, - OpGenericCastToPtr = 122, - OpGenericCastToPtrExplicit = 123, - OpBitcast = 124, - OpSNegate = 126, - OpFNegate = 127, - OpIAdd = 128, - OpFAdd = 129, - OpISub = 130, - OpFSub = 131, - OpIMul = 132, - OpFMul = 133, - OpUDiv = 134, - OpSDiv = 135, - OpFDiv = 136, - OpUMod = 137, - OpSRem = 138, - OpSMod = 139, - OpFRem = 140, - OpFMod = 141, - OpVectorTimesScalar = 142, - OpMatrixTimesScalar = 143, - OpVectorTimesMatrix = 144, - OpMatrixTimesVector = 145, - OpMatrixTimesMatrix = 146, - OpOuterProduct = 147, - OpDot = 148, - OpIAddCarry = 149, - OpISubBorrow = 150, - OpUMulExtended = 151, - OpSMulExtended = 152, - OpAny = 154, - OpAll = 155, - OpIsNan = 156, - OpIsInf = 157, - OpIsFinite = 158, - OpIsNormal = 159, - OpSignBitSet = 160, - OpLessOrGreater = 161, - OpOrdered = 162, - OpUnordered = 163, - OpLogicalEqual = 164, - OpLogicalNotEqual = 165, - OpLogicalOr = 166, - OpLogicalAnd = 167, - OpLogicalNot = 168, - OpSelect = 169, - OpIEqual = 170, - OpINotEqual = 171, - OpUGreaterThan = 172, - OpSGreaterThan = 173, - OpUGreaterThanEqual = 174, - OpSGreaterThanEqual = 175, - OpULessThan = 176, - OpSLessThan = 177, - OpULessThanEqual = 178, - OpSLessThanEqual = 179, - OpFOrdEqual = 180, - OpFUnordEqual = 181, - OpFOrdNotEqual = 182, - OpFUnordNotEqual = 183, - OpFOrdLessThan = 184, - OpFUnordLessThan = 185, - OpFOrdGreaterThan = 186, - OpFUnordGreaterThan = 187, - OpFOrdLessThanEqual = 188, - OpFUnordLessThanEqual = 189, - OpFOrdGreaterThanEqual = 190, - OpFUnordGreaterThanEqual = 191, - OpShiftRightLogical = 194, - OpShiftRightArithmetic = 195, - OpShiftLeftLogical = 196, - OpBitwiseOr = 197, - OpBitwiseXor = 198, - OpBitwiseAnd = 199, - OpNot = 200, - OpBitFieldInsert = 201, - OpBitFieldSExtract = 202, - OpBitFieldUExtract = 203, - OpBitReverse = 204, - OpBitCount = 205, - OpDPdx = 207, - OpDPdy = 208, - OpFwidth = 209, - OpDPdxFine = 210, - OpDPdyFine = 211, - OpFwidthFine = 212, - OpDPdxCoarse = 213, - OpDPdyCoarse = 214, - OpFwidthCoarse = 215, - OpEmitVertex = 218, - OpEndPrimitive = 219, - OpEmitStreamVertex = 220, - OpEndStreamPrimitive = 221, - OpControlBarrier = 224, - OpMemoryBarrier = 225, - OpAtomicLoad = 227, - OpAtomicStore = 228, - OpAtomicExchange = 229, - OpAtomicCompareExchange = 230, - OpAtomicCompareExchangeWeak = 231, - OpAtomicIIncrement = 232, - OpAtomicIDecrement = 233, - OpAtomicIAdd = 234, - OpAtomicISub = 235, - OpAtomicSMin = 236, - OpAtomicUMin = 237, - OpAtomicSMax = 238, - OpAtomicUMax = 239, - OpAtomicAnd = 240, - OpAtomicOr = 241, - OpAtomicXor = 242, - OpPhi = 245, - OpLoopMerge = 246, - OpSelectionMerge = 247, - OpLabel = 248, - OpBranch = 249, - OpBranchConditional = 250, - OpSwitch = 251, - OpKill = 252, - OpReturn = 253, - OpReturnValue = 254, - OpUnreachable = 255, - OpLifetimeStart = 256, - OpLifetimeStop = 257, - OpGroupAsyncCopy = 259, - OpGroupWaitEvents = 260, - OpGroupAll = 261, - OpGroupAny = 262, - OpGroupBroadcast = 263, - OpGroupIAdd = 264, - OpGroupFAdd = 265, - OpGroupFMin = 266, - OpGroupUMin = 267, - OpGroupSMin = 268, - OpGroupFMax = 269, - OpGroupUMax = 270, - OpGroupSMax = 271, - OpReadPipe = 274, - OpWritePipe = 275, - OpReservedReadPipe = 276, - OpReservedWritePipe = 277, - OpReserveReadPipePackets = 278, - OpReserveWritePipePackets = 279, - OpCommitReadPipe = 280, - OpCommitWritePipe = 281, - OpIsValidReserveId = 282, - OpGetNumPipePackets = 283, - OpGetMaxPipePackets = 284, - OpGroupReserveReadPipePackets = 285, - OpGroupReserveWritePipePackets = 286, - OpGroupCommitReadPipe = 287, - OpGroupCommitWritePipe = 288, - OpEnqueueMarker = 291, - OpEnqueueKernel = 292, - OpGetKernelNDrangeSubGroupCount = 293, - OpGetKernelNDrangeMaxSubGroupSize = 294, - OpGetKernelWorkGroupSize = 295, - OpGetKernelPreferredWorkGroupSizeMultiple = 296, - OpRetainEvent = 297, - OpReleaseEvent = 298, - OpCreateUserEvent = 299, - OpIsValidEvent = 300, - OpSetUserEventStatus = 301, - OpCaptureEventProfilingInfo = 302, - OpGetDefaultQueue = 303, - OpBuildNDRange = 304, - OpImageSparseSampleImplicitLod = 305, - OpImageSparseSampleExplicitLod = 306, - OpImageSparseSampleDrefImplicitLod = 307, - OpImageSparseSampleDrefExplicitLod = 308, - OpImageSparseSampleProjImplicitLod = 309, - OpImageSparseSampleProjExplicitLod = 310, - OpImageSparseSampleProjDrefImplicitLod = 311, - OpImageSparseSampleProjDrefExplicitLod = 312, - OpImageSparseFetch = 313, - OpImageSparseGather = 314, - OpImageSparseDrefGather = 315, - OpImageSparseTexelsResident = 316, - OpNoLine = 317, - OpAtomicFlagTestAndSet = 318, - OpAtomicFlagClear = 319, -}; - -// Overload operator| for mask bit combining - -inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } -inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } -inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } -inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } -inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } -inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } -inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } -inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } - -} // end namespace spv - -#endif // #ifndef spirv_HPP +// Copyright (c) 2014-2016 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +#ifndef spirv_HPP +#define spirv_HPP + +namespace spv { + +typedef unsigned int Id; + +#define SPV_VERSION 0x10000 +#define SPV_REVISION 3 + +static const unsigned int MagicNumber = 0x07230203; +static const unsigned int Version = 0x00010000; +static const unsigned int Revision = 3; +static const unsigned int OpCodeMask = 0xffff; +static const unsigned int WordCountShift = 16; + +enum SourceLanguage { + SourceLanguageUnknown = 0, + SourceLanguageESSL = 1, + SourceLanguageGLSL = 2, + SourceLanguageOpenCL_C = 3, + SourceLanguageOpenCL_CPP = 4, +}; + +enum ExecutionModel { + ExecutionModelVertex = 0, + ExecutionModelTessellationControl = 1, + ExecutionModelTessellationEvaluation = 2, + ExecutionModelGeometry = 3, + ExecutionModelFragment = 4, + ExecutionModelGLCompute = 5, + ExecutionModelKernel = 6, +}; + +enum AddressingModel { + AddressingModelLogical = 0, + AddressingModelPhysical32 = 1, + AddressingModelPhysical64 = 2, +}; + +enum MemoryModel { + MemoryModelSimple = 0, + MemoryModelGLSL450 = 1, + MemoryModelOpenCL = 2, +}; + +enum ExecutionMode { + ExecutionModeInvocations = 0, + ExecutionModeSpacingEqual = 1, + ExecutionModeSpacingFractionalEven = 2, + ExecutionModeSpacingFractionalOdd = 3, + ExecutionModeVertexOrderCw = 4, + ExecutionModeVertexOrderCcw = 5, + ExecutionModePixelCenterInteger = 6, + ExecutionModeOriginUpperLeft = 7, + ExecutionModeOriginLowerLeft = 8, + ExecutionModeEarlyFragmentTests = 9, + ExecutionModePointMode = 10, + ExecutionModeXfb = 11, + ExecutionModeDepthReplacing = 12, + ExecutionModeDepthGreater = 14, + ExecutionModeDepthLess = 15, + ExecutionModeDepthUnchanged = 16, + ExecutionModeLocalSize = 17, + ExecutionModeLocalSizeHint = 18, + ExecutionModeInputPoints = 19, + ExecutionModeInputLines = 20, + ExecutionModeInputLinesAdjacency = 21, + ExecutionModeTriangles = 22, + ExecutionModeInputTrianglesAdjacency = 23, + ExecutionModeQuads = 24, + ExecutionModeIsolines = 25, + ExecutionModeOutputVertices = 26, + ExecutionModeOutputPoints = 27, + ExecutionModeOutputLineStrip = 28, + ExecutionModeOutputTriangleStrip = 29, + ExecutionModeVecTypeHint = 30, + ExecutionModeContractionOff = 31, +}; + +enum StorageClass { + StorageClassUniformConstant = 0, + StorageClassInput = 1, + StorageClassUniform = 2, + StorageClassOutput = 3, + StorageClassWorkgroup = 4, + StorageClassCrossWorkgroup = 5, + StorageClassPrivate = 6, + StorageClassFunction = 7, + StorageClassGeneric = 8, + StorageClassPushConstant = 9, + StorageClassAtomicCounter = 10, + StorageClassImage = 11, +}; + +enum Dim { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + DimCube = 3, + DimRect = 4, + DimBuffer = 5, + DimSubpassData = 6, +}; + +enum SamplerAddressingMode { + SamplerAddressingModeNone = 0, + SamplerAddressingModeClampToEdge = 1, + SamplerAddressingModeClamp = 2, + SamplerAddressingModeRepeat = 3, + SamplerAddressingModeRepeatMirrored = 4, +}; + +enum SamplerFilterMode { + SamplerFilterModeNearest = 0, + SamplerFilterModeLinear = 1, +}; + +enum ImageFormat { + ImageFormatUnknown = 0, + ImageFormatRgba32f = 1, + ImageFormatRgba16f = 2, + ImageFormatR32f = 3, + ImageFormatRgba8 = 4, + ImageFormatRgba8Snorm = 5, + ImageFormatRg32f = 6, + ImageFormatRg16f = 7, + ImageFormatR11fG11fB10f = 8, + ImageFormatR16f = 9, + ImageFormatRgba16 = 10, + ImageFormatRgb10A2 = 11, + ImageFormatRg16 = 12, + ImageFormatRg8 = 13, + ImageFormatR16 = 14, + ImageFormatR8 = 15, + ImageFormatRgba16Snorm = 16, + ImageFormatRg16Snorm = 17, + ImageFormatRg8Snorm = 18, + ImageFormatR16Snorm = 19, + ImageFormatR8Snorm = 20, + ImageFormatRgba32i = 21, + ImageFormatRgba16i = 22, + ImageFormatRgba8i = 23, + ImageFormatR32i = 24, + ImageFormatRg32i = 25, + ImageFormatRg16i = 26, + ImageFormatRg8i = 27, + ImageFormatR16i = 28, + ImageFormatR8i = 29, + ImageFormatRgba32ui = 30, + ImageFormatRgba16ui = 31, + ImageFormatRgba8ui = 32, + ImageFormatR32ui = 33, + ImageFormatRgb10a2ui = 34, + ImageFormatRg32ui = 35, + ImageFormatRg16ui = 36, + ImageFormatRg8ui = 37, + ImageFormatR16ui = 38, + ImageFormatR8ui = 39, +}; + +enum ImageChannelOrder { + ImageChannelOrderR = 0, + ImageChannelOrderA = 1, + ImageChannelOrderRG = 2, + ImageChannelOrderRA = 3, + ImageChannelOrderRGB = 4, + ImageChannelOrderRGBA = 5, + ImageChannelOrderBGRA = 6, + ImageChannelOrderARGB = 7, + ImageChannelOrderIntensity = 8, + ImageChannelOrderLuminance = 9, + ImageChannelOrderRx = 10, + ImageChannelOrderRGx = 11, + ImageChannelOrderRGBx = 12, + ImageChannelOrderDepth = 13, + ImageChannelOrderDepthStencil = 14, + ImageChannelOrdersRGB = 15, + ImageChannelOrdersRGBx = 16, + ImageChannelOrdersRGBA = 17, + ImageChannelOrdersBGRA = 18, +}; + +enum ImageChannelDataType { + ImageChannelDataTypeSnormInt8 = 0, + ImageChannelDataTypeSnormInt16 = 1, + ImageChannelDataTypeUnormInt8 = 2, + ImageChannelDataTypeUnormInt16 = 3, + ImageChannelDataTypeUnormShort565 = 4, + ImageChannelDataTypeUnormShort555 = 5, + ImageChannelDataTypeUnormInt101010 = 6, + ImageChannelDataTypeSignedInt8 = 7, + ImageChannelDataTypeSignedInt16 = 8, + ImageChannelDataTypeSignedInt32 = 9, + ImageChannelDataTypeUnsignedInt8 = 10, + ImageChannelDataTypeUnsignedInt16 = 11, + ImageChannelDataTypeUnsignedInt32 = 12, + ImageChannelDataTypeHalfFloat = 13, + ImageChannelDataTypeFloat = 14, + ImageChannelDataTypeUnormInt24 = 15, + ImageChannelDataTypeUnormInt101010_2 = 16, +}; + +enum ImageOperandsShift { + ImageOperandsBiasShift = 0, + ImageOperandsLodShift = 1, + ImageOperandsGradShift = 2, + ImageOperandsConstOffsetShift = 3, + ImageOperandsOffsetShift = 4, + ImageOperandsConstOffsetsShift = 5, + ImageOperandsSampleShift = 6, + ImageOperandsMinLodShift = 7, +}; + +enum ImageOperandsMask { + ImageOperandsMaskNone = 0, + ImageOperandsBiasMask = 0x00000001, + ImageOperandsLodMask = 0x00000002, + ImageOperandsGradMask = 0x00000004, + ImageOperandsConstOffsetMask = 0x00000008, + ImageOperandsOffsetMask = 0x00000010, + ImageOperandsConstOffsetsMask = 0x00000020, + ImageOperandsSampleMask = 0x00000040, + ImageOperandsMinLodMask = 0x00000080, +}; + +enum FPFastMathModeShift { + FPFastMathModeNotNaNShift = 0, + FPFastMathModeNotInfShift = 1, + FPFastMathModeNSZShift = 2, + FPFastMathModeAllowRecipShift = 3, + FPFastMathModeFastShift = 4, +}; + +enum FPFastMathModeMask { + FPFastMathModeMaskNone = 0, + FPFastMathModeNotNaNMask = 0x00000001, + FPFastMathModeNotInfMask = 0x00000002, + FPFastMathModeNSZMask = 0x00000004, + FPFastMathModeAllowRecipMask = 0x00000008, + FPFastMathModeFastMask = 0x00000010, +}; + +enum FPRoundingMode { + FPRoundingModeRTE = 0, + FPRoundingModeRTZ = 1, + FPRoundingModeRTP = 2, + FPRoundingModeRTN = 3, +}; + +enum LinkageType { + LinkageTypeExport = 0, + LinkageTypeImport = 1, +}; + +enum AccessQualifier { + AccessQualifierReadOnly = 0, + AccessQualifierWriteOnly = 1, + AccessQualifierReadWrite = 2, +}; + +enum FunctionParameterAttribute { + FunctionParameterAttributeZext = 0, + FunctionParameterAttributeSext = 1, + FunctionParameterAttributeByVal = 2, + FunctionParameterAttributeSret = 3, + FunctionParameterAttributeNoAlias = 4, + FunctionParameterAttributeNoCapture = 5, + FunctionParameterAttributeNoWrite = 6, + FunctionParameterAttributeNoReadWrite = 7, +}; + +enum Decoration { + DecorationRelaxedPrecision = 0, + DecorationSpecId = 1, + DecorationBlock = 2, + DecorationBufferBlock = 3, + DecorationRowMajor = 4, + DecorationColMajor = 5, + DecorationArrayStride = 6, + DecorationMatrixStride = 7, + DecorationGLSLShared = 8, + DecorationGLSLPacked = 9, + DecorationCPacked = 10, + DecorationBuiltIn = 11, + DecorationNoPerspective = 13, + DecorationFlat = 14, + DecorationPatch = 15, + DecorationCentroid = 16, + DecorationSample = 17, + DecorationInvariant = 18, + DecorationRestrict = 19, + DecorationAliased = 20, + DecorationVolatile = 21, + DecorationConstant = 22, + DecorationCoherent = 23, + DecorationNonWritable = 24, + DecorationNonReadable = 25, + DecorationUniform = 26, + DecorationSaturatedConversion = 28, + DecorationStream = 29, + DecorationLocation = 30, + DecorationComponent = 31, + DecorationIndex = 32, + DecorationBinding = 33, + DecorationDescriptorSet = 34, + DecorationOffset = 35, + DecorationXfbBuffer = 36, + DecorationXfbStride = 37, + DecorationFuncParamAttr = 38, + DecorationFPRoundingMode = 39, + DecorationFPFastMathMode = 40, + DecorationLinkageAttributes = 41, + DecorationNoContraction = 42, + DecorationInputAttachmentIndex = 43, + DecorationAlignment = 44, +}; + +enum BuiltIn { + BuiltInPosition = 0, + BuiltInPointSize = 1, + BuiltInClipDistance = 3, + BuiltInCullDistance = 4, + BuiltInVertexId = 5, + BuiltInInstanceId = 6, + BuiltInPrimitiveId = 7, + BuiltInInvocationId = 8, + BuiltInLayer = 9, + BuiltInViewportIndex = 10, + BuiltInTessLevelOuter = 11, + BuiltInTessLevelInner = 12, + BuiltInTessCoord = 13, + BuiltInPatchVertices = 14, + BuiltInFragCoord = 15, + BuiltInPointCoord = 16, + BuiltInFrontFacing = 17, + BuiltInSampleId = 18, + BuiltInSamplePosition = 19, + BuiltInSampleMask = 20, + BuiltInFragDepth = 22, + BuiltInHelperInvocation = 23, + BuiltInNumWorkgroups = 24, + BuiltInWorkgroupSize = 25, + BuiltInWorkgroupId = 26, + BuiltInLocalInvocationId = 27, + BuiltInGlobalInvocationId = 28, + BuiltInLocalInvocationIndex = 29, + BuiltInWorkDim = 30, + BuiltInGlobalSize = 31, + BuiltInEnqueuedWorkgroupSize = 32, + BuiltInGlobalOffset = 33, + BuiltInGlobalLinearId = 34, + BuiltInSubgroupSize = 36, + BuiltInSubgroupMaxSize = 37, + BuiltInNumSubgroups = 38, + BuiltInNumEnqueuedSubgroups = 39, + BuiltInSubgroupId = 40, + BuiltInSubgroupLocalInvocationId = 41, + BuiltInVertexIndex = 42, + BuiltInInstanceIndex = 43, +}; + +enum SelectionControlShift { + SelectionControlFlattenShift = 0, + SelectionControlDontFlattenShift = 1, +}; + +enum SelectionControlMask { + SelectionControlMaskNone = 0, + SelectionControlFlattenMask = 0x00000001, + SelectionControlDontFlattenMask = 0x00000002, +}; + +enum LoopControlShift { + LoopControlUnrollShift = 0, + LoopControlDontUnrollShift = 1, +}; + +enum LoopControlMask { + LoopControlMaskNone = 0, + LoopControlUnrollMask = 0x00000001, + LoopControlDontUnrollMask = 0x00000002, +}; + +enum FunctionControlShift { + FunctionControlInlineShift = 0, + FunctionControlDontInlineShift = 1, + FunctionControlPureShift = 2, + FunctionControlConstShift = 3, +}; + +enum FunctionControlMask { + FunctionControlMaskNone = 0, + FunctionControlInlineMask = 0x00000001, + FunctionControlDontInlineMask = 0x00000002, + FunctionControlPureMask = 0x00000004, + FunctionControlConstMask = 0x00000008, +}; + +enum MemorySemanticsShift { + MemorySemanticsAcquireShift = 1, + MemorySemanticsReleaseShift = 2, + MemorySemanticsAcquireReleaseShift = 3, + MemorySemanticsSequentiallyConsistentShift = 4, + MemorySemanticsUniformMemoryShift = 6, + MemorySemanticsSubgroupMemoryShift = 7, + MemorySemanticsWorkgroupMemoryShift = 8, + MemorySemanticsCrossWorkgroupMemoryShift = 9, + MemorySemanticsAtomicCounterMemoryShift = 10, + MemorySemanticsImageMemoryShift = 11, +}; + +enum MemorySemanticsMask { + MemorySemanticsMaskNone = 0, + MemorySemanticsAcquireMask = 0x00000002, + MemorySemanticsReleaseMask = 0x00000004, + MemorySemanticsAcquireReleaseMask = 0x00000008, + MemorySemanticsSequentiallyConsistentMask = 0x00000010, + MemorySemanticsUniformMemoryMask = 0x00000040, + MemorySemanticsSubgroupMemoryMask = 0x00000080, + MemorySemanticsWorkgroupMemoryMask = 0x00000100, + MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, + MemorySemanticsAtomicCounterMemoryMask = 0x00000400, + MemorySemanticsImageMemoryMask = 0x00000800, +}; + +enum MemoryAccessShift { + MemoryAccessVolatileShift = 0, + MemoryAccessAlignedShift = 1, + MemoryAccessNontemporalShift = 2, +}; + +enum MemoryAccessMask { + MemoryAccessMaskNone = 0, + MemoryAccessVolatileMask = 0x00000001, + MemoryAccessAlignedMask = 0x00000002, + MemoryAccessNontemporalMask = 0x00000004, +}; + +enum Scope { + ScopeCrossDevice = 0, + ScopeDevice = 1, + ScopeWorkgroup = 2, + ScopeSubgroup = 3, + ScopeInvocation = 4, +}; + +enum GroupOperation { + GroupOperationReduce = 0, + GroupOperationInclusiveScan = 1, + GroupOperationExclusiveScan = 2, +}; + +enum KernelEnqueueFlags { + KernelEnqueueFlagsNoWait = 0, + KernelEnqueueFlagsWaitKernel = 1, + KernelEnqueueFlagsWaitWorkGroup = 2, +}; + +enum KernelProfilingInfoShift { + KernelProfilingInfoCmdExecTimeShift = 0, +}; + +enum KernelProfilingInfoMask { + KernelProfilingInfoMaskNone = 0, + KernelProfilingInfoCmdExecTimeMask = 0x00000001, +}; + +enum Capability { + CapabilityMatrix = 0, + CapabilityShader = 1, + CapabilityGeometry = 2, + CapabilityTessellation = 3, + CapabilityAddresses = 4, + CapabilityLinkage = 5, + CapabilityKernel = 6, + CapabilityVector16 = 7, + CapabilityFloat16Buffer = 8, + CapabilityFloat16 = 9, + CapabilityFloat64 = 10, + CapabilityInt64 = 11, + CapabilityInt64Atomics = 12, + CapabilityImageBasic = 13, + CapabilityImageReadWrite = 14, + CapabilityImageMipmap = 15, + CapabilityPipes = 17, + CapabilityGroups = 18, + CapabilityDeviceEnqueue = 19, + CapabilityLiteralSampler = 20, + CapabilityAtomicStorage = 21, + CapabilityInt16 = 22, + CapabilityTessellationPointSize = 23, + CapabilityGeometryPointSize = 24, + CapabilityImageGatherExtended = 25, + CapabilityStorageImageMultisample = 27, + CapabilityUniformBufferArrayDynamicIndexing = 28, + CapabilitySampledImageArrayDynamicIndexing = 29, + CapabilityStorageBufferArrayDynamicIndexing = 30, + CapabilityStorageImageArrayDynamicIndexing = 31, + CapabilityClipDistance = 32, + CapabilityCullDistance = 33, + CapabilityImageCubeArray = 34, + CapabilitySampleRateShading = 35, + CapabilityImageRect = 36, + CapabilitySampledRect = 37, + CapabilityGenericPointer = 38, + CapabilityInt8 = 39, + CapabilityInputAttachment = 40, + CapabilitySparseResidency = 41, + CapabilityMinLod = 42, + CapabilitySampled1D = 43, + CapabilityImage1D = 44, + CapabilitySampledCubeArray = 45, + CapabilitySampledBuffer = 46, + CapabilityImageBuffer = 47, + CapabilityImageMSArray = 48, + CapabilityStorageImageExtendedFormats = 49, + CapabilityImageQuery = 50, + CapabilityDerivativeControl = 51, + CapabilityInterpolationFunction = 52, + CapabilityTransformFeedback = 53, + CapabilityGeometryStreams = 54, + CapabilityStorageImageReadWithoutFormat = 55, + CapabilityStorageImageWriteWithoutFormat = 56, + CapabilityMultiViewport = 57, +}; + +enum Op { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, +}; + +// Overload operator| for mask bit combining + +inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } + +} // end namespace spv + +#endif // #ifndef spirv_HPP diff --git a/Test/baseResults/310.comp.out b/Test/baseResults/310.comp.out index e61d2aae..ff438e3a 100644 --- a/Test/baseResults/310.comp.out +++ b/Test/baseResults/310.comp.out @@ -8,7 +8,7 @@ ERROR: 0:39: 'location qualifier on input' : not supported in this stage: comput ERROR: 0:40: 'in' : global storage input qualifier cannot be used in a compute shader ERROR: 0:41: 'out' : global storage output qualifier cannot be used in a compute shader ERROR: 0:44: 'shared' : cannot apply layout qualifiers to a shared variable -ERROR: 0:44: 'location' : can only appy to uniform, buffer, in, or out storage qualifiers +ERROR: 0:44: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers ERROR: 0:45: 'shared' : cannot initialize this type of qualifier ERROR: 0:47: 'local_size' : can only apply to 'in' ERROR: 0:47: 'local_size' : can only apply to 'in' diff --git a/Test/baseResults/420.vert.out b/Test/baseResults/420.vert.out index 6d7b3618..3b0dfaea 100644 --- a/Test/baseResults/420.vert.out +++ b/Test/baseResults/420.vert.out @@ -9,7 +9,6 @@ ERROR: 0:12: '' : can only have one auxiliary qualifier (centroid, patch, and sa ERROR: 0:13: 'uniform' : too many storage qualifiers ERROR: 0:18: '=' : global const initializers must be constant 'const int' ERROR: 0:20: 'const' : no qualifiers allowed for function return -ERROR: 0:27: '' : constant expression required ERROR: 0:27: '' : array size must be a constant integer expression ERROR: 0:38: 'j' : undeclared identifier ERROR: 0:38: '=' : cannot convert from 'temp float' to 'temp int' @@ -33,7 +32,6 @@ ERROR: 0:85: 'patch' : not supported in this stage: vertex ERROR: 0:85: '' : vertex input cannot be further qualified ERROR: 0:86: 'patch' : not supported in this stage: vertex ERROR: 0:100: '=' : global const initializers must be constant 'const int' -ERROR: 0:101: '' : constant expression required ERROR: 0:101: '' : array size must be a constant integer expression ERROR: 0:107: '' : image variables not declared 'writeonly' must have a format layout qualifier ERROR: 0:114: 'imageAtomicMin' : only supported on image with format r32i or r32ui @@ -53,7 +51,7 @@ ERROR: 0:157: 'textureQueryLevels' : no matching overloaded function found ERROR: 0:157: 'assign' : cannot convert from 'const float' to 'temp int' ERROR: 0:158: 'textureQueryLevels' : no matching overloaded function found ERROR: 0:158: 'assign' : cannot convert from 'const float' to 'temp int' -ERROR: 52 compilation errors. No code generated. +ERROR: 50 compilation errors. No code generated. Shader version: 420 diff --git a/Test/baseResults/430.comp.out b/Test/baseResults/430.comp.out index 39896593..aecf42fc 100644 --- a/Test/baseResults/430.comp.out +++ b/Test/baseResults/430.comp.out @@ -7,7 +7,7 @@ ERROR: 0:43: 'location qualifier on input' : not supported in this stage: comput ERROR: 0:44: 'in' : global storage input qualifier cannot be used in a compute shader ERROR: 0:45: 'out' : global storage output qualifier cannot be used in a compute shader ERROR: 0:48: 'shared' : cannot apply layout qualifiers to a shared variable -ERROR: 0:48: 'location' : can only appy to uniform, buffer, in, or out storage qualifiers +ERROR: 0:48: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers ERROR: 0:49: 'shared' : cannot initialize this type of qualifier ERROR: 0:51: 'local_size' : can only apply to 'in' ERROR: 0:51: 'local_size' : can only apply to 'in' diff --git a/Test/baseResults/430.vert.out b/Test/baseResults/430.vert.out index 30e2cafe..8cfd20c0 100644 --- a/Test/baseResults/430.vert.out +++ b/Test/baseResults/430.vert.out @@ -1,6 +1,6 @@ 430.vert Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. -ERROR: 0:3: 'location' : can only appy to uniform, buffer, in, or out storage qualifiers +ERROR: 0:3: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers ERROR: 0:7: 'input block' : not supported in this stage: vertex ERROR: 0:7: 'location qualifier on in/out block' : not supported for this version or the enabled extensions ERROR: 0:8: 'location qualifier on in/out block' : not supported for this version or the enabled extensions diff --git a/Test/baseResults/constErrors.frag.out b/Test/baseResults/constErrors.frag.out index 6f12aecd..f04c7369 100644 --- a/Test/baseResults/constErrors.frag.out +++ b/Test/baseResults/constErrors.frag.out @@ -1,14 +1,11 @@ constErrors.frag ERROR: 0:14: 'non-constant initializer' : not supported for this version or the enabled extensions -ERROR: 0:17: '' : constant expression required ERROR: 0:17: '' : array size must be a constant integer expression -ERROR: 0:18: '' : constant expression required ERROR: 0:18: '' : array size must be a constant integer expression -ERROR: 0:19: '' : constant expression required ERROR: 0:19: '' : array size must be a constant integer expression ERROR: 0:27: '=' : global const initializers must be constant 'const structure{global 3-component vector of float v3, global 2-component vector of int iv2}' ERROR: 0:33: '=' : global const initializers must be constant 'const structure{global 3-component vector of float v3, global 2-component vector of int iv2, global 2X4 matrix of float m}' -ERROR: 9 compilation errors. No code generated. +ERROR: 6 compilation errors. No code generated. Shader version: 330 diff --git a/Test/baseResults/nonVulkan.frag.out b/Test/baseResults/nonVulkan.frag.out new file mode 100644 index 00000000..10c693c0 --- /dev/null +++ b/Test/baseResults/nonVulkan.frag.out @@ -0,0 +1,30 @@ +nonVulkan.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:3: 'constant_id' : only allowed when generating SPIR-V +ERROR: 0:4: 'input_attachment_index' : only allowed when using GLSL for Vulkan +ERROR: 0:4: 'input_attachment_index' : can only be used with a subpass +ERROR: 0:5: 'push_constant' : only allowed when using GLSL for Vulkan +ERROR: 4 compilation errors. No code generated. + + +Shader version: 450 +ERROR: node is still EOpNull! +0:? Linker Objects +0:? 'arraySize' (specialization-constant const int) +0:? 12 (const int) +0:? 'foo' (temp int) +0:? 'ubi' (layout(column_major std430 push_constant ) uniform block{layout(column_major std430 offset=0 ) uniform int a}) + + +Linked fragment stage: + +ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point + +Shader version: 450 +ERROR: node is still EOpNull! +0:? Linker Objects +0:? 'arraySize' (specialization-constant const int) +0:? 12 (const int) +0:? 'foo' (temp int) +0:? 'ubi' (layout(column_major std430 push_constant ) uniform block{layout(column_major std430 offset=0 ) uniform int a}) + diff --git a/Test/baseResults/specExamples.vert.out b/Test/baseResults/specExamples.vert.out index bec3fb32..eb399e1b 100644 --- a/Test/baseResults/specExamples.vert.out +++ b/Test/baseResults/specExamples.vert.out @@ -1,6 +1,6 @@ specExamples.vert Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. -ERROR: 0:29: 'location' : can only appy to uniform, buffer, in, or out storage qualifiers +ERROR: 0:29: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers ERROR: 0:31: 'triangles' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:31: 'invocations' : there is no such layout identifier for this stage taking an assigned value ERROR: 0:33: 'lines' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out index 1d00037c..9b40c920 100755 --- a/Test/baseResults/spv.100ops.frag.out +++ b/Test/baseResults/spv.100ops.frag.out @@ -7,13 +7,13 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 48 +// Id's are bound by 49 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 36 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 21 26 37 + ExecutionMode 4 OriginUpperLeft Source ESSL 310 Name 4 "main" Name 8 "foo(" @@ -22,7 +22,7 @@ Linked fragment stage: Name 17 "z" Name 21 "low" Name 26 "high" - Name 36 "Color" + Name 37 "Color" Decorate 8(foo() RelaxedPrecision Decorate 11(face1) RelaxedPrecision Decorate 13(face2) RelaxedPrecision @@ -34,9 +34,8 @@ Linked fragment stage: Decorate 26(high) RelaxedPrecision Decorate 27 RelaxedPrecision Decorate 32 RelaxedPrecision - Decorate 33 RelaxedPrecision - Decorate 36(Color) RelaxedPrecision - Decorate 37 RelaxedPrecision + Decorate 34 RelaxedPrecision + Decorate 37(Color) RelaxedPrecision Decorate 38 RelaxedPrecision Decorate 39 RelaxedPrecision Decorate 40 RelaxedPrecision @@ -45,6 +44,7 @@ Linked fragment stage: Decorate 43 RelaxedPrecision Decorate 44 RelaxedPrecision Decorate 45 RelaxedPrecision + Decorate 46 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -57,47 +57,48 @@ Linked fragment stage: 15: TypeInt 32 1 16: TypePointer Function 15(int) 18: 15(int) Constant 3 - 19: 15(int) Constant 2 - 20: TypePointer UniformConstant 15(int) - 21(low): 20(ptr) Variable UniformConstant - 24: 15(int) Constant 1 - 26(high): 20(ptr) Variable UniformConstant + 19: 6(float) Constant 1073741824 + 20: TypePointer Input 6(float) + 21(low): 20(ptr) Variable Input + 24: 6(float) Constant 1065353216 + 26(high): 20(ptr) Variable Input 28: TypeBool - 34: TypeVector 6(float) 4 - 35: TypePointer Output 34(fvec4) - 36(Color): 35(ptr) Variable Output + 33: 15(int) Constant 1 + 35: TypeVector 6(float) 4 + 36: TypePointer Output 35(fvec4) + 37(Color): 36(ptr) Variable Output 4(main): 2 Function None 3 5: Label 17(z): 16(ptr) Variable Function Store 11(face1) 12 Store 13(face2) 14 Store 17(z) 18 - 22: 15(int) Load 21(low) - 23: 15(int) IMul 19 22 - 25: 15(int) IAdd 23 24 - 27: 15(int) Load 26(high) - 29: 28(bool) SLessThan 25 27 + 22: 6(float) Load 21(low) + 23: 6(float) FMul 19 22 + 25: 6(float) FAdd 23 24 + 27: 6(float) Load 26(high) + 29: 28(bool) FOrdLessThan 25 27 SelectionMerge 31 None BranchConditional 29 30 31 30: Label 32: 15(int) Load 17(z) - 33: 15(int) IAdd 32 24 - Store 17(z) 33 + 34: 15(int) IAdd 32 33 + Store 17(z) 34 Branch 31 31: Label - 37: 6(float) Load 11(face1) - 38: 15(int) Load 17(z) - 39: 6(float) ConvertSToF 38 - 40: 34(fvec4) CompositeConstruct 39 39 39 39 - 41: 34(fvec4) VectorTimesScalar 40 37 - 42: 6(float) FunctionCall 8(foo() - 43: 34(fvec4) CompositeConstruct 42 42 42 42 - 44: 34(fvec4) FAdd 41 43 - Store 36(Color) 44 + 38: 6(float) Load 11(face1) + 39: 15(int) Load 17(z) + 40: 6(float) ConvertSToF 39 + 41: 35(fvec4) CompositeConstruct 40 40 40 40 + 42: 35(fvec4) VectorTimesScalar 41 38 + 43: 6(float) FunctionCall 8(foo() + 44: 35(fvec4) CompositeConstruct 43 43 43 43 + 45: 35(fvec4) FAdd 42 44 + Store 37(Color) 45 Return FunctionEnd 8(foo(): 6(float) Function None 7 9: Label - 45: 6(float) Load 13(face2) - ReturnValue 45 + 46: 6(float) Load 13(face2) + ReturnValue 46 FunctionEnd diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index ad8ecc78..8d881f50 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -7,7 +7,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 213 +// Id's are bound by 205 Capability Shader Capability ClipDistance @@ -18,7 +18,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 SourceExtension "GL_ARB_gpu_shader5" SourceExtension "GL_ARB_shader_texture_lod" @@ -61,14 +61,25 @@ Linked fragment stage: Name 199 "s2DRS" Name 203 "s1D" Name 204 "s2DS" - Name 206 "f" - Name 208 "v2" - Name 210 "v3" - Name 212 "v4" + Decorate 21(samp2D) DescriptorSet 0 + Decorate 37(samp2DA) DescriptorSet 0 + Decorate 47(samp2DR) DescriptorSet 0 + Decorate 55(samp2DS) DescriptorSet 0 + Decorate 72(Sca) DescriptorSet 0 + Decorate 87(Isca) DescriptorSet 0 + Decorate 103(Usca) DescriptorSet 0 + Decorate 118(Scas) DescriptorSet 0 + Decorate 167(sampC) DescriptorSet 0 Decorate 173(gl_ClipDistance) BuiltIn ClipDistance Decorate 184(fflat) Flat Decorate 186(fnop) NoPerspective + Decorate 193(bounds) DescriptorSet 0 Decorate 193(bounds) Binding 0 + Decorate 194(s2D) DescriptorSet 0 + Decorate 195(s2DR) DescriptorSet 0 + Decorate 199(s2DRS) DescriptorSet 0 + Decorate 203(s1D) DescriptorSet 0 + Decorate 204(s2DS) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 14: TypeFloat 32 @@ -177,14 +188,6 @@ Linked fragment stage: 202: TypePointer UniformConstant 201 203(s1D): 202(ptr) Variable UniformConstant 204(s2DS): 54(ptr) Variable UniformConstant - 205: TypePointer UniformConstant 14(float) - 206(f): 205(ptr) Variable UniformConstant - 207: TypePointer UniformConstant 23(fvec2) - 208(v2): 207(ptr) Variable UniformConstant - 209: TypePointer UniformConstant 39(fvec3) - 210(v3): 209(ptr) Variable UniformConstant - 211: TypePointer UniformConstant 15(fvec4) - 212(v4): 211(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 168: 165 Load 167(sampC) diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index 288272e2..f302478c 100755 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -15,7 +15,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 16 28 33 43 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "foo(" @@ -40,6 +40,9 @@ Linked fragment stage: Name 100 "bname" Decorate 16(gl_FrontFacing) BuiltIn FrontFacing Decorate 33(gl_ClipDistance) BuiltIn ClipDistance + Decorate 55(sampR) DescriptorSet 0 + Decorate 63(sampB) DescriptorSet 0 + Decorate 87(samp2Da) DescriptorSet 0 Decorate 90 ArrayStride 64 Decorate 91 ArrayStride 64 MemberDecorate 92(bn) 0 RowMajor @@ -58,9 +61,11 @@ Linked fragment stage: MemberDecorate 92(bn) 4 Offset 640 MemberDecorate 92(bn) 4 MatrixStride 16 Decorate 92(bn) Block + Decorate 94 DescriptorSet 0 Decorate 96 ArrayStride 16 MemberDecorate 97(bi) 0 Offset 0 Decorate 97(bi) Block + Decorate 100(bname) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.150.vert.out b/Test/baseResults/spv.150.vert.out index 3e86aec2..5ccf1a81 100755 --- a/Test/baseResults/spv.150.vert.out +++ b/Test/baseResults/spv.150.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 67 +// Id's are bound by 63 Capability Shader Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 13 17 39 65 66 + EntryPoint Vertex 4 "main" 13 17 23 38 62 Source GLSL 150 Name 4 "main" Name 11 "gl_PerVertex" @@ -21,26 +21,23 @@ Linked vertex stage: Name 13 "" Name 17 "iv4" Name 23 "ps" - Name 35 "s1" - MemberName 35(s1) 0 "a" - MemberName 35(s1) 1 "a2" - MemberName 35(s1) 2 "b" - Name 37 "s2" - MemberName 37(s2) 0 "c" - MemberName 37(s2) 1 "d" - Name 39 "s2out" - Name 41 "i" - Name 48 "s2D" - Name 63 "ui" - Name 65 "gl_VertexID" - Name 66 "gl_InstanceID" + Name 34 "s1" + MemberName 34(s1) 0 "a" + MemberName 34(s1) 1 "a2" + MemberName 34(s1) 2 "b" + Name 36 "s2" + MemberName 36(s2) 0 "c" + MemberName 36(s2) 1 "d" + Name 38 "s2out" + Name 40 "i" + Name 47 "s2D" + Name 62 "ui" MemberDecorate 11(gl_PerVertex) 0 Invariant MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance Decorate 11(gl_PerVertex) Block - Decorate 65(gl_VertexID) BuiltIn VertexId - Decorate 66(gl_InstanceID) BuiltIn InstanceId + Decorate 47(s2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -57,58 +54,54 @@ Linked vertex stage: 17(iv4): 16(ptr) Variable Input 19: TypePointer Output 7(fvec4) 21: 14(int) Constant 1 - 22: TypePointer UniformConstant 6(float) - 23(ps): 22(ptr) Variable UniformConstant + 22: TypePointer Input 6(float) + 23(ps): 22(ptr) Variable Input 25: TypePointer Output 6(float) 27: 14(int) Constant 2 28: 8(int) Constant 0 - 29: TypePointer Input 6(float) - 33: 8(int) Constant 3 - 34: TypeArray 7(fvec4) 33 - 35(s1): TypeStruct 14(int) 14(int) 34 - 36: TypeArray 35(s1) 9 - 37(s2): TypeStruct 14(int) 36 - 38: TypePointer Output 37(s2) - 39(s2out): 38(ptr) Variable Output - 40: TypePointer Function 14(int) - 45: TypeImage 6(float) 2D sampled format:Unknown - 46: TypeSampledImage 45 - 47: TypePointer UniformConstant 46 - 48(s2D): 47(ptr) Variable UniformConstant - 50: TypeVector 6(float) 2 - 51: 6(float) Constant 1056964608 - 52: 50(fvec2) ConstantComposite 51 51 - 53: 6(float) Constant 0 - 56: TypeVector 6(float) 3 - 57: 56(fvec3) ConstantComposite 51 51 51 - 60: 6(float) Constant 1078774989 - 62: TypePointer UniformConstant 14(int) - 63(ui): 62(ptr) Variable UniformConstant - 64: TypePointer Input 14(int) - 65(gl_VertexID): 64(ptr) Variable Input -66(gl_InstanceID): 64(ptr) Variable Input + 32: 8(int) Constant 3 + 33: TypeArray 7(fvec4) 32 + 34(s1): TypeStruct 14(int) 14(int) 33 + 35: TypeArray 34(s1) 9 + 36(s2): TypeStruct 14(int) 35 + 37: TypePointer Output 36(s2) + 38(s2out): 37(ptr) Variable Output + 39: TypePointer Function 14(int) + 44: TypeImage 6(float) 2D sampled format:Unknown + 45: TypeSampledImage 44 + 46: TypePointer UniformConstant 45 + 47(s2D): 46(ptr) Variable UniformConstant + 49: TypeVector 6(float) 2 + 50: 6(float) Constant 1056964608 + 51: 49(fvec2) ConstantComposite 50 50 + 52: 6(float) Constant 0 + 55: TypeVector 6(float) 3 + 56: 55(fvec3) ConstantComposite 50 50 50 + 59: 6(float) Constant 1078774989 + 61: TypePointer Input 14(int) + 62(ui): 61(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 41(i): 40(ptr) Variable Function + 40(i): 39(ptr) Variable Function 18: 7(fvec4) Load 17(iv4) 20: 19(ptr) AccessChain 13 15 Store 20 18 24: 6(float) Load 23(ps) 26: 25(ptr) AccessChain 13 21 Store 26 24 - 30: 29(ptr) AccessChain 17(iv4) 28 - 31: 6(float) Load 30 - 32: 25(ptr) AccessChain 13 27 27 - Store 32 31 - 42: 14(int) Load 41(i) - 43: 6(float) Load 23(ps) - 44: 25(ptr) AccessChain 39(s2out) 21 42 27 27 33 - Store 44 43 - 49: 46 Load 48(s2D) - 54: 7(fvec4) ImageSampleExplicitLod 49 52 Lod 53 - 55: 46 Load 48(s2D) - 58: 7(fvec4) ImageSampleProjExplicitLod 55 57 Lod 53 - 59: 46 Load 48(s2D) - 61: 7(fvec4) ImageSampleExplicitLod 59 52 Lod 60 + 29: 22(ptr) AccessChain 17(iv4) 28 + 30: 6(float) Load 29 + 31: 25(ptr) AccessChain 13 27 27 + Store 31 30 + 41: 14(int) Load 40(i) + 42: 6(float) Load 23(ps) + 43: 25(ptr) AccessChain 38(s2out) 21 41 27 27 32 + Store 43 42 + 48: 45 Load 47(s2D) + 53: 7(fvec4) ImageSampleExplicitLod 48 51 Lod 52 + 54: 45 Load 47(s2D) + 57: 7(fvec4) ImageSampleProjExplicitLod 54 56 Lod 52 + 58: 45 Load 47(s2D) + 60: 7(fvec4) ImageSampleExplicitLod 58 51 Lod 59 Return FunctionEnd diff --git a/Test/baseResults/spv.300BuiltIns.vert.out b/Test/baseResults/spv.300BuiltIns.vert.out index a8dd6221..ab07f4a8 100755 --- a/Test/baseResults/spv.300BuiltIns.vert.out +++ b/Test/baseResults/spv.300BuiltIns.vert.out @@ -7,88 +7,73 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 49 +// Id's are bound by 42 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 11 24 27 48 + EntryPoint Vertex 4 "main" 10 14 21 34 Source ESSL 310 Name 4 "main" - Name 8 "i" - Name 11 "gl_VertexID" - Name 16 "j" - Name 22 "gl_PerVertex" - MemberName 22(gl_PerVertex) 0 "gl_Position" - MemberName 22(gl_PerVertex) 1 "gl_PointSize" - Name 24 "" - Name 27 "ps" - Name 48 "gl_InstanceID" - Decorate 8(i) RelaxedPrecision - Decorate 11(gl_VertexID) BuiltIn VertexId - Decorate 16(j) RelaxedPrecision - MemberDecorate 22(gl_PerVertex) 0 Invariant - MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize - Decorate 22(gl_PerVertex) Block - Decorate 27(ps) RelaxedPrecision - Decorate 28 RelaxedPrecision - Decorate 32 RelaxedPrecision - Decorate 39 RelaxedPrecision - Decorate 42 RelaxedPrecision - Decorate 48(gl_InstanceID) BuiltIn InstanceId + Name 8 "gl_PerVertex" + MemberName 8(gl_PerVertex) 0 "gl_Position" + MemberName 8(gl_PerVertex) 1 "gl_PointSize" + Name 10 "" + Name 14 "ps" + Name 21 "gl_VertexIndex" + Name 34 "gl_InstanceIndex" + MemberDecorate 8(gl_PerVertex) 0 Invariant + MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 8(gl_PerVertex) 1 BuiltIn PointSize + Decorate 8(gl_PerVertex) Block + Decorate 14(ps) RelaxedPrecision + Decorate 15 RelaxedPrecision + Decorate 21(gl_VertexIndex) BuiltIn VertexIndex + Decorate 30 RelaxedPrecision + Decorate 34(gl_InstanceIndex) BuiltIn InstanceIndex 2: TypeVoid 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypePointer Function 6(int) - 9: 6(int) Constant 4 - 10: TypePointer Input 6(int) - 11(gl_VertexID): 10(ptr) Variable Input - 14: 6(int) Constant 10 - 20: TypeFloat 32 - 21: TypeVector 20(float) 4 -22(gl_PerVertex): TypeStruct 21(fvec4) 20(float) - 23: TypePointer Output 22(gl_PerVertex) - 24: 23(ptr) Variable Output - 25: 6(int) Constant 0 - 26: TypePointer Input 20(float) - 27(ps): 26(ptr) Variable Input - 30: TypePointer Output 21(fvec4) - 38: 6(int) Constant 1 - 40: TypePointer Output 20(float) -48(gl_InstanceID): 10(ptr) Variable Input + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8(gl_PerVertex): TypeStruct 7(fvec4) 6(float) + 9: TypePointer Output 8(gl_PerVertex) + 10: 9(ptr) Variable Output + 11: TypeInt 32 1 + 12: 11(int) Constant 0 + 13: TypePointer Input 6(float) + 14(ps): 13(ptr) Variable Input + 17: TypePointer Output 7(fvec4) + 19: 11(int) Constant 4 + 20: TypePointer Input 11(int) +21(gl_VertexIndex): 20(ptr) Variable Input + 29: 11(int) Constant 1 + 31: TypePointer Output 6(float) + 33: 11(int) Constant 5 +34(gl_InstanceIndex): 20(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 8(i): 7(ptr) Variable Function - 16(j): 7(ptr) Variable Function - 12: 6(int) Load 11(gl_VertexID) - 13: 6(int) IMul 9 12 - 15: 6(int) ISub 13 14 - Store 8(i) 15 - 17: 6(int) Load 11(gl_VertexID) - 18: 6(int) IMul 9 17 - 19: 6(int) ISub 18 14 - Store 16(j) 19 - 28: 20(float) Load 27(ps) - 29: 21(fvec4) CompositeConstruct 28 28 28 28 - 31: 30(ptr) AccessChain 24 25 - Store 31 29 - 32: 6(int) Load 8(i) - 33: 20(float) ConvertSToF 32 - 34: 30(ptr) AccessChain 24 25 - 35: 21(fvec4) Load 34 - 36: 21(fvec4) VectorTimesScalar 35 33 - 37: 30(ptr) AccessChain 24 25 - Store 37 36 - 39: 20(float) Load 27(ps) - 41: 40(ptr) AccessChain 24 38 - Store 41 39 - 42: 6(int) Load 16(j) - 43: 20(float) ConvertSToF 42 - 44: 40(ptr) AccessChain 24 38 - 45: 20(float) Load 44 - 46: 20(float) FMul 45 43 - 47: 40(ptr) AccessChain 24 38 - Store 47 46 + 15: 6(float) Load 14(ps) + 16: 7(fvec4) CompositeConstruct 15 15 15 15 + 18: 17(ptr) AccessChain 10 12 + Store 18 16 + 22: 11(int) Load 21(gl_VertexIndex) + 23: 11(int) ISub 19 22 + 24: 6(float) ConvertSToF 23 + 25: 17(ptr) AccessChain 10 12 + 26: 7(fvec4) Load 25 + 27: 7(fvec4) VectorTimesScalar 26 24 + 28: 17(ptr) AccessChain 10 12 + Store 28 27 + 30: 6(float) Load 14(ps) + 32: 31(ptr) AccessChain 10 29 + Store 32 30 + 35: 11(int) Load 34(gl_InstanceIndex) + 36: 11(int) ISub 33 35 + 37: 6(float) ConvertSToF 36 + 38: 31(ptr) AccessChain 10 29 + 39: 6(float) Load 38 + 40: 6(float) FMul 39 37 + 41: 31(ptr) AccessChain 10 29 + Store 41 40 Return FunctionEnd diff --git a/Test/baseResults/spv.300layout.frag.out b/Test/baseResults/spv.300layout.frag.out index ed39d5a6..e340c1b2 100755 --- a/Test/baseResults/spv.300layout.frag.out +++ b/Test/baseResults/spv.300layout.frag.out @@ -13,7 +13,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 9 11 15 26 29 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source ESSL 310 Name 4 "main" Name 9 "c" diff --git a/Test/baseResults/spv.300layout.vert.out b/Test/baseResults/spv.300layout.vert.out index f940f7aa..859794a3 100644 --- a/Test/baseResults/spv.300layout.vert.out +++ b/Test/baseResults/spv.300layout.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 165 +// Id's are bound by 163 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 11 99 101 109 121 129 163 164 + EntryPoint Vertex 4 "main" 9 11 98 100 108 114 120 128 Source ESSL 310 Name 4 "main" Name 9 "pos" @@ -29,21 +29,19 @@ Linked vertex stage: MemberName 45(T3) 2 "N2" MemberName 45(T3) 3 "uv3a" Name 47 "" - Name 79 "T2" - MemberName 79(T2) 0 "b" - MemberName 79(T2) 1 "t2m" - Name 81 "" - Name 99 "color" - Name 101 "c" - Name 109 "iout" - Name 115 "uiuin" - Name 121 "aiv2" - Name 127 "S" - MemberName 127(S) 0 "c" - MemberName 127(S) 1 "f" - Name 129 "s" - Name 163 "gl_VertexID" - Name 164 "gl_InstanceID" + Name 78 "T2" + MemberName 78(T2) 0 "b" + MemberName 78(T2) 1 "t2m" + Name 80 "" + Name 98 "color" + Name 100 "c" + Name 108 "iout" + Name 114 "uiuin" + Name 120 "aiv2" + Name 126 "S" + MemberName 126(S) 0 "c" + MemberName 126(S) 1 "f" + Name 128 "s" Decorate 11(p) Location 3 MemberDecorate 17(Transform) 0 RowMajor MemberDecorate 17(Transform) 0 Offset 0 @@ -56,19 +54,29 @@ Linked vertex stage: MemberDecorate 17(Transform) 2 MatrixStride 16 MemberDecorate 17(Transform) 3 Offset 176 Decorate 17(Transform) Block + Decorate 19(tblock) DescriptorSet 0 + Decorate 44 ArrayStride 16 MemberDecorate 45(T3) 0 ColMajor + MemberDecorate 45(T3) 0 Offset 0 + MemberDecorate 45(T3) 0 MatrixStride 16 MemberDecorate 45(T3) 1 RowMajor + MemberDecorate 45(T3) 1 Offset 64 + MemberDecorate 45(T3) 1 MatrixStride 16 MemberDecorate 45(T3) 2 ColMajor - Decorate 45(T3) GLSLShared + MemberDecorate 45(T3) 2 Offset 128 + MemberDecorate 45(T3) 2 MatrixStride 16 + MemberDecorate 45(T3) 3 Offset 160 Decorate 45(T3) Block - MemberDecorate 79(T2) 1 RowMajor - Decorate 79(T2) GLSLShared - Decorate 79(T2) Block - Decorate 101(c) Location 7 - Decorate 109(iout) Flat - Decorate 121(aiv2) Location 9 - Decorate 163(gl_VertexID) BuiltIn VertexId - Decorate 164(gl_InstanceID) BuiltIn InstanceId + Decorate 47 DescriptorSet 0 + MemberDecorate 78(T2) 0 Offset 0 + MemberDecorate 78(T2) 1 RowMajor + MemberDecorate 78(T2) 1 Offset 16 + MemberDecorate 78(T2) 1 MatrixStride 16 + Decorate 78(T2) Block + Decorate 80 DescriptorSet 0 + Decorate 100(c) Location 7 + Decorate 108(iout) Flat + Decorate 120(aiv2) Location 9 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -95,42 +103,40 @@ Linked vertex stage: 45(T3): TypeStruct 13 13 40 44 46: TypePointer Uniform 45(T3) 47: 46(ptr) Variable Uniform - 78: TypeBool - 79(T2): TypeStruct 78(bool) 13 - 80: TypePointer Uniform 79(T2) - 81: 80(ptr) Variable Uniform - 98: TypePointer Output 14(fvec3) - 99(color): 98(ptr) Variable Output - 100: TypePointer Input 14(fvec3) - 101(c): 100(ptr) Variable Input - 103: 16(int) Constant 2 - 104: TypePointer Uniform 15 - 108: TypePointer Output 16(int) - 109(iout): 108(ptr) Variable Output - 110: 16(int) Constant 3 - 111: TypePointer Uniform 16(int) - 114: TypePointer UniformConstant 41(int) - 115(uiuin): 114(ptr) Variable UniformConstant - 119: TypeVector 16(int) 2 - 120: TypePointer Input 119(ivec2) - 121(aiv2): 120(ptr) Variable Input - 122: 41(int) Constant 1 - 123: TypePointer Input 16(int) - 127(S): TypeStruct 14(fvec3) 6(float) - 128: TypePointer Output 127(S) - 129(s): 128(ptr) Variable Output - 132: 41(int) Constant 0 - 133: TypePointer Input 6(float) - 136: TypePointer Output 6(float) + 78(T2): TypeStruct 41(int) 13 + 79: TypePointer Uniform 78(T2) + 80: 79(ptr) Variable Uniform + 97: TypePointer Output 14(fvec3) + 98(color): 97(ptr) Variable Output + 99: TypePointer Input 14(fvec3) + 100(c): 99(ptr) Variable Input + 102: 16(int) Constant 2 + 103: TypePointer Uniform 15 + 107: TypePointer Output 16(int) + 108(iout): 107(ptr) Variable Output + 109: 16(int) Constant 3 + 110: TypePointer Uniform 16(int) + 113: TypePointer Input 41(int) + 114(uiuin): 113(ptr) Variable Input + 118: TypeVector 16(int) 2 + 119: TypePointer Input 118(ivec2) + 120(aiv2): 119(ptr) Variable Input + 121: 41(int) Constant 1 + 122: TypePointer Input 16(int) + 126(S): TypeStruct 14(fvec3) 6(float) + 127: TypePointer Output 126(S) + 128(s): 127(ptr) Variable Output + 131: 41(int) Constant 0 + 132: TypePointer Input 6(float) + 135: TypePointer Output 6(float) + 137: TypeBool 138: TypePointer Uniform 14(fvec3) 141: 6(float) Constant 1065353216 142: 14(fvec3) ConstantComposite 141 141 141 - 143: TypeVector 78(bool) 3 + 143: TypeVector 137(bool) 3 149: TypePointer Uniform 42(ivec3) 152: 41(int) Constant 5 153: 42(ivec3) ConstantComposite 152 152 152 -163(gl_VertexID): 123(ptr) Variable Input -164(gl_InstanceID): 123(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12: 7(fvec4) Load 11(p) @@ -181,63 +187,63 @@ Linked vertex stage: 75: 7(fvec4) CompositeExtract 64 3 76: 7(fvec4) FAdd 74 75 77: 13 CompositeConstruct 67 70 73 76 - 82: 21(ptr) AccessChain 81 24 - 83: 13 Load 82 - 84: 7(fvec4) CompositeExtract 77 0 - 85: 7(fvec4) CompositeExtract 83 0 - 86: 7(fvec4) FAdd 84 85 - 87: 7(fvec4) CompositeExtract 77 1 - 88: 7(fvec4) CompositeExtract 83 1 - 89: 7(fvec4) FAdd 87 88 - 90: 7(fvec4) CompositeExtract 77 2 - 91: 7(fvec4) CompositeExtract 83 2 - 92: 7(fvec4) FAdd 90 91 - 93: 7(fvec4) CompositeExtract 77 3 - 94: 7(fvec4) CompositeExtract 83 3 - 95: 7(fvec4) FAdd 93 94 - 96: 13 CompositeConstruct 86 89 92 95 - 97: 7(fvec4) VectorTimesMatrix 12 96 - Store 9(pos) 97 - 102: 14(fvec3) Load 101(c) - 105: 104(ptr) AccessChain 19(tblock) 103 - 106: 15 Load 105 - 107: 14(fvec3) VectorTimesMatrix 102 106 - Store 99(color) 107 - 112: 111(ptr) AccessChain 19(tblock) 110 - 113: 16(int) Load 112 - 116: 41(int) Load 115(uiuin) - 117: 16(int) Bitcast 116 - 118: 16(int) IAdd 113 117 - 124: 123(ptr) AccessChain 121(aiv2) 122 - 125: 16(int) Load 124 - 126: 16(int) IAdd 118 125 - Store 109(iout) 126 - 130: 14(fvec3) Load 101(c) - 131: 98(ptr) AccessChain 129(s) 20 - Store 131 130 - 134: 133(ptr) AccessChain 11(p) 132 - 135: 6(float) Load 134 - 137: 136(ptr) AccessChain 129(s) 24 - Store 137 135 - 139: 138(ptr) AccessChain 47 103 24 + 81: 21(ptr) AccessChain 80 24 + 82: 13 Load 81 + 83: 7(fvec4) CompositeExtract 77 0 + 84: 7(fvec4) CompositeExtract 82 0 + 85: 7(fvec4) FAdd 83 84 + 86: 7(fvec4) CompositeExtract 77 1 + 87: 7(fvec4) CompositeExtract 82 1 + 88: 7(fvec4) FAdd 86 87 + 89: 7(fvec4) CompositeExtract 77 2 + 90: 7(fvec4) CompositeExtract 82 2 + 91: 7(fvec4) FAdd 89 90 + 92: 7(fvec4) CompositeExtract 77 3 + 93: 7(fvec4) CompositeExtract 82 3 + 94: 7(fvec4) FAdd 92 93 + 95: 13 CompositeConstruct 85 88 91 94 + 96: 7(fvec4) VectorTimesMatrix 12 95 + Store 9(pos) 96 + 101: 14(fvec3) Load 100(c) + 104: 103(ptr) AccessChain 19(tblock) 102 + 105: 15 Load 104 + 106: 14(fvec3) VectorTimesMatrix 101 105 + Store 98(color) 106 + 111: 110(ptr) AccessChain 19(tblock) 109 + 112: 16(int) Load 111 + 115: 41(int) Load 114(uiuin) + 116: 16(int) Bitcast 115 + 117: 16(int) IAdd 112 116 + 123: 122(ptr) AccessChain 120(aiv2) 121 + 124: 16(int) Load 123 + 125: 16(int) IAdd 117 124 + Store 108(iout) 125 + 129: 14(fvec3) Load 100(c) + 130: 97(ptr) AccessChain 128(s) 20 + Store 130 129 + 133: 132(ptr) AccessChain 11(p) 131 + 134: 6(float) Load 133 + 136: 135(ptr) AccessChain 128(s) 24 + Store 136 134 + 139: 138(ptr) AccessChain 47 102 24 140: 14(fvec3) Load 139 144: 143(bvec3) FOrdNotEqual 140 142 - 145: 78(bool) Any 144 - 146: 78(bool) LogicalNot 145 + 145: 137(bool) Any 144 + 146: 137(bool) LogicalNot 145 SelectionMerge 148 None BranchConditional 146 147 148 147: Label - 150: 149(ptr) AccessChain 47 110 103 + 150: 149(ptr) AccessChain 47 109 102 151: 42(ivec3) Load 150 154: 143(bvec3) INotEqual 151 153 - 155: 78(bool) Any 154 + 155: 137(bool) Any 154 Branch 148 148: Label - 156: 78(bool) Phi 145 5 155 147 + 156: 137(bool) Phi 145 5 155 147 SelectionMerge 158 None BranchConditional 156 157 158 157: Label - 159: 98(ptr) AccessChain 129(s) 20 + 159: 97(ptr) AccessChain 128(s) 20 160: 14(fvec3) Load 159 161: 14(fvec3) CompositeConstruct 141 141 141 162: 14(fvec3) FAdd 160 161 diff --git a/Test/baseResults/spv.300layoutp.vert.out b/Test/baseResults/spv.300layoutp.vert.out index 5baf51fb..ebad9635 100755 --- a/Test/baseResults/spv.300layoutp.vert.out +++ b/Test/baseResults/spv.300layoutp.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 117 +// Id's are bound by 115 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 11 51 53 61 73 81 115 116 + EntryPoint Vertex 4 "main" 9 11 50 52 60 72 80 Source ESSL 310 Name 4 "main" Name 9 "pos" @@ -29,21 +29,19 @@ Linked vertex stage: MemberName 33(T3) 2 "N2" MemberName 33(T3) 3 "uv3a" Name 35 "" - Name 43 "T2" - MemberName 43(T2) 0 "b" - MemberName 43(T2) 1 "t2m" - Name 45 "" - Name 51 "color" - Name 53 "c" - Name 61 "iout" - Name 67 "uiuin" - Name 73 "aiv2" - Name 79 "S" - MemberName 79(S) 0 "c" - MemberName 79(S) 1 "f" - Name 81 "s" - Name 115 "gl_VertexID" - Name 116 "gl_InstanceID" + Name 42 "T2" + MemberName 42(T2) 0 "b" + MemberName 42(T2) 1 "t2m" + Name 44 "" + Name 50 "color" + Name 52 "c" + Name 60 "iout" + Name 66 "uiuin" + Name 72 "aiv2" + Name 78 "S" + MemberName 78(S) 0 "c" + MemberName 78(S) 1 "f" + Name 80 "s" Decorate 11(p) Location 3 MemberDecorate 17(Transform) 0 RowMajor MemberDecorate 17(Transform) 0 Offset 0 @@ -56,19 +54,29 @@ Linked vertex stage: MemberDecorate 17(Transform) 2 MatrixStride 16 MemberDecorate 17(Transform) 3 Offset 176 Decorate 17(Transform) Block + Decorate 19(tblock) DescriptorSet 0 + Decorate 32 ArrayStride 16 MemberDecorate 33(T3) 0 ColMajor + MemberDecorate 33(T3) 0 Offset 0 + MemberDecorate 33(T3) 0 MatrixStride 16 MemberDecorate 33(T3) 1 RowMajor + MemberDecorate 33(T3) 1 Offset 64 + MemberDecorate 33(T3) 1 MatrixStride 16 MemberDecorate 33(T3) 2 ColMajor - Decorate 33(T3) GLSLShared + MemberDecorate 33(T3) 2 Offset 128 + MemberDecorate 33(T3) 2 MatrixStride 16 + MemberDecorate 33(T3) 3 Offset 160 Decorate 33(T3) Block - MemberDecorate 43(T2) 1 RowMajor - Decorate 43(T2) GLSLShared - Decorate 43(T2) Block - Decorate 53(c) Location 7 - Decorate 61(iout) Flat - Decorate 73(aiv2) Location 9 - Decorate 115(gl_VertexID) BuiltIn VertexId - Decorate 116(gl_InstanceID) BuiltIn InstanceId + Decorate 35 DescriptorSet 0 + MemberDecorate 42(T2) 0 Offset 0 + MemberDecorate 42(T2) 1 RowMajor + MemberDecorate 42(T2) 1 Offset 16 + MemberDecorate 42(T2) 1 MatrixStride 16 + Decorate 42(T2) Block + Decorate 44 DescriptorSet 0 + Decorate 52(c) Location 7 + Decorate 60(iout) Flat + Decorate 72(aiv2) Location 9 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -95,42 +103,40 @@ Linked vertex stage: 33(T3): TypeStruct 13 13 28 32 34: TypePointer Uniform 33(T3) 35: 34(ptr) Variable Uniform - 42: TypeBool - 43(T2): TypeStruct 42(bool) 13 - 44: TypePointer Uniform 43(T2) - 45: 44(ptr) Variable Uniform - 50: TypePointer Output 14(fvec3) - 51(color): 50(ptr) Variable Output - 52: TypePointer Input 14(fvec3) - 53(c): 52(ptr) Variable Input - 55: 16(int) Constant 2 - 56: TypePointer Uniform 15 - 60: TypePointer Output 16(int) - 61(iout): 60(ptr) Variable Output - 62: 16(int) Constant 3 - 63: TypePointer Uniform 16(int) - 66: TypePointer UniformConstant 29(int) - 67(uiuin): 66(ptr) Variable UniformConstant - 71: TypeVector 16(int) 2 - 72: TypePointer Input 71(ivec2) - 73(aiv2): 72(ptr) Variable Input - 74: 29(int) Constant 1 - 75: TypePointer Input 16(int) - 79(S): TypeStruct 14(fvec3) 6(float) - 80: TypePointer Output 79(S) - 81(s): 80(ptr) Variable Output - 84: 29(int) Constant 0 - 85: TypePointer Input 6(float) - 88: TypePointer Output 6(float) + 42(T2): TypeStruct 29(int) 13 + 43: TypePointer Uniform 42(T2) + 44: 43(ptr) Variable Uniform + 49: TypePointer Output 14(fvec3) + 50(color): 49(ptr) Variable Output + 51: TypePointer Input 14(fvec3) + 52(c): 51(ptr) Variable Input + 54: 16(int) Constant 2 + 55: TypePointer Uniform 15 + 59: TypePointer Output 16(int) + 60(iout): 59(ptr) Variable Output + 61: 16(int) Constant 3 + 62: TypePointer Uniform 16(int) + 65: TypePointer Private 29(int) + 66(uiuin): 65(ptr) Variable Private + 70: TypeVector 16(int) 2 + 71: TypePointer Input 70(ivec2) + 72(aiv2): 71(ptr) Variable Input + 73: 29(int) Constant 1 + 74: TypePointer Input 16(int) + 78(S): TypeStruct 14(fvec3) 6(float) + 79: TypePointer Output 78(S) + 80(s): 79(ptr) Variable Output + 83: 29(int) Constant 0 + 84: TypePointer Input 6(float) + 87: TypePointer Output 6(float) + 89: TypeBool 90: TypePointer Uniform 14(fvec3) 93: 6(float) Constant 1065353216 94: 14(fvec3) ConstantComposite 93 93 93 - 95: TypeVector 42(bool) 3 + 95: TypeVector 89(bool) 3 101: TypePointer Uniform 30(ivec3) 104: 29(int) Constant 5 105: 30(ivec3) ConstantComposite 104 104 104 -115(gl_VertexID): 75(ptr) Variable Input -116(gl_InstanceID): 75(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12: 7(fvec4) Load 11(p) @@ -145,51 +151,51 @@ Linked vertex stage: 39: 21(ptr) AccessChain 35 20 40: 13 Load 39 41: 13 MatrixTimesMatrix 38 40 - 46: 21(ptr) AccessChain 45 24 - 47: 13 Load 46 - 48: 13 MatrixTimesMatrix 41 47 - 49: 7(fvec4) VectorTimesMatrix 12 48 - Store 9(pos) 49 - 54: 14(fvec3) Load 53(c) - 57: 56(ptr) AccessChain 19(tblock) 55 - 58: 15 Load 57 - 59: 14(fvec3) VectorTimesMatrix 54 58 - Store 51(color) 59 - 64: 63(ptr) AccessChain 19(tblock) 62 - 65: 16(int) Load 64 - 68: 29(int) Load 67(uiuin) - 69: 16(int) Bitcast 68 - 70: 16(int) IAdd 65 69 - 76: 75(ptr) AccessChain 73(aiv2) 74 - 77: 16(int) Load 76 - 78: 16(int) IAdd 70 77 - Store 61(iout) 78 - 82: 14(fvec3) Load 53(c) - 83: 50(ptr) AccessChain 81(s) 20 - Store 83 82 - 86: 85(ptr) AccessChain 11(p) 84 - 87: 6(float) Load 86 - 89: 88(ptr) AccessChain 81(s) 24 - Store 89 87 - 91: 90(ptr) AccessChain 35 55 24 + 45: 21(ptr) AccessChain 44 24 + 46: 13 Load 45 + 47: 13 MatrixTimesMatrix 41 46 + 48: 7(fvec4) VectorTimesMatrix 12 47 + Store 9(pos) 48 + 53: 14(fvec3) Load 52(c) + 56: 55(ptr) AccessChain 19(tblock) 54 + 57: 15 Load 56 + 58: 14(fvec3) VectorTimesMatrix 53 57 + Store 50(color) 58 + 63: 62(ptr) AccessChain 19(tblock) 61 + 64: 16(int) Load 63 + 67: 29(int) Load 66(uiuin) + 68: 16(int) Bitcast 67 + 69: 16(int) IAdd 64 68 + 75: 74(ptr) AccessChain 72(aiv2) 73 + 76: 16(int) Load 75 + 77: 16(int) IAdd 69 76 + Store 60(iout) 77 + 81: 14(fvec3) Load 52(c) + 82: 49(ptr) AccessChain 80(s) 20 + Store 82 81 + 85: 84(ptr) AccessChain 11(p) 83 + 86: 6(float) Load 85 + 88: 87(ptr) AccessChain 80(s) 24 + Store 88 86 + 91: 90(ptr) AccessChain 35 54 24 92: 14(fvec3) Load 91 96: 95(bvec3) FOrdNotEqual 92 94 - 97: 42(bool) Any 96 - 98: 42(bool) LogicalNot 97 + 97: 89(bool) Any 96 + 98: 89(bool) LogicalNot 97 SelectionMerge 100 None BranchConditional 98 99 100 99: Label - 102: 101(ptr) AccessChain 35 62 55 + 102: 101(ptr) AccessChain 35 61 54 103: 30(ivec3) Load 102 106: 95(bvec3) INotEqual 103 105 - 107: 42(bool) Any 106 + 107: 89(bool) Any 106 Branch 100 100: Label - 108: 42(bool) Phi 97 5 107 99 + 108: 89(bool) Phi 97 5 107 99 SelectionMerge 110 None BranchConditional 108 109 110 109: Label - 111: 50(ptr) AccessChain 81(s) 20 + 111: 49(ptr) AccessChain 80(s) 20 112: 14(fvec3) Load 111 113: 14(fvec3) CompositeConstruct 93 93 93 114: 14(fvec3) FAdd 112 113 diff --git a/Test/baseResults/spv.310.comp.out b/Test/baseResults/spv.310.comp.out index 1a34d087..fa23af92 100755 --- a/Test/baseResults/spv.310.comp.out +++ b/Test/baseResults/spv.310.comp.out @@ -33,12 +33,22 @@ Linked compute stage: MemberName 48(outs) 1 "va" Name 50 "outnames" Name 53 "gl_LocalInvocationID" - Decorate 13(outb) GLSLShared + Decorate 12 ArrayStride 16 + MemberDecorate 13(outb) 0 Offset 0 + MemberDecorate 13(outb) 1 Offset 4 + MemberDecorate 13(outb) 2 Offset 8 + MemberDecorate 13(outb) 3 Offset 16 Decorate 13(outb) BufferBlock - Decorate 24(outbna) GLSLShared + Decorate 15(outbname) DescriptorSet 0 + MemberDecorate 24(outbna) 0 Offset 0 + MemberDecorate 24(outbna) 1 Offset 16 Decorate 24(outbna) BufferBlock - Decorate 48(outs) GLSLShared + Decorate 26(outbnamena) DescriptorSet 0 + Decorate 47 ArrayStride 16 + MemberDecorate 48(outs) 0 Offset 0 + MemberDecorate 48(outs) 1 Offset 16 Decorate 48(outs) BufferBlock + Decorate 50(outnames) DescriptorSet 0 Decorate 53(gl_LocalInvocationID) BuiltIn LocalInvocationId Decorate 66 BuiltIn WorkgroupSize 2: TypeVoid diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index 81ae28e2..a851500c 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -16,7 +16,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 400 SourceExtension "GL_ARB_separate_shader_objects" Name 4 "main" @@ -52,8 +52,12 @@ Linked fragment stage: Name 1078 "isamp2DA" Name 1095 "gl_FragCoord" Name 1097 "vl2" + Decorate 17(u2drs) DescriptorSet 0 + Decorate 1023(arrayedSampler) DescriptorSet 0 Decorate 1025(i) Flat Decorate 1036(gl_ClipDistance) BuiltIn ClipDistance + Decorate 1052(samp2dr) DescriptorSet 0 + Decorate 1078(isamp2DA) DescriptorSet 0 Decorate 1095(gl_FragCoord) BuiltIn FragCoord Decorate 1097(vl2) Location 6 2: TypeVoid diff --git a/Test/baseResults/spv.420.geom.out b/Test/baseResults/spv.420.geom.out index 0d659c5b..09fffb8e 100644 --- a/Test/baseResults/spv.420.geom.out +++ b/Test/baseResults/spv.420.geom.out @@ -7,7 +7,7 @@ Linked geometry stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 74 +// Id's are bound by 72 Capability Geometry Capability GeometryPointSize @@ -36,7 +36,6 @@ Linked geometry stage: Name 46 "coord" Name 64 "i" Name 67 "indexable" - Name 73 "v4" MemberDecorate 9(gl_PerVertex) 0 BuiltIn PointSize Decorate 9(gl_PerVertex) Block MemberDecorate 21(gl_PerVertex) 0 BuiltIn PointSize @@ -46,6 +45,7 @@ Linked geometry stage: Decorate 28(gl_ViewportIndex) Stream 0 Decorate 28(gl_ViewportIndex) BuiltIn ViewportIndex Decorate 33(gl_InvocationID) BuiltIn InvocationId + Decorate 41(s2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -94,12 +94,10 @@ Linked geometry stage: 60: 15(int) Constant 2 61: 50(ivec2) ConstantComposite 60 16 62: 52 ConstantComposite 53 55 57 59 61 - 63: TypePointer UniformConstant 15(int) - 64(i): 63(ptr) Variable UniformConstant + 63: TypePointer Private 15(int) + 64(i): 63(ptr) Variable Private 66: TypePointer Function 52 68: TypePointer Function 50(ivec2) - 72: TypePointer UniformConstant 35(fvec4) - 73(v4): 72(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 8(p): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.430.vert.out b/Test/baseResults/spv.430.vert.out index 2bf2aafd..a851b1c4 100755 --- a/Test/baseResults/spv.430.vert.out +++ b/Test/baseResults/spv.430.vert.out @@ -7,13 +7,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 69 +// Id's are bound by 63 Capability Shader Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 12 23 34 44 45 65 67 68 + EntryPoint Vertex 4 "main" 12 23 34 38 41 42 62 Source GLSL 430 Name 4 "main" Name 10 "gl_PerVertex" @@ -21,58 +21,57 @@ Linked vertex stage: Name 12 "" Name 23 "bad" Name 34 "badorder3" - Name 39 "f" - Name 43 "uv4" - Name 44 "badorder" - Name 45 "badorder2" - Name 46 "boundblock" - MemberName 46(boundblock) 0 "aoeu" - Name 48 "boundInst" - Name 49 "anonblock" - MemberName 49(anonblock) 0 "aoeu" - Name 51 "" - Name 55 "sampb1" - Name 58 "sampb2" - Name 59 "sampb4" - Name 62 "S" - MemberName 62(S) 0 "a" - MemberName 62(S) 1 "b" - MemberName 62(S) 2 "c" - Name 63 "SS" - MemberName 63(SS) 0 "b" - MemberName 63(SS) 1 "s" - MemberName 63(SS) 2 "c" - Name 65 "var" - Name 67 "gl_VertexID" - Name 68 "gl_InstanceID" + Name 38 "f" + Name 41 "badorder" + Name 42 "badorder2" + Name 43 "boundblock" + MemberName 43(boundblock) 0 "aoeu" + Name 45 "boundInst" + Name 46 "anonblock" + MemberName 46(anonblock) 0 "aoeu" + Name 48 "" + Name 52 "sampb1" + Name 55 "sampb2" + Name 56 "sampb4" + Name 59 "S" + MemberName 59(S) 0 "a" + MemberName 59(S) 1 "b" + MemberName 59(S) 2 "c" + Name 60 "SS" + MemberName 60(SS) 0 "b" + MemberName 60(SS) 1 "s" + MemberName 60(SS) 2 "c" + Name 62 "var" MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance Decorate 10(gl_PerVertex) Block Decorate 34(badorder3) Flat - Decorate 43(uv4) Location 4 - Decorate 45(badorder2) Invariant - Decorate 46(boundblock) GLSLShared - Decorate 46(boundblock) Block - Decorate 48(boundInst) Binding 3 - Decorate 49(anonblock) GLSLShared - Decorate 49(anonblock) Block - Decorate 51 Binding 7 - Decorate 55(sampb1) Binding 4 - Decorate 58(sampb2) Binding 5 - Decorate 59(sampb4) Binding 31 - MemberDecorate 62(S) 0 Flat - MemberDecorate 62(S) 0 Location 1 - MemberDecorate 62(S) 1 Flat - MemberDecorate 62(S) 1 Location 2 - MemberDecorate 62(S) 2 Flat - MemberDecorate 62(S) 2 Location 3 - MemberDecorate 63(SS) 0 Flat - MemberDecorate 63(SS) 0 Location 0 - MemberDecorate 63(SS) 1 Flat - MemberDecorate 63(SS) 1 Location 1 - MemberDecorate 63(SS) 2 Flat - MemberDecorate 63(SS) 2 Location 4 - Decorate 67(gl_VertexID) BuiltIn VertexId - Decorate 68(gl_InstanceID) BuiltIn InstanceId + Decorate 42(badorder2) Invariant + MemberDecorate 43(boundblock) 0 Offset 0 + Decorate 43(boundblock) Block + Decorate 45(boundInst) DescriptorSet 0 + Decorate 45(boundInst) Binding 3 + MemberDecorate 46(anonblock) 0 Offset 0 + Decorate 46(anonblock) Block + Decorate 48 DescriptorSet 0 + Decorate 48 Binding 7 + Decorate 52(sampb1) DescriptorSet 0 + Decorate 52(sampb1) Binding 4 + Decorate 55(sampb2) DescriptorSet 0 + Decorate 55(sampb2) Binding 5 + Decorate 56(sampb4) DescriptorSet 0 + Decorate 56(sampb4) Binding 31 + MemberDecorate 59(S) 0 Flat + MemberDecorate 59(S) 0 Location 1 + MemberDecorate 59(S) 1 Flat + MemberDecorate 59(S) 1 Location 2 + MemberDecorate 59(S) 2 Flat + MemberDecorate 59(S) 2 Location 3 + MemberDecorate 60(SS) 0 Flat + MemberDecorate 60(SS) 0 Location 0 + MemberDecorate 60(SS) 1 Flat + MemberDecorate 60(SS) 1 Location 1 + MemberDecorate 60(SS) 2 Flat + MemberDecorate 60(SS) 2 Location 4 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -99,35 +98,29 @@ Linked vertex stage: 33: TypePointer Output 19(fvec4) 34(badorder3): 33(ptr) Variable Output 35: TypePointer Input 19(fvec4) - 38: TypePointer UniformConstant 6(float) - 39(f): 38(ptr) Variable UniformConstant - 42: TypePointer UniformConstant 19(fvec4) - 43(uv4): 42(ptr) Variable UniformConstant - 44(badorder): 35(ptr) Variable Input - 45(badorder2): 33(ptr) Variable Output - 46(boundblock): TypeStruct 13(int) - 47: TypePointer Uniform 46(boundblock) - 48(boundInst): 47(ptr) Variable Uniform - 49(anonblock): TypeStruct 13(int) - 50: TypePointer Uniform 49(anonblock) - 51: 50(ptr) Variable Uniform - 52: TypeImage 6(float) 2D sampled format:Unknown - 53: TypeSampledImage 52 + 38(f): 25(ptr) Variable Input + 41(badorder): 35(ptr) Variable Input + 42(badorder2): 33(ptr) Variable Output + 43(boundblock): TypeStruct 13(int) + 44: TypePointer Uniform 43(boundblock) + 45(boundInst): 44(ptr) Variable Uniform + 46(anonblock): TypeStruct 13(int) + 47: TypePointer Uniform 46(anonblock) + 48: 47(ptr) Variable Uniform + 49: TypeImage 6(float) 2D sampled format:Unknown + 50: TypeSampledImage 49 + 51: TypePointer UniformConstant 50 + 52(sampb1): 51(ptr) Variable UniformConstant + 53: TypeArray 50 20 54: TypePointer UniformConstant 53 - 55(sampb1): 54(ptr) Variable UniformConstant - 56: TypeArray 53 20 - 57: TypePointer UniformConstant 56 - 58(sampb2): 57(ptr) Variable UniformConstant - 59(sampb4): 54(ptr) Variable UniformConstant - 60: TypeVector 7(int) 2 - 61: TypeVector 6(float) 3 - 62(S): TypeStruct 6(float) 60(ivec2) 61(fvec3) - 63(SS): TypeStruct 19(fvec4) 62(S) 19(fvec4) - 64: TypePointer Output 63(SS) - 65(var): 64(ptr) Variable Output - 66: TypePointer Input 13(int) - 67(gl_VertexID): 66(ptr) Variable Input -68(gl_InstanceID): 66(ptr) Variable Input + 55(sampb2): 54(ptr) Variable UniformConstant + 56(sampb4): 51(ptr) Variable UniformConstant + 57: TypeVector 7(int) 2 + 58: TypeVector 6(float) 3 + 59(S): TypeStruct 6(float) 57(ivec2) 58(fvec3) + 60(SS): TypeStruct 19(fvec4) 59(S) 19(fvec4) + 61: TypePointer Output 60(SS) + 62(var): 61(ptr) Variable Output 4(main): 2 Function None 3 5: Label 18: 17(ptr) AccessChain 12 14 15 @@ -143,8 +136,8 @@ Linked vertex stage: Store 34(badorder3) 37 Branch 32 32: Label - 40: 6(float) Load 39(f) - 41: 17(ptr) AccessChain 12 14 14 - Store 41 40 + 39: 6(float) Load 38(f) + 40: 17(ptr) AccessChain 12 14 14 + Store 40 39 Return FunctionEnd diff --git a/Test/baseResults/spv.AofA.frag.out b/Test/baseResults/spv.AofA.frag.out index 1e41c3b8..0dbf69ce 100644 --- a/Test/baseResults/spv.AofA.frag.out +++ b/Test/baseResults/spv.AofA.frag.out @@ -12,8 +12,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 39 44 78 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 39 44 68 70 72 78 + ExecutionMode 4 OriginUpperLeft Source GLSL 430 Name 4 "main" Name 17 "foo(f1[5][7];" @@ -33,8 +33,14 @@ Linked fragment stage: Name 94 "uAofA" MemberName 94(uAofA) 0 "f" Name 98 "nameAofA" - Decorate 94(uAofA) GLSLShared + Decorate 68(i) Flat + Decorate 70(j) Flat + Decorate 72(k) Flat + Decorate 92 ArrayStride 16 + Decorate 93 ArrayStride 64 + MemberDecorate 94(uAofA) 0 Offset 0 Decorate 94(uAofA) Block + Decorate 98(nameAofA) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -74,10 +80,10 @@ Linked fragment stage: 64: TypeArray 62 63 65: TypePointer Private 64 66(many): 65(ptr) Variable Private - 67: TypePointer UniformConstant 21(int) - 68(i): 67(ptr) Variable UniformConstant - 70(j): 67(ptr) Variable UniformConstant - 72(k): 67(ptr) Variable UniformConstant + 67: TypePointer Input 21(int) + 68(i): 67(ptr) Variable Input + 70(j): 67(ptr) Variable Input + 72(k): 67(ptr) Variable Input 77: TypePointer Input 6(float) 78(infloat): 77(ptr) Variable Input 80: TypePointer Private 6(float) diff --git a/Test/baseResults/spv.Operations.frag.out b/Test/baseResults/spv.Operations.frag.out index 16b0013c..b3a6d283 100755 --- a/Test/baseResults/spv.Operations.frag.out +++ b/Test/baseResults/spv.Operations.frag.out @@ -7,13 +7,13 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 507 +// Id's are bound by 509 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 483 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 22 212 288 485 503 508 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 9 "v" @@ -27,52 +27,56 @@ Linked fragment stage: Name 288 "uui" Name 305 "b" Name 342 "ub42" - Name 483 "FragColor" - Name 501 "uiv4" - Name 503 "ub" - Name 506 "uuv4" + Name 485 "FragColor" + Name 503 "uiv4" + Name 505 "ub" + Name 508 "uuv4" + Decorate 22(ui) Flat + Decorate 288(uui) Flat + Decorate 503(uiv4) Flat + Decorate 508(uuv4) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 8: TypePointer Function 7(fvec4) - 10: TypePointer UniformConstant 7(fvec4) - 11(uv4): 10(ptr) Variable UniformConstant + 10: TypePointer Input 7(fvec4) + 11(uv4): 10(ptr) Variable Input 18: TypeInt 32 1 19: TypePointer Function 18(int) - 21: TypePointer UniformConstant 18(int) - 22(ui): 21(ptr) Variable UniformConstant + 21: TypePointer Input 18(int) + 22(ui): 21(ptr) Variable Input 141: TypeInt 32 0 142: 141(int) Constant 0 143: TypePointer Function 6(float) 178: TypeBool 179: TypeVector 178(bool) 4 - 180: TypePointer UniformConstant 179(bvec4) - 181(ub41): 180(ptr) Variable UniformConstant - 211: TypePointer UniformConstant 6(float) - 212(uf): 211(ptr) Variable UniformConstant + 180: TypePointer Private 179(bvec4) + 181(ub41): 180(ptr) Variable Private + 211: TypePointer Input 6(float) + 212(uf): 211(ptr) Variable Input 284: TypePointer Function 141(int) - 287: TypePointer UniformConstant 141(int) - 288(uui): 287(ptr) Variable UniformConstant + 287: TypePointer Input 141(int) + 288(uui): 287(ptr) Variable Input 304: TypePointer Function 178(bool) - 342(ub42): 180(ptr) Variable UniformConstant - 396: 18(int) Constant 2 - 403: 18(int) Constant 1 - 433: TypeVector 6(float) 3 - 452: 6(float) Constant 1073741824 - 459: 6(float) Constant 1065353216 - 464: 18(int) Constant 66 - 470: 18(int) Constant 17 - 482: TypePointer Output 7(fvec4) - 483(FragColor): 482(ptr) Variable Output - 499: TypeVector 18(int) 4 - 500: TypePointer UniformConstant 499(ivec4) - 501(uiv4): 500(ptr) Variable UniformConstant - 502: TypePointer UniformConstant 178(bool) - 503(ub): 502(ptr) Variable UniformConstant - 504: TypeVector 141(int) 4 - 505: TypePointer UniformConstant 504(ivec4) - 506(uuv4): 505(ptr) Variable UniformConstant + 342(ub42): 180(ptr) Variable Private + 398: 18(int) Constant 2 + 405: 18(int) Constant 1 + 435: TypeVector 6(float) 3 + 454: 6(float) Constant 1073741824 + 461: 6(float) Constant 1065353216 + 466: 18(int) Constant 66 + 472: 18(int) Constant 17 + 484: TypePointer Output 7(fvec4) + 485(FragColor): 484(ptr) Variable Output + 501: TypeVector 18(int) 4 + 502: TypePointer Input 501(ivec4) + 503(uiv4): 502(ptr) Variable Input + 504: TypePointer Private 178(bool) + 505(ub): 504(ptr) Variable Private + 506: TypeVector 141(int) 4 + 507: TypePointer Input 506(ivec4) + 508(uuv4): 507(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(v): 8(ptr) Variable Function @@ -80,7 +84,7 @@ Linked fragment stage: 188(f): 143(ptr) Variable Function 285(u): 284(ptr) Variable Function 305(b): 304(ptr) Variable Function - 484: 8(ptr) Variable Function + 486: 8(ptr) Variable Function 12: 7(fvec4) Load 11(uv4) 13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12 Store 9(v) 13 @@ -529,137 +533,142 @@ Linked fragment stage: 388: 18(int) Load 20(i) 389: 18(int) Load 22(ui) 390: 178(bool) INotEqual 388 389 - 391: 18(int) Load 20(i) - 392: 18(int) Load 22(ui) - 393: 178(bool) IEqual 391 392 - 394: 178(bool) LogicalAnd 390 393 - 395: 18(int) Load 20(i) - 397: 178(bool) INotEqual 395 396 - 398: 178(bool) LogicalNotEqual 394 397 + SelectionMerge 392 None + BranchConditional 390 391 392 + 391: Label + 393: 18(int) Load 20(i) + 394: 18(int) Load 22(ui) + 395: 178(bool) IEqual 393 394 + Branch 392 + 392: Label + 396: 178(bool) Phi 390 386 395 391 + 397: 18(int) Load 20(i) + 399: 178(bool) INotEqual 397 398 + 400: 178(bool) LogicalNotEqual 396 399 Branch 387 387: Label - 399: 178(bool) Phi 384 365 398 386 - SelectionMerge 401 None - BranchConditional 399 400 401 - 400: Label - 402: 18(int) Load 20(i) - 404: 18(int) IAdd 402 403 - Store 20(i) 404 - Branch 401 - 401: Label - 405: 6(float) Load 212(uf) - 406: 6(float) Load 212(uf) - 407: 6(float) FAdd 405 406 + 401: 178(bool) Phi 384 365 400 392 + SelectionMerge 403 None + BranchConditional 401 402 403 + 402: Label + 404: 18(int) Load 20(i) + 406: 18(int) IAdd 404 405 + Store 20(i) 406 + Branch 403 + 403: Label + 407: 6(float) Load 212(uf) 408: 6(float) Load 212(uf) - 409: 6(float) FMul 407 408 + 409: 6(float) FAdd 407 408 410: 6(float) Load 212(uf) - 411: 6(float) FSub 409 410 + 411: 6(float) FMul 409 410 412: 6(float) Load 212(uf) - 413: 6(float) FDiv 411 412 - Store 188(f) 413 - 414: 7(fvec4) Load 9(v) - 415: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 414 - 416: 6(float) Load 188(f) - 417: 6(float) FAdd 416 415 - Store 188(f) 417 - 418: 7(fvec4) Load 9(v) - 419: 7(fvec4) Load 9(v) - 420: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 418 419 - 421: 6(float) Load 188(f) - 422: 6(float) FAdd 421 420 - Store 188(f) 422 - 423: 7(fvec4) Load 9(v) - 424: 7(fvec4) Load 9(v) - 425: 6(float) Dot 423 424 - 426: 6(float) Load 188(f) - 427: 6(float) FAdd 426 425 - Store 188(f) 427 + 413: 6(float) FSub 411 412 + 414: 6(float) Load 212(uf) + 415: 6(float) FDiv 413 414 + Store 188(f) 415 + 416: 7(fvec4) Load 9(v) + 417: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 416 + 418: 6(float) Load 188(f) + 419: 6(float) FAdd 418 417 + Store 188(f) 419 + 420: 7(fvec4) Load 9(v) + 421: 7(fvec4) Load 9(v) + 422: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 420 421 + 423: 6(float) Load 188(f) + 424: 6(float) FAdd 423 422 + Store 188(f) 424 + 425: 7(fvec4) Load 9(v) + 426: 7(fvec4) Load 9(v) + 427: 6(float) Dot 425 426 428: 6(float) Load 188(f) - 429: 6(float) Load 212(uf) - 430: 6(float) FMul 428 429 - 431: 6(float) Load 188(f) - 432: 6(float) FAdd 431 430 - Store 188(f) 432 - 434: 7(fvec4) Load 9(v) - 435: 433(fvec3) VectorShuffle 434 434 0 1 2 + 429: 6(float) FAdd 428 427 + Store 188(f) 429 + 430: 6(float) Load 188(f) + 431: 6(float) Load 212(uf) + 432: 6(float) FMul 430 431 + 433: 6(float) Load 188(f) + 434: 6(float) FAdd 433 432 + Store 188(f) 434 436: 7(fvec4) Load 9(v) - 437: 433(fvec3) VectorShuffle 436 436 0 1 2 - 438: 433(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 435 437 - 439: 6(float) CompositeExtract 438 0 - 440: 6(float) Load 188(f) - 441: 6(float) FAdd 440 439 - Store 188(f) 441 + 437: 435(fvec3) VectorShuffle 436 436 0 1 2 + 438: 7(fvec4) Load 9(v) + 439: 435(fvec3) VectorShuffle 438 438 0 1 2 + 440: 435(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 437 439 + 441: 6(float) CompositeExtract 440 0 442: 6(float) Load 188(f) - 443: 6(float) Load 212(uf) - 444: 178(bool) FOrdEqual 442 443 - 445: 178(bool) LogicalNot 444 - SelectionMerge 447 None - BranchConditional 445 446 447 - 446: Label - 448: 6(float) Load 188(f) - 449: 6(float) Load 212(uf) - 450: 178(bool) FOrdNotEqual 448 449 - 451: 6(float) Load 188(f) - 453: 178(bool) FOrdNotEqual 451 452 - 454: 178(bool) LogicalAnd 450 453 - Branch 447 - 447: Label - 455: 178(bool) Phi 444 401 454 446 - SelectionMerge 457 None - BranchConditional 455 456 457 - 456: Label - 458: 6(float) Load 188(f) - 460: 6(float) FAdd 458 459 - Store 188(f) 460 - Branch 457 - 457: Label - 461: 18(int) Load 22(ui) - 462: 18(int) Load 20(i) - 463: 18(int) BitwiseAnd 462 461 - Store 20(i) 463 - 465: 18(int) Load 20(i) - 466: 18(int) BitwiseOr 465 464 - Store 20(i) 466 - 467: 18(int) Load 22(ui) - 468: 18(int) Load 20(i) - 469: 18(int) BitwiseXor 468 467 - Store 20(i) 469 - 471: 18(int) Load 20(i) - 472: 18(int) SMod 471 470 - Store 20(i) 472 + 443: 6(float) FAdd 442 441 + Store 188(f) 443 + 444: 6(float) Load 188(f) + 445: 6(float) Load 212(uf) + 446: 178(bool) FOrdEqual 444 445 + 447: 178(bool) LogicalNot 446 + SelectionMerge 449 None + BranchConditional 447 448 449 + 448: Label + 450: 6(float) Load 188(f) + 451: 6(float) Load 212(uf) + 452: 178(bool) FOrdNotEqual 450 451 + 453: 6(float) Load 188(f) + 455: 178(bool) FOrdNotEqual 453 454 + 456: 178(bool) LogicalAnd 452 455 + Branch 449 + 449: Label + 457: 178(bool) Phi 446 403 456 448 + SelectionMerge 459 None + BranchConditional 457 458 459 + 458: Label + 460: 6(float) Load 188(f) + 462: 6(float) FAdd 460 461 + Store 188(f) 462 + Branch 459 + 459: Label + 463: 18(int) Load 22(ui) + 464: 18(int) Load 20(i) + 465: 18(int) BitwiseAnd 464 463 + Store 20(i) 465 + 467: 18(int) Load 20(i) + 468: 18(int) BitwiseOr 467 466 + Store 20(i) 468 + 469: 18(int) Load 22(ui) + 470: 18(int) Load 20(i) + 471: 18(int) BitwiseXor 470 469 + Store 20(i) 471 473: 18(int) Load 20(i) - 474: 18(int) ShiftRightArithmetic 473 396 + 474: 18(int) SMod 473 472 Store 20(i) 474 - 475: 18(int) Load 22(ui) - 476: 18(int) Load 20(i) - 477: 18(int) ShiftLeftLogical 476 475 - Store 20(i) 477 + 475: 18(int) Load 20(i) + 476: 18(int) ShiftRightArithmetic 475 398 + Store 20(i) 476 + 477: 18(int) Load 22(ui) 478: 18(int) Load 20(i) - 479: 18(int) Not 478 + 479: 18(int) ShiftLeftLogical 478 477 Store 20(i) 479 - 480: 178(bool) Load 305(b) - 481: 178(bool) LogicalNot 480 - Store 305(b) 481 - 485: 178(bool) Load 305(b) - SelectionMerge 487 None - BranchConditional 485 486 496 - 486: Label - 488: 18(int) Load 20(i) - 489: 6(float) ConvertSToF 488 - 490: 7(fvec4) CompositeConstruct 489 489 489 489 - 491: 6(float) Load 188(f) + 480: 18(int) Load 20(i) + 481: 18(int) Not 480 + Store 20(i) 481 + 482: 178(bool) Load 305(b) + 483: 178(bool) LogicalNot 482 + Store 305(b) 483 + 487: 178(bool) Load 305(b) + SelectionMerge 489 None + BranchConditional 487 488 498 + 488: Label + 490: 18(int) Load 20(i) + 491: 6(float) ConvertSToF 490 492: 7(fvec4) CompositeConstruct 491 491 491 491 - 493: 7(fvec4) FAdd 490 492 - 494: 7(fvec4) Load 9(v) - 495: 7(fvec4) FAdd 493 494 - Store 484 495 - Branch 487 - 496: Label - 497: 7(fvec4) Load 9(v) - Store 484 497 - Branch 487 - 487: Label - 498: 7(fvec4) Load 484 - Store 483(FragColor) 498 + 493: 6(float) Load 188(f) + 494: 7(fvec4) CompositeConstruct 493 493 493 493 + 495: 7(fvec4) FAdd 492 494 + 496: 7(fvec4) Load 9(v) + 497: 7(fvec4) FAdd 495 496 + Store 486 497 + Branch 489 + 498: Label + 499: 7(fvec4) Load 9(v) + Store 486 499 + Branch 489 + 489: Label + 500: 7(fvec4) Load 486 + Store 485(FragColor) 500 Return FunctionEnd diff --git a/Test/baseResults/spv.accessChain.frag.out b/Test/baseResults/spv.accessChain.frag.out index b434c700..e9a9d81b 100755 --- a/Test/baseResults/spv.accessChain.frag.out +++ b/Test/baseResults/spv.accessChain.frag.out @@ -12,8 +12,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 65 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 65 149 + ExecutionMode 4 OriginUpperLeft Source GLSL 420 Name 4 "main" Name 8 "S" @@ -72,6 +72,7 @@ Linked fragment stage: Name 190 "param" Name 194 "param" Decorate 65(OutColor) Location 0 + Decorate 149(u) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -92,8 +93,8 @@ Linked fragment stage: 141: 6(float) Constant 0 142: 7(fvec3) ConstantComposite 141 141 141 143: TypePointer Function 8(S) - 148: TypePointer UniformConstant 13(int) - 149(u): 148(ptr) Variable UniformConstant + 148: TypePointer Input 13(int) + 149(u): 148(ptr) Variable Input 4(main): 2 Function None 3 5: Label 144(s): 143(ptr) Variable Function diff --git a/Test/baseResults/spv.aggOps.frag.out b/Test/baseResults/spv.aggOps.frag.out index abac3874..4888bea4 100644 --- a/Test/baseResults/spv.aggOps.frag.out +++ b/Test/baseResults/spv.aggOps.frag.out @@ -7,13 +7,13 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 378 +// Id's are bound by 215 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 16 41 90 374 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 16 41 101 213 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 8 "s1" @@ -23,34 +23,47 @@ Linked fragment stage: Name 16 "u" Name 37 "b" Name 41 "w" - Name 55 "s2" - MemberName 55(s2) 0 "i" - MemberName 55(s2) 1 "f" - MemberName 55(s2) 2 "s1_1" - Name 57 "foo2a" - Name 59 "foo2b" - Name 82 "v" - Name 86 "samp2D" - Name 90 "coord" - Name 341 "s1" - MemberName 341(s1) 0 "i" - MemberName 341(s1) 1 "f" - Name 342 "s2" - MemberName 342(s2) 0 "i" - MemberName 342(s2) 1 "f" - MemberName 342(s2) 2 "s1_1" - Name 343 "bn" - MemberName 343(bn) 0 "foo2a" - Name 345 "bi" - Name 374 "color" - Name 377 "foo1" - MemberDecorate 341(s1) 0 Offset 0 - MemberDecorate 341(s1) 1 Offset 4 - MemberDecorate 342(s2) 0 Offset 0 - MemberDecorate 342(s2) 1 Offset 4 - MemberDecorate 342(s2) 2 Offset 16 - MemberDecorate 343(bn) 0 Offset 0 - Decorate 343(bn) Block + Name 55 "s1" + MemberName 55(s1) 0 "i" + MemberName 55(s1) 1 "f" + Name 56 "s2" + MemberName 56(s2) 0 "i" + MemberName 56(s2) 1 "f" + MemberName 56(s2) 2 "s1_1" + Name 57 "ub1" + MemberName 57(ub1) 0 "foo2a" + Name 59 "uName1" + Name 64 "s1" + MemberName 64(s1) 0 "i" + MemberName 64(s1) 1 "f" + Name 65 "s2" + MemberName 65(s2) 0 "i" + MemberName 65(s2) 1 "f" + MemberName 65(s2) 2 "s1_1" + Name 66 "ub2" + MemberName 66(ub2) 0 "foo2b" + Name 68 "uName2" + Name 93 "v" + Name 97 "samp2D" + Name 101 "coord" + Name 213 "color" + MemberDecorate 55(s1) 0 Offset 0 + MemberDecorate 55(s1) 1 Offset 4 + MemberDecorate 56(s2) 0 Offset 0 + MemberDecorate 56(s2) 1 Offset 4 + MemberDecorate 56(s2) 2 Offset 16 + MemberDecorate 57(ub1) 0 Offset 0 + Decorate 57(ub1) Block + Decorate 59(uName1) DescriptorSet 0 + MemberDecorate 64(s1) 0 Offset 0 + MemberDecorate 64(s1) 1 Offset 4 + MemberDecorate 65(s2) 0 Offset 0 + MemberDecorate 65(s2) 1 Offset 4 + MemberDecorate 65(s2) 2 Offset 8 + MemberDecorate 66(ub2) 0 Offset 0 + Decorate 66(ub2) BufferBlock + Decorate 68(uName2) DescriptorSet 0 + Decorate 97(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -74,44 +87,43 @@ Linked fragment stage: 39: 7(float) Constant 1099431936 40: 8(s1) ConstantComposite 38 39 41(w): 15(ptr) Variable Input - 55(s2): TypeStruct 6(int) 7(float) 8(s1) - 56: TypePointer UniformConstant 55(s2) - 57(foo2a): 56(ptr) Variable UniformConstant - 59(foo2b): 56(ptr) Variable UniformConstant - 61: TypeBool - 81: TypePointer Function 14(fvec4) - 83: TypeImage 7(float) 2D sampled format:Unknown - 84: TypeSampledImage 83 - 85: TypePointer UniformConstant 84 - 86(samp2D): 85(ptr) Variable UniformConstant - 88: TypeVector 7(float) 2 - 89: TypePointer Input 88(fvec2) - 90(coord): 89(ptr) Variable Input - 95: 7(float) Constant 1073741824 - 101: TypeVector 61(bool) 4 - 106: 7(float) Constant 1077936128 - 115: 7(float) Constant 1082130432 - 121: TypeVector 61(bool) 2 - 126: 7(float) Constant 1084227584 - 232: 7(float) Constant 1086324736 - 338: 7(float) Constant 1088421888 - 341(s1): TypeStruct 6(int) 7(float) - 342(s2): TypeStruct 6(int) 7(float) 341(s1) - 343(bn): TypeStruct 342(s2) - 344: TypePointer Uniform 343(bn) - 345(bi): 344(ptr) Variable Uniform - 346: 6(int) Constant 0 - 347: TypePointer Uniform 342(s2) - 370: 7(float) Constant 1090519040 - 373: TypePointer Output 14(fvec4) - 374(color): 373(ptr) Variable Output - 376: TypePointer UniformConstant 8(s1) - 377(foo1): 376(ptr) Variable UniformConstant + 55(s1): TypeStruct 6(int) 7(float) + 56(s2): TypeStruct 6(int) 7(float) 55(s1) + 57(ub1): TypeStruct 56(s2) + 58: TypePointer Uniform 57(ub1) + 59(uName1): 58(ptr) Variable Uniform + 60: 6(int) Constant 0 + 61: TypePointer Uniform 56(s2) + 64(s1): TypeStruct 6(int) 7(float) + 65(s2): TypeStruct 6(int) 7(float) 64(s1) + 66(ub2): TypeStruct 65(s2) + 67: TypePointer Uniform 66(ub2) + 68(uName2): 67(ptr) Variable Uniform + 69: TypePointer Uniform 65(s2) + 72: TypeBool + 92: TypePointer Function 14(fvec4) + 94: TypeImage 7(float) 2D sampled format:Unknown + 95: TypeSampledImage 94 + 96: TypePointer UniformConstant 95 + 97(samp2D): 96(ptr) Variable UniformConstant + 99: TypeVector 7(float) 2 + 100: TypePointer Input 99(fvec2) + 101(coord): 100(ptr) Variable Input + 106: 7(float) Constant 1073741824 + 112: TypeVector 72(bool) 4 + 117: 7(float) Constant 1077936128 + 126: 7(float) Constant 1082130432 + 132: TypeVector 72(bool) 2 + 137: 7(float) Constant 1084227584 + 173: 7(float) Constant 1086324736 + 209: 7(float) Constant 1088421888 + 212: TypePointer Output 14(fvec4) + 213(color): 212(ptr) Variable Output 4(main): 2 Function None 3 5: Label 13(a): 12(ptr) Variable Function 37(b): 12(ptr) Variable Function - 82(v): 81(ptr) Variable Function + 93(v): 92(ptr) Variable Function 19: 18(ptr) AccessChain 16(u) 17 20: 7(float) Load 19 21: 6(int) ConvertFToS 20 @@ -140,325 +152,159 @@ Linked fragment stage: 53: 8(s1) CompositeConstruct 50 52 54: 11 CompositeConstruct 40 47 53 Store 37(b) 54 - 58: 55(s2) Load 57(foo2a) - 60: 55(s2) Load 59(foo2b) - 62: 6(int) CompositeExtract 58 0 - 63: 6(int) CompositeExtract 60 0 - 64: 61(bool) IEqual 62 63 - 65: 7(float) CompositeExtract 58 1 - 66: 7(float) CompositeExtract 60 1 - 67: 61(bool) FOrdEqual 65 66 - 68: 61(bool) LogicalAnd 64 67 - 69: 8(s1) CompositeExtract 58 2 - 70: 8(s1) CompositeExtract 60 2 - 71: 6(int) CompositeExtract 69 0 - 72: 6(int) CompositeExtract 70 0 - 73: 61(bool) IEqual 71 72 - 74: 7(float) CompositeExtract 69 1 - 75: 7(float) CompositeExtract 70 1 - 76: 61(bool) FOrdEqual 74 75 - 77: 61(bool) LogicalAnd 73 76 - 78: 61(bool) LogicalAnd 68 77 - SelectionMerge 80 None - BranchConditional 78 79 93 - 79: Label - 87: 84 Load 86(samp2D) - 91: 88(fvec2) Load 90(coord) - 92: 14(fvec4) ImageSampleImplicitLod 87 91 - Store 82(v) 92 - Branch 80 - 93: Label - 94: 84 Load 86(samp2D) - 96: 88(fvec2) Load 90(coord) - 97: 88(fvec2) VectorTimesScalar 96 95 - 98: 14(fvec4) ImageSampleImplicitLod 94 97 - Store 82(v) 98 - Branch 80 - 80: Label - 99: 14(fvec4) Load 16(u) - 100: 14(fvec4) Load 82(v) - 102: 101(bvec4) FOrdEqual 99 100 - 103: 61(bool) All 102 - SelectionMerge 105 None - BranchConditional 103 104 105 + 62: 61(ptr) AccessChain 59(uName1) 60 + 63: 56(s2) Load 62 + 70: 69(ptr) AccessChain 68(uName2) 60 + 71: 65(s2) Load 70 + 73: 6(int) CompositeExtract 63 0 + 74: 6(int) CompositeExtract 71 0 + 75: 72(bool) IEqual 73 74 + 76: 7(float) CompositeExtract 63 1 + 77: 7(float) CompositeExtract 71 1 + 78: 72(bool) FOrdEqual 76 77 + 79: 72(bool) LogicalAnd 75 78 + 80: 55(s1) CompositeExtract 63 2 + 81: 64(s1) CompositeExtract 71 2 + 82: 6(int) CompositeExtract 80 0 + 83: 6(int) CompositeExtract 81 0 + 84: 72(bool) IEqual 82 83 + 85: 7(float) CompositeExtract 80 1 + 86: 7(float) CompositeExtract 81 1 + 87: 72(bool) FOrdEqual 85 86 + 88: 72(bool) LogicalAnd 84 87 + 89: 72(bool) LogicalAnd 79 88 + SelectionMerge 91 None + BranchConditional 89 90 104 + 90: Label + 98: 95 Load 97(samp2D) + 102: 99(fvec2) Load 101(coord) + 103: 14(fvec4) ImageSampleImplicitLod 98 102 + Store 93(v) 103 + Branch 91 104: Label - 107: 14(fvec4) Load 82(v) - 108: 14(fvec4) VectorTimesScalar 107 106 - Store 82(v) 108 - Branch 105 - 105: Label - 109: 14(fvec4) Load 16(u) - 110: 14(fvec4) Load 82(v) - 111: 101(bvec4) FOrdNotEqual 109 110 - 112: 61(bool) Any 111 - SelectionMerge 114 None - BranchConditional 112 113 114 - 113: Label - 116: 14(fvec4) Load 82(v) - 117: 14(fvec4) VectorTimesScalar 116 115 - Store 82(v) 117 - Branch 114 - 114: Label - 118: 88(fvec2) Load 90(coord) - 119: 14(fvec4) Load 82(v) - 120: 88(fvec2) VectorShuffle 119 119 1 3 - 122: 121(bvec2) FOrdEqual 118 120 - 123: 61(bool) All 122 + 105: 95 Load 97(samp2D) + 107: 99(fvec2) Load 101(coord) + 108: 99(fvec2) VectorTimesScalar 107 106 + 109: 14(fvec4) ImageSampleImplicitLod 105 108 + Store 93(v) 109 + Branch 91 + 91: Label + 110: 14(fvec4) Load 16(u) + 111: 14(fvec4) Load 93(v) + 113: 112(bvec4) FOrdEqual 110 111 + 114: 72(bool) All 113 + SelectionMerge 116 None + BranchConditional 114 115 116 + 115: Label + 118: 14(fvec4) Load 93(v) + 119: 14(fvec4) VectorTimesScalar 118 117 + Store 93(v) 119 + Branch 116 + 116: Label + 120: 14(fvec4) Load 16(u) + 121: 14(fvec4) Load 93(v) + 122: 112(bvec4) FOrdNotEqual 120 121 + 123: 72(bool) Any 122 SelectionMerge 125 None BranchConditional 123 124 125 124: Label - 127: 14(fvec4) Load 82(v) + 127: 14(fvec4) Load 93(v) 128: 14(fvec4) VectorTimesScalar 127 126 - Store 82(v) 128 + Store 93(v) 128 Branch 125 125: Label - 129: 11 Load 13(a) - 130: 11 Load 37(b) - 131: 8(s1) CompositeExtract 129 0 - 132: 8(s1) CompositeExtract 130 0 - 133: 6(int) CompositeExtract 131 0 - 134: 6(int) CompositeExtract 132 0 - 135: 61(bool) IEqual 133 134 - 136: 7(float) CompositeExtract 131 1 - 137: 7(float) CompositeExtract 132 1 - 138: 61(bool) FOrdEqual 136 137 - 139: 61(bool) LogicalAnd 135 138 - 140: 8(s1) CompositeExtract 129 1 - 141: 8(s1) CompositeExtract 130 1 - 142: 6(int) CompositeExtract 140 0 - 143: 6(int) CompositeExtract 141 0 - 144: 61(bool) IEqual 142 143 - 145: 7(float) CompositeExtract 140 1 - 146: 7(float) CompositeExtract 141 1 - 147: 61(bool) FOrdEqual 145 146 - 148: 61(bool) LogicalAnd 144 147 - 149: 61(bool) LogicalAnd 139 148 - 150: 8(s1) CompositeExtract 129 2 - 151: 8(s1) CompositeExtract 130 2 - 152: 6(int) CompositeExtract 150 0 + 129: 99(fvec2) Load 101(coord) + 130: 14(fvec4) Load 93(v) + 131: 99(fvec2) VectorShuffle 130 130 1 3 + 133: 132(bvec2) FOrdEqual 129 131 + 134: 72(bool) All 133 + SelectionMerge 136 None + BranchConditional 134 135 136 + 135: Label + 138: 14(fvec4) Load 93(v) + 139: 14(fvec4) VectorTimesScalar 138 137 + Store 93(v) 139 + Branch 136 + 136: Label + 140: 11 Load 13(a) + 141: 11 Load 37(b) + 142: 8(s1) CompositeExtract 140 0 + 143: 8(s1) CompositeExtract 141 0 + 144: 6(int) CompositeExtract 142 0 + 145: 6(int) CompositeExtract 143 0 + 146: 72(bool) IEqual 144 145 + 147: 7(float) CompositeExtract 142 1 + 148: 7(float) CompositeExtract 143 1 + 149: 72(bool) FOrdEqual 147 148 + 150: 72(bool) LogicalAnd 146 149 + 151: 8(s1) CompositeExtract 140 1 + 152: 8(s1) CompositeExtract 141 1 153: 6(int) CompositeExtract 151 0 - 154: 61(bool) IEqual 152 153 - 155: 7(float) CompositeExtract 150 1 + 154: 6(int) CompositeExtract 152 0 + 155: 72(bool) IEqual 153 154 156: 7(float) CompositeExtract 151 1 - 157: 61(bool) FOrdEqual 155 156 - 158: 61(bool) LogicalAnd 154 157 - 159: 61(bool) LogicalAnd 149 158 - 160: 8(s1) CompositeExtract 129 3 - 161: 8(s1) CompositeExtract 130 3 - 162: 6(int) CompositeExtract 160 0 + 157: 7(float) CompositeExtract 152 1 + 158: 72(bool) FOrdEqual 156 157 + 159: 72(bool) LogicalAnd 155 158 + 160: 72(bool) LogicalAnd 150 159 + 161: 8(s1) CompositeExtract 140 2 + 162: 8(s1) CompositeExtract 141 2 163: 6(int) CompositeExtract 161 0 - 164: 61(bool) IEqual 162 163 - 165: 7(float) CompositeExtract 160 1 + 164: 6(int) CompositeExtract 162 0 + 165: 72(bool) IEqual 163 164 166: 7(float) CompositeExtract 161 1 - 167: 61(bool) FOrdEqual 165 166 - 168: 61(bool) LogicalAnd 164 167 - 169: 61(bool) LogicalAnd 159 168 - 170: 8(s1) CompositeExtract 129 4 - 171: 8(s1) CompositeExtract 130 4 - 172: 6(int) CompositeExtract 170 0 - 173: 6(int) CompositeExtract 171 0 - 174: 61(bool) IEqual 172 173 - 175: 7(float) CompositeExtract 170 1 - 176: 7(float) CompositeExtract 171 1 - 177: 61(bool) FOrdEqual 175 176 - 178: 61(bool) LogicalAnd 174 177 - 179: 61(bool) LogicalAnd 169 178 - 180: 8(s1) CompositeExtract 129 5 - 181: 8(s1) CompositeExtract 130 5 - 182: 6(int) CompositeExtract 180 0 - 183: 6(int) CompositeExtract 181 0 - 184: 61(bool) IEqual 182 183 - 185: 7(float) CompositeExtract 180 1 - 186: 7(float) CompositeExtract 181 1 - 187: 61(bool) FOrdEqual 185 186 - 188: 61(bool) LogicalAnd 184 187 - 189: 61(bool) LogicalAnd 179 188 - 190: 8(s1) CompositeExtract 129 6 - 191: 8(s1) CompositeExtract 130 6 - 192: 6(int) CompositeExtract 190 0 - 193: 6(int) CompositeExtract 191 0 - 194: 61(bool) IEqual 192 193 - 195: 7(float) CompositeExtract 190 1 - 196: 7(float) CompositeExtract 191 1 - 197: 61(bool) FOrdEqual 195 196 - 198: 61(bool) LogicalAnd 194 197 - 199: 61(bool) LogicalAnd 189 198 - 200: 8(s1) CompositeExtract 129 7 - 201: 8(s1) CompositeExtract 130 7 - 202: 6(int) CompositeExtract 200 0 - 203: 6(int) CompositeExtract 201 0 - 204: 61(bool) IEqual 202 203 - 205: 7(float) CompositeExtract 200 1 - 206: 7(float) CompositeExtract 201 1 - 207: 61(bool) FOrdEqual 205 206 - 208: 61(bool) LogicalAnd 204 207 - 209: 61(bool) LogicalAnd 199 208 - 210: 8(s1) CompositeExtract 129 8 - 211: 8(s1) CompositeExtract 130 8 - 212: 6(int) CompositeExtract 210 0 - 213: 6(int) CompositeExtract 211 0 - 214: 61(bool) IEqual 212 213 - 215: 7(float) CompositeExtract 210 1 - 216: 7(float) CompositeExtract 211 1 - 217: 61(bool) FOrdEqual 215 216 - 218: 61(bool) LogicalAnd 214 217 - 219: 61(bool) LogicalAnd 209 218 - 220: 8(s1) CompositeExtract 129 9 - 221: 8(s1) CompositeExtract 130 9 - 222: 6(int) CompositeExtract 220 0 - 223: 6(int) CompositeExtract 221 0 - 224: 61(bool) IEqual 222 223 - 225: 7(float) CompositeExtract 220 1 - 226: 7(float) CompositeExtract 221 1 - 227: 61(bool) FOrdEqual 225 226 - 228: 61(bool) LogicalAnd 224 227 - 229: 61(bool) LogicalAnd 219 228 - SelectionMerge 231 None - BranchConditional 229 230 231 - 230: Label - 233: 14(fvec4) Load 82(v) - 234: 14(fvec4) VectorTimesScalar 233 232 - Store 82(v) 234 - Branch 231 - 231: Label - 235: 11 Load 13(a) - 236: 11 Load 37(b) - 237: 8(s1) CompositeExtract 235 0 - 238: 8(s1) CompositeExtract 236 0 - 239: 6(int) CompositeExtract 237 0 - 240: 6(int) CompositeExtract 238 0 - 241: 61(bool) INotEqual 239 240 - 242: 7(float) CompositeExtract 237 1 - 243: 7(float) CompositeExtract 238 1 - 244: 61(bool) FOrdNotEqual 242 243 - 245: 61(bool) LogicalOr 241 244 - 246: 8(s1) CompositeExtract 235 1 - 247: 8(s1) CompositeExtract 236 1 - 248: 6(int) CompositeExtract 246 0 - 249: 6(int) CompositeExtract 247 0 - 250: 61(bool) INotEqual 248 249 - 251: 7(float) CompositeExtract 246 1 - 252: 7(float) CompositeExtract 247 1 - 253: 61(bool) FOrdNotEqual 251 252 - 254: 61(bool) LogicalOr 250 253 - 255: 61(bool) LogicalOr 245 254 - 256: 8(s1) CompositeExtract 235 2 - 257: 8(s1) CompositeExtract 236 2 - 258: 6(int) CompositeExtract 256 0 - 259: 6(int) CompositeExtract 257 0 - 260: 61(bool) INotEqual 258 259 - 261: 7(float) CompositeExtract 256 1 - 262: 7(float) CompositeExtract 257 1 - 263: 61(bool) FOrdNotEqual 261 262 - 264: 61(bool) LogicalOr 260 263 - 265: 61(bool) LogicalOr 255 264 - 266: 8(s1) CompositeExtract 235 3 - 267: 8(s1) CompositeExtract 236 3 - 268: 6(int) CompositeExtract 266 0 - 269: 6(int) CompositeExtract 267 0 - 270: 61(bool) INotEqual 268 269 - 271: 7(float) CompositeExtract 266 1 - 272: 7(float) CompositeExtract 267 1 - 273: 61(bool) FOrdNotEqual 271 272 - 274: 61(bool) LogicalOr 270 273 - 275: 61(bool) LogicalOr 265 274 - 276: 8(s1) CompositeExtract 235 4 - 277: 8(s1) CompositeExtract 236 4 - 278: 6(int) CompositeExtract 276 0 - 279: 6(int) CompositeExtract 277 0 - 280: 61(bool) INotEqual 278 279 - 281: 7(float) CompositeExtract 276 1 - 282: 7(float) CompositeExtract 277 1 - 283: 61(bool) FOrdNotEqual 281 282 - 284: 61(bool) LogicalOr 280 283 - 285: 61(bool) LogicalOr 275 284 - 286: 8(s1) CompositeExtract 235 5 - 287: 8(s1) CompositeExtract 236 5 - 288: 6(int) CompositeExtract 286 0 - 289: 6(int) CompositeExtract 287 0 - 290: 61(bool) INotEqual 288 289 - 291: 7(float) CompositeExtract 286 1 - 292: 7(float) CompositeExtract 287 1 - 293: 61(bool) FOrdNotEqual 291 292 - 294: 61(bool) LogicalOr 290 293 - 295: 61(bool) LogicalOr 285 294 - 296: 8(s1) CompositeExtract 235 6 - 297: 8(s1) CompositeExtract 236 6 - 298: 6(int) CompositeExtract 296 0 - 299: 6(int) CompositeExtract 297 0 - 300: 61(bool) INotEqual 298 299 - 301: 7(float) CompositeExtract 296 1 - 302: 7(float) CompositeExtract 297 1 - 303: 61(bool) FOrdNotEqual 301 302 - 304: 61(bool) LogicalOr 300 303 - 305: 61(bool) LogicalOr 295 304 - 306: 8(s1) CompositeExtract 235 7 - 307: 8(s1) CompositeExtract 236 7 - 308: 6(int) CompositeExtract 306 0 - 309: 6(int) CompositeExtract 307 0 - 310: 61(bool) INotEqual 308 309 - 311: 7(float) CompositeExtract 306 1 - 312: 7(float) CompositeExtract 307 1 - 313: 61(bool) FOrdNotEqual 311 312 - 314: 61(bool) LogicalOr 310 313 - 315: 61(bool) LogicalOr 305 314 - 316: 8(s1) CompositeExtract 235 8 - 317: 8(s1) CompositeExtract 236 8 - 318: 6(int) CompositeExtract 316 0 - 319: 6(int) CompositeExtract 317 0 - 320: 61(bool) INotEqual 318 319 - 321: 7(float) CompositeExtract 316 1 - 322: 7(float) CompositeExtract 317 1 - 323: 61(bool) FOrdNotEqual 321 322 - 324: 61(bool) LogicalOr 320 323 - 325: 61(bool) LogicalOr 315 324 - 326: 8(s1) CompositeExtract 235 9 - 327: 8(s1) CompositeExtract 236 9 - 328: 6(int) CompositeExtract 326 0 - 329: 6(int) CompositeExtract 327 0 - 330: 61(bool) INotEqual 328 329 - 331: 7(float) CompositeExtract 326 1 - 332: 7(float) CompositeExtract 327 1 - 333: 61(bool) FOrdNotEqual 331 332 - 334: 61(bool) LogicalOr 330 333 - 335: 61(bool) LogicalOr 325 334 - SelectionMerge 337 None - BranchConditional 335 336 337 - 336: Label - 339: 14(fvec4) Load 82(v) - 340: 14(fvec4) VectorTimesScalar 339 338 - Store 82(v) 340 - Branch 337 - 337: Label - 348: 347(ptr) AccessChain 345(bi) 346 - 349: 342(s2) Load 348 - 350: 55(s2) Load 57(foo2a) - 351: 6(int) CompositeExtract 349 0 - 352: 6(int) CompositeExtract 350 0 - 353: 61(bool) INotEqual 351 352 - 354: 7(float) CompositeExtract 349 1 - 355: 7(float) CompositeExtract 350 1 - 356: 61(bool) FOrdNotEqual 354 355 - 357: 61(bool) LogicalOr 353 356 - 358: 341(s1) CompositeExtract 349 2 - 359: 8(s1) CompositeExtract 350 2 - 360: 6(int) CompositeExtract 358 0 - 361: 6(int) CompositeExtract 359 0 - 362: 61(bool) INotEqual 360 361 - 363: 7(float) CompositeExtract 358 1 - 364: 7(float) CompositeExtract 359 1 - 365: 61(bool) FOrdNotEqual 363 364 - 366: 61(bool) LogicalOr 362 365 - 367: 61(bool) LogicalOr 357 366 - SelectionMerge 369 None - BranchConditional 367 368 369 - 368: Label - 371: 14(fvec4) Load 82(v) - 372: 14(fvec4) VectorTimesScalar 371 370 - Store 82(v) 372 - Branch 369 - 369: Label - 375: 14(fvec4) Load 82(v) - Store 374(color) 375 + 167: 7(float) CompositeExtract 162 1 + 168: 72(bool) FOrdEqual 166 167 + 169: 72(bool) LogicalAnd 165 168 + 170: 72(bool) LogicalAnd 160 169 + SelectionMerge 172 None + BranchConditional 170 171 172 + 171: Label + 174: 14(fvec4) Load 93(v) + 175: 14(fvec4) VectorTimesScalar 174 173 + Store 93(v) 175 + Branch 172 + 172: Label + 176: 11 Load 13(a) + 177: 11 Load 37(b) + 178: 8(s1) CompositeExtract 176 0 + 179: 8(s1) CompositeExtract 177 0 + 180: 6(int) CompositeExtract 178 0 + 181: 6(int) CompositeExtract 179 0 + 182: 72(bool) INotEqual 180 181 + 183: 7(float) CompositeExtract 178 1 + 184: 7(float) CompositeExtract 179 1 + 185: 72(bool) FOrdNotEqual 183 184 + 186: 72(bool) LogicalOr 182 185 + 187: 8(s1) CompositeExtract 176 1 + 188: 8(s1) CompositeExtract 177 1 + 189: 6(int) CompositeExtract 187 0 + 190: 6(int) CompositeExtract 188 0 + 191: 72(bool) INotEqual 189 190 + 192: 7(float) CompositeExtract 187 1 + 193: 7(float) CompositeExtract 188 1 + 194: 72(bool) FOrdNotEqual 192 193 + 195: 72(bool) LogicalOr 191 194 + 196: 72(bool) LogicalOr 186 195 + 197: 8(s1) CompositeExtract 176 2 + 198: 8(s1) CompositeExtract 177 2 + 199: 6(int) CompositeExtract 197 0 + 200: 6(int) CompositeExtract 198 0 + 201: 72(bool) INotEqual 199 200 + 202: 7(float) CompositeExtract 197 1 + 203: 7(float) CompositeExtract 198 1 + 204: 72(bool) FOrdNotEqual 202 203 + 205: 72(bool) LogicalOr 201 204 + 206: 72(bool) LogicalOr 196 205 + SelectionMerge 208 None + BranchConditional 206 207 208 + 207: Label + 210: 14(fvec4) Load 93(v) + 211: 14(fvec4) VectorTimesScalar 210 209 + Store 93(v) 211 + Branch 208 + 208: Label + 214: 14(fvec4) Load 93(v) + Store 213(color) 214 Return FunctionEnd diff --git a/Test/baseResults/spv.always-discard.frag.out b/Test/baseResults/spv.always-discard.frag.out index 8c19b7b3..9102b3bb 100644 --- a/Test/baseResults/spv.always-discard.frag.out +++ b/Test/baseResults/spv.always-discard.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 59 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "white" diff --git a/Test/baseResults/spv.always-discard2.frag.out b/Test/baseResults/spv.always-discard2.frag.out index 896382e1..7984c832 100755 --- a/Test/baseResults/spv.always-discard2.frag.out +++ b/Test/baseResults/spv.always-discard2.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 38 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "white" diff --git a/Test/baseResults/spv.atomic.comp.out b/Test/baseResults/spv.atomic.comp.out index bdf16fe5..bc8d9b81 100755 --- a/Test/baseResults/spv.atomic.comp.out +++ b/Test/baseResults/spv.atomic.comp.out @@ -1,132 +1,205 @@ spv.atomic.comp Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. +Shader version: 310 +Requested GL_ARB_gl_spirv +local_size = (1, 1, 1) +0:? Sequence +0:14 Function Definition: func(au1; (global highp uint) +0:14 Function Parameters: +0:14 'c' (in highp atomic_uint) +0:16 Sequence +0:16 Branch: Return with expression +0:16 AtomicCounterIncrement (global highp uint) +0:16 'c' (in highp atomic_uint) +0:19 Function Definition: main( (global void) +0:19 Function Parameters: +0:21 Sequence +0:21 MemoryBarrierAtomicCounter (global void) +0:22 Function Call: func(au1; (global highp uint) +0:22 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint) +0:23 Sequence +0:23 move second child to first child (temp highp uint) +0:23 'val' (temp highp uint) +0:23 AtomicCounter (global highp uint) +0:23 direct index (layout(binding=0 offset=4 ) temp highp atomic_uint) +0:23 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint) +0:23 Constant: +0:23 2 (const int) +0:24 AtomicCounterDecrement (global highp uint) +0:24 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint) +0:36 Function Definition: atoms( (global void) +0:36 Function Parameters: +0:38 Sequence +0:38 Sequence +0:38 move second child to first child (temp highp int) +0:38 'origi' (temp highp int) +0:38 AtomicAdd (global highp int) +0:38 'atomi' (shared highp int) +0:38 Constant: +0:38 3 (const int) +0:39 Sequence +0:39 move second child to first child (temp highp uint) +0:39 'origu' (temp highp uint) +0:39 AtomicAnd (global highp uint) +0:39 'atomu' (shared highp uint) +0:39 'value' (shared highp uint) +0:40 move second child to first child (temp highp uint) +0:40 'origu' (temp highp uint) +0:40 AtomicOr (global highp uint) +0:40 'atomu' (shared highp uint) +0:40 Constant: +0:40 7 (const uint) +0:41 move second child to first child (temp highp uint) +0:41 'origu' (temp highp uint) +0:41 AtomicXor (global highp uint) +0:41 'atomu' (shared highp uint) +0:41 Constant: +0:41 7 (const uint) +0:42 move second child to first child (temp highp uint) +0:42 'origu' (temp highp uint) +0:42 AtomicMin (global highp uint) +0:42 'atomu' (shared highp uint) +0:42 'value' (shared highp uint) +0:43 move second child to first child (temp highp int) +0:43 'origi' (temp highp int) +0:43 AtomicMax (global highp int) +0:43 'atomi' (shared highp int) +0:43 Constant: +0:43 7 (const int) +0:44 move second child to first child (temp highp int) +0:44 'origi' (temp highp int) +0:44 AtomicExchange (global highp int) +0:44 'atomi' (shared highp int) +0:44 'origi' (temp highp int) +0:45 move second child to first child (temp highp uint) +0:45 'origu' (temp highp uint) +0:45 AtomicCompSwap (global highp uint) +0:45 'atomu' (shared highp uint) +0:45 Constant: +0:45 10 (const uint) +0:45 'value' (shared highp uint) +0:46 AtomicAdd (global highp int) +0:46 direct index (temp highp int) +0:46 n_frames_rendered: direct index for structure (layout(column_major std140 offset=16 ) buffer highp 4-component vector of int) +0:46 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered}) +0:46 Constant: +0:46 1 (const int) +0:46 Constant: +0:46 2 (const int) +0:46 Constant: +0:46 1 (const int) +0:? Linker Objects +0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint) +0:? 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint) +0:? 'value' (shared highp uint) +0:? 'arrX' (global 1-element array of highp int) +0:? 'arrY' (global 1-element array of highp int) +0:? 'arrZ' (global 1-element array of highp int) +0:? 'atomi' (shared highp int) +0:? 'atomu' (shared highp uint) +0:? 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered}) + Linked compute stage: -TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class? -// Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 75 +Shader version: 310 +Requested GL_ARB_gl_spirv +local_size = (1, 1, 1) +0:? Sequence +0:14 Function Definition: func(au1; (global highp uint) +0:14 Function Parameters: +0:14 'c' (in highp atomic_uint) +0:16 Sequence +0:16 Branch: Return with expression +0:16 AtomicCounterIncrement (global highp uint) +0:16 'c' (in highp atomic_uint) +0:19 Function Definition: main( (global void) +0:19 Function Parameters: +0:21 Sequence +0:21 MemoryBarrierAtomicCounter (global void) +0:22 Function Call: func(au1; (global highp uint) +0:22 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint) +0:23 Sequence +0:23 move second child to first child (temp highp uint) +0:23 'val' (temp highp uint) +0:23 AtomicCounter (global highp uint) +0:23 direct index (layout(binding=0 offset=4 ) temp highp atomic_uint) +0:23 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint) +0:23 Constant: +0:23 2 (const int) +0:24 AtomicCounterDecrement (global highp uint) +0:24 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint) +0:36 Function Definition: atoms( (global void) +0:36 Function Parameters: +0:38 Sequence +0:38 Sequence +0:38 move second child to first child (temp highp int) +0:38 'origi' (temp highp int) +0:38 AtomicAdd (global highp int) +0:38 'atomi' (shared highp int) +0:38 Constant: +0:38 3 (const int) +0:39 Sequence +0:39 move second child to first child (temp highp uint) +0:39 'origu' (temp highp uint) +0:39 AtomicAnd (global highp uint) +0:39 'atomu' (shared highp uint) +0:39 'value' (shared highp uint) +0:40 move second child to first child (temp highp uint) +0:40 'origu' (temp highp uint) +0:40 AtomicOr (global highp uint) +0:40 'atomu' (shared highp uint) +0:40 Constant: +0:40 7 (const uint) +0:41 move second child to first child (temp highp uint) +0:41 'origu' (temp highp uint) +0:41 AtomicXor (global highp uint) +0:41 'atomu' (shared highp uint) +0:41 Constant: +0:41 7 (const uint) +0:42 move second child to first child (temp highp uint) +0:42 'origu' (temp highp uint) +0:42 AtomicMin (global highp uint) +0:42 'atomu' (shared highp uint) +0:42 'value' (shared highp uint) +0:43 move second child to first child (temp highp int) +0:43 'origi' (temp highp int) +0:43 AtomicMax (global highp int) +0:43 'atomi' (shared highp int) +0:43 Constant: +0:43 7 (const int) +0:44 move second child to first child (temp highp int) +0:44 'origi' (temp highp int) +0:44 AtomicExchange (global highp int) +0:44 'atomi' (shared highp int) +0:44 'origi' (temp highp int) +0:45 move second child to first child (temp highp uint) +0:45 'origu' (temp highp uint) +0:45 AtomicCompSwap (global highp uint) +0:45 'atomu' (shared highp uint) +0:45 Constant: +0:45 10 (const uint) +0:45 'value' (shared highp uint) +0:46 AtomicAdd (global highp int) +0:46 direct index (temp highp int) +0:46 n_frames_rendered: direct index for structure (layout(column_major std140 offset=16 ) buffer highp 4-component vector of int) +0:46 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered}) +0:46 Constant: +0:46 1 (const int) +0:46 Constant: +0:46 2 (const int) +0:46 Constant: +0:46 1 (const int) +0:? Linker Objects +0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint) +0:? 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint) +0:? 'value' (shared highp uint) +0:? 'arrX' (global 1-element array of highp int) +0:? 'arrY' (global 1-element array of highp int) +0:? 'arrZ' (global 1-element array of highp int) +0:? 'atomi' (shared highp int) +0:? 'atomu' (shared highp uint) +0:? 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered}) - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint GLCompute 4 "main" - ExecutionMode 4 LocalSize 1 1 1 - Source ESSL 310 - Name 4 "main" - Name 10 "func(au1;" - Name 9 "c" - Name 12 "atoms(" - Name 21 "counter" - Name 22 "param" - Name 25 "val" - Name 29 "countArr" - Name 36 "origi" - Name 38 "atomi" - Name 41 "origu" - Name 43 "atomu" - Name 45 "value" - Name 62 "dataSSB" - MemberName 62(dataSSB) 0 "f" - MemberName 62(dataSSB) 1 "n_frames_rendered" - Name 64 "result" - Name 72 "arrX" - Name 73 "arrY" - Name 74 "arrZ" - Decorate 21(counter) Binding 0 - Decorate 29(countArr) Binding 0 - MemberDecorate 62(dataSSB) 0 Offset 0 - MemberDecorate 62(dataSSB) 1 Offset 16 - Decorate 62(dataSSB) BufferBlock - Decorate 64(result) Binding 0 - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeInt 32 0 - 7: TypePointer Function 6(int) - 8: TypeFunction 6(int) 7(ptr) - 14: 6(int) Constant 1 - 15: 6(int) Constant 0 - 19: 6(int) Constant 1024 - 20: TypePointer AtomicCounter 6(int) - 21(counter): 20(ptr) Variable AtomicCounter - 26: 6(int) Constant 4 - 27: TypeArray 6(int) 26 - 28: TypePointer AtomicCounter 27 - 29(countArr): 28(ptr) Variable AtomicCounter - 30: TypeInt 32 1 - 31: 30(int) Constant 2 - 35: TypePointer Function 30(int) - 37: TypePointer Workgroup 30(int) - 38(atomi): 37(ptr) Variable Workgroup - 39: 30(int) Constant 3 - 42: TypePointer Workgroup 6(int) - 43(atomu): 42(ptr) Variable Workgroup - 44: TypePointer UniformConstant 6(int) - 45(value): 44(ptr) Variable UniformConstant - 48: 6(int) Constant 7 - 53: 30(int) Constant 7 - 57: 6(int) Constant 10 - 60: TypeFloat 32 - 61: TypeVector 30(int) 4 - 62(dataSSB): TypeStruct 60(float) 61(ivec4) - 63: TypePointer Uniform 62(dataSSB) - 64(result): 63(ptr) Variable Uniform - 65: 30(int) Constant 1 - 66: 6(int) Constant 2 - 67: TypePointer Uniform 30(int) - 70: TypeArray 30(int) 14 - 71: TypePointer Private 70 - 72(arrX): 71(ptr) Variable Private - 73(arrY): 71(ptr) Variable Private - 74(arrZ): 71(ptr) Variable Private - 4(main): 2 Function None 3 - 5: Label - 22(param): 7(ptr) Variable Function - 25(val): 7(ptr) Variable Function - MemoryBarrier 14 19 - 23: 6(int) Load 21(counter) - Store 22(param) 23 - 24: 6(int) FunctionCall 10(func(au1;) 22(param) - 32: 20(ptr) AccessChain 29(countArr) 31 - 33: 6(int) AtomicLoad 32 14 15 - Store 25(val) 33 - 34: 6(int) AtomicIDecrement 21(counter) 14 15 - Return - FunctionEnd - 10(func(au1;): 6(int) Function None 8 - 9(c): 7(ptr) FunctionParameter - 11: Label - 16: 6(int) AtomicIIncrement 9(c) 14 15 - ReturnValue 16 - FunctionEnd - 12(atoms(): 2 Function None 3 - 13: Label - 36(origi): 35(ptr) Variable Function - 41(origu): 7(ptr) Variable Function - 40: 30(int) AtomicIAdd 38(atomi) 14 15 39 - Store 36(origi) 40 - 46: 6(int) Load 45(value) - 47: 6(int) AtomicAnd 43(atomu) 14 15 46 - Store 41(origu) 47 - 49: 6(int) AtomicOr 43(atomu) 14 15 48 - Store 41(origu) 49 - 50: 6(int) AtomicXor 43(atomu) 14 15 48 - Store 41(origu) 50 - 51: 6(int) Load 45(value) - 52: 6(int) AtomicUMin 43(atomu) 14 15 51 - Store 41(origu) 52 - 54: 30(int) AtomicSMax 38(atomi) 14 15 53 - Store 36(origi) 54 - 55: 30(int) Load 36(origi) - 56: 30(int) AtomicExchange 38(atomi) 14 15 55 - Store 36(origi) 56 - 58: 6(int) Load 45(value) - 59: 6(int) AtomicCompareExchange 43(atomu) 14 15 15 58 57 - Store 41(origu) 59 - 68: 67(ptr) AccessChain 64(result) 65 66 - 69: 30(int) AtomicIAdd 68 14 15 65 - Return - FunctionEnd diff --git a/Test/baseResults/spv.bitCast.frag.out b/Test/baseResults/spv.bitCast.frag.out index 53f2d965..b0dc8104 100644 --- a/Test/baseResults/spv.bitCast.frag.out +++ b/Test/baseResults/spv.bitCast.frag.out @@ -12,8 +12,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 154 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 14 26 37 48 89 98 107 116 122 130 139 148 154 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 9 "idata" @@ -32,6 +32,14 @@ Linked fragment stage: Name 139 "u3" Name 148 "u4" Name 154 "fragColor" + Decorate 89(i1) Flat + Decorate 98(i2) Flat + Decorate 107(i3) Flat + Decorate 116(i4) Flat + Decorate 122(u1) Flat + Decorate 130(u2) Flat + Decorate 139(u3) Flat + Decorate 148(u4) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -40,22 +48,22 @@ Linked fragment stage: 10: 6(int) Constant 0 11: 7(ivec4) ConstantComposite 10 10 10 10 12: TypeFloat 32 - 13: TypePointer UniformConstant 12(float) - 14(f1): 13(ptr) Variable UniformConstant + 13: TypePointer Input 12(float) + 14(f1): 13(ptr) Variable Input 17: TypeInt 32 0 18: 17(int) Constant 0 19: TypePointer Function 6(int) 24: TypeVector 12(float) 2 - 25: TypePointer UniformConstant 24(fvec2) - 26(f2): 25(ptr) Variable UniformConstant + 25: TypePointer Input 24(fvec2) + 26(f2): 25(ptr) Variable Input 28: TypeVector 6(int) 2 35: TypeVector 12(float) 3 - 36: TypePointer UniformConstant 35(fvec3) - 37(f3): 36(ptr) Variable UniformConstant + 36: TypePointer Input 35(fvec3) + 37(f3): 36(ptr) Variable Input 39: TypeVector 6(int) 3 46: TypeVector 12(float) 4 - 47: TypePointer UniformConstant 46(fvec4) - 48(f4): 47(ptr) Variable UniformConstant + 47: TypePointer Input 46(fvec4) + 48(f4): 47(ptr) Variable Input 53: TypeVector 17(int) 4 54: TypePointer Function 53(ivec4) 56: 53(ivec4) ConstantComposite 18 18 18 18 @@ -65,23 +73,23 @@ Linked fragment stage: 84: TypePointer Function 46(fvec4) 86: 12(float) Constant 0 87: 46(fvec4) ConstantComposite 86 86 86 86 - 88: TypePointer UniformConstant 6(int) - 89(i1): 88(ptr) Variable UniformConstant + 88: TypePointer Input 6(int) + 89(i1): 88(ptr) Variable Input 92: TypePointer Function 12(float) - 97: TypePointer UniformConstant 28(ivec2) - 98(i2): 97(ptr) Variable UniformConstant - 106: TypePointer UniformConstant 39(ivec3) - 107(i3): 106(ptr) Variable UniformConstant - 115: TypePointer UniformConstant 7(ivec4) - 116(i4): 115(ptr) Variable UniformConstant - 121: TypePointer UniformConstant 17(int) - 122(u1): 121(ptr) Variable UniformConstant - 129: TypePointer UniformConstant 65(ivec2) - 130(u2): 129(ptr) Variable UniformConstant - 138: TypePointer UniformConstant 73(ivec3) - 139(u3): 138(ptr) Variable UniformConstant - 147: TypePointer UniformConstant 53(ivec4) - 148(u4): 147(ptr) Variable UniformConstant + 97: TypePointer Input 28(ivec2) + 98(i2): 97(ptr) Variable Input + 106: TypePointer Input 39(ivec3) + 107(i3): 106(ptr) Variable Input + 115: TypePointer Input 7(ivec4) + 116(i4): 115(ptr) Variable Input + 121: TypePointer Input 17(int) + 122(u1): 121(ptr) Variable Input + 129: TypePointer Input 65(ivec2) + 130(u2): 129(ptr) Variable Input + 138: TypePointer Input 73(ivec3) + 139(u3): 138(ptr) Variable Input + 147: TypePointer Input 53(ivec4) + 148(u4): 147(ptr) Variable Input 153: TypePointer Output 46(fvec4) 154(fragColor): 153(ptr) Variable Output 159: TypeBool diff --git a/Test/baseResults/spv.bool.vert.out b/Test/baseResults/spv.bool.vert.out index 7f85e6b0..f11fe398 100644 --- a/Test/baseResults/spv.bool.vert.out +++ b/Test/baseResults/spv.bool.vert.out @@ -7,14 +7,14 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 50 +// Id's are bound by 49 Capability Shader Capability ClipDistance Capability CullDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 24 48 49 + EntryPoint Vertex 4 "main" 24 Source GLSL 450 Name 4 "main" Name 10 "foo(b1;" @@ -29,17 +29,14 @@ Linked vertex stage: MemberName 29(ubname) 0 "b" Name 31 "ubinst" Name 32 "param" - Name 48 "gl_VertexID" - Name 49 "gl_InstanceID" MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 22(gl_PerVertex) 2 BuiltIn ClipDistance MemberDecorate 22(gl_PerVertex) 3 BuiltIn CullDistance Decorate 22(gl_PerVertex) Block - Decorate 29(ubname) GLSLShared + MemberDecorate 29(ubname) 0 Offset 0 Decorate 29(ubname) Block - Decorate 48(gl_VertexID) BuiltIn VertexId - Decorate 49(gl_InstanceID) BuiltIn InstanceId + Decorate 31(ubinst) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeBool @@ -57,38 +54,37 @@ Linked vertex stage: 25: TypeInt 32 1 26: 25(int) Constant 0 27: TypePointer Function 18(fvec4) - 29(ubname): TypeStruct 6(bool) + 29(ubname): TypeStruct 19(int) 30: TypePointer Uniform 29(ubname) 31(ubinst): 30(ptr) Variable Uniform - 33: TypePointer Uniform 6(bool) - 39: 17(float) Constant 0 - 40: 18(fvec4) ConstantComposite 39 39 39 39 - 42: 17(float) Constant 1065353216 - 43: 18(fvec4) ConstantComposite 42 42 42 42 - 45: TypePointer Output 18(fvec4) - 47: TypePointer Input 25(int) - 48(gl_VertexID): 47(ptr) Variable Input -49(gl_InstanceID): 47(ptr) Variable Input + 33: TypePointer Uniform 19(int) + 36: 19(int) Constant 0 + 41: 17(float) Constant 0 + 42: 18(fvec4) ConstantComposite 41 41 41 41 + 44: 17(float) Constant 1065353216 + 45: 18(fvec4) ConstantComposite 44 44 44 44 + 47: TypePointer Output 18(fvec4) 4(main): 2 Function None 3 5: Label 28: 27(ptr) Variable Function 32(param): 7(ptr) Variable Function 34: 33(ptr) AccessChain 31(ubinst) 26 - 35: 6(bool) Load 34 - Store 32(param) 35 - 36: 6(bool) FunctionCall 10(foo(b1;) 32(param) - SelectionMerge 38 None - BranchConditional 36 37 41 - 37: Label - Store 28 40 - Branch 38 - 41: Label - Store 28 43 - Branch 38 - 38: Label - 44: 18(fvec4) Load 28 - 46: 45(ptr) AccessChain 24 26 - Store 46 44 + 35: 19(int) Load 34 + 37: 6(bool) INotEqual 35 36 + Store 32(param) 37 + 38: 6(bool) FunctionCall 10(foo(b1;) 32(param) + SelectionMerge 40 None + BranchConditional 38 39 43 + 39: Label + Store 28 42 + Branch 40 + 43: Label + Store 28 45 + Branch 40 + 40: Label + 46: 18(fvec4) Load 28 + 48: 47(ptr) AccessChain 24 26 + Store 48 46 Return FunctionEnd 10(foo(b1;): 6(bool) Function None 8 diff --git a/Test/baseResults/spv.branch-return.vert.out b/Test/baseResults/spv.branch-return.vert.out index 19bc3e04..217a863f 100644 --- a/Test/baseResults/spv.branch-return.vert.out +++ b/Test/baseResults/spv.branch-return.vert.out @@ -7,30 +7,28 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 39 +// Id's are bound by 38 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 8 20 38 + EntryPoint Vertex 4 "main" 8 20 Source ESSL 310 Name 4 "main" - Name 8 "gl_InstanceID" + Name 8 "gl_InstanceIndex" Name 18 "gl_PerVertex" MemberName 18(gl_PerVertex) 0 "gl_Position" MemberName 18(gl_PerVertex) 1 "gl_PointSize" Name 20 "" - Name 38 "gl_VertexID" - Decorate 8(gl_InstanceID) BuiltIn InstanceId + Decorate 8(gl_InstanceIndex) BuiltIn InstanceIndex MemberDecorate 18(gl_PerVertex) 0 BuiltIn Position MemberDecorate 18(gl_PerVertex) 1 BuiltIn PointSize Decorate 18(gl_PerVertex) Block - Decorate 38(gl_VertexID) BuiltIn VertexId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Input 6(int) -8(gl_InstanceID): 7(ptr) Variable Input +8(gl_InstanceIndex): 7(ptr) Variable Input 16: TypeFloat 32 17: TypeVector 16(float) 4 18(gl_PerVertex): TypeStruct 17(fvec4) 16(float) @@ -44,10 +42,9 @@ Linked vertex stage: 31: TypeInt 32 0 32: 31(int) Constant 0 33: TypePointer Output 16(float) - 38(gl_VertexID): 7(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 9: 6(int) Load 8(gl_InstanceID) + 9: 6(int) Load 8(gl_InstanceIndex) SelectionMerge 14 None Switch 9 14 case 0: 10 diff --git a/Test/baseResults/spv.conditionalDiscard.frag.out b/Test/baseResults/spv.conditionalDiscard.frag.out index 73363281..ef7e3b4c 100755 --- a/Test/baseResults/spv.conditionalDiscard.frag.out +++ b/Test/baseResults/spv.conditionalDiscard.frag.out @@ -13,13 +13,14 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 34 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 400 Name 4 "main" Name 9 "v" Name 13 "tex" Name 17 "coord" Name 34 "gl_FragColor" + Decorate 13(tex) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.conversion.frag.out b/Test/baseResults/spv.conversion.frag.out index a88007a1..bc915698 100755 --- a/Test/baseResults/spv.conversion.frag.out +++ b/Test/baseResults/spv.conversion.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 39 53 157 322 446 448 450 452 454 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "b" @@ -62,13 +62,13 @@ Linked fragment stage: 6: TypeBool 7: TypePointer Function 6(bool) 9: TypeInt 32 1 - 10: TypePointer UniformConstant 9(int) - 11(u_i): 10(ptr) Variable UniformConstant + 10: TypePointer Private 9(int) + 11(u_i): 10(ptr) Variable Private 13: TypeInt 32 0 14: 13(int) Constant 0 16: TypeFloat 32 - 17: TypePointer UniformConstant 16(float) - 18(u_f): 17(ptr) Variable UniformConstant + 17: TypePointer Private 16(float) + 18(u_f): 17(ptr) Variable Private 20: 16(float) Constant 0 23: TypeVector 6(bool) 2 24: TypePointer Function 23(bvec2) @@ -86,22 +86,22 @@ Linked fragment stage: 66: TypeVector 9(int) 2 67: TypePointer Function 66(ivec2) 69: TypeVector 16(float) 2 - 70: TypePointer UniformConstant 69(fvec2) - 71(u_f2): 70(ptr) Variable UniformConstant + 70: TypePointer Private 69(fvec2) + 71(u_f2): 70(ptr) Variable Private 75: 66(ivec2) ConstantComposite 62 62 76: 66(ivec2) ConstantComposite 63 63 79: TypeVector 9(int) 3 80: TypePointer Function 79(ivec3) 82: TypeVector 16(float) 3 - 83: TypePointer UniformConstant 82(fvec3) - 84(u_f3): 83(ptr) Variable UniformConstant + 83: TypePointer Private 82(fvec3) + 84(u_f3): 83(ptr) Variable Private 88: 79(ivec3) ConstantComposite 62 62 62 89: 79(ivec3) ConstantComposite 63 63 63 92: TypeVector 9(int) 4 93: TypePointer Function 92(ivec4) 95: TypeVector 16(float) 4 - 96: TypePointer UniformConstant 95(fvec4) - 97(u_f4): 96(ptr) Variable UniformConstant + 96: TypePointer Private 95(fvec4) + 97(u_f4): 96(ptr) Variable Private 101: 92(ivec4) ConstantComposite 62 62 62 62 102: 92(ivec4) ConstantComposite 63 63 63 63 105: TypePointer Function 16(float) @@ -124,24 +124,24 @@ Linked fragment stage: 322(gl_FragColor): 321(ptr) Variable Output 367: 13(int) Constant 2 380: 13(int) Constant 3 - 427: TypePointer UniformConstant 6(bool) - 428(u_b): 427(ptr) Variable UniformConstant - 429: TypePointer UniformConstant 23(bvec2) - 430(u_b2): 429(ptr) Variable UniformConstant - 431: TypePointer UniformConstant 31(bvec3) - 432(u_b3): 431(ptr) Variable UniformConstant - 433: TypePointer UniformConstant 43(bvec4) - 434(u_b4): 433(ptr) Variable UniformConstant - 435: TypePointer UniformConstant 66(ivec2) - 436(u_i2): 435(ptr) Variable UniformConstant - 437: TypePointer UniformConstant 79(ivec3) - 438(u_i3): 437(ptr) Variable UniformConstant - 439: TypePointer UniformConstant 92(ivec4) - 440(u_i4): 439(ptr) Variable UniformConstant - 441(i_b): 427(ptr) Variable UniformConstant - 442(i_b2): 429(ptr) Variable UniformConstant - 443(i_b3): 431(ptr) Variable UniformConstant - 444(i_b4): 433(ptr) Variable UniformConstant + 427: TypePointer Private 6(bool) + 428(u_b): 427(ptr) Variable Private + 429: TypePointer Private 23(bvec2) + 430(u_b2): 429(ptr) Variable Private + 431: TypePointer Private 31(bvec3) + 432(u_b3): 431(ptr) Variable Private + 433: TypePointer Private 43(bvec4) + 434(u_b4): 433(ptr) Variable Private + 435: TypePointer Private 66(ivec2) + 436(u_i2): 435(ptr) Variable Private + 437: TypePointer Private 79(ivec3) + 438(u_i3): 437(ptr) Variable Private + 439: TypePointer Private 92(ivec4) + 440(u_i4): 439(ptr) Variable Private + 441(i_b): 427(ptr) Variable Private + 442(i_b2): 429(ptr) Variable Private + 443(i_b3): 431(ptr) Variable Private + 444(i_b4): 433(ptr) Variable Private 445: TypePointer Input 66(ivec2) 446(i_i2): 445(ptr) Variable Input 447: TypePointer Input 79(ivec3) diff --git a/Test/baseResults/spv.dataOut.frag.out b/Test/baseResults/spv.dataOut.frag.out index 67723d4d..651c96e3 100755 --- a/Test/baseResults/spv.dataOut.frag.out +++ b/Test/baseResults/spv.dataOut.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 16 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 12 "gl_FragData" diff --git a/Test/baseResults/spv.dataOutIndirect.frag.out b/Test/baseResults/spv.dataOutIndirect.frag.out index 1b22e228..d1227a5b 100755 --- a/Test/baseResults/spv.dataOutIndirect.frag.out +++ b/Test/baseResults/spv.dataOutIndirect.frag.out @@ -5,38 +5,47 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 22 +// Id's are bound by 26 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 12 18 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 12 22 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" - Name 12 "gl_FragData" - Name 15 "i" - Name 18 "Color" + Name 12 "fcolor" + Name 14 "b" + MemberName 14(b) 0 "i" + Name 16 "bName" + Name 22 "Color" + MemberDecorate 14(b) 0 Offset 0 + Decorate 14(b) Block + Decorate 16(bName) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 8: TypeInt 32 0 - 9: 8(int) Constant 32 + 9: 8(int) Constant 4 10: TypeArray 7(fvec4) 9 11: TypePointer Output 10 - 12(gl_FragData): 11(ptr) Variable Output + 12(fcolor): 11(ptr) Variable Output 13: TypeInt 32 1 - 14: TypePointer UniformConstant 13(int) - 15(i): 14(ptr) Variable UniformConstant - 17: TypePointer Input 7(fvec4) - 18(Color): 17(ptr) Variable Input - 20: TypePointer Output 7(fvec4) + 14(b): TypeStruct 13(int) + 15: TypePointer Uniform 14(b) + 16(bName): 15(ptr) Variable Uniform + 17: 13(int) Constant 0 + 18: TypePointer Uniform 13(int) + 21: TypePointer Input 7(fvec4) + 22(Color): 21(ptr) Variable Input + 24: TypePointer Output 7(fvec4) 4(main): 2 Function None 3 5: Label - 16: 13(int) Load 15(i) - 19: 7(fvec4) Load 18(Color) - 21: 20(ptr) AccessChain 12(gl_FragData) 16 - Store 21 19 + 19: 18(ptr) AccessChain 16(bName) 17 + 20: 13(int) Load 19 + 23: 7(fvec4) Load 22(Color) + 25: 24(ptr) AccessChain 12(fcolor) 20 + Store 25 23 Return FunctionEnd diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index c0182b5f..797c6518 100755 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -7,23 +7,19 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 41 +// Id's are bound by 38 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 25 28 34 39 40 + EntryPoint Vertex 4 "main" 25 28 34 Source GLSL 140 Name 4 "main" Name 8 "i" Name 25 "colorOut" Name 28 "color" Name 34 "gl_Position" - Name 39 "gl_VertexID" - Name 40 "gl_InstanceID" Decorate 34(gl_Position) BuiltIn Position - Decorate 39(gl_VertexID) BuiltIn VertexId - Decorate 40(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -43,9 +39,6 @@ Linked vertex stage: 30: TypePointer Output 20(fvec4) 34(gl_Position): 30(ptr) Variable Output 35: 6(int) Constant 2 - 38: TypePointer Input 6(int) - 39(gl_VertexID): 38(ptr) Variable Input -40(gl_InstanceID): 38(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.deepRvalue.frag.out b/Test/baseResults/spv.deepRvalue.frag.out index d579ef82..b4894383 100644 --- a/Test/baseResults/spv.deepRvalue.frag.out +++ b/Test/baseResults/spv.deepRvalue.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 149 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 330 Name 4 "main" Name 9 "v1" @@ -31,6 +31,7 @@ Linked fragment stage: MemberName 134(str) 2 "c" Name 136 "t" Name 149 "gl_FragColor" + Decorate 111(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.depthOut.frag.out b/Test/baseResults/spv.depthOut.frag.out index dff7388b..6242391f 100755 --- a/Test/baseResults/spv.depthOut.frag.out +++ b/Test/baseResults/spv.depthOut.frag.out @@ -13,7 +13,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 8 10 14 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft ExecutionMode 4 DepthGreater ExecutionMode 4 DepthReplacing Source GLSL 450 diff --git a/Test/baseResults/spv.discard-dce.frag.out b/Test/baseResults/spv.discard-dce.frag.out index dd1d6296..7668233b 100755 --- a/Test/baseResults/spv.discard-dce.frag.out +++ b/Test/baseResults/spv.discard-dce.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 59 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "white" diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out index d3f090f8..c0862d1e 100755 --- a/Test/baseResults/spv.do-simple.vert.out +++ b/Test/baseResults/spv.do-simple.vert.out @@ -7,19 +7,15 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 24 +// Id's are bound by 21 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 22 23 + EntryPoint Vertex 4 "main" Source ESSL 310 Name 4 "main" Name 8 "i" - Name 22 "gl_VertexID" - Name 23 "gl_InstanceID" - Decorate 22(gl_VertexID) BuiltIn VertexId - Decorate 23(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -28,9 +24,6 @@ Linked vertex stage: 15: 6(int) Constant 1 18: 6(int) Constant 10 19: TypeBool - 21: TypePointer Input 6(int) - 22(gl_VertexID): 21(ptr) Variable Input -23(gl_InstanceID): 21(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index 98fa1849..ebfe85d0 100644 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 46 +// Id's are bound by 43 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 44 45 + EntryPoint Vertex 4 "main" Source ESSL 310 Name 4 "main" Name 8 "i" @@ -23,10 +23,6 @@ Linked vertex stage: Name 33 "E" Name 35 "F" Name 41 "G" - Name 44 "gl_VertexID" - Name 45 "gl_InstanceID" - Decorate 44(gl_VertexID) BuiltIn VertexId - Decorate 45(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -41,9 +37,6 @@ Linked vertex stage: 36: 6(int) Constant 99 39: 6(int) Constant 19 42: 6(int) Constant 12 - 43: TypePointer Input 6(int) - 44(gl_VertexID): 43(ptr) Variable Input -45(gl_InstanceID): 43(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out index 86423ea7..1d12af10 100755 --- a/Test/baseResults/spv.doWhileLoop.frag.out +++ b/Test/baseResults/spv.doWhileLoop.frag.out @@ -5,20 +5,20 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 35 +// Id's are bound by 34 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 33 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 17 27 32 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" - Name 18 "bigColor" - Name 28 "d" - Name 33 "gl_FragColor" + Name 17 "bigColor" + Name 27 "d" + Name 32 "gl_FragColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -26,16 +26,15 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 17: TypePointer UniformConstant 7(fvec4) - 18(bigColor): 17(ptr) Variable UniformConstant - 22: TypeInt 32 0 - 23: 22(int) Constant 0 - 24: TypePointer Function 6(float) - 27: TypePointer UniformConstant 6(float) - 28(d): 27(ptr) Variable UniformConstant - 30: TypeBool - 32: TypePointer Output 7(fvec4) -33(gl_FragColor): 32(ptr) Variable Output + 17(bigColor): 10(ptr) Variable Input + 21: TypeInt 32 0 + 22: 21(int) Constant 0 + 23: TypePointer Function 6(float) + 26: TypePointer Input 6(float) + 27(d): 26(ptr) Variable Input + 29: TypeBool + 31: TypePointer Output 7(fvec4) +32(gl_FragColor): 31(ptr) Variable Output 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -46,19 +45,19 @@ Linked fragment stage: LoopMerge 15 16 None Branch 14 14: Label - 19: 7(fvec4) Load 18(bigColor) - 20: 7(fvec4) Load 9(color) - 21: 7(fvec4) FAdd 20 19 - Store 9(color) 21 + 18: 7(fvec4) Load 17(bigColor) + 19: 7(fvec4) Load 9(color) + 20: 7(fvec4) FAdd 19 18 + Store 9(color) 20 Branch 16 16: Label - 25: 24(ptr) AccessChain 9(color) 23 - 26: 6(float) Load 25 - 29: 6(float) Load 28(d) - 31: 30(bool) FOrdLessThan 26 29 - BranchConditional 31 13 15 + 24: 23(ptr) AccessChain 9(color) 22 + 25: 6(float) Load 24 + 28: 6(float) Load 27(d) + 30: 29(bool) FOrdLessThan 25 28 + BranchConditional 30 13 15 15: Label - 34: 7(fvec4) Load 9(color) - Store 33(gl_FragColor) 34 + 33: 7(fvec4) Load 9(color) + Store 32(gl_FragColor) 33 Return FunctionEnd diff --git a/Test/baseResults/spv.double.comp.out b/Test/baseResults/spv.double.comp.out index 52ed78c5..fcd2f02b 100755 --- a/Test/baseResults/spv.double.comp.out +++ b/Test/baseResults/spv.double.comp.out @@ -7,7 +7,7 @@ Linked compute stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 62 +// Id's are bound by 60 Capability Shader Capability Float64 @@ -27,12 +27,14 @@ Linked compute stage: Name 33 "gl_LocalInvocationID" Name 49 "aa" Name 54 "globalCoef" - Name 58 "roll" - Name 61 "destTex" - Decorate 8(bufName) GLSLShared + Name 59 "destTex" + MemberDecorate 8(bufName) 0 Offset 0 + MemberDecorate 8(bufName) 1 Offset 8 Decorate 8(bufName) BufferBlock + Decorate 10(bufInst) DescriptorSet 0 Decorate 26(gl_GlobalInvocationID) BuiltIn GlobalInvocationId Decorate 33(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 59(destTex) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -67,11 +69,9 @@ Linked compute stage: 53: 47(fvec4) ConstantComposite 50 51 52 50 55: 7(float) Constant 0 1072693248 56: 7(float) Constant 3229815407 1074340298 - 57: TypePointer UniformConstant 7(float) - 58(roll): 57(ptr) Variable UniformConstant - 59: TypeImage 6(float) 2D nonsampled format:Unknown - 60: TypePointer UniformConstant 59 - 61(destTex): 60(ptr) Variable UniformConstant + 57: TypeImage 6(float) 2D nonsampled format:Unknown + 58: TypePointer UniformConstant 57 + 59(destTex): 58(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 22(storePos): 21(ptr) Variable Function diff --git a/Test/baseResults/spv.earlyReturnDiscard.frag.out b/Test/baseResults/spv.earlyReturnDiscard.frag.out index 76888484..7e6409e6 100755 --- a/Test/baseResults/spv.earlyReturnDiscard.frag.out +++ b/Test/baseResults/spv.earlyReturnDiscard.frag.out @@ -5,29 +5,29 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 112 +// Id's are bound by 110 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 18 107 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 14 17 19 25 30 39 51 63 105 109 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" Name 13 "color2" - Name 15 "otherColor" - Name 18 "c" - Name 21 "d" - Name 27 "bigColor" - Name 32 "smallColor" - Name 41 "minimum" - Name 53 "threshhold" - Name 65 "threshhold2" - Name 79 "b" - Name 107 "gl_FragColor" - Name 111 "threshhold3" + Name 14 "otherColor" + Name 17 "c" + Name 19 "d" + Name 25 "bigColor" + Name 30 "smallColor" + Name 39 "minimum" + Name 51 "threshhold" + Name 63 "threshhold2" + Name 77 "b" + Name 105 "gl_FragColor" + Name 109 "threshhold3" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -35,141 +35,139 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 14: TypePointer UniformConstant 7(fvec4) - 15(otherColor): 14(ptr) Variable UniformConstant - 17: TypePointer Input 6(float) - 18(c): 17(ptr) Variable Input - 20: TypePointer UniformConstant 6(float) - 21(d): 20(ptr) Variable UniformConstant - 23: TypeBool - 27(bigColor): 14(ptr) Variable UniformConstant - 32(smallColor): 14(ptr) Variable UniformConstant - 36: TypeInt 32 0 - 37: 36(int) Constant 2 - 38: TypePointer Function 6(float) - 41(minimum): 20(ptr) Variable UniformConstant - 49: 6(float) Constant 1065353216 - 53(threshhold): 20(ptr) Variable UniformConstant - 62: 36(int) Constant 3 - 65(threshhold2): 20(ptr) Variable UniformConstant - 78: TypePointer UniformConstant 23(bool) - 79(b): 78(ptr) Variable UniformConstant - 87: 36(int) Constant 0 - 106: TypePointer Output 7(fvec4) -107(gl_FragColor): 106(ptr) Variable Output -111(threshhold3): 20(ptr) Variable UniformConstant + 14(otherColor): 10(ptr) Variable Input + 16: TypePointer Input 6(float) + 17(c): 16(ptr) Variable Input + 19(d): 16(ptr) Variable Input + 21: TypeBool + 25(bigColor): 10(ptr) Variable Input + 30(smallColor): 10(ptr) Variable Input + 34: TypeInt 32 0 + 35: 34(int) Constant 2 + 36: TypePointer Function 6(float) + 39(minimum): 16(ptr) Variable Input + 47: 6(float) Constant 1065353216 + 51(threshhold): 16(ptr) Variable Input + 60: 34(int) Constant 3 + 63(threshhold2): 16(ptr) Variable Input + 76: TypePointer Private 21(bool) + 77(b): 76(ptr) Variable Private + 85: 34(int) Constant 0 + 104: TypePointer Output 7(fvec4) +105(gl_FragColor): 104(ptr) Variable Output +109(threshhold3): 16(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function 13(color2): 8(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 - 16: 7(fvec4) Load 15(otherColor) - Store 13(color2) 16 - 19: 6(float) Load 18(c) - 22: 6(float) Load 21(d) - 24: 23(bool) FOrdGreaterThan 19 22 - SelectionMerge 26 None - BranchConditional 24 25 31 - 25: Label - 28: 7(fvec4) Load 27(bigColor) - 29: 7(fvec4) Load 9(color) - 30: 7(fvec4) FAdd 29 28 - Store 9(color) 30 - Branch 26 - 31: Label - 33: 7(fvec4) Load 32(smallColor) - 34: 7(fvec4) Load 9(color) - 35: 7(fvec4) FAdd 34 33 - Store 9(color) 35 - Branch 26 - 26: Label - 39: 38(ptr) AccessChain 9(color) 37 - 40: 6(float) Load 39 - 42: 6(float) Load 41(minimum) - 43: 23(bool) FOrdLessThan 40 42 - SelectionMerge 45 None - BranchConditional 43 44 45 - 44: Label + 15: 7(fvec4) Load 14(otherColor) + Store 13(color2) 15 + 18: 6(float) Load 17(c) + 20: 6(float) Load 19(d) + 22: 21(bool) FOrdGreaterThan 18 20 + SelectionMerge 24 None + BranchConditional 22 23 29 + 23: Label + 26: 7(fvec4) Load 25(bigColor) + 27: 7(fvec4) Load 9(color) + 28: 7(fvec4) FAdd 27 26 + Store 9(color) 28 + Branch 24 + 29: Label + 31: 7(fvec4) Load 30(smallColor) + 32: 7(fvec4) Load 9(color) + 33: 7(fvec4) FAdd 32 31 + Store 9(color) 33 + Branch 24 + 24: Label + 37: 36(ptr) AccessChain 9(color) 35 + 38: 6(float) Load 37 + 40: 6(float) Load 39(minimum) + 41: 21(bool) FOrdLessThan 38 40 + SelectionMerge 43 None + BranchConditional 41 42 43 + 42: Label Return - 45: Label - 47: 38(ptr) AccessChain 9(color) 37 - 48: 6(float) Load 47 - 50: 6(float) FAdd 48 49 - Store 47 50 - 51: 38(ptr) AccessChain 9(color) 37 - 52: 6(float) Load 51 - 54: 6(float) Load 53(threshhold) - 55: 23(bool) FOrdGreaterThan 52 54 - SelectionMerge 57 None - BranchConditional 55 56 57 - 56: Label + 43: Label + 45: 36(ptr) AccessChain 9(color) 35 + 46: 6(float) Load 45 + 48: 6(float) FAdd 46 47 + Store 45 48 + 49: 36(ptr) AccessChain 9(color) 35 + 50: 6(float) Load 49 + 52: 6(float) Load 51(threshhold) + 53: 21(bool) FOrdGreaterThan 50 52 + SelectionMerge 55 None + BranchConditional 53 54 55 + 54: Label Kill - 57: Label - 59: 7(fvec4) Load 9(color) - 60: 7(fvec4) CompositeConstruct 49 49 49 49 - 61: 7(fvec4) FAdd 59 60 - Store 9(color) 61 - 63: 38(ptr) AccessChain 9(color) 62 - 64: 6(float) Load 63 - 66: 6(float) Load 65(threshhold2) - 67: 23(bool) FOrdGreaterThan 64 66 - SelectionMerge 69 None - BranchConditional 67 68 99 - 68: Label - 70: 38(ptr) AccessChain 9(color) 37 - 71: 6(float) Load 70 - 72: 6(float) Load 65(threshhold2) - 73: 23(bool) FOrdGreaterThan 71 72 - SelectionMerge 75 None - BranchConditional 73 74 77 - 74: Label + 55: Label + 57: 7(fvec4) Load 9(color) + 58: 7(fvec4) CompositeConstruct 47 47 47 47 + 59: 7(fvec4) FAdd 57 58 + Store 9(color) 59 + 61: 36(ptr) AccessChain 9(color) 60 + 62: 6(float) Load 61 + 64: 6(float) Load 63(threshhold2) + 65: 21(bool) FOrdGreaterThan 62 64 + SelectionMerge 67 None + BranchConditional 65 66 97 + 66: Label + 68: 36(ptr) AccessChain 9(color) 35 + 69: 6(float) Load 68 + 70: 6(float) Load 63(threshhold2) + 71: 21(bool) FOrdGreaterThan 69 70 + SelectionMerge 73 None + BranchConditional 71 72 75 + 72: Label Return - 77: Label - 80: 23(bool) Load 79(b) - SelectionMerge 82 None - BranchConditional 80 81 86 - 81: Label - 83: 38(ptr) AccessChain 9(color) 37 - 84: 6(float) Load 83 - 85: 6(float) FAdd 84 49 - Store 83 85 - Branch 82 - 86: Label - 88: 38(ptr) AccessChain 9(color) 87 - 89: 6(float) Load 88 - 90: 6(float) Load 41(minimum) - 91: 23(bool) FOrdLessThan 89 90 - SelectionMerge 93 None - BranchConditional 91 92 95 - 92: Label + 75: Label + 78: 21(bool) Load 77(b) + SelectionMerge 80 None + BranchConditional 78 79 84 + 79: Label + 81: 36(ptr) AccessChain 9(color) 35 + 82: 6(float) Load 81 + 83: 6(float) FAdd 82 47 + Store 81 83 + Branch 80 + 84: Label + 86: 36(ptr) AccessChain 9(color) 85 + 87: 6(float) Load 86 + 88: 6(float) Load 39(minimum) + 89: 21(bool) FOrdLessThan 87 88 + SelectionMerge 91 None + BranchConditional 89 90 93 + 90: Label Kill - 95: Label - 96: 7(fvec4) Load 9(color) - 97: 7(fvec4) CompositeConstruct 49 49 49 49 - 98: 7(fvec4) FAdd 96 97 - Store 9(color) 98 - Branch 93 - 93: Label - Branch 82 - 82: Label - Branch 75 - 75: Label - Branch 69 - 99: Label - 100: 23(bool) Load 79(b) - SelectionMerge 102 None - BranchConditional 100 101 104 - 101: Label + 93: Label + 94: 7(fvec4) Load 9(color) + 95: 7(fvec4) CompositeConstruct 47 47 47 47 + 96: 7(fvec4) FAdd 94 95 + Store 9(color) 96 + Branch 91 + 91: Label + Branch 80 + 80: Label + Branch 73 + 73: Label + Branch 67 + 97: Label + 98: 21(bool) Load 77(b) + SelectionMerge 100 None + BranchConditional 98 99 102 + 99: Label Kill - 104: Label + 102: Label Return - 102: Label - Branch 69 - 69: Label - 108: 7(fvec4) Load 9(color) - 109: 7(fvec4) Load 13(color2) - 110: 7(fvec4) FMul 108 109 - Store 107(gl_FragColor) 110 + 100: Label + Branch 67 + 67: Label + 106: 7(fvec4) Load 9(color) + 107: 7(fvec4) Load 13(color2) + 108: 7(fvec4) FMul 106 107 + Store 105(gl_FragColor) 108 Return FunctionEnd diff --git a/Test/baseResults/spv.flowControl.frag.out b/Test/baseResults/spv.flowControl.frag.out index 2ca252e7..7ca61b7a 100755 --- a/Test/baseResults/spv.flowControl.frag.out +++ b/Test/baseResults/spv.flowControl.frag.out @@ -5,24 +5,24 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 41 +// Id's are bound by 39 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 18 37 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 14 17 19 25 30 35 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" Name 13 "color2" - Name 15 "otherColor" - Name 18 "c" - Name 21 "d" - Name 27 "bigColor" - Name 32 "smallColor" - Name 37 "gl_FragColor" + Name 14 "otherColor" + Name 17 "c" + Name 19 "d" + Name 25 "bigColor" + Name 30 "smallColor" + Name 35 "gl_FragColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -30,46 +30,44 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 14: TypePointer UniformConstant 7(fvec4) - 15(otherColor): 14(ptr) Variable UniformConstant - 17: TypePointer Input 6(float) - 18(c): 17(ptr) Variable Input - 20: TypePointer UniformConstant 6(float) - 21(d): 20(ptr) Variable UniformConstant - 23: TypeBool - 27(bigColor): 14(ptr) Variable UniformConstant - 32(smallColor): 14(ptr) Variable UniformConstant - 36: TypePointer Output 7(fvec4) -37(gl_FragColor): 36(ptr) Variable Output + 14(otherColor): 10(ptr) Variable Input + 16: TypePointer Input 6(float) + 17(c): 16(ptr) Variable Input + 19(d): 16(ptr) Variable Input + 21: TypeBool + 25(bigColor): 10(ptr) Variable Input + 30(smallColor): 10(ptr) Variable Input + 34: TypePointer Output 7(fvec4) +35(gl_FragColor): 34(ptr) Variable Output 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function 13(color2): 8(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 - 16: 7(fvec4) Load 15(otherColor) - Store 13(color2) 16 - 19: 6(float) Load 18(c) - 22: 6(float) Load 21(d) - 24: 23(bool) FOrdGreaterThan 19 22 - SelectionMerge 26 None - BranchConditional 24 25 31 - 25: Label - 28: 7(fvec4) Load 27(bigColor) - 29: 7(fvec4) Load 9(color) - 30: 7(fvec4) FAdd 29 28 - Store 9(color) 30 - Branch 26 - 31: Label - 33: 7(fvec4) Load 32(smallColor) - 34: 7(fvec4) Load 9(color) - 35: 7(fvec4) FAdd 34 33 - Store 9(color) 35 - Branch 26 - 26: Label - 38: 7(fvec4) Load 9(color) - 39: 7(fvec4) Load 13(color2) - 40: 7(fvec4) FMul 38 39 - Store 37(gl_FragColor) 40 + 15: 7(fvec4) Load 14(otherColor) + Store 13(color2) 15 + 18: 6(float) Load 17(c) + 20: 6(float) Load 19(d) + 22: 21(bool) FOrdGreaterThan 18 20 + SelectionMerge 24 None + BranchConditional 22 23 29 + 23: Label + 26: 7(fvec4) Load 25(bigColor) + 27: 7(fvec4) Load 9(color) + 28: 7(fvec4) FAdd 27 26 + Store 9(color) 28 + Branch 24 + 29: Label + 31: 7(fvec4) Load 30(smallColor) + 32: 7(fvec4) Load 9(color) + 33: 7(fvec4) FAdd 32 31 + Store 9(color) 33 + Branch 24 + 24: Label + 36: 7(fvec4) Load 9(color) + 37: 7(fvec4) Load 13(color2) + 38: 7(fvec4) FMul 36 37 + Store 35(gl_FragColor) 38 Return FunctionEnd diff --git a/Test/baseResults/spv.for-complex-condition.vert.out b/Test/baseResults/spv.for-complex-condition.vert.out index 3e0e5a73..fab7f3d9 100644 --- a/Test/baseResults/spv.for-complex-condition.vert.out +++ b/Test/baseResults/spv.for-complex-condition.vert.out @@ -7,23 +7,19 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 37 +// Id's are bound by 35 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 18 31 35 36 + EntryPoint Vertex 4 "main" 18 31 Source GLSL 450 Name 4 "main" Name 8 "i" Name 18 "flag" Name 31 "r" - Name 35 "gl_VertexID" - Name 36 "gl_InstanceID" Decorate 18(flag) Location 0 Decorate 31(r) Location 0 - Decorate 35(gl_VertexID) BuiltIn VertexId - Decorate 36(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -37,8 +33,6 @@ Linked vertex stage: 27: 6(int) Constant 15 30: TypePointer Output 6(int) 31(r): 30(ptr) Variable Output - 35(gl_VertexID): 17(ptr) Variable Input -36(gl_InstanceID): 17(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index f7530b73..0ea2f143 100644 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 48 +// Id's are bound by 45 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 46 47 + EntryPoint Vertex 4 "main" Source ESSL 310 Name 4 "main" Name 8 "i" @@ -23,10 +23,6 @@ Linked vertex stage: Name 38 "E" Name 39 "F" Name 43 "G" - Name 46 "gl_VertexID" - Name 47 "gl_InstanceID" - Decorate 46(gl_VertexID) BuiltIn VertexId - Decorate 47(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -39,9 +35,6 @@ Linked vertex stage: 31: 6(int) Constant 3 40: 6(int) Constant 12 44: 6(int) Constant 99 - 45: TypePointer Input 6(int) - 46(gl_VertexID): 45(ptr) Variable Input -47(gl_InstanceID): 45(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.for-nobody.vert.out b/Test/baseResults/spv.for-nobody.vert.out index 820dd5ec..a127b709 100644 --- a/Test/baseResults/spv.for-nobody.vert.out +++ b/Test/baseResults/spv.for-nobody.vert.out @@ -7,21 +7,17 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 28 +// Id's are bound by 25 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 23 26 27 + EntryPoint Vertex 4 "main" 23 Source GLSL 450 Name 4 "main" Name 8 "i" Name 23 "r" - Name 26 "gl_VertexID" - Name 27 "gl_InstanceID" Decorate 23(r) Location 0 - Decorate 26(gl_VertexID) BuiltIn VertexId - Decorate 27(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -32,9 +28,6 @@ Linked vertex stage: 20: 6(int) Constant 1 22: TypePointer Output 6(int) 23(r): 22(ptr) Variable Output - 25: TypePointer Input 6(int) - 26(gl_VertexID): 25(ptr) Variable Input -27(gl_InstanceID): 25(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.for-notest.vert.out b/Test/baseResults/spv.for-notest.vert.out index b2618c1e..67706701 100644 --- a/Test/baseResults/spv.for-notest.vert.out +++ b/Test/baseResults/spv.for-notest.vert.out @@ -7,21 +7,17 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 23 +// Id's are bound by 20 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 15 21 22 + EntryPoint Vertex 4 "main" 15 Source GLSL 450 Name 4 "main" Name 8 "i" Name 15 "r" - Name 21 "gl_VertexID" - Name 22 "gl_InstanceID" Decorate 15(r) Location 0 - Decorate 21(gl_VertexID) BuiltIn VertexId - Decorate 22(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -30,9 +26,6 @@ Linked vertex stage: 14: TypePointer Output 6(int) 15(r): 14(ptr) Variable Output 18: 6(int) Constant 1 - 20: TypePointer Input 6(int) - 21(gl_VertexID): 20(ptr) Variable Input -22(gl_InstanceID): 20(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index c8af4c5b..52a047ff 100755 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -7,20 +7,16 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 27 +// Id's are bound by 24 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 25 26 + EntryPoint Vertex 4 "main" Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "j" - Name 25 "gl_VertexID" - Name 26 "gl_InstanceID" - Decorate 25(gl_VertexID) BuiltIn VertexId - Decorate 26(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -30,9 +26,6 @@ Linked vertex stage: 17: TypeBool 20: 6(int) Constant 12 22: 6(int) Constant 1 - 24: TypePointer Input 6(int) - 25(gl_VertexID): 24(ptr) Variable Input -26(gl_InstanceID): 24(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 1d6c425a..e606f9cc 100755 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -5,30 +5,32 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 132 +// Id's are bound by 131 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 37 105 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 24 28 36 53 104 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" Name 15 "i" Name 24 "Count" - Name 29 "bigColor" - Name 37 "gl_FragColor" - Name 40 "sum" - Name 42 "i" - Name 54 "v4" - Name 64 "i" - Name 72 "tv4" - Name 89 "r" - Name 95 "i" - Name 105 "f" - Name 118 "i" + Name 28 "bigColor" + Name 36 "gl_FragColor" + Name 39 "sum" + Name 41 "i" + Name 53 "v4" + Name 63 "i" + Name 71 "tv4" + Name 88 "r" + Name 94 "i" + Name 104 "f" + Name 117 "i" + Decorate 24(Count) Flat + Decorate 53(v4) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -39,39 +41,38 @@ Linked fragment stage: 13: TypeInt 32 1 14: TypePointer Function 13(int) 16: 13(int) Constant 0 - 23: TypePointer UniformConstant 13(int) - 24(Count): 23(ptr) Variable UniformConstant + 23: TypePointer Input 13(int) + 24(Count): 23(ptr) Variable Input 26: TypeBool - 28: TypePointer UniformConstant 7(fvec4) - 29(bigColor): 28(ptr) Variable UniformConstant - 34: 13(int) Constant 1 - 36: TypePointer Output 7(fvec4) -37(gl_FragColor): 36(ptr) Variable Output - 39: TypePointer Function 6(float) - 41: 6(float) Constant 0 - 49: 13(int) Constant 4 - 51: TypeInt 32 0 - 52: TypeVector 51(int) 4 - 53: TypePointer UniformConstant 52(ivec4) - 54(v4): 53(ptr) Variable UniformConstant - 56: TypePointer UniformConstant 51(int) - 77: 51(int) Constant 4 - 90: TypeVector 6(float) 3 - 104: TypePointer Input 6(float) - 105(f): 104(ptr) Variable Input - 107: 51(int) Constant 3 - 125: 13(int) Constant 16 + 28(bigColor): 10(ptr) Variable Input + 33: 13(int) Constant 1 + 35: TypePointer Output 7(fvec4) +36(gl_FragColor): 35(ptr) Variable Output + 38: TypePointer Function 6(float) + 40: 6(float) Constant 0 + 48: 13(int) Constant 4 + 50: TypeInt 32 0 + 51: TypeVector 50(int) 4 + 52: TypePointer Input 51(ivec4) + 53(v4): 52(ptr) Variable Input + 55: TypePointer Input 50(int) + 76: 50(int) Constant 4 + 89: TypeVector 6(float) 3 + 103: TypePointer Input 6(float) + 104(f): 103(ptr) Variable Input + 106: 50(int) Constant 3 + 124: 13(int) Constant 16 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function 15(i): 14(ptr) Variable Function - 40(sum): 39(ptr) Variable Function - 42(i): 14(ptr) Variable Function - 64(i): 14(ptr) Variable Function - 72(tv4): 8(ptr) Variable Function - 89(r): 8(ptr) Variable Function - 95(i): 14(ptr) Variable Function - 118(i): 14(ptr) Variable Function + 39(sum): 38(ptr) Variable Function + 41(i): 14(ptr) Variable Function + 63(i): 14(ptr) Variable Function + 71(tv4): 8(ptr) Variable Function + 88(r): 8(ptr) Variable Function + 94(i): 14(ptr) Variable Function + 117(i): 14(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 Store 15(i) 16 @@ -85,130 +86,130 @@ Linked fragment stage: 27: 26(bool) SLessThan 22 25 BranchConditional 27 18 19 18: Label - 30: 7(fvec4) Load 29(bigColor) - 31: 7(fvec4) Load 9(color) - 32: 7(fvec4) FAdd 31 30 - Store 9(color) 32 + 29: 7(fvec4) Load 28(bigColor) + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 Branch 20 20: Label - 33: 13(int) Load 15(i) - 35: 13(int) IAdd 33 34 - Store 15(i) 35 + 32: 13(int) Load 15(i) + 34: 13(int) IAdd 32 33 + Store 15(i) 34 Branch 17 19: Label - 38: 7(fvec4) Load 9(color) - Store 37(gl_FragColor) 38 - Store 40(sum) 41 - Store 42(i) 16 - Branch 43 - 43: Label - LoopMerge 45 46 None - Branch 47 - 47: Label - 48: 13(int) Load 42(i) - 50: 26(bool) SLessThan 48 49 - BranchConditional 50 44 45 - 44: Label - 55: 13(int) Load 42(i) - 57: 56(ptr) AccessChain 54(v4) 55 - 58: 51(int) Load 57 - 59: 6(float) ConvertUToF 58 - 60: 6(float) Load 40(sum) - 61: 6(float) FAdd 60 59 - Store 40(sum) 61 - Branch 46 - 46: Label - 62: 13(int) Load 42(i) - 63: 13(int) IAdd 62 34 - Store 42(i) 63 - Branch 43 - 45: Label - Store 64(i) 16 - Branch 65 - 65: Label - LoopMerge 67 68 None - Branch 69 - 69: Label - 70: 13(int) Load 64(i) - 71: 26(bool) SLessThan 70 49 - BranchConditional 71 66 67 - 66: Label - 73: 13(int) Load 64(i) - 74: 13(int) Load 64(i) - 75: 56(ptr) AccessChain 54(v4) 74 - 76: 51(int) Load 75 - 78: 51(int) IMul 76 77 - 79: 6(float) ConvertUToF 78 - 80: 39(ptr) AccessChain 72(tv4) 73 - Store 80 79 - Branch 68 - 68: Label - 81: 13(int) Load 64(i) - 82: 13(int) IAdd 81 34 - Store 64(i) 82 - Branch 65 - 67: Label - 83: 6(float) Load 40(sum) - 84: 7(fvec4) CompositeConstruct 83 83 83 83 - 85: 7(fvec4) Load 72(tv4) - 86: 7(fvec4) FAdd 84 85 - 87: 7(fvec4) Load 37(gl_FragColor) - 88: 7(fvec4) FAdd 87 86 - Store 37(gl_FragColor) 88 - 91: 7(fvec4) Load 11(BaseColor) - 92: 90(fvec3) VectorShuffle 91 91 0 1 2 - 93: 7(fvec4) Load 89(r) - 94: 7(fvec4) VectorShuffle 93 92 4 5 6 3 - Store 89(r) 94 - Store 95(i) 16 - Branch 96 - 96: Label - LoopMerge 98 99 None - Branch 100 - 100: Label - 101: 13(int) Load 95(i) - 102: 13(int) Load 24(Count) - 103: 26(bool) SLessThan 101 102 - BranchConditional 103 97 98 - 97: Label - 106: 6(float) Load 105(f) - 108: 39(ptr) AccessChain 89(r) 107 - Store 108 106 - Branch 99 - 99: Label - 109: 13(int) Load 95(i) - 110: 13(int) IAdd 109 34 - Store 95(i) 110 - Branch 96 - 98: Label - 111: 7(fvec4) Load 89(r) - 112: 90(fvec3) VectorShuffle 111 111 0 1 2 - 113: 7(fvec4) Load 37(gl_FragColor) - 114: 90(fvec3) VectorShuffle 113 113 0 1 2 - 115: 90(fvec3) FAdd 114 112 - 116: 7(fvec4) Load 37(gl_FragColor) - 117: 7(fvec4) VectorShuffle 116 115 4 5 6 3 - Store 37(gl_FragColor) 117 - Store 118(i) 16 - Branch 119 - 119: Label - LoopMerge 121 122 None - Branch 123 - 123: Label - 124: 13(int) Load 118(i) - 126: 26(bool) SLessThan 124 125 - BranchConditional 126 120 121 - 120: Label - 127: 6(float) Load 105(f) - 128: 7(fvec4) Load 37(gl_FragColor) - 129: 7(fvec4) VectorTimesScalar 128 127 - Store 37(gl_FragColor) 129 - Branch 122 - 122: Label - 130: 13(int) Load 118(i) - 131: 13(int) IAdd 130 49 - Store 118(i) 131 - Branch 119 - 121: Label + 37: 7(fvec4) Load 9(color) + Store 36(gl_FragColor) 37 + Store 39(sum) 40 + Store 41(i) 16 + Branch 42 + 42: Label + LoopMerge 44 45 None + Branch 46 + 46: Label + 47: 13(int) Load 41(i) + 49: 26(bool) SLessThan 47 48 + BranchConditional 49 43 44 + 43: Label + 54: 13(int) Load 41(i) + 56: 55(ptr) AccessChain 53(v4) 54 + 57: 50(int) Load 56 + 58: 6(float) ConvertUToF 57 + 59: 6(float) Load 39(sum) + 60: 6(float) FAdd 59 58 + Store 39(sum) 60 + Branch 45 + 45: Label + 61: 13(int) Load 41(i) + 62: 13(int) IAdd 61 33 + Store 41(i) 62 + Branch 42 + 44: Label + Store 63(i) 16 + Branch 64 + 64: Label + LoopMerge 66 67 None + Branch 68 + 68: Label + 69: 13(int) Load 63(i) + 70: 26(bool) SLessThan 69 48 + BranchConditional 70 65 66 + 65: Label + 72: 13(int) Load 63(i) + 73: 13(int) Load 63(i) + 74: 55(ptr) AccessChain 53(v4) 73 + 75: 50(int) Load 74 + 77: 50(int) IMul 75 76 + 78: 6(float) ConvertUToF 77 + 79: 38(ptr) AccessChain 71(tv4) 72 + Store 79 78 + Branch 67 + 67: Label + 80: 13(int) Load 63(i) + 81: 13(int) IAdd 80 33 + Store 63(i) 81 + Branch 64 + 66: Label + 82: 6(float) Load 39(sum) + 83: 7(fvec4) CompositeConstruct 82 82 82 82 + 84: 7(fvec4) Load 71(tv4) + 85: 7(fvec4) FAdd 83 84 + 86: 7(fvec4) Load 36(gl_FragColor) + 87: 7(fvec4) FAdd 86 85 + Store 36(gl_FragColor) 87 + 90: 7(fvec4) Load 11(BaseColor) + 91: 89(fvec3) VectorShuffle 90 90 0 1 2 + 92: 7(fvec4) Load 88(r) + 93: 7(fvec4) VectorShuffle 92 91 4 5 6 3 + Store 88(r) 93 + Store 94(i) 16 + Branch 95 + 95: Label + LoopMerge 97 98 None + Branch 99 + 99: Label + 100: 13(int) Load 94(i) + 101: 13(int) Load 24(Count) + 102: 26(bool) SLessThan 100 101 + BranchConditional 102 96 97 + 96: Label + 105: 6(float) Load 104(f) + 107: 38(ptr) AccessChain 88(r) 106 + Store 107 105 + Branch 98 + 98: Label + 108: 13(int) Load 94(i) + 109: 13(int) IAdd 108 33 + Store 94(i) 109 + Branch 95 + 97: Label + 110: 7(fvec4) Load 88(r) + 111: 89(fvec3) VectorShuffle 110 110 0 1 2 + 112: 7(fvec4) Load 36(gl_FragColor) + 113: 89(fvec3) VectorShuffle 112 112 0 1 2 + 114: 89(fvec3) FAdd 113 111 + 115: 7(fvec4) Load 36(gl_FragColor) + 116: 7(fvec4) VectorShuffle 115 114 4 5 6 3 + Store 36(gl_FragColor) 116 + Store 117(i) 16 + Branch 118 + 118: Label + LoopMerge 120 121 None + Branch 122 + 122: Label + 123: 13(int) Load 117(i) + 125: 26(bool) SLessThan 123 124 + BranchConditional 125 119 120 + 119: Label + 126: 6(float) Load 104(f) + 127: 7(fvec4) Load 36(gl_FragColor) + 128: 7(fvec4) VectorTimesScalar 127 126 + Store 36(gl_FragColor) 128 + Branch 121 + 121: Label + 129: 13(int) Load 117(i) + 130: 13(int) IAdd 129 48 + Store 117(i) 130 + Branch 118 + 120: Label Return FunctionEnd diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out index 0ce0c2e4..346523cb 100755 --- a/Test/baseResults/spv.forwardFun.frag.out +++ b/Test/baseResults/spv.forwardFun.frag.out @@ -5,13 +5,13 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 61 +// Id's are bound by 60 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 20 30 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 20 30 36 59 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 6 "bar(" @@ -24,7 +24,7 @@ Linked fragment stage: Name 27 "f" Name 30 "gl_FragColor" Name 36 "d" - Name 60 "bigColor" + Name 59 "bigColor" 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -37,8 +37,8 @@ Linked fragment stage: 26: TypePointer Function 8(float) 29: TypePointer Output 12(fvec4) 30(gl_FragColor): 29(ptr) Variable Output - 35: TypePointer UniformConstant 8(float) - 36(d): 35(ptr) Variable UniformConstant + 35: TypePointer Input 8(float) + 36(d): 35(ptr) Variable Input 38: 8(float) Constant 1082549862 39: TypeBool 43: 8(float) Constant 1067030938 @@ -46,8 +46,7 @@ Linked fragment stage: 49: TypeInt 32 0 50: 49(int) Constant 0 53: 49(int) Constant 1 - 59: TypePointer UniformConstant 12(fvec4) - 60(bigColor): 59(ptr) Variable UniformConstant + 59(bigColor): 19(ptr) Variable Input 4(main): 2 Function None 3 5: Label 18(color): 13(ptr) Variable Function diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out index 3e3fbd52..db40dd51 100755 --- a/Test/baseResults/spv.functionCall.frag.out +++ b/Test/baseResults/spv.functionCall.frag.out @@ -1,17 +1,21 @@ spv.functionCall.frag +WARNING: 0:3: varying deprecated in version 130; may be removed in future release +WARNING: 0:4: varying deprecated in version 130; may be removed in future release +WARNING: 0:5: varying deprecated in version 130; may be removed in future release + Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 77 +// Id's are bound by 76 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 58 69 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 35 58 69 75 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 11 "foo(vf4;" @@ -27,7 +31,7 @@ Linked fragment stage: Name 64 "f" Name 66 "g" Name 69 "gl_FragColor" - Name 76 "bigColor" + Name 75 "bigColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -42,8 +46,8 @@ Linked fragment stage: 24: 23(int) Constant 0 25: TypePointer Function 6(float) 28: 23(int) Constant 1 - 34: TypePointer UniformConstant 6(float) - 35(d): 34(ptr) Variable UniformConstant + 34: TypePointer Input 6(float) + 35(d): 34(ptr) Variable Input 37: 6(float) Constant 1082549862 38: TypeBool 42: 6(float) Constant 1067030938 @@ -53,8 +57,7 @@ Linked fragment stage: 58(BaseColor): 57(ptr) Variable Input 68: TypePointer Output 7(fvec4) 69(gl_FragColor): 68(ptr) Variable Output - 75: TypePointer UniformConstant 7(fvec4) - 76(bigColor): 75(ptr) Variable UniformConstant + 75(bigColor): 57(ptr) Variable Input 4(main): 2 Function None 3 5: Label 56(color): 8(ptr) Variable Function diff --git a/Test/baseResults/spv.functionSemantics.frag.out b/Test/baseResults/spv.functionSemantics.frag.out index 9978539f..aa2abd84 100755 --- a/Test/baseResults/spv.functionSemantics.frag.out +++ b/Test/baseResults/spv.functionSemantics.frag.out @@ -12,8 +12,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 152 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 76 152 + ExecutionMode 4 OriginUpperLeft Source GLSL 400 Name 4 "main" Name 15 "foo(i1;i1;i1;i1;i1;i1;" @@ -65,8 +65,8 @@ Linked fragment stage: 66: 17(float) Constant 1084227584 67: TypeInt 32 0 68: 67(int) Constant 1 - 75: TypePointer UniformConstant 17(float) - 76(u): 75(ptr) Variable UniformConstant + 75: TypePointer Input 17(float) + 76(u): 75(ptr) Variable Input 78: 17(float) Constant 1078774989 79: TypeBool 84: 6(int) Constant 1000000 diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index ca9c588d..9cb1ec4d 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -20,8 +20,8 @@ Linked fragment stage: Capability StorageImageWriteWithoutFormat 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 362 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 132 142 152 248 362 377 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 9 "iv" @@ -47,20 +47,39 @@ Linked fragment stage: Name 357 "wo2D" Name 362 "fragData" Name 377 "ic4D" + Decorate 15(i1D) DescriptorSet 0 Decorate 15(i1D) Binding 0 + Decorate 27(i2D) DescriptorSet 0 Decorate 27(i2D) Binding 1 + Decorate 38(i3D) DescriptorSet 0 Decorate 38(i3D) Binding 2 + Decorate 45(iCube) DescriptorSet 0 Decorate 45(iCube) Binding 3 + Decorate 55(iCubeArray) DescriptorSet 0 Decorate 55(iCubeArray) Binding 4 + Decorate 62(i2DRect) DescriptorSet 0 Decorate 62(i2DRect) Binding 5 + Decorate 72(i1DArray) DescriptorSet 0 Decorate 72(i1DArray) Binding 6 + Decorate 82(i2DArray) DescriptorSet 0 Decorate 82(i2DArray) Binding 7 + Decorate 89(iBuffer) DescriptorSet 0 Decorate 89(iBuffer) Binding 8 + Decorate 98(i2DMS) DescriptorSet 0 Decorate 98(i2DMS) Binding 9 + Decorate 108(i2DMSArray) DescriptorSet 0 Decorate 108(i2DMSArray) Binding 10 + Decorate 132(ic1D) Flat + Decorate 142(ic2D) Flat + Decorate 152(ic3D) Flat + Decorate 232(ii1D) DescriptorSet 0 Decorate 232(ii1D) Binding 11 + Decorate 245(ui2D) DescriptorSet 0 Decorate 245(ui2D) Binding 12 + Decorate 248(value) Flat + Decorate 357(wo2D) DescriptorSet 0 Decorate 357(wo2D) Binding 1 + Decorate 377(ic4D) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -110,12 +129,12 @@ Linked fragment stage: 126: TypePointer Function 125(fvec4) 128: 12(float) Constant 0 129: 125(fvec4) ConstantComposite 128 128 128 128 - 131: TypePointer UniformConstant 6(int) - 132(ic1D): 131(ptr) Variable UniformConstant - 141: TypePointer UniformConstant 29(ivec2) - 142(ic2D): 141(ptr) Variable UniformConstant - 151: TypePointer UniformConstant 7(ivec3) - 152(ic3D): 151(ptr) Variable UniformConstant + 131: TypePointer Input 6(int) + 132(ic1D): 131(ptr) Variable Input + 141: TypePointer Input 29(ivec2) + 142(ic2D): 141(ptr) Variable Input + 151: TypePointer Input 7(ivec3) + 152(ic3D): 151(ptr) Variable Input 210: 6(int) Constant 1 216: 6(int) Constant 2 220: 6(int) Constant 3 @@ -130,8 +149,8 @@ Linked fragment stage: 243: TypeImage 18(int) 2D nonsampled format:R32ui 244: TypePointer UniformConstant 243 245(ui2D): 244(ptr) Variable UniformConstant - 247: TypePointer UniformConstant 18(int) - 248(value): 247(ptr) Variable UniformConstant + 247: TypePointer Input 18(int) + 248(value): 247(ptr) Variable Input 250: TypePointer Image 18(int) 256: 6(int) Constant 11 270: 6(int) Constant 12 @@ -149,8 +168,8 @@ Linked fragment stage: 362(fragData): 361(ptr) Variable Output 368: TypeBool 375: TypeVector 6(int) 4 - 376: TypePointer UniformConstant 375(ivec4) - 377(ic4D): 376(ptr) Variable UniformConstant + 376: TypePointer Input 375(ivec4) + 377(ic4D): 376(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(iv): 8(ptr) Variable Function diff --git a/Test/baseResults/spv.intOps.vert.out b/Test/baseResults/spv.intOps.vert.out index 86a52190..bbab470f 100644 --- a/Test/baseResults/spv.intOps.vert.out +++ b/Test/baseResults/spv.intOps.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 270 +// Id's are bound by 268 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 15 21 26 47 67 83 100 121 142 146 156 173 182 247 268 269 + EntryPoint Vertex 4 "main" 9 15 21 26 47 67 83 100 121 142 146 156 173 182 247 Source ESSL 310 Name 4 "main" Name 9 "iout" @@ -44,12 +44,8 @@ Linked vertex stage: Name 173 "u3" Name 182 "i3" Name 247 "v4" - Name 268 "gl_VertexID" - Name 269 "gl_InstanceID" Decorate 261 RelaxedPrecision Decorate 265 RelaxedPrecision - Decorate 268(gl_VertexID) BuiltIn VertexId - Decorate 269(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -117,8 +113,6 @@ Linked vertex stage: 182(i3): 181(ptr) Variable Input 246: TypePointer Input 19(fvec4) 247(v4): 246(ptr) Variable Input -268(gl_VertexID): 155(ptr) Variable Input -269(gl_InstanceID): 155(ptr) Variable Input 4(main): 2 Function None 3 5: Label 30(u2out): 29(ptr) Variable Function diff --git a/Test/baseResults/spv.interpOps.frag.out b/Test/baseResults/spv.interpOps.frag.out index c132b441..a5076421 100644 --- a/Test/baseResults/spv.interpOps.frag.out +++ b/Test/baseResults/spv.interpOps.frag.out @@ -7,14 +7,14 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 101 +// Id's are bound by 100 Capability Shader Capability InterpolationFunction 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 13 24 33 41 99 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 13 24 33 41 47 72 98 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 9 "f4" @@ -23,8 +23,10 @@ Linked fragment stage: Name 33 "if3" Name 41 "if4" Name 47 "samp" - Name 73 "offset" - Name 99 "fragColor" + Name 72 "offset" + Name 98 "fragColor" + Decorate 47(samp) Flat + Decorate 72(offset) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -46,12 +48,11 @@ Linked fragment stage: 40: TypePointer Input 7(fvec4) 41(if4): 40(ptr) Variable Input 45: TypeInt 32 1 - 46: TypePointer UniformConstant 45(int) - 47(samp): 46(ptr) Variable UniformConstant - 72: TypePointer UniformConstant 22(fvec2) - 73(offset): 72(ptr) Variable UniformConstant - 98: TypePointer Output 7(fvec4) - 99(fragColor): 98(ptr) Variable Output + 46: TypePointer Input 45(int) + 47(samp): 46(ptr) Variable Input + 72(offset): 23(ptr) Variable Input + 97: TypePointer Output 7(fvec4) + 98(fragColor): 97(ptr) Variable Output 4(main): 2 Function None 3 5: Label 9(f4): 8(ptr) Variable Function @@ -108,35 +109,35 @@ Linked fragment stage: 70: 7(fvec4) Load 9(f4) 71: 7(fvec4) FAdd 70 69 Store 9(f4) 71 - 74: 22(fvec2) Load 73(offset) - 75: 6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 13(if1) 74 - 76: 17(ptr) AccessChain 9(f4) 16 - 77: 6(float) Load 76 - 78: 6(float) FAdd 77 75 - 79: 17(ptr) AccessChain 9(f4) 16 - Store 79 78 - 80: 22(fvec2) Load 73(offset) - 81: 22(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 24(if2) 80 - 82: 7(fvec4) Load 9(f4) - 83: 22(fvec2) VectorShuffle 82 82 0 1 - 84: 22(fvec2) FAdd 83 81 - 85: 7(fvec4) Load 9(f4) - 86: 7(fvec4) VectorShuffle 85 84 4 5 2 3 - Store 9(f4) 86 - 87: 22(fvec2) Load 73(offset) - 88: 31(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 33(if3) 87 - 89: 7(fvec4) Load 9(f4) - 90: 31(fvec3) VectorShuffle 89 89 0 1 2 - 91: 31(fvec3) FAdd 90 88 - 92: 7(fvec4) Load 9(f4) - 93: 7(fvec4) VectorShuffle 92 91 4 5 6 3 - Store 9(f4) 93 - 94: 22(fvec2) Load 73(offset) - 95: 7(fvec4) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 41(if4) 94 - 96: 7(fvec4) Load 9(f4) - 97: 7(fvec4) FAdd 96 95 - Store 9(f4) 97 - 100: 7(fvec4) Load 9(f4) - Store 99(fragColor) 100 + 73: 22(fvec2) Load 72(offset) + 74: 6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 13(if1) 73 + 75: 17(ptr) AccessChain 9(f4) 16 + 76: 6(float) Load 75 + 77: 6(float) FAdd 76 74 + 78: 17(ptr) AccessChain 9(f4) 16 + Store 78 77 + 79: 22(fvec2) Load 72(offset) + 80: 22(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 24(if2) 79 + 81: 7(fvec4) Load 9(f4) + 82: 22(fvec2) VectorShuffle 81 81 0 1 + 83: 22(fvec2) FAdd 82 80 + 84: 7(fvec4) Load 9(f4) + 85: 7(fvec4) VectorShuffle 84 83 4 5 2 3 + Store 9(f4) 85 + 86: 22(fvec2) Load 72(offset) + 87: 31(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 33(if3) 86 + 88: 7(fvec4) Load 9(f4) + 89: 31(fvec3) VectorShuffle 88 88 0 1 2 + 90: 31(fvec3) FAdd 89 87 + 91: 7(fvec4) Load 9(f4) + 92: 7(fvec4) VectorShuffle 91 90 4 5 6 3 + Store 9(f4) 92 + 93: 22(fvec2) Load 72(offset) + 94: 7(fvec4) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 41(if4) 93 + 95: 7(fvec4) Load 9(f4) + 96: 7(fvec4) FAdd 95 94 + Store 9(f4) 96 + 99: 7(fvec4) Load 9(f4) + Store 98(fragColor) 99 Return FunctionEnd diff --git a/Test/baseResults/spv.layoutNested.vert.out b/Test/baseResults/spv.layoutNested.vert.out index 399e283b..4f3d67c1 100644 --- a/Test/baseResults/spv.layoutNested.vert.out +++ b/Test/baseResults/spv.layoutNested.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 70 +// Id's are bound by 67 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 63 66 68 69 + EntryPoint Vertex 4 "main" 63 66 Source GLSL 450 Name 4 "main" Name 14 "S" @@ -92,8 +92,6 @@ Linked vertex stage: MemberName 64(S) 1 "b" MemberName 64(S) 2 "c" Name 66 "soutinv" - Name 68 "gl_VertexID" - Name 69 "gl_InstanceID" Decorate 13 ArrayStride 32 MemberDecorate 14(S) 0 Offset 0 MemberDecorate 14(S) 1 ColMajor @@ -175,8 +173,6 @@ Linked vertex stage: MemberDecorate 64(S) 1 Invariant MemberDecorate 64(S) 2 Invariant Decorate 66(soutinv) Invariant - Decorate 68(gl_VertexID) BuiltIn VertexId - Decorate 69(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -240,9 +236,6 @@ Linked vertex stage: 64(S): TypeStruct 8(ivec3) 13 7(int) 65: TypePointer Output 64(S) 66(soutinv): 65(ptr) Variable Output - 67: TypePointer Input 6(int) - 68(gl_VertexID): 67(ptr) Variable Input -69(gl_InstanceID): 67(ptr) Variable Input 4(main): 2 Function None 3 5: Label Return diff --git a/Test/baseResults/spv.length.frag.out b/Test/baseResults/spv.length.frag.out index c7e8ad8f..81f98a61 100755 --- a/Test/baseResults/spv.length.frag.out +++ b/Test/baseResults/spv.length.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 14 26 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "t" @@ -39,8 +39,8 @@ Linked fragment stage: 28: 24(fvec4) ConstantComposite 27 27 27 27 29: 10(int) Constant 3 30: TypeArray 24(fvec4) 29 - 31: TypePointer UniformConstant 30 - 32(u): 31(ptr) Variable UniformConstant + 31: TypePointer Private 30 + 32(u): 31(ptr) Variable Private 4(main): 2 Function None 3 5: Label 9(t): 8(ptr) Variable Function diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index db540dc1..14f56092 100755 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -1,18 +1,20 @@ spv.localAggregates.frag +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 138 +// Id's are bound by 143 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 40 98 108 - ExecutionMode 4 OriginLowerLeft - Source GLSL 140 + EntryPoint Fragment 4 "main" 18 43 93 101 111 138 142 + ExecutionMode 4 OriginUpperLeft + Source GLSL 400 Name 4 "main" Name 8 "s1" MemberName 8(s1) 0 "i" @@ -23,26 +25,69 @@ Linked fragment stage: MemberName 10(s2) 2 "s1_1" MemberName 10(s2) 3 "bleh" Name 12 "locals2" - Name 13 "s3" - MemberName 13(s3) 0 "s2_1" - MemberName 13(s3) 1 "i" - MemberName 13(s3) 2 "f" - MemberName 13(s3) 3 "s1_1" - Name 15 "foo3" - Name 36 "localFArray" - Name 40 "coord" - Name 49 "localIArray" - Name 68 "x" - Name 70 "localArray" - Name 75 "i" - Name 84 "a" - Name 90 "condition" - Name 98 "color" - Name 108 "gl_FragColor" - Name 128 "samp2D" - Name 134 "foo" - Name 135 "foo2" - Name 137 "uFloatArray" + Name 13 "s1" + MemberName 13(s1) 0 "i" + MemberName 13(s1) 1 "f" + Name 14 "s2" + MemberName 14(s2) 0 "i" + MemberName 14(s2) 1 "f" + MemberName 14(s2) 2 "s1_1" + MemberName 14(s2) 3 "bleh" + Name 15 "s1" + MemberName 15(s1) 0 "i" + MemberName 15(s1) 1 "f" + Name 16 "s3" + MemberName 16(s3) 0 "s2_1" + MemberName 16(s3) 1 "i" + MemberName 16(s3) 2 "f" + MemberName 16(s3) 3 "s1_1" + Name 18 "foo3" + Name 39 "localFArray" + Name 43 "coord" + Name 52 "localIArray" + Name 71 "x" + Name 73 "localArray" + Name 78 "i" + Name 87 "a" + Name 93 "condition" + Name 101 "color" + Name 111 "gl_FragColor" + Name 131 "samp2D" + Name 136 "s1" + MemberName 136(s1) 0 "i" + MemberName 136(s1) 1 "f" + Name 138 "foo" + Name 139 "s1" + MemberName 139(s1) 0 "i" + MemberName 139(s1) 1 "f" + Name 140 "s2" + MemberName 140(s2) 0 "i" + MemberName 140(s2) 1 "f" + MemberName 140(s2) 2 "s1_1" + MemberName 140(s2) 3 "bleh" + Name 142 "foo2" + MemberDecorate 13(s1) 0 Flat + MemberDecorate 13(s1) 1 Flat + MemberDecorate 14(s2) 0 Flat + MemberDecorate 14(s2) 1 Flat + MemberDecorate 14(s2) 2 Flat + MemberDecorate 14(s2) 3 Flat + MemberDecorate 15(s1) 0 Flat + MemberDecorate 15(s1) 1 Flat + MemberDecorate 16(s3) 0 Flat + MemberDecorate 16(s3) 1 Flat + MemberDecorate 16(s3) 2 Flat + MemberDecorate 16(s3) 3 Flat + Decorate 93(condition) Flat + Decorate 131(samp2D) DescriptorSet 0 + MemberDecorate 136(s1) 0 Flat + MemberDecorate 136(s1) 1 Flat + MemberDecorate 139(s1) 0 Flat + MemberDecorate 139(s1) 1 Flat + MemberDecorate 140(s2) 0 Flat + MemberDecorate 140(s2) 1 Flat + MemberDecorate 140(s2) 2 Flat + MemberDecorate 140(s2) 3 Flat 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -51,166 +96,171 @@ Linked fragment stage: 9: TypeVector 7(float) 4 10(s2): TypeStruct 6(int) 7(float) 8(s1) 9(fvec4) 11: TypePointer Function 10(s2) - 13(s3): TypeStruct 10(s2) 6(int) 7(float) 8(s1) - 14: TypePointer UniformConstant 13(s3) - 15(foo3): 14(ptr) Variable UniformConstant - 16: 6(int) Constant 0 - 17: TypePointer UniformConstant 10(s2) - 20: TypePointer UniformConstant 6(int) - 23: TypeBool - 27: 6(int) Constant 2 - 28: 6(int) Constant 1 - 29: 7(float) Constant 1065353216 - 30: TypePointer Function 7(float) - 32: TypeInt 32 0 - 33: 32(int) Constant 16 - 34: TypeArray 7(float) 33 - 35: TypePointer Function 34 - 37: 6(int) Constant 4 - 38: TypeVector 7(float) 2 - 39: TypePointer Input 38(fvec2) - 40(coord): 39(ptr) Variable Input - 41: 32(int) Constant 0 - 42: TypePointer Input 7(float) - 46: 32(int) Constant 8 - 47: TypeArray 6(int) 46 - 48: TypePointer Function 47 - 52: TypePointer Function 6(int) - 69: 6(int) Constant 5 - 82: 6(int) Constant 16 - 86: 7(float) Constant 0 - 90(condition): 20(ptr) Variable UniformConstant - 96: 6(int) Constant 3 - 97: TypePointer Input 9(fvec4) - 98(color): 97(ptr) Variable Input - 100: TypePointer Function 9(fvec4) - 102: 32(int) Constant 1 - 105: 32(int) Constant 2 - 107: TypePointer Output 9(fvec4) -108(gl_FragColor): 107(ptr) Variable Output - 125: TypeImage 7(float) 2D sampled format:Unknown - 126: TypeSampledImage 125 - 127: TypePointer UniformConstant 126 - 128(samp2D): 127(ptr) Variable UniformConstant - 133: TypePointer UniformConstant 8(s1) - 134(foo): 133(ptr) Variable UniformConstant - 135(foo2): 17(ptr) Variable UniformConstant - 136: TypePointer UniformConstant 34 -137(uFloatArray): 136(ptr) Variable UniformConstant + 13(s1): TypeStruct 6(int) 7(float) + 14(s2): TypeStruct 6(int) 7(float) 13(s1) 9(fvec4) + 15(s1): TypeStruct 6(int) 7(float) + 16(s3): TypeStruct 14(s2) 6(int) 7(float) 15(s1) + 17: TypePointer Input 16(s3) + 18(foo3): 17(ptr) Variable Input + 19: 6(int) Constant 0 + 20: TypePointer Input 14(s2) + 23: TypePointer Input 6(int) + 26: TypeBool + 30: 6(int) Constant 2 + 31: 6(int) Constant 1 + 32: 7(float) Constant 1065353216 + 33: TypePointer Function 7(float) + 35: TypeInt 32 0 + 36: 35(int) Constant 16 + 37: TypeArray 7(float) 36 + 38: TypePointer Function 37 + 40: 6(int) Constant 4 + 41: TypeVector 7(float) 2 + 42: TypePointer Input 41(fvec2) + 43(coord): 42(ptr) Variable Input + 44: 35(int) Constant 0 + 45: TypePointer Input 7(float) + 49: 35(int) Constant 8 + 50: TypeArray 6(int) 49 + 51: TypePointer Function 50 + 55: TypePointer Function 6(int) + 72: 6(int) Constant 5 + 85: 6(int) Constant 16 + 89: 7(float) Constant 0 + 93(condition): 23(ptr) Variable Input + 99: 6(int) Constant 3 + 100: TypePointer Input 9(fvec4) + 101(color): 100(ptr) Variable Input + 103: TypePointer Function 9(fvec4) + 105: 35(int) Constant 1 + 108: 35(int) Constant 2 + 110: TypePointer Output 9(fvec4) +111(gl_FragColor): 110(ptr) Variable Output + 128: TypeImage 7(float) 2D sampled format:Unknown + 129: TypeSampledImage 128 + 130: TypePointer UniformConstant 129 + 131(samp2D): 130(ptr) Variable UniformConstant + 136(s1): TypeStruct 6(int) 7(float) + 137: TypePointer Input 136(s1) + 138(foo): 137(ptr) Variable Input + 139(s1): TypeStruct 6(int) 7(float) + 140(s2): TypeStruct 6(int) 7(float) 139(s1) 9(fvec4) + 141: TypePointer Input 140(s2) + 142(foo2): 141(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12(locals2): 11(ptr) Variable Function - 36(localFArray): 35(ptr) Variable Function - 49(localIArray): 48(ptr) Variable Function - 68(x): 52(ptr) Variable Function - 70(localArray): 35(ptr) Variable Function - 75(i): 52(ptr) Variable Function - 84(a): 35(ptr) Variable Function - 18: 17(ptr) AccessChain 15(foo3) 16 - 19: 10(s2) Load 18 - Store 12(locals2) 19 - 21: 20(ptr) AccessChain 15(foo3) 16 16 - 22: 6(int) Load 21 - 24: 23(bool) SGreaterThan 22 16 - SelectionMerge 26 None - BranchConditional 24 25 54 - 25: Label - 31: 30(ptr) AccessChain 12(locals2) 27 28 - Store 31 29 - 43: 42(ptr) AccessChain 40(coord) 41 - 44: 7(float) Load 43 - 45: 30(ptr) AccessChain 36(localFArray) 37 - Store 45 44 - 50: 20(ptr) AccessChain 15(foo3) 16 16 - 51: 6(int) Load 50 - 53: 52(ptr) AccessChain 49(localIArray) 27 - Store 53 51 - Branch 26 - 54: Label - 55: 42(ptr) AccessChain 40(coord) 41 - 56: 7(float) Load 55 - 57: 30(ptr) AccessChain 12(locals2) 27 28 - Store 57 56 - 58: 30(ptr) AccessChain 36(localFArray) 37 - Store 58 29 - 59: 52(ptr) AccessChain 49(localIArray) 27 - Store 59 16 - Branch 26 - 26: Label - 60: 52(ptr) AccessChain 49(localIArray) 27 - 61: 6(int) Load 60 - 62: 23(bool) IEqual 61 16 - SelectionMerge 64 None - BranchConditional 62 63 64 - 63: Label - 65: 30(ptr) AccessChain 36(localFArray) 37 - 66: 7(float) Load 65 - 67: 7(float) FAdd 66 29 - Store 65 67 - Branch 64 - 64: Label - Store 68(x) 69 - 71: 6(int) Load 68(x) - 72: 42(ptr) AccessChain 40(coord) 41 - 73: 7(float) Load 72 - 74: 30(ptr) AccessChain 70(localArray) 71 - Store 74 73 - Store 75(i) 16 - Branch 76 - 76: Label - LoopMerge 78 79 None - Branch 80 - 80: Label - 81: 6(int) Load 75(i) - 83: 23(bool) SLessThan 81 82 - BranchConditional 83 77 78 - 77: Label - 85: 6(int) Load 75(i) - 87: 30(ptr) AccessChain 84(a) 85 - Store 87 86 + 39(localFArray): 38(ptr) Variable Function + 52(localIArray): 51(ptr) Variable Function + 71(x): 55(ptr) Variable Function + 73(localArray): 38(ptr) Variable Function + 78(i): 55(ptr) Variable Function + 87(a): 38(ptr) Variable Function + 21: 20(ptr) AccessChain 18(foo3) 19 + 22: 14(s2) Load 21 + Store 12(locals2) 22 + 24: 23(ptr) AccessChain 18(foo3) 19 19 + 25: 6(int) Load 24 + 27: 26(bool) SGreaterThan 25 19 + SelectionMerge 29 None + BranchConditional 27 28 57 + 28: Label + 34: 33(ptr) AccessChain 12(locals2) 30 31 + Store 34 32 + 46: 45(ptr) AccessChain 43(coord) 44 + 47: 7(float) Load 46 + 48: 33(ptr) AccessChain 39(localFArray) 40 + Store 48 47 + 53: 23(ptr) AccessChain 18(foo3) 19 19 + 54: 6(int) Load 53 + 56: 55(ptr) AccessChain 52(localIArray) 30 + Store 56 54 + Branch 29 + 57: Label + 58: 45(ptr) AccessChain 43(coord) 44 + 59: 7(float) Load 58 + 60: 33(ptr) AccessChain 12(locals2) 30 31 + Store 60 59 + 61: 33(ptr) AccessChain 39(localFArray) 40 + Store 61 32 + 62: 55(ptr) AccessChain 52(localIArray) 30 + Store 62 19 + Branch 29 + 29: Label + 63: 55(ptr) AccessChain 52(localIArray) 30 + 64: 6(int) Load 63 + 65: 26(bool) IEqual 64 19 + SelectionMerge 67 None + BranchConditional 65 66 67 + 66: Label + 68: 33(ptr) AccessChain 39(localFArray) 40 + 69: 7(float) Load 68 + 70: 7(float) FAdd 69 32 + Store 68 70 + Branch 67 + 67: Label + Store 71(x) 72 + 74: 6(int) Load 71(x) + 75: 45(ptr) AccessChain 43(coord) 44 + 76: 7(float) Load 75 + 77: 33(ptr) AccessChain 73(localArray) 74 + Store 77 76 + Store 78(i) 19 + Branch 79 + 79: Label + LoopMerge 81 82 None + Branch 83 + 83: Label + 84: 6(int) Load 78(i) + 86: 26(bool) SLessThan 84 85 + BranchConditional 86 80 81 + 80: Label + 88: 6(int) Load 78(i) + 90: 33(ptr) AccessChain 87(a) 88 + Store 90 89 + Branch 82 + 82: Label + 91: 6(int) Load 78(i) + 92: 6(int) IAdd 91 31 + Store 78(i) 92 Branch 79 - 79: Label - 88: 6(int) Load 75(i) - 89: 6(int) IAdd 88 28 - Store 75(i) 89 - Branch 76 - 78: Label - 91: 6(int) Load 90(condition) - 92: 23(bool) IEqual 91 28 - SelectionMerge 94 None - BranchConditional 92 93 94 - 93: Label - 95: 34 Load 70(localArray) - Store 84(a) 95 - Branch 94 - 94: Label - 99: 9(fvec4) Load 98(color) - 101: 100(ptr) AccessChain 12(locals2) 96 - Store 101 99 - 103: 42(ptr) AccessChain 40(coord) 102 - 104: 7(float) Load 103 - 106: 30(ptr) AccessChain 12(locals2) 96 105 - Store 106 104 - 109: 100(ptr) AccessChain 12(locals2) 96 - 110: 9(fvec4) Load 109 - 111: 30(ptr) AccessChain 36(localFArray) 37 - 112: 7(float) Load 111 - 113: 30(ptr) AccessChain 12(locals2) 27 28 - 114: 7(float) Load 113 - 115: 7(float) FAdd 112 114 - 116: 6(int) Load 68(x) - 117: 30(ptr) AccessChain 70(localArray) 116 - 118: 7(float) Load 117 - 119: 7(float) FAdd 115 118 - 120: 6(int) Load 68(x) - 121: 30(ptr) AccessChain 84(a) 120 - 122: 7(float) Load 121 - 123: 7(float) FAdd 119 122 - 124: 9(fvec4) VectorTimesScalar 110 123 - 129: 126 Load 128(samp2D) - 130: 38(fvec2) Load 40(coord) - 131: 9(fvec4) ImageSampleImplicitLod 129 130 - 132: 9(fvec4) FMul 124 131 - Store 108(gl_FragColor) 132 + 81: Label + 94: 6(int) Load 93(condition) + 95: 26(bool) IEqual 94 31 + SelectionMerge 97 None + BranchConditional 95 96 97 + 96: Label + 98: 37 Load 73(localArray) + Store 87(a) 98 + Branch 97 + 97: Label + 102: 9(fvec4) Load 101(color) + 104: 103(ptr) AccessChain 12(locals2) 99 + Store 104 102 + 106: 45(ptr) AccessChain 43(coord) 105 + 107: 7(float) Load 106 + 109: 33(ptr) AccessChain 12(locals2) 99 108 + Store 109 107 + 112: 103(ptr) AccessChain 12(locals2) 99 + 113: 9(fvec4) Load 112 + 114: 33(ptr) AccessChain 39(localFArray) 40 + 115: 7(float) Load 114 + 116: 33(ptr) AccessChain 12(locals2) 30 31 + 117: 7(float) Load 116 + 118: 7(float) FAdd 115 117 + 119: 6(int) Load 71(x) + 120: 33(ptr) AccessChain 73(localArray) 119 + 121: 7(float) Load 120 + 122: 7(float) FAdd 118 121 + 123: 6(int) Load 71(x) + 124: 33(ptr) AccessChain 87(a) 123 + 125: 7(float) Load 124 + 126: 7(float) FAdd 122 125 + 127: 9(fvec4) VectorTimesScalar 113 126 + 132: 129 Load 131(samp2D) + 133: 41(fvec2) Load 43(coord) + 134: 9(fvec4) ImageSampleImplicitLod 132 133 + 135: 9(fvec4) FMul 127 134 + Store 111(gl_FragColor) 135 Return FunctionEnd diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index 994dd96d..952f7941 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -5,70 +5,54 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 743 +// Id's are bound by 725 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 616 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 54 57 71 106 114 118 131 137 157 160 171 308 344 350 366 380 418 450 469 512 544 552 562 588 615 624 629 649 687 698 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" Name 54 "d" - Name 58 "bigColor" - Name 72 "bigColor1_1" - Name 107 "d2" - Name 115 "d3" - Name 119 "bigColor1_2" - Name 132 "bigColor1_3" - Name 138 "d4" - Name 149 "i" - Name 158 "Count" - Name 161 "bigColor2" - Name 172 "bigColor3" - Name 180 "i" - Name 196 "i" - Name 232 "i" - Name 255 "i" - Name 280 "i" - Name 309 "bigColor4" - Name 345 "bigColor5" - Name 351 "d5" - Name 367 "d6" - Name 381 "bigColor6" - Name 419 "d7" - Name 451 "bigColor7" - Name 470 "d8" - Name 513 "d9" - Name 545 "d10" - Name 553 "d11" - Name 563 "d12" - Name 589 "bigColor8" - Name 616 "gl_FragColor" - Name 625 "d14" - Name 630 "d15" - Name 650 "d16" - Name 688 "d18" - Name 699 "d17" - Name 726 "d13" - Name 727 "d19" - Name 728 "d20" - Name 729 "d21" - Name 730 "d22" - Name 731 "d23" - Name 732 "d24" - Name 733 "d25" - Name 734 "d26" - Name 735 "d27" - Name 736 "d28" - Name 737 "d29" - Name 738 "d30" - Name 739 "d31" - Name 740 "d32" - Name 741 "d33" - Name 742 "d34" + Name 57 "bigColor" + Name 71 "bigColor1_1" + Name 106 "d2" + Name 114 "d3" + Name 118 "bigColor1_2" + Name 131 "bigColor1_3" + Name 137 "d4" + Name 148 "i" + Name 157 "Count" + Name 160 "bigColor2" + Name 171 "bigColor3" + Name 179 "i" + Name 195 "i" + Name 231 "i" + Name 254 "i" + Name 279 "i" + Name 308 "bigColor4" + Name 344 "bigColor5" + Name 350 "d5" + Name 366 "d6" + Name 380 "bigColor6" + Name 418 "d7" + Name 450 "bigColor7" + Name 469 "d8" + Name 512 "d9" + Name 544 "d10" + Name 552 "d11" + Name 562 "d12" + Name 588 "bigColor8" + Name 615 "gl_FragColor" + Name 624 "d14" + Name 629 "d15" + Name 649 "d16" + Name 687 "d18" + Name 698 "d17" + Decorate 157(Count) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -85,83 +69,65 @@ Linked fragment stage: 29: 7(fvec4) ConstantComposite 25 25 25 25 35: 6(float) Constant 1059648963 39: 7(fvec4) ConstantComposite 35 35 35 35 - 53: TypePointer UniformConstant 6(float) - 54(d): 53(ptr) Variable UniformConstant - 57: TypePointer UniformConstant 7(fvec4) - 58(bigColor): 57(ptr) Variable UniformConstant - 67: 20(int) Constant 2 - 72(bigColor1_1): 57(ptr) Variable UniformConstant - 76: 20(int) Constant 3 - 94: 6(float) Constant 1109917696 - 97: 6(float) Constant 1065353216 - 107(d2): 53(ptr) Variable UniformConstant - 112: 20(int) Constant 1 - 115(d3): 53(ptr) Variable UniformConstant -119(bigColor1_2): 57(ptr) Variable UniformConstant -132(bigColor1_3): 57(ptr) Variable UniformConstant - 138(d4): 53(ptr) Variable UniformConstant - 147: TypeInt 32 1 - 148: TypePointer Function 147(int) - 150: 147(int) Constant 0 - 157: TypePointer UniformConstant 147(int) - 158(Count): 157(ptr) Variable UniformConstant - 161(bigColor2): 57(ptr) Variable UniformConstant - 166: 147(int) Constant 1 - 172(bigColor3): 57(ptr) Variable UniformConstant - 187: 147(int) Constant 42 - 203: 147(int) Constant 100 - 207: 6(float) Constant 1101004800 - 239: 147(int) Constant 120 - 309(bigColor4): 57(ptr) Variable UniformConstant - 345(bigColor5): 57(ptr) Variable UniformConstant - 351(d5): 53(ptr) Variable UniformConstant - 367(d6): 53(ptr) Variable UniformConstant - 381(bigColor6): 57(ptr) Variable UniformConstant - 419(d7): 53(ptr) Variable UniformConstant - 446: 6(float) Constant 0 - 451(bigColor7): 57(ptr) Variable UniformConstant - 470(d8): 53(ptr) Variable UniformConstant - 487: 6(float) Constant 1073741824 - 513(d9): 53(ptr) Variable UniformConstant - 529: 6(float) Constant 1084227584 - 545(d10): 53(ptr) Variable UniformConstant - 553(d11): 53(ptr) Variable UniformConstant - 563(d12): 53(ptr) Variable UniformConstant - 587: 6(float) Constant 1092616192 - 589(bigColor8): 57(ptr) Variable UniformConstant - 615: TypePointer Output 7(fvec4) -616(gl_FragColor): 615(ptr) Variable Output - 625(d14): 53(ptr) Variable UniformConstant - 630(d15): 53(ptr) Variable UniformConstant - 650(d16): 53(ptr) Variable UniformConstant - 688(d18): 53(ptr) Variable UniformConstant - 699(d17): 53(ptr) Variable UniformConstant - 726(d13): 53(ptr) Variable UniformConstant - 727(d19): 53(ptr) Variable UniformConstant - 728(d20): 53(ptr) Variable UniformConstant - 729(d21): 53(ptr) Variable UniformConstant - 730(d22): 53(ptr) Variable UniformConstant - 731(d23): 53(ptr) Variable UniformConstant - 732(d24): 53(ptr) Variable UniformConstant - 733(d25): 53(ptr) Variable UniformConstant - 734(d26): 53(ptr) Variable UniformConstant - 735(d27): 53(ptr) Variable UniformConstant - 736(d28): 53(ptr) Variable UniformConstant - 737(d29): 53(ptr) Variable UniformConstant - 738(d30): 53(ptr) Variable UniformConstant - 739(d31): 53(ptr) Variable UniformConstant - 740(d32): 53(ptr) Variable UniformConstant - 741(d33): 53(ptr) Variable UniformConstant - 742(d34): 53(ptr) Variable UniformConstant + 53: TypePointer Input 6(float) + 54(d): 53(ptr) Variable Input + 57(bigColor): 10(ptr) Variable Input + 66: 20(int) Constant 2 + 71(bigColor1_1): 10(ptr) Variable Input + 75: 20(int) Constant 3 + 93: 6(float) Constant 1109917696 + 96: 6(float) Constant 1065353216 + 106(d2): 53(ptr) Variable Input + 111: 20(int) Constant 1 + 114(d3): 53(ptr) Variable Input +118(bigColor1_2): 10(ptr) Variable Input +131(bigColor1_3): 10(ptr) Variable Input + 137(d4): 53(ptr) Variable Input + 146: TypeInt 32 1 + 147: TypePointer Function 146(int) + 149: 146(int) Constant 0 + 156: TypePointer Input 146(int) + 157(Count): 156(ptr) Variable Input + 160(bigColor2): 10(ptr) Variable Input + 165: 146(int) Constant 1 + 171(bigColor3): 10(ptr) Variable Input + 186: 146(int) Constant 42 + 202: 146(int) Constant 100 + 206: 6(float) Constant 1101004800 + 238: 146(int) Constant 120 + 308(bigColor4): 10(ptr) Variable Input + 344(bigColor5): 10(ptr) Variable Input + 350(d5): 53(ptr) Variable Input + 366(d6): 53(ptr) Variable Input + 380(bigColor6): 10(ptr) Variable Input + 418(d7): 53(ptr) Variable Input + 445: 6(float) Constant 0 + 450(bigColor7): 10(ptr) Variable Input + 469(d8): 53(ptr) Variable Input + 486: 6(float) Constant 1073741824 + 512(d9): 53(ptr) Variable Input + 528: 6(float) Constant 1084227584 + 544(d10): 53(ptr) Variable Input + 552(d11): 53(ptr) Variable Input + 562(d12): 53(ptr) Variable Input + 586: 6(float) Constant 1092616192 + 588(bigColor8): 10(ptr) Variable Input + 614: TypePointer Output 7(fvec4) +615(gl_FragColor): 614(ptr) Variable Output + 624(d14): 53(ptr) Variable Input + 629(d15): 53(ptr) Variable Input + 649(d16): 53(ptr) Variable Input + 687(d18): 53(ptr) Variable Input + 698(d17): 53(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function - 149(i): 148(ptr) Variable Function - 180(i): 148(ptr) Variable Function - 196(i): 148(ptr) Variable Function - 232(i): 148(ptr) Variable Function - 255(i): 148(ptr) Variable Function - 280(i): 148(ptr) Variable Function + 148(i): 147(ptr) Variable Function + 179(i): 147(ptr) Variable Function + 195(i): 147(ptr) Variable Function + 231(i): 147(ptr) Variable Function + 254(i): 147(ptr) Variable Function + 279(i): 147(ptr) Variable Function 12: 7(fvec4) Load 11(BaseColor) Store 9(color) 12 Branch 13 @@ -211,932 +177,932 @@ Linked fragment stage: 56: 18(bool) FOrdLessThan 52 55 BranchConditional 56 47 48 47: Label - 59: 7(fvec4) Load 58(bigColor) - 60: 7(fvec4) Load 9(color) - 61: 7(fvec4) FAdd 60 59 - Store 9(color) 61 + 58: 7(fvec4) Load 57(bigColor) + 59: 7(fvec4) Load 9(color) + 60: 7(fvec4) FAdd 59 58 + Store 9(color) 60 Branch 49 49: Label Branch 46 48: Label - Branch 62 - 62: Label - LoopMerge 64 65 None - Branch 66 - 66: Label - 68: 22(ptr) AccessChain 9(color) 67 - 69: 6(float) Load 68 - 70: 6(float) Load 54(d) - 71: 18(bool) FOrdLessThan 69 70 - BranchConditional 71 63 64 - 63: Label - 73: 7(fvec4) Load 72(bigColor1_1) - 74: 7(fvec4) Load 9(color) - 75: 7(fvec4) FAdd 74 73 - Store 9(color) 75 - 77: 22(ptr) AccessChain 9(color) 76 - 78: 6(float) Load 77 - 79: 6(float) Load 54(d) - 80: 18(bool) FOrdLessThan 78 79 - SelectionMerge 82 None - BranchConditional 80 81 82 - 81: Label - Branch 65 - 82: Label - 84: 7(fvec4) Load 72(bigColor1_1) - 85: 7(fvec4) Load 9(color) - 86: 7(fvec4) FAdd 85 84 - Store 9(color) 86 - Branch 65 - 65: Label - Branch 62 - 64: Label - Branch 87 - 87: Label - LoopMerge 89 90 None - Branch 91 - 91: Label - 92: 22(ptr) AccessChain 9(color) 21 - 93: 6(float) Load 92 - 95: 18(bool) FOrdLessThan 93 94 - BranchConditional 95 88 89 - 88: Label - 96: 7(fvec4) Load 9(color) - 98: 7(fvec4) CompositeConstruct 97 97 97 97 - 99: 7(fvec4) FAdd 96 98 - Store 9(color) 99 - Branch 90 - 90: Label - Branch 87 - 89: Label - Branch 100 - 100: Label - LoopMerge 102 103 None - Branch 104 - 104: Label - 105: 22(ptr) AccessChain 9(color) 76 - 106: 6(float) Load 105 - 108: 6(float) Load 107(d2) - 109: 18(bool) FOrdLessThan 106 108 - SelectionMerge 111 None - BranchConditional 109 110 111 - 110: Label - 113: 22(ptr) AccessChain 9(color) 112 - 114: 6(float) Load 113 - 116: 6(float) Load 115(d3) - 117: 18(bool) FOrdLessThan 114 116 - Branch 111 - 111: Label - 118: 18(bool) Phi 109 104 117 110 - BranchConditional 118 101 102 - 101: Label - 120: 7(fvec4) Load 119(bigColor1_2) - 121: 7(fvec4) Load 9(color) - 122: 7(fvec4) FAdd 121 120 - Store 9(color) 122 + Branch 61 + 61: Label + LoopMerge 63 64 None + Branch 65 + 65: Label + 67: 22(ptr) AccessChain 9(color) 66 + 68: 6(float) Load 67 + 69: 6(float) Load 54(d) + 70: 18(bool) FOrdLessThan 68 69 + BranchConditional 70 62 63 + 62: Label + 72: 7(fvec4) Load 71(bigColor1_1) + 73: 7(fvec4) Load 9(color) + 74: 7(fvec4) FAdd 73 72 + Store 9(color) 74 + 76: 22(ptr) AccessChain 9(color) 75 + 77: 6(float) Load 76 + 78: 6(float) Load 54(d) + 79: 18(bool) FOrdLessThan 77 78 + SelectionMerge 81 None + BranchConditional 79 80 81 + 80: Label + Branch 64 + 81: Label + 83: 7(fvec4) Load 71(bigColor1_1) + 84: 7(fvec4) Load 9(color) + 85: 7(fvec4) FAdd 84 83 + Store 9(color) 85 + Branch 64 + 64: Label + Branch 61 + 63: Label + Branch 86 + 86: Label + LoopMerge 88 89 None + Branch 90 + 90: Label + 91: 22(ptr) AccessChain 9(color) 21 + 92: 6(float) Load 91 + 94: 18(bool) FOrdLessThan 92 93 + BranchConditional 94 87 88 + 87: Label + 95: 7(fvec4) Load 9(color) + 97: 7(fvec4) CompositeConstruct 96 96 96 96 + 98: 7(fvec4) FAdd 95 97 + Store 9(color) 98 + Branch 89 + 89: Label + Branch 86 + 88: Label + Branch 99 + 99: Label + LoopMerge 101 102 None Branch 103 103: Label - Branch 100 + 104: 22(ptr) AccessChain 9(color) 75 + 105: 6(float) Load 104 + 107: 6(float) Load 106(d2) + 108: 18(bool) FOrdLessThan 105 107 + SelectionMerge 110 None + BranchConditional 108 109 110 + 109: Label + 112: 22(ptr) AccessChain 9(color) 111 + 113: 6(float) Load 112 + 115: 6(float) Load 114(d3) + 116: 18(bool) FOrdLessThan 113 115 + Branch 110 + 110: Label + 117: 18(bool) Phi 108 103 116 109 + BranchConditional 117 100 101 + 100: Label + 119: 7(fvec4) Load 118(bigColor1_2) + 120: 7(fvec4) Load 9(color) + 121: 7(fvec4) FAdd 120 119 + Store 9(color) 121 + Branch 102 102: Label - Branch 123 - 123: Label - LoopMerge 125 126 None - Branch 127 - 127: Label - 128: 22(ptr) AccessChain 9(color) 67 - 129: 6(float) Load 128 - 130: 6(float) Load 115(d3) - 131: 18(bool) FOrdLessThan 129 130 - BranchConditional 131 124 125 - 124: Label - 133: 7(fvec4) Load 132(bigColor1_3) - 134: 7(fvec4) Load 9(color) - 135: 7(fvec4) FAdd 134 133 - Store 9(color) 135 - 136: 22(ptr) AccessChain 9(color) 112 - 137: 6(float) Load 136 - 139: 6(float) Load 138(d4) - 140: 18(bool) FOrdLessThan 137 139 - SelectionMerge 142 None - BranchConditional 140 141 142 - 141: Label - Branch 125 - 142: Label - 144: 7(fvec4) Load 132(bigColor1_3) - 145: 7(fvec4) Load 9(color) - 146: 7(fvec4) FAdd 145 144 - Store 9(color) 146 - Branch 126 - 126: Label - Branch 123 - 125: Label - Store 149(i) 150 - Branch 151 - 151: Label - LoopMerge 153 154 None - Branch 155 - 155: Label - 156: 147(int) Load 149(i) - 159: 147(int) Load 158(Count) - 160: 18(bool) SLessThan 156 159 - BranchConditional 160 152 153 - 152: Label - 162: 7(fvec4) Load 161(bigColor2) - 163: 7(fvec4) Load 9(color) - 164: 7(fvec4) FAdd 163 162 - Store 9(color) 164 - Branch 154 - 154: Label - 165: 147(int) Load 149(i) - 167: 147(int) IAdd 165 166 - Store 149(i) 167 - Branch 151 - 153: Label + Branch 99 + 101: Label + Branch 122 + 122: Label + LoopMerge 124 125 None + Branch 126 + 126: Label + 127: 22(ptr) AccessChain 9(color) 66 + 128: 6(float) Load 127 + 129: 6(float) Load 114(d3) + 130: 18(bool) FOrdLessThan 128 129 + BranchConditional 130 123 124 + 123: Label + 132: 7(fvec4) Load 131(bigColor1_3) + 133: 7(fvec4) Load 9(color) + 134: 7(fvec4) FAdd 133 132 + Store 9(color) 134 + 135: 22(ptr) AccessChain 9(color) 111 + 136: 6(float) Load 135 + 138: 6(float) Load 137(d4) + 139: 18(bool) FOrdLessThan 136 138 + SelectionMerge 141 None + BranchConditional 139 140 141 + 140: Label + Branch 124 + 141: Label + 143: 7(fvec4) Load 131(bigColor1_3) + 144: 7(fvec4) Load 9(color) + 145: 7(fvec4) FAdd 144 143 + Store 9(color) 145 + Branch 125 + 125: Label + Branch 122 + 124: Label + Store 148(i) 149 + Branch 150 + 150: Label + LoopMerge 152 153 None + Branch 154 + 154: Label + 155: 146(int) Load 148(i) + 158: 146(int) Load 157(Count) + 159: 18(bool) SLessThan 155 158 + BranchConditional 159 151 152 + 151: Label + 161: 7(fvec4) Load 160(bigColor2) + 162: 7(fvec4) Load 9(color) + 163: 7(fvec4) FAdd 162 161 + Store 9(color) 163 + Branch 153 + 153: Label + 164: 146(int) Load 148(i) + 166: 146(int) IAdd 164 165 + Store 148(i) 166 + Branch 150 + 152: Label + Branch 167 + 167: Label + LoopMerge 169 170 None Branch 168 168: Label - LoopMerge 170 171 None - Branch 169 - 169: Label - 173: 7(fvec4) Load 172(bigColor3) - 174: 7(fvec4) Load 9(color) - 175: 7(fvec4) FAdd 174 173 - Store 9(color) 175 - Branch 171 - 171: Label - 176: 22(ptr) AccessChain 9(color) 21 - 177: 6(float) Load 176 - 178: 6(float) Load 107(d2) - 179: 18(bool) FOrdLessThan 177 178 - BranchConditional 179 168 170 + 172: 7(fvec4) Load 171(bigColor3) + 173: 7(fvec4) Load 9(color) + 174: 7(fvec4) FAdd 173 172 + Store 9(color) 174 + Branch 170 170: Label - Store 180(i) 150 - Branch 181 - 181: Label - LoopMerge 183 184 None - Branch 185 - 185: Label - 186: 147(int) Load 180(i) - 188: 18(bool) SLessThan 186 187 - BranchConditional 188 182 183 - 182: Label - 189: 6(float) Load 115(d3) - 190: 22(ptr) AccessChain 9(color) 67 - 191: 6(float) Load 190 - 192: 6(float) FAdd 191 189 - 193: 22(ptr) AccessChain 9(color) 67 - Store 193 192 - Branch 184 - 184: Label - 194: 147(int) Load 180(i) - 195: 147(int) IAdd 194 166 - Store 180(i) 195 - Branch 181 - 183: Label - Store 196(i) 150 - Branch 197 - 197: Label - LoopMerge 199 200 None - Branch 201 - 201: Label - 202: 147(int) Load 196(i) - 204: 18(bool) SLessThan 202 203 - BranchConditional 204 198 199 - 198: Label - 205: 22(ptr) AccessChain 9(color) 67 - 206: 6(float) Load 205 - 208: 18(bool) FOrdLessThan 206 207 - SelectionMerge 210 None - BranchConditional 208 209 214 - 209: Label - 211: 22(ptr) AccessChain 9(color) 21 - 212: 6(float) Load 211 - 213: 6(float) FAdd 212 97 - Store 211 213 - Branch 210 - 214: Label - 215: 22(ptr) AccessChain 9(color) 112 - 216: 6(float) Load 215 - 217: 6(float) FAdd 216 97 - Store 215 217 - Branch 210 - 210: Label - 218: 22(ptr) AccessChain 9(color) 76 - 219: 6(float) Load 218 - 220: 18(bool) FOrdLessThan 219 207 - SelectionMerge 222 None - BranchConditional 220 221 222 - 221: Label - 223: 22(ptr) AccessChain 9(color) 67 - 224: 6(float) Load 223 - 225: 22(ptr) AccessChain 9(color) 112 - 226: 6(float) Load 225 - 227: 18(bool) FOrdGreaterThan 224 226 - SelectionMerge 229 None - BranchConditional 227 228 229 - 228: Label - Branch 229 - 229: Label - Branch 222 - 222: Label - Branch 200 - 200: Label - 230: 147(int) Load 196(i) - 231: 147(int) IAdd 230 166 - Store 196(i) 231 - Branch 197 - 199: Label - Store 232(i) 150 - Branch 233 - 233: Label - LoopMerge 235 236 None - Branch 237 - 237: Label - 238: 147(int) Load 232(i) - 240: 18(bool) SLessThan 238 239 - BranchConditional 240 234 235 - 234: Label - 241: 22(ptr) AccessChain 9(color) 67 - 242: 6(float) Load 241 - 243: 18(bool) FOrdLessThan 242 207 - SelectionMerge 245 None - BranchConditional 243 244 249 - 244: Label - 246: 22(ptr) AccessChain 9(color) 21 - 247: 6(float) Load 246 - 248: 6(float) FAdd 247 97 - Store 246 248 - Branch 245 - 249: Label - 250: 22(ptr) AccessChain 9(color) 112 - 251: 6(float) Load 250 - 252: 6(float) FAdd 251 97 - Store 250 252 - Branch 245 - 245: Label - Branch 236 - 236: Label - 253: 147(int) Load 232(i) - 254: 147(int) IAdd 253 166 - Store 232(i) 254 - Branch 233 - 235: Label - Store 255(i) 150 - Branch 256 - 256: Label - LoopMerge 258 259 None - Branch 260 - 260: Label - 261: 147(int) Load 255(i) - 262: 18(bool) SLessThan 261 187 - BranchConditional 262 257 258 - 257: Label - 263: 6(float) Load 115(d3) - 264: 22(ptr) AccessChain 9(color) 67 - 265: 6(float) Load 264 - 266: 6(float) FAdd 265 263 - 267: 22(ptr) AccessChain 9(color) 67 - Store 267 266 - 268: 22(ptr) AccessChain 9(color) 21 - 269: 6(float) Load 268 - 270: 6(float) Load 138(d4) - 271: 18(bool) FOrdLessThan 269 270 - SelectionMerge 273 None - BranchConditional 271 272 273 - 272: Label - Branch 259 - 273: Label - 275: 22(ptr) AccessChain 9(color) 76 - 276: 6(float) Load 275 - 277: 6(float) FAdd 276 97 - Store 275 277 - Branch 259 - 259: Label - 278: 147(int) Load 255(i) - 279: 147(int) IAdd 278 166 - Store 255(i) 279 - Branch 256 - 258: Label - Store 280(i) 150 - Branch 281 - 281: Label - LoopMerge 283 284 None - Branch 285 - 285: Label - 286: 147(int) Load 280(i) - 287: 18(bool) SLessThan 286 187 - BranchConditional 287 282 283 - 282: Label - 288: 6(float) Load 115(d3) - 289: 22(ptr) AccessChain 9(color) 67 - 290: 6(float) Load 289 - 291: 6(float) FAdd 290 288 - 292: 22(ptr) AccessChain 9(color) 67 - Store 292 291 - 293: 22(ptr) AccessChain 9(color) 21 - 294: 6(float) Load 293 - 295: 6(float) Load 138(d4) - 296: 18(bool) FOrdLessThan 294 295 - SelectionMerge 298 None - BranchConditional 296 297 298 - 297: Label - Branch 283 - 298: Label - 300: 22(ptr) AccessChain 9(color) 76 - 301: 6(float) Load 300 - 302: 6(float) FAdd 301 97 - Store 300 302 - Branch 284 - 284: Label - 303: 147(int) Load 280(i) - 304: 147(int) IAdd 303 166 - Store 280(i) 304 - Branch 281 - 283: Label + 175: 22(ptr) AccessChain 9(color) 21 + 176: 6(float) Load 175 + 177: 6(float) Load 106(d2) + 178: 18(bool) FOrdLessThan 176 177 + BranchConditional 178 167 169 + 169: Label + Store 179(i) 149 + Branch 180 + 180: Label + LoopMerge 182 183 None + Branch 184 + 184: Label + 185: 146(int) Load 179(i) + 187: 18(bool) SLessThan 185 186 + BranchConditional 187 181 182 + 181: Label + 188: 6(float) Load 114(d3) + 189: 22(ptr) AccessChain 9(color) 66 + 190: 6(float) Load 189 + 191: 6(float) FAdd 190 188 + 192: 22(ptr) AccessChain 9(color) 66 + Store 192 191 + Branch 183 + 183: Label + 193: 146(int) Load 179(i) + 194: 146(int) IAdd 193 165 + Store 179(i) 194 + Branch 180 + 182: Label + Store 195(i) 149 + Branch 196 + 196: Label + LoopMerge 198 199 None + Branch 200 + 200: Label + 201: 146(int) Load 195(i) + 203: 18(bool) SLessThan 201 202 + BranchConditional 203 197 198 + 197: Label + 204: 22(ptr) AccessChain 9(color) 66 + 205: 6(float) Load 204 + 207: 18(bool) FOrdLessThan 205 206 + SelectionMerge 209 None + BranchConditional 207 208 213 + 208: Label + 210: 22(ptr) AccessChain 9(color) 21 + 211: 6(float) Load 210 + 212: 6(float) FAdd 211 96 + Store 210 212 + Branch 209 + 213: Label + 214: 22(ptr) AccessChain 9(color) 111 + 215: 6(float) Load 214 + 216: 6(float) FAdd 215 96 + Store 214 216 + Branch 209 + 209: Label + 217: 22(ptr) AccessChain 9(color) 75 + 218: 6(float) Load 217 + 219: 18(bool) FOrdLessThan 218 206 + SelectionMerge 221 None + BranchConditional 219 220 221 + 220: Label + 222: 22(ptr) AccessChain 9(color) 66 + 223: 6(float) Load 222 + 224: 22(ptr) AccessChain 9(color) 111 + 225: 6(float) Load 224 + 226: 18(bool) FOrdGreaterThan 223 225 + SelectionMerge 228 None + BranchConditional 226 227 228 + 227: Label + Branch 228 + 228: Label + Branch 221 + 221: Label + Branch 199 + 199: Label + 229: 146(int) Load 195(i) + 230: 146(int) IAdd 229 165 + Store 195(i) 230 + Branch 196 + 198: Label + Store 231(i) 149 + Branch 232 + 232: Label + LoopMerge 234 235 None + Branch 236 + 236: Label + 237: 146(int) Load 231(i) + 239: 18(bool) SLessThan 237 238 + BranchConditional 239 233 234 + 233: Label + 240: 22(ptr) AccessChain 9(color) 66 + 241: 6(float) Load 240 + 242: 18(bool) FOrdLessThan 241 206 + SelectionMerge 244 None + BranchConditional 242 243 248 + 243: Label + 245: 22(ptr) AccessChain 9(color) 21 + 246: 6(float) Load 245 + 247: 6(float) FAdd 246 96 + Store 245 247 + Branch 244 + 248: Label + 249: 22(ptr) AccessChain 9(color) 111 + 250: 6(float) Load 249 + 251: 6(float) FAdd 250 96 + Store 249 251 + Branch 244 + 244: Label + Branch 235 + 235: Label + 252: 146(int) Load 231(i) + 253: 146(int) IAdd 252 165 + Store 231(i) 253 + Branch 232 + 234: Label + Store 254(i) 149 + Branch 255 + 255: Label + LoopMerge 257 258 None + Branch 259 + 259: Label + 260: 146(int) Load 254(i) + 261: 18(bool) SLessThan 260 186 + BranchConditional 261 256 257 + 256: Label + 262: 6(float) Load 114(d3) + 263: 22(ptr) AccessChain 9(color) 66 + 264: 6(float) Load 263 + 265: 6(float) FAdd 264 262 + 266: 22(ptr) AccessChain 9(color) 66 + Store 266 265 + 267: 22(ptr) AccessChain 9(color) 21 + 268: 6(float) Load 267 + 269: 6(float) Load 137(d4) + 270: 18(bool) FOrdLessThan 268 269 + SelectionMerge 272 None + BranchConditional 270 271 272 + 271: Label + Branch 258 + 272: Label + 274: 22(ptr) AccessChain 9(color) 75 + 275: 6(float) Load 274 + 276: 6(float) FAdd 275 96 + Store 274 276 + Branch 258 + 258: Label + 277: 146(int) Load 254(i) + 278: 146(int) IAdd 277 165 + Store 254(i) 278 + Branch 255 + 257: Label + Store 279(i) 149 + Branch 280 + 280: Label + LoopMerge 282 283 None + Branch 284 + 284: Label + 285: 146(int) Load 279(i) + 286: 18(bool) SLessThan 285 186 + BranchConditional 286 281 282 + 281: Label + 287: 6(float) Load 114(d3) + 288: 22(ptr) AccessChain 9(color) 66 + 289: 6(float) Load 288 + 290: 6(float) FAdd 289 287 + 291: 22(ptr) AccessChain 9(color) 66 + Store 291 290 + 292: 22(ptr) AccessChain 9(color) 21 + 293: 6(float) Load 292 + 294: 6(float) Load 137(d4) + 295: 18(bool) FOrdLessThan 293 294 + SelectionMerge 297 None + BranchConditional 295 296 297 + 296: Label + Branch 282 + 297: Label + 299: 22(ptr) AccessChain 9(color) 75 + 300: 6(float) Load 299 + 301: 6(float) FAdd 300 96 + Store 299 301 + Branch 283 + 283: Label + 302: 146(int) Load 279(i) + 303: 146(int) IAdd 302 165 + Store 279(i) 303 + Branch 280 + 282: Label + Branch 304 + 304: Label + LoopMerge 306 307 None Branch 305 305: Label - LoopMerge 307 308 None - Branch 306 - 306: Label - 310: 7(fvec4) Load 309(bigColor4) - 311: 7(fvec4) Load 9(color) - 312: 7(fvec4) FAdd 311 310 - Store 9(color) 312 - 313: 22(ptr) AccessChain 9(color) 21 - 314: 6(float) Load 313 - 315: 6(float) Load 138(d4) - 316: 18(bool) FOrdLessThan 314 315 - SelectionMerge 318 None - BranchConditional 316 317 318 - 317: Label - Branch 308 - 318: Label - 320: 22(ptr) AccessChain 9(color) 112 - 321: 6(float) Load 320 - 322: 6(float) Load 138(d4) - 323: 18(bool) FOrdLessThan 321 322 - SelectionMerge 325 None - BranchConditional 323 324 331 - 324: Label - 326: 6(float) Load 138(d4) - 327: 22(ptr) AccessChain 9(color) 112 - 328: 6(float) Load 327 - 329: 6(float) FAdd 328 326 - 330: 22(ptr) AccessChain 9(color) 112 - Store 330 329 - Branch 325 - 331: Label - 332: 6(float) Load 138(d4) - 333: 22(ptr) AccessChain 9(color) 21 - 334: 6(float) Load 333 - 335: 6(float) FAdd 334 332 - 336: 22(ptr) AccessChain 9(color) 21 - Store 336 335 - Branch 325 - 325: Label - Branch 308 - 308: Label - 337: 22(ptr) AccessChain 9(color) 67 - 338: 6(float) Load 337 - 339: 6(float) Load 138(d4) - 340: 18(bool) FOrdLessThan 338 339 - BranchConditional 340 305 307 + 309: 7(fvec4) Load 308(bigColor4) + 310: 7(fvec4) Load 9(color) + 311: 7(fvec4) FAdd 310 309 + Store 9(color) 311 + 312: 22(ptr) AccessChain 9(color) 21 + 313: 6(float) Load 312 + 314: 6(float) Load 137(d4) + 315: 18(bool) FOrdLessThan 313 314 + SelectionMerge 317 None + BranchConditional 315 316 317 + 316: Label + Branch 307 + 317: Label + 319: 22(ptr) AccessChain 9(color) 111 + 320: 6(float) Load 319 + 321: 6(float) Load 137(d4) + 322: 18(bool) FOrdLessThan 320 321 + SelectionMerge 324 None + BranchConditional 322 323 330 + 323: Label + 325: 6(float) Load 137(d4) + 326: 22(ptr) AccessChain 9(color) 111 + 327: 6(float) Load 326 + 328: 6(float) FAdd 327 325 + 329: 22(ptr) AccessChain 9(color) 111 + Store 329 328 + Branch 324 + 330: Label + 331: 6(float) Load 137(d4) + 332: 22(ptr) AccessChain 9(color) 21 + 333: 6(float) Load 332 + 334: 6(float) FAdd 333 331 + 335: 22(ptr) AccessChain 9(color) 21 + Store 335 334 + Branch 324 + 324: Label + Branch 307 307: Label + 336: 22(ptr) AccessChain 9(color) 66 + 337: 6(float) Load 336 + 338: 6(float) Load 137(d4) + 339: 18(bool) FOrdLessThan 337 338 + BranchConditional 339 304 306 + 306: Label + Branch 340 + 340: Label + LoopMerge 342 343 None Branch 341 341: Label - LoopMerge 343 344 None - Branch 342 - 342: Label - 346: 7(fvec4) Load 345(bigColor5) - 347: 7(fvec4) Load 9(color) - 348: 7(fvec4) FAdd 347 346 - Store 9(color) 348 - 349: 22(ptr) AccessChain 9(color) 112 - 350: 6(float) Load 349 - 352: 6(float) Load 351(d5) - 353: 18(bool) FOrdLessThan 350 352 - SelectionMerge 355 None - BranchConditional 353 354 355 - 354: Label - 356: 6(float) Load 351(d5) - 357: 22(ptr) AccessChain 9(color) 112 - 358: 6(float) Load 357 - 359: 6(float) FAdd 358 356 - 360: 22(ptr) AccessChain 9(color) 112 - Store 360 359 - Branch 355 - 355: Label - Branch 344 - 344: Label - 361: 22(ptr) AccessChain 9(color) 21 - 362: 6(float) Load 361 - 363: 6(float) Load 351(d5) - 364: 18(bool) FOrdLessThan 362 363 - BranchConditional 364 341 343 + 345: 7(fvec4) Load 344(bigColor5) + 346: 7(fvec4) Load 9(color) + 347: 7(fvec4) FAdd 346 345 + Store 9(color) 347 + 348: 22(ptr) AccessChain 9(color) 111 + 349: 6(float) Load 348 + 351: 6(float) Load 350(d5) + 352: 18(bool) FOrdLessThan 349 351 + SelectionMerge 354 None + BranchConditional 352 353 354 + 353: Label + 355: 6(float) Load 350(d5) + 356: 22(ptr) AccessChain 9(color) 111 + 357: 6(float) Load 356 + 358: 6(float) FAdd 357 355 + 359: 22(ptr) AccessChain 9(color) 111 + Store 359 358 + Branch 354 + 354: Label + Branch 343 343: Label - 365: 22(ptr) AccessChain 9(color) 21 - 366: 6(float) Load 365 - 368: 6(float) Load 367(d6) - 369: 18(bool) FOrdLessThan 366 368 - SelectionMerge 371 None - BranchConditional 369 370 385 - 370: Label - Branch 372 - 372: Label - LoopMerge 374 375 None - Branch 376 - 376: Label - 377: 22(ptr) AccessChain 9(color) 112 - 378: 6(float) Load 377 - 379: 6(float) Load 367(d6) - 380: 18(bool) FOrdLessThan 378 379 - BranchConditional 380 373 374 - 373: Label - 382: 7(fvec4) Load 381(bigColor6) - 383: 7(fvec4) Load 9(color) - 384: 7(fvec4) FAdd 383 382 - Store 9(color) 384 - Branch 375 - 375: Label - Branch 372 - 374: Label + 360: 22(ptr) AccessChain 9(color) 21 + 361: 6(float) Load 360 + 362: 6(float) Load 350(d5) + 363: 18(bool) FOrdLessThan 361 362 + BranchConditional 363 340 342 + 342: Label + 364: 22(ptr) AccessChain 9(color) 21 + 365: 6(float) Load 364 + 367: 6(float) Load 366(d6) + 368: 18(bool) FOrdLessThan 365 367 + SelectionMerge 370 None + BranchConditional 368 369 384 + 369: Label Branch 371 + 371: Label + LoopMerge 373 374 None + Branch 375 + 375: Label + 376: 22(ptr) AccessChain 9(color) 111 + 377: 6(float) Load 376 + 378: 6(float) Load 366(d6) + 379: 18(bool) FOrdLessThan 377 378 + BranchConditional 379 372 373 + 372: Label + 381: 7(fvec4) Load 380(bigColor6) + 382: 7(fvec4) Load 9(color) + 383: 7(fvec4) FAdd 382 381 + Store 9(color) 383 + Branch 374 + 374: Label + Branch 371 + 373: Label + Branch 370 + 384: Label + Branch 385 385: Label - Branch 386 - 386: Label - LoopMerge 388 389 None - Branch 390 - 390: Label - 391: 22(ptr) AccessChain 9(color) 67 - 392: 6(float) Load 391 - 393: 6(float) Load 367(d6) - 394: 18(bool) FOrdLessThan 392 393 - BranchConditional 394 387 388 - 387: Label - 395: 53(ptr) AccessChain 381(bigColor6) 67 - 396: 6(float) Load 395 - 397: 22(ptr) AccessChain 9(color) 67 - 398: 6(float) Load 397 - 399: 6(float) FAdd 398 396 - 400: 22(ptr) AccessChain 9(color) 67 - Store 400 399 - Branch 389 - 389: Label - Branch 386 - 388: Label - Branch 371 - 371: Label - 401: 22(ptr) AccessChain 9(color) 21 - 402: 6(float) Load 401 - 403: 6(float) Load 367(d6) - 404: 18(bool) FOrdLessThan 402 403 - SelectionMerge 406 None - BranchConditional 404 405 425 - 405: Label - Branch 407 - 407: Label - LoopMerge 409 410 None - Branch 411 - 411: Label - 412: 22(ptr) AccessChain 9(color) 112 - 413: 6(float) Load 412 - 414: 6(float) Load 367(d6) - 415: 18(bool) FOrdLessThan 413 414 - BranchConditional 415 408 409 - 408: Label - 416: 7(fvec4) Load 381(bigColor6) - 417: 7(fvec4) Load 9(color) - 418: 7(fvec4) FAdd 417 416 - Store 9(color) 418 - 420: 6(float) Load 419(d7) - 421: 18(bool) FOrdLessThan 420 97 - SelectionMerge 423 None - BranchConditional 421 422 423 - 422: Label - Branch 409 - 423: Label - Branch 410 - 410: Label - Branch 407 - 409: Label + LoopMerge 387 388 None + Branch 389 + 389: Label + 390: 22(ptr) AccessChain 9(color) 66 + 391: 6(float) Load 390 + 392: 6(float) Load 366(d6) + 393: 18(bool) FOrdLessThan 391 392 + BranchConditional 393 386 387 + 386: Label + 394: 53(ptr) AccessChain 380(bigColor6) 66 + 395: 6(float) Load 394 + 396: 22(ptr) AccessChain 9(color) 66 + 397: 6(float) Load 396 + 398: 6(float) FAdd 397 395 + 399: 22(ptr) AccessChain 9(color) 66 + Store 399 398 + Branch 388 + 388: Label + Branch 385 + 387: Label + Branch 370 + 370: Label + 400: 22(ptr) AccessChain 9(color) 21 + 401: 6(float) Load 400 + 402: 6(float) Load 366(d6) + 403: 18(bool) FOrdLessThan 401 402 + SelectionMerge 405 None + BranchConditional 403 404 424 + 404: Label Branch 406 + 406: Label + LoopMerge 408 409 None + Branch 410 + 410: Label + 411: 22(ptr) AccessChain 9(color) 111 + 412: 6(float) Load 411 + 413: 6(float) Load 366(d6) + 414: 18(bool) FOrdLessThan 412 413 + BranchConditional 414 407 408 + 407: Label + 415: 7(fvec4) Load 380(bigColor6) + 416: 7(fvec4) Load 9(color) + 417: 7(fvec4) FAdd 416 415 + Store 9(color) 417 + 419: 6(float) Load 418(d7) + 420: 18(bool) FOrdLessThan 419 96 + SelectionMerge 422 None + BranchConditional 420 421 422 + 421: Label + Branch 408 + 422: Label + Branch 409 + 409: Label + Branch 406 + 408: Label + Branch 405 + 424: Label + Branch 425 425: Label - Branch 426 - 426: Label - LoopMerge 428 429 None - Branch 430 - 430: Label - 431: 22(ptr) AccessChain 9(color) 67 - 432: 6(float) Load 431 - 433: 6(float) Load 367(d6) - 434: 18(bool) FOrdLessThan 432 433 - BranchConditional 434 427 428 - 427: Label - 435: 53(ptr) AccessChain 381(bigColor6) 67 - 436: 6(float) Load 435 - 437: 22(ptr) AccessChain 9(color) 67 - 438: 6(float) Load 437 - 439: 6(float) FAdd 438 436 - 440: 22(ptr) AccessChain 9(color) 67 - Store 440 439 - Branch 429 - 429: Label - Branch 426 - 428: Label - Branch 406 - 406: Label + LoopMerge 427 428 None + Branch 429 + 429: Label + 430: 22(ptr) AccessChain 9(color) 66 + 431: 6(float) Load 430 + 432: 6(float) Load 366(d6) + 433: 18(bool) FOrdLessThan 431 432 + BranchConditional 433 426 427 + 426: Label + 434: 53(ptr) AccessChain 380(bigColor6) 66 + 435: 6(float) Load 434 + 436: 22(ptr) AccessChain 9(color) 66 + 437: 6(float) Load 436 + 438: 6(float) FAdd 437 435 + 439: 22(ptr) AccessChain 9(color) 66 + Store 439 438 + Branch 428 + 428: Label + Branch 425 + 427: Label + Branch 405 + 405: Label + Branch 440 + 440: Label + LoopMerge 442 443 None Branch 441 441: Label - LoopMerge 443 444 None - Branch 442 - 442: Label - 445: 6(float) Load 419(d7) - 447: 18(bool) FOrdLessThan 445 446 - SelectionMerge 449 None - BranchConditional 447 448 449 - 448: Label - Branch 443 - 449: Label - 452: 7(fvec4) Load 451(bigColor7) - 453: 7(fvec4) Load 9(color) - 454: 7(fvec4) FAdd 453 452 - Store 9(color) 454 - 455: 6(float) Load 419(d7) - 456: 18(bool) FOrdLessThan 455 97 - SelectionMerge 458 None - BranchConditional 456 457 458 - 457: Label - 459: 22(ptr) AccessChain 9(color) 67 - 460: 6(float) Load 459 - 461: 6(float) FAdd 460 97 - Store 459 461 - Branch 443 - 458: Label - 463: 7(fvec4) Load 11(BaseColor) - 464: 7(fvec4) Load 9(color) - 465: 7(fvec4) FAdd 464 463 - Store 9(color) 465 - Branch 444 - 444: Label - BranchConditional 19 441 443 + 444: 6(float) Load 418(d7) + 446: 18(bool) FOrdLessThan 444 445 + SelectionMerge 448 None + BranchConditional 446 447 448 + 447: Label + Branch 442 + 448: Label + 451: 7(fvec4) Load 450(bigColor7) + 452: 7(fvec4) Load 9(color) + 453: 7(fvec4) FAdd 452 451 + Store 9(color) 453 + 454: 6(float) Load 418(d7) + 455: 18(bool) FOrdLessThan 454 96 + SelectionMerge 457 None + BranchConditional 455 456 457 + 456: Label + 458: 22(ptr) AccessChain 9(color) 66 + 459: 6(float) Load 458 + 460: 6(float) FAdd 459 96 + Store 458 460 + Branch 442 + 457: Label + 462: 7(fvec4) Load 11(BaseColor) + 463: 7(fvec4) Load 9(color) + 464: 7(fvec4) FAdd 463 462 + Store 9(color) 464 + Branch 443 443: Label + BranchConditional 19 440 442 + 442: Label + Branch 465 + 465: Label + LoopMerge 467 468 None Branch 466 466: Label - LoopMerge 468 469 None - Branch 467 - 467: Label - 471: 6(float) Load 470(d8) - 472: 18(bool) FOrdLessThan 471 446 - SelectionMerge 474 None - BranchConditional 472 473 474 - 473: Label - Branch 468 - 474: Label - 476: 7(fvec4) Load 451(bigColor7) - 477: 7(fvec4) Load 9(color) - 478: 7(fvec4) FAdd 477 476 - Store 9(color) 478 - 479: 6(float) Load 470(d8) - 480: 18(bool) FOrdLessThan 479 97 - SelectionMerge 482 None - BranchConditional 480 481 482 - 481: Label - 483: 22(ptr) AccessChain 9(color) 67 - 484: 6(float) Load 483 - 485: 6(float) FAdd 484 97 - Store 483 485 - 486: 6(float) Load 470(d8) - 488: 18(bool) FOrdLessThan 486 487 - SelectionMerge 490 None - BranchConditional 488 489 494 - 489: Label - 491: 22(ptr) AccessChain 9(color) 112 - 492: 6(float) Load 491 - 493: 6(float) FAdd 492 97 - Store 491 493 - Branch 490 - 494: Label - 495: 22(ptr) AccessChain 9(color) 21 - 496: 6(float) Load 495 - 497: 6(float) FAdd 496 97 - Store 495 497 - Branch 490 - 490: Label - Branch 468 - 482: Label - 499: 7(fvec4) Load 11(BaseColor) - 500: 7(fvec4) Load 9(color) - 501: 7(fvec4) FAdd 500 499 - Store 9(color) 501 - Branch 469 - 469: Label - 502: 22(ptr) AccessChain 9(color) 67 - 503: 6(float) Load 502 - 504: 6(float) Load 470(d8) - 505: 18(bool) FOrdLessThan 503 504 - BranchConditional 505 466 468 + 470: 6(float) Load 469(d8) + 471: 18(bool) FOrdLessThan 470 445 + SelectionMerge 473 None + BranchConditional 471 472 473 + 472: Label + Branch 467 + 473: Label + 475: 7(fvec4) Load 450(bigColor7) + 476: 7(fvec4) Load 9(color) + 477: 7(fvec4) FAdd 476 475 + Store 9(color) 477 + 478: 6(float) Load 469(d8) + 479: 18(bool) FOrdLessThan 478 96 + SelectionMerge 481 None + BranchConditional 479 480 481 + 480: Label + 482: 22(ptr) AccessChain 9(color) 66 + 483: 6(float) Load 482 + 484: 6(float) FAdd 483 96 + Store 482 484 + 485: 6(float) Load 469(d8) + 487: 18(bool) FOrdLessThan 485 486 + SelectionMerge 489 None + BranchConditional 487 488 493 + 488: Label + 490: 22(ptr) AccessChain 9(color) 111 + 491: 6(float) Load 490 + 492: 6(float) FAdd 491 96 + Store 490 492 + Branch 489 + 493: Label + 494: 22(ptr) AccessChain 9(color) 21 + 495: 6(float) Load 494 + 496: 6(float) FAdd 495 96 + Store 494 496 + Branch 489 + 489: Label + Branch 467 + 481: Label + 498: 7(fvec4) Load 11(BaseColor) + 499: 7(fvec4) Load 9(color) + 500: 7(fvec4) FAdd 499 498 + Store 9(color) 500 + Branch 468 468: Label - Branch 506 - 506: Label - LoopMerge 508 509 None - Branch 510 - 510: Label - 511: 22(ptr) AccessChain 9(color) 76 - 512: 6(float) Load 511 - 514: 6(float) Load 513(d9) - 515: 18(bool) FOrdLessThan 512 514 - BranchConditional 515 507 508 - 507: Label - 516: 6(float) Load 513(d9) - 517: 6(float) Load 470(d8) - 518: 18(bool) FOrdGreaterThan 516 517 - SelectionMerge 520 None - BranchConditional 518 519 520 - 519: Label - 521: 22(ptr) AccessChain 9(color) 21 - 522: 6(float) Load 521 - 523: 6(float) Load 419(d7) - 524: 18(bool) FOrdLessThanEqual 522 523 - SelectionMerge 526 None - BranchConditional 524 525 526 - 525: Label - 527: 22(ptr) AccessChain 9(color) 67 - 528: 6(float) Load 527 - 530: 18(bool) FOrdEqual 528 529 - SelectionMerge 532 None - BranchConditional 530 531 536 - 531: Label - 533: 22(ptr) AccessChain 9(color) 76 - 534: 6(float) Load 533 - 535: 6(float) FAdd 534 97 - Store 533 535 - Branch 532 - 536: Label - Branch 508 - 532: Label - Branch 526 - 526: Label - Branch 520 - 520: Label - Branch 509 - 509: Label - Branch 506 - 508: Label - Branch 538 - 538: Label - LoopMerge 540 541 None - Branch 542 - 542: Label - 543: 22(ptr) AccessChain 9(color) 67 - 544: 6(float) Load 543 - 546: 6(float) Load 545(d10) - 547: 18(bool) FOrdLessThan 544 546 - BranchConditional 547 539 540 - 539: Label - 548: 22(ptr) AccessChain 9(color) 112 - 549: 6(float) Load 548 - 550: 6(float) FAdd 549 97 - Store 548 550 - 551: 22(ptr) AccessChain 9(color) 112 - 552: 6(float) Load 551 - 554: 6(float) Load 553(d11) - 555: 18(bool) FOrdLessThan 552 554 - SelectionMerge 557 None - BranchConditional 555 556 557 - 556: Label - 558: 22(ptr) AccessChain 9(color) 67 - 559: 6(float) Load 558 - 560: 6(float) FAdd 559 97 - Store 558 560 - 561: 22(ptr) AccessChain 9(color) 76 - 562: 6(float) Load 561 - 564: 6(float) Load 563(d12) - 565: 18(bool) FOrdLessThan 562 564 - SelectionMerge 567 None - BranchConditional 565 566 571 - 566: Label - 568: 22(ptr) AccessChain 9(color) 76 - 569: 6(float) Load 568 - 570: 6(float) FAdd 569 97 - Store 568 570 - Branch 567 - 571: Label - 572: 22(ptr) AccessChain 9(color) 21 - 573: 6(float) Load 572 - 574: 6(float) FAdd 573 97 - Store 572 574 - Branch 567 - 567: Label - Branch 541 - 557: Label - 576: 7(fvec4) Load 9(color) - 577: 7(fvec4) CompositeConstruct 97 97 97 97 - 578: 7(fvec4) FAdd 576 577 - Store 9(color) 578 - Branch 540 - 541: Label - Branch 538 - 540: Label - Branch 580 - 580: Label - LoopMerge 582 583 None - Branch 584 - 584: Label - 585: 22(ptr) AccessChain 9(color) 21 - 586: 6(float) Load 585 - 588: 18(bool) FOrdLessThan 586 587 - BranchConditional 588 581 582 - 581: Label - 590: 7(fvec4) Load 589(bigColor8) - 591: 7(fvec4) Load 9(color) - 592: 7(fvec4) FAdd 591 590 - Store 9(color) 592 - 593: 22(ptr) AccessChain 9(color) 67 - 594: 6(float) Load 593 - 595: 6(float) Load 470(d8) - 596: 18(bool) FOrdLessThan 594 595 - SelectionMerge 598 None - BranchConditional 596 597 598 - 597: Label - 599: 22(ptr) AccessChain 9(color) 76 - 600: 6(float) Load 599 - 601: 6(float) Load 367(d6) - 602: 18(bool) FOrdLessThan 600 601 - SelectionMerge 604 None - BranchConditional 602 603 604 - 603: Label - Branch 583 - 604: Label - Branch 598 - 598: Label - 606: 53(ptr) AccessChain 589(bigColor8) 21 - 607: 6(float) Load 606 - 608: 22(ptr) AccessChain 9(color) 112 - 609: 6(float) Load 608 - 610: 6(float) FAdd 609 607 - 611: 22(ptr) AccessChain 9(color) 112 - Store 611 610 - Branch 583 - 583: Label - Branch 580 - 582: Label - 612: 7(fvec4) Load 9(color) - 613: 7(fvec4) CompositeConstruct 97 97 97 97 - 614: 7(fvec4) FAdd 612 613 - Store 9(color) 614 - 617: 7(fvec4) Load 9(color) - Store 616(gl_FragColor) 617 - Branch 618 - 618: Label - LoopMerge 620 621 None - Branch 622 - 622: Label - 623: 22(ptr) AccessChain 9(color) 21 - 624: 6(float) Load 623 - 626: 6(float) Load 625(d14) - 627: 18(bool) FOrdLessThan 624 626 - BranchConditional 627 619 620 - 619: Label - 628: 22(ptr) AccessChain 9(color) 112 - 629: 6(float) Load 628 - 631: 6(float) Load 630(d15) - 632: 18(bool) FOrdLessThan 629 631 - SelectionMerge 634 None - BranchConditional 632 633 636 - 633: Label + 501: 22(ptr) AccessChain 9(color) 66 + 502: 6(float) Load 501 + 503: 6(float) Load 469(d8) + 504: 18(bool) FOrdLessThan 502 503 + BranchConditional 504 465 467 + 467: Label + Branch 505 + 505: Label + LoopMerge 507 508 None + Branch 509 + 509: Label + 510: 22(ptr) AccessChain 9(color) 75 + 511: 6(float) Load 510 + 513: 6(float) Load 512(d9) + 514: 18(bool) FOrdLessThan 511 513 + BranchConditional 514 506 507 + 506: Label + 515: 6(float) Load 512(d9) + 516: 6(float) Load 469(d8) + 517: 18(bool) FOrdGreaterThan 515 516 + SelectionMerge 519 None + BranchConditional 517 518 519 + 518: Label + 520: 22(ptr) AccessChain 9(color) 21 + 521: 6(float) Load 520 + 522: 6(float) Load 418(d7) + 523: 18(bool) FOrdLessThanEqual 521 522 + SelectionMerge 525 None + BranchConditional 523 524 525 + 524: Label + 526: 22(ptr) AccessChain 9(color) 66 + 527: 6(float) Load 526 + 529: 18(bool) FOrdEqual 527 528 + SelectionMerge 531 None + BranchConditional 529 530 535 + 530: Label + 532: 22(ptr) AccessChain 9(color) 75 + 533: 6(float) Load 532 + 534: 6(float) FAdd 533 96 + Store 532 534 + Branch 531 + 535: Label + Branch 507 + 531: Label + Branch 525 + 525: Label + Branch 519 + 519: Label + Branch 508 + 508: Label + Branch 505 + 507: Label + Branch 537 + 537: Label + LoopMerge 539 540 None + Branch 541 + 541: Label + 542: 22(ptr) AccessChain 9(color) 66 + 543: 6(float) Load 542 + 545: 6(float) Load 544(d10) + 546: 18(bool) FOrdLessThan 543 545 + BranchConditional 546 538 539 + 538: Label + 547: 22(ptr) AccessChain 9(color) 111 + 548: 6(float) Load 547 + 549: 6(float) FAdd 548 96 + Store 547 549 + 550: 22(ptr) AccessChain 9(color) 111 + 551: 6(float) Load 550 + 553: 6(float) Load 552(d11) + 554: 18(bool) FOrdLessThan 551 553 + SelectionMerge 556 None + BranchConditional 554 555 556 + 555: Label + 557: 22(ptr) AccessChain 9(color) 66 + 558: 6(float) Load 557 + 559: 6(float) FAdd 558 96 + Store 557 559 + 560: 22(ptr) AccessChain 9(color) 75 + 561: 6(float) Load 560 + 563: 6(float) Load 562(d12) + 564: 18(bool) FOrdLessThan 561 563 + SelectionMerge 566 None + BranchConditional 564 565 570 + 565: Label + 567: 22(ptr) AccessChain 9(color) 75 + 568: 6(float) Load 567 + 569: 6(float) FAdd 568 96 + Store 567 569 + Branch 566 + 570: Label + 571: 22(ptr) AccessChain 9(color) 21 + 572: 6(float) Load 571 + 573: 6(float) FAdd 572 96 + Store 571 573 + Branch 566 + 566: Label + Branch 540 + 556: Label + 575: 7(fvec4) Load 9(color) + 576: 7(fvec4) CompositeConstruct 96 96 96 96 + 577: 7(fvec4) FAdd 575 576 + Store 9(color) 577 + Branch 539 + 540: Label + Branch 537 + 539: Label + Branch 579 + 579: Label + LoopMerge 581 582 None + Branch 583 + 583: Label + 584: 22(ptr) AccessChain 9(color) 21 + 585: 6(float) Load 584 + 587: 18(bool) FOrdLessThan 585 586 + BranchConditional 587 580 581 + 580: Label + 589: 7(fvec4) Load 588(bigColor8) + 590: 7(fvec4) Load 9(color) + 591: 7(fvec4) FAdd 590 589 + Store 9(color) 591 + 592: 22(ptr) AccessChain 9(color) 66 + 593: 6(float) Load 592 + 594: 6(float) Load 469(d8) + 595: 18(bool) FOrdLessThan 593 594 + SelectionMerge 597 None + BranchConditional 595 596 597 + 596: Label + 598: 22(ptr) AccessChain 9(color) 75 + 599: 6(float) Load 598 + 600: 6(float) Load 366(d6) + 601: 18(bool) FOrdLessThan 599 600 + SelectionMerge 603 None + BranchConditional 601 602 603 + 602: Label + Branch 582 + 603: Label + Branch 597 + 597: Label + 605: 53(ptr) AccessChain 588(bigColor8) 21 + 606: 6(float) Load 605 + 607: 22(ptr) AccessChain 9(color) 111 + 608: 6(float) Load 607 + 609: 6(float) FAdd 608 606 + 610: 22(ptr) AccessChain 9(color) 111 + Store 610 609 + Branch 582 + 582: Label + Branch 579 + 581: Label + 611: 7(fvec4) Load 9(color) + 612: 7(fvec4) CompositeConstruct 96 96 96 96 + 613: 7(fvec4) FAdd 611 612 + Store 9(color) 613 + 616: 7(fvec4) Load 9(color) + Store 615(gl_FragColor) 616 + Branch 617 + 617: Label + LoopMerge 619 620 None + Branch 621 + 621: Label + 622: 22(ptr) AccessChain 9(color) 21 + 623: 6(float) Load 622 + 625: 6(float) Load 624(d14) + 626: 18(bool) FOrdLessThan 623 625 + BranchConditional 626 618 619 + 618: Label + 627: 22(ptr) AccessChain 9(color) 111 + 628: 6(float) Load 627 + 630: 6(float) Load 629(d15) + 631: 18(bool) FOrdLessThan 628 630 + SelectionMerge 633 None + BranchConditional 631 632 635 + 632: Label Return - 636: Label - 637: 7(fvec4) Load 9(color) - 638: 7(fvec4) CompositeConstruct 97 97 97 97 - 639: 7(fvec4) FAdd 637 638 - Store 9(color) 639 - Branch 634 - 634: Label - Branch 621 - 621: Label - Branch 618 - 620: Label - 640: 7(fvec4) Load 9(color) - 641: 7(fvec4) CompositeConstruct 97 97 97 97 - 642: 7(fvec4) FAdd 640 641 - Store 9(color) 642 - Branch 643 - 643: Label - LoopMerge 645 646 None - Branch 647 - 647: Label - 648: 22(ptr) AccessChain 9(color) 76 - 649: 6(float) Load 648 - 651: 6(float) Load 650(d16) - 652: 18(bool) FOrdLessThan 649 651 - BranchConditional 652 644 645 - 644: Label - 653: 22(ptr) AccessChain 9(color) 76 - 654: 6(float) Load 653 - 655: 6(float) FAdd 654 97 - Store 653 655 - Branch 646 - 646: Label - Branch 643 - 645: Label - Branch 656 - 656: Label - LoopMerge 658 659 None - Branch 660 - 660: Label - 661: 22(ptr) AccessChain 9(color) 76 - 662: 6(float) Load 661 - 663: 6(float) Load 107(d2) - 664: 18(bool) FOrdLessThan 662 663 - SelectionMerge 666 None - BranchConditional 664 665 666 - 665: Label - 667: 22(ptr) AccessChain 9(color) 112 - 668: 6(float) Load 667 - 669: 6(float) Load 115(d3) - 670: 18(bool) FOrdLessThan 668 669 - Branch 666 - 666: Label - 671: 18(bool) Phi 664 660 670 665 - BranchConditional 671 657 658 - 657: Label - 672: 7(fvec4) Load 119(bigColor1_2) - 673: 7(fvec4) Load 9(color) - 674: 7(fvec4) FAdd 673 672 - Store 9(color) 674 - 675: 22(ptr) AccessChain 9(color) 67 - 676: 6(float) Load 675 - 677: 6(float) Load 115(d3) - 678: 18(bool) FOrdLessThan 676 677 - SelectionMerge 680 None - BranchConditional 678 679 680 - 679: Label - Return - 680: Label + 635: Label + 636: 7(fvec4) Load 9(color) + 637: 7(fvec4) CompositeConstruct 96 96 96 96 + 638: 7(fvec4) FAdd 636 637 + Store 9(color) 638 + Branch 633 + 633: Label + Branch 620 + 620: Label + Branch 617 + 619: Label + 639: 7(fvec4) Load 9(color) + 640: 7(fvec4) CompositeConstruct 96 96 96 96 + 641: 7(fvec4) FAdd 639 640 + Store 9(color) 641 + Branch 642 + 642: Label + LoopMerge 644 645 None + Branch 646 + 646: Label + 647: 22(ptr) AccessChain 9(color) 75 + 648: 6(float) Load 647 + 650: 6(float) Load 649(d16) + 651: 18(bool) FOrdLessThan 648 650 + BranchConditional 651 643 644 + 643: Label + 652: 22(ptr) AccessChain 9(color) 75 + 653: 6(float) Load 652 + 654: 6(float) FAdd 653 96 + Store 652 654 + Branch 645 + 645: Label + Branch 642 + 644: Label + Branch 655 + 655: Label + LoopMerge 657 658 None Branch 659 659: Label - Branch 656 + 660: 22(ptr) AccessChain 9(color) 75 + 661: 6(float) Load 660 + 662: 6(float) Load 106(d2) + 663: 18(bool) FOrdLessThan 661 662 + SelectionMerge 665 None + BranchConditional 663 664 665 + 664: Label + 666: 22(ptr) AccessChain 9(color) 111 + 667: 6(float) Load 666 + 668: 6(float) Load 114(d3) + 669: 18(bool) FOrdLessThan 667 668 + Branch 665 + 665: Label + 670: 18(bool) Phi 663 659 669 664 + BranchConditional 670 656 657 + 656: Label + 671: 7(fvec4) Load 118(bigColor1_2) + 672: 7(fvec4) Load 9(color) + 673: 7(fvec4) FAdd 672 671 + Store 9(color) 673 + 674: 22(ptr) AccessChain 9(color) 66 + 675: 6(float) Load 674 + 676: 6(float) Load 114(d3) + 677: 18(bool) FOrdLessThan 675 676 + SelectionMerge 679 None + BranchConditional 677 678 679 + 678: Label + Return + 679: Label + Branch 658 658: Label + Branch 655 + 657: Label + Branch 681 + 681: Label + LoopMerge 683 684 None Branch 682 682: Label - LoopMerge 684 685 None - Branch 683 - 683: Label - 686: 22(ptr) AccessChain 9(color) 112 - 687: 6(float) Load 686 - 689: 6(float) Load 688(d18) - 690: 18(bool) FOrdLessThan 687 689 - SelectionMerge 692 None - BranchConditional 690 691 692 - 691: Label + 685: 22(ptr) AccessChain 9(color) 111 + 686: 6(float) Load 685 + 688: 6(float) Load 687(d18) + 689: 18(bool) FOrdLessThan 686 688 + SelectionMerge 691 None + BranchConditional 689 690 691 + 690: Label Return - 692: Label - 694: 7(fvec4) Load 9(color) - 695: 7(fvec4) CompositeConstruct 97 97 97 97 - 696: 7(fvec4) FAdd 694 695 - Store 9(color) 696 - Branch 685 - 685: Label - 697: 22(ptr) AccessChain 9(color) 21 - 698: 6(float) Load 697 - 700: 6(float) Load 699(d17) - 701: 18(bool) FOrdLessThan 698 700 - BranchConditional 701 682 684 + 691: Label + 693: 7(fvec4) Load 9(color) + 694: 7(fvec4) CompositeConstruct 96 96 96 96 + 695: 7(fvec4) FAdd 693 694 + Store 9(color) 695 + Branch 684 684: Label - Branch 702 - 702: Label - LoopMerge 704 705 None - Branch 706 - 706: Label - 707: 22(ptr) AccessChain 9(color) 112 - 708: 6(float) Load 707 - 709: 6(float) Load 650(d16) - 710: 18(bool) FOrdLessThan 708 709 - BranchConditional 710 703 704 - 703: Label - 711: 22(ptr) AccessChain 9(color) 76 - 712: 6(float) Load 711 - 713: 6(float) Load 650(d16) - 714: 18(bool) FOrdLessThan 712 713 - SelectionMerge 716 None - BranchConditional 714 715 718 - 715: Label + 696: 22(ptr) AccessChain 9(color) 21 + 697: 6(float) Load 696 + 699: 6(float) Load 698(d17) + 700: 18(bool) FOrdLessThan 697 699 + BranchConditional 700 681 683 + 683: Label + Branch 701 + 701: Label + LoopMerge 703 704 None + Branch 705 + 705: Label + 706: 22(ptr) AccessChain 9(color) 111 + 707: 6(float) Load 706 + 708: 6(float) Load 649(d16) + 709: 18(bool) FOrdLessThan 707 708 + BranchConditional 709 702 703 + 702: Label + 710: 22(ptr) AccessChain 9(color) 75 + 711: 6(float) Load 710 + 712: 6(float) Load 649(d16) + 713: 18(bool) FOrdLessThan 711 712 + SelectionMerge 715 None + BranchConditional 713 714 717 + 714: Label Kill - 718: Label - 719: 7(fvec4) Load 9(color) - 720: 7(fvec4) CompositeConstruct 97 97 97 97 - 721: 7(fvec4) FAdd 719 720 - Store 9(color) 721 - Branch 716 - 716: Label - Branch 705 - 705: Label - Branch 702 - 704: Label - 722: 7(fvec4) Load 9(color) - 723: 7(fvec4) CompositeConstruct 97 97 97 97 - 724: 7(fvec4) FAdd 722 723 - Store 9(color) 724 - 725: 7(fvec4) Load 9(color) - Store 616(gl_FragColor) 725 + 717: Label + 718: 7(fvec4) Load 9(color) + 719: 7(fvec4) CompositeConstruct 96 96 96 96 + 720: 7(fvec4) FAdd 718 719 + Store 9(color) 720 + Branch 715 + 715: Label + Branch 704 + 704: Label + Branch 701 + 703: Label + 721: 7(fvec4) Load 9(color) + 722: 7(fvec4) CompositeConstruct 96 96 96 96 + 723: 7(fvec4) FAdd 721 722 + Store 9(color) 723 + 724: 7(fvec4) Load 9(color) + Store 615(gl_FragColor) 724 Return FunctionEnd diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index 7fd04d44..5f10bd35 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -5,64 +5,36 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 188 +// Id's are bound by 158 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 141 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 17 27 80 140 142 143 144 145 146 147 148 149 150 151 152 153 154 157 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" - Name 18 "bigColor4" - Name 28 "d4" - Name 81 "d13" - Name 141 "gl_FragColor" - Name 143 "bigColor" - Name 144 "bigColor1_1" - Name 145 "bigColor1_2" - Name 146 "bigColor1_3" - Name 147 "bigColor2" - Name 148 "bigColor3" - Name 149 "bigColor5" - Name 150 "bigColor6" - Name 151 "bigColor7" - Name 152 "bigColor8" - Name 153 "d" - Name 154 "d2" - Name 155 "d3" - Name 156 "d5" - Name 157 "d6" - Name 158 "d7" - Name 159 "d8" - Name 160 "d9" - Name 161 "d10" - Name 162 "d11" - Name 163 "d12" - Name 164 "d14" - Name 165 "d15" - Name 166 "d16" - Name 167 "d17" - Name 168 "d18" - Name 169 "d19" - Name 170 "d20" - Name 171 "d21" - Name 172 "d22" - Name 173 "d23" - Name 174 "d24" - Name 175 "d25" - Name 176 "d26" - Name 177 "d27" - Name 178 "d28" - Name 179 "d29" - Name 180 "d30" - Name 181 "d31" - Name 182 "d32" - Name 183 "d33" - Name 184 "d34" - Name 187 "Count" + Name 17 "bigColor4" + Name 27 "d4" + Name 80 "d13" + Name 140 "gl_FragColor" + Name 142 "bigColor" + Name 143 "bigColor1_1" + Name 144 "bigColor1_2" + Name 145 "bigColor1_3" + Name 146 "bigColor2" + Name 147 "bigColor3" + Name 148 "bigColor5" + Name 149 "bigColor6" + Name 150 "bigColor7" + Name 151 "bigColor8" + Name 152 "d" + Name 153 "d2" + Name 154 "d3" + Name 157 "Count" + Decorate 157(Count) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -70,67 +42,37 @@ Linked fragment stage: 8: TypePointer Function 7(fvec4) 10: TypePointer Input 7(fvec4) 11(BaseColor): 10(ptr) Variable Input - 17: TypePointer UniformConstant 7(fvec4) - 18(bigColor4): 17(ptr) Variable UniformConstant - 22: TypeInt 32 0 - 23: 22(int) Constant 0 - 24: TypePointer Function 6(float) - 27: TypePointer UniformConstant 6(float) - 28(d4): 27(ptr) Variable UniformConstant - 30: TypeBool - 34: 6(float) Constant 1073741824 - 35: 22(int) Constant 2 - 48: 6(float) Constant 1065353216 - 51: 22(int) Constant 1 - 78: 22(int) Constant 3 - 81(d13): 27(ptr) Variable UniformConstant - 140: TypePointer Output 7(fvec4) -141(gl_FragColor): 140(ptr) Variable Output - 143(bigColor): 17(ptr) Variable UniformConstant -144(bigColor1_1): 17(ptr) Variable UniformConstant -145(bigColor1_2): 17(ptr) Variable UniformConstant -146(bigColor1_3): 17(ptr) Variable UniformConstant - 147(bigColor2): 17(ptr) Variable UniformConstant - 148(bigColor3): 17(ptr) Variable UniformConstant - 149(bigColor5): 17(ptr) Variable UniformConstant - 150(bigColor6): 17(ptr) Variable UniformConstant - 151(bigColor7): 17(ptr) Variable UniformConstant - 152(bigColor8): 17(ptr) Variable UniformConstant - 153(d): 27(ptr) Variable UniformConstant - 154(d2): 27(ptr) Variable UniformConstant - 155(d3): 27(ptr) Variable UniformConstant - 156(d5): 27(ptr) Variable UniformConstant - 157(d6): 27(ptr) Variable UniformConstant - 158(d7): 27(ptr) Variable UniformConstant - 159(d8): 27(ptr) Variable UniformConstant - 160(d9): 27(ptr) Variable UniformConstant - 161(d10): 27(ptr) Variable UniformConstant - 162(d11): 27(ptr) Variable UniformConstant - 163(d12): 27(ptr) Variable UniformConstant - 164(d14): 27(ptr) Variable UniformConstant - 165(d15): 27(ptr) Variable UniformConstant - 166(d16): 27(ptr) Variable UniformConstant - 167(d17): 27(ptr) Variable UniformConstant - 168(d18): 27(ptr) Variable UniformConstant - 169(d19): 27(ptr) Variable UniformConstant - 170(d20): 27(ptr) Variable UniformConstant - 171(d21): 27(ptr) Variable UniformConstant - 172(d22): 27(ptr) Variable UniformConstant - 173(d23): 27(ptr) Variable UniformConstant - 174(d24): 27(ptr) Variable UniformConstant - 175(d25): 27(ptr) Variable UniformConstant - 176(d26): 27(ptr) Variable UniformConstant - 177(d27): 27(ptr) Variable UniformConstant - 178(d28): 27(ptr) Variable UniformConstant - 179(d29): 27(ptr) Variable UniformConstant - 180(d30): 27(ptr) Variable UniformConstant - 181(d31): 27(ptr) Variable UniformConstant - 182(d32): 27(ptr) Variable UniformConstant - 183(d33): 27(ptr) Variable UniformConstant - 184(d34): 27(ptr) Variable UniformConstant - 185: TypeInt 32 1 - 186: TypePointer UniformConstant 185(int) - 187(Count): 186(ptr) Variable UniformConstant + 17(bigColor4): 10(ptr) Variable Input + 21: TypeInt 32 0 + 22: 21(int) Constant 0 + 23: TypePointer Function 6(float) + 26: TypePointer Input 6(float) + 27(d4): 26(ptr) Variable Input + 29: TypeBool + 33: 6(float) Constant 1073741824 + 34: 21(int) Constant 2 + 47: 6(float) Constant 1065353216 + 50: 21(int) Constant 1 + 77: 21(int) Constant 3 + 80(d13): 26(ptr) Variable Input + 139: TypePointer Output 7(fvec4) +140(gl_FragColor): 139(ptr) Variable Output + 142(bigColor): 10(ptr) Variable Input +143(bigColor1_1): 10(ptr) Variable Input +144(bigColor1_2): 10(ptr) Variable Input +145(bigColor1_3): 10(ptr) Variable Input + 146(bigColor2): 10(ptr) Variable Input + 147(bigColor3): 10(ptr) Variable Input + 148(bigColor5): 10(ptr) Variable Input + 149(bigColor6): 10(ptr) Variable Input + 150(bigColor7): 10(ptr) Variable Input + 151(bigColor8): 10(ptr) Variable Input + 152(d): 26(ptr) Variable Input + 153(d2): 26(ptr) Variable Input + 154(d3): 26(ptr) Variable Input + 155: TypeInt 32 1 + 156: TypePointer Input 155(int) + 157(Count): 156(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -141,161 +83,161 @@ Linked fragment stage: LoopMerge 15 16 None Branch 14 14: Label - 19: 7(fvec4) Load 18(bigColor4) - 20: 7(fvec4) Load 9(color) - 21: 7(fvec4) FAdd 20 19 - Store 9(color) 21 - 25: 24(ptr) AccessChain 9(color) 23 - 26: 6(float) Load 25 - 29: 6(float) Load 28(d4) - 31: 30(bool) FOrdLessThan 26 29 - SelectionMerge 33 None - BranchConditional 31 32 33 - 32: Label - 36: 24(ptr) AccessChain 9(color) 35 - 37: 6(float) Load 36 - 38: 6(float) FAdd 37 34 - 39: 24(ptr) AccessChain 9(color) 35 - Store 39 38 - 40: 24(ptr) AccessChain 9(color) 35 - 41: 6(float) Load 40 - 42: 6(float) Load 28(d4) - 43: 30(bool) FOrdLessThan 41 42 - SelectionMerge 45 None - BranchConditional 43 44 45 - 44: Label - 46: 24(ptr) AccessChain 9(color) 23 - 47: 6(float) Load 46 - 49: 6(float) FAdd 47 48 - Store 46 49 + 18: 7(fvec4) Load 17(bigColor4) + 19: 7(fvec4) Load 9(color) + 20: 7(fvec4) FAdd 19 18 + Store 9(color) 20 + 24: 23(ptr) AccessChain 9(color) 22 + 25: 6(float) Load 24 + 28: 6(float) Load 27(d4) + 30: 29(bool) FOrdLessThan 25 28 + SelectionMerge 32 None + BranchConditional 30 31 32 + 31: Label + 35: 23(ptr) AccessChain 9(color) 34 + 36: 6(float) Load 35 + 37: 6(float) FAdd 36 33 + 38: 23(ptr) AccessChain 9(color) 34 + Store 38 37 + 39: 23(ptr) AccessChain 9(color) 34 + 40: 6(float) Load 39 + 41: 6(float) Load 27(d4) + 42: 29(bool) FOrdLessThan 40 41 + SelectionMerge 44 None + BranchConditional 42 43 44 + 43: Label + 45: 23(ptr) AccessChain 9(color) 22 + 46: 6(float) Load 45 + 48: 6(float) FAdd 46 47 + Store 45 48 Branch 16 - 45: Label - Branch 33 - 33: Label - 52: 24(ptr) AccessChain 9(color) 51 - 53: 6(float) Load 52 - 54: 6(float) Load 28(d4) - 55: 30(bool) FOrdLessThan 53 54 - SelectionMerge 57 None - BranchConditional 55 56 63 - 56: Label - 58: 6(float) Load 28(d4) - 59: 24(ptr) AccessChain 9(color) 51 - 60: 6(float) Load 59 - 61: 6(float) FAdd 60 58 - 62: 24(ptr) AccessChain 9(color) 51 - Store 62 61 - Branch 57 - 63: Label - 64: 6(float) Load 28(d4) - 65: 24(ptr) AccessChain 9(color) 23 - 66: 6(float) Load 65 - 67: 6(float) FAdd 66 64 - 68: 24(ptr) AccessChain 9(color) 23 - Store 68 67 - Branch 57 - 57: Label + 44: Label + Branch 32 + 32: Label + 51: 23(ptr) AccessChain 9(color) 50 + 52: 6(float) Load 51 + 53: 6(float) Load 27(d4) + 54: 29(bool) FOrdLessThan 52 53 + SelectionMerge 56 None + BranchConditional 54 55 62 + 55: Label + 57: 6(float) Load 27(d4) + 58: 23(ptr) AccessChain 9(color) 50 + 59: 6(float) Load 58 + 60: 6(float) FAdd 59 57 + 61: 23(ptr) AccessChain 9(color) 50 + Store 61 60 + Branch 56 + 62: Label + 63: 6(float) Load 27(d4) + 64: 23(ptr) AccessChain 9(color) 22 + 65: 6(float) Load 64 + 66: 6(float) FAdd 65 63 + 67: 23(ptr) AccessChain 9(color) 22 + Store 67 66 + Branch 56 + 56: Label Branch 16 16: Label - 69: 24(ptr) AccessChain 9(color) 35 - 70: 6(float) Load 69 - 71: 6(float) Load 28(d4) - 72: 30(bool) FOrdLessThan 70 71 - BranchConditional 72 13 15 + 68: 23(ptr) AccessChain 9(color) 34 + 69: 6(float) Load 68 + 70: 6(float) Load 27(d4) + 71: 29(bool) FOrdLessThan 69 70 + BranchConditional 71 13 15 15: Label - Branch 73 - 73: Label - LoopMerge 75 76 None - Branch 77 - 77: Label - 79: 24(ptr) AccessChain 9(color) 78 - 80: 6(float) Load 79 - 82: 6(float) Load 81(d13) - 83: 30(bool) FOrdLessThan 80 82 - BranchConditional 83 74 75 - 74: Label - 84: 24(ptr) AccessChain 9(color) 35 - 85: 6(float) Load 84 - 86: 6(float) Load 81(d13) - 87: 30(bool) FOrdLessThan 85 86 - SelectionMerge 89 None - BranchConditional 87 88 93 - 88: Label - 90: 7(fvec4) Load 9(color) - 91: 7(fvec4) CompositeConstruct 48 48 48 48 - 92: 7(fvec4) FAdd 90 91 - Store 9(color) 92 - Branch 89 - 93: Label - 94: 7(fvec4) Load 9(color) - 95: 7(fvec4) CompositeConstruct 48 48 48 48 - 96: 7(fvec4) FSub 94 95 - Store 9(color) 96 - Branch 89 - 89: Label - 97: 7(fvec4) Load 18(bigColor4) - 98: 7(fvec4) Load 9(color) - 99: 7(fvec4) FAdd 98 97 - Store 9(color) 99 - 100: 24(ptr) AccessChain 9(color) 23 - 101: 6(float) Load 100 - 102: 6(float) Load 28(d4) - 103: 30(bool) FOrdLessThan 101 102 - SelectionMerge 105 None - BranchConditional 103 104 105 - 104: Label - 106: 24(ptr) AccessChain 9(color) 35 - 107: 6(float) Load 106 - 108: 6(float) FAdd 107 34 - 109: 24(ptr) AccessChain 9(color) 35 - Store 109 108 - 110: 24(ptr) AccessChain 9(color) 35 - 111: 6(float) Load 110 - 112: 6(float) Load 28(d4) - 113: 30(bool) FOrdLessThan 111 112 - SelectionMerge 115 None - BranchConditional 113 114 115 - 114: Label - 116: 24(ptr) AccessChain 9(color) 23 - 117: 6(float) Load 116 - 118: 6(float) FAdd 117 48 - Store 116 118 - Branch 76 - 115: Label - Branch 105 - 105: Label - 120: 24(ptr) AccessChain 9(color) 51 - 121: 6(float) Load 120 - 122: 6(float) Load 28(d4) - 123: 30(bool) FOrdLessThan 121 122 - SelectionMerge 125 None - BranchConditional 123 124 131 - 124: Label - 126: 6(float) Load 28(d4) - 127: 24(ptr) AccessChain 9(color) 51 - 128: 6(float) Load 127 - 129: 6(float) FAdd 128 126 - 130: 24(ptr) AccessChain 9(color) 51 - Store 130 129 - Branch 125 - 131: Label - 132: 6(float) Load 28(d4) - 133: 24(ptr) AccessChain 9(color) 23 - 134: 6(float) Load 133 - 135: 6(float) FAdd 134 132 - 136: 24(ptr) AccessChain 9(color) 23 - Store 136 135 - Branch 125 - 125: Label - Branch 76 - 76: Label - Branch 73 - 75: Label - 137: 7(fvec4) Load 9(color) - 138: 7(fvec4) CompositeConstruct 48 48 48 48 - 139: 7(fvec4) FAdd 137 138 - Store 9(color) 139 - 142: 7(fvec4) Load 9(color) - Store 141(gl_FragColor) 142 + Branch 72 + 72: Label + LoopMerge 74 75 None + Branch 76 + 76: Label + 78: 23(ptr) AccessChain 9(color) 77 + 79: 6(float) Load 78 + 81: 6(float) Load 80(d13) + 82: 29(bool) FOrdLessThan 79 81 + BranchConditional 82 73 74 + 73: Label + 83: 23(ptr) AccessChain 9(color) 34 + 84: 6(float) Load 83 + 85: 6(float) Load 80(d13) + 86: 29(bool) FOrdLessThan 84 85 + SelectionMerge 88 None + BranchConditional 86 87 92 + 87: Label + 89: 7(fvec4) Load 9(color) + 90: 7(fvec4) CompositeConstruct 47 47 47 47 + 91: 7(fvec4) FAdd 89 90 + Store 9(color) 91 + Branch 88 + 92: Label + 93: 7(fvec4) Load 9(color) + 94: 7(fvec4) CompositeConstruct 47 47 47 47 + 95: 7(fvec4) FSub 93 94 + Store 9(color) 95 + Branch 88 + 88: Label + 96: 7(fvec4) Load 17(bigColor4) + 97: 7(fvec4) Load 9(color) + 98: 7(fvec4) FAdd 97 96 + Store 9(color) 98 + 99: 23(ptr) AccessChain 9(color) 22 + 100: 6(float) Load 99 + 101: 6(float) Load 27(d4) + 102: 29(bool) FOrdLessThan 100 101 + SelectionMerge 104 None + BranchConditional 102 103 104 + 103: Label + 105: 23(ptr) AccessChain 9(color) 34 + 106: 6(float) Load 105 + 107: 6(float) FAdd 106 33 + 108: 23(ptr) AccessChain 9(color) 34 + Store 108 107 + 109: 23(ptr) AccessChain 9(color) 34 + 110: 6(float) Load 109 + 111: 6(float) Load 27(d4) + 112: 29(bool) FOrdLessThan 110 111 + SelectionMerge 114 None + BranchConditional 112 113 114 + 113: Label + 115: 23(ptr) AccessChain 9(color) 22 + 116: 6(float) Load 115 + 117: 6(float) FAdd 116 47 + Store 115 117 + Branch 75 + 114: Label + Branch 104 + 104: Label + 119: 23(ptr) AccessChain 9(color) 50 + 120: 6(float) Load 119 + 121: 6(float) Load 27(d4) + 122: 29(bool) FOrdLessThan 120 121 + SelectionMerge 124 None + BranchConditional 122 123 130 + 123: Label + 125: 6(float) Load 27(d4) + 126: 23(ptr) AccessChain 9(color) 50 + 127: 6(float) Load 126 + 128: 6(float) FAdd 127 125 + 129: 23(ptr) AccessChain 9(color) 50 + Store 129 128 + Branch 124 + 130: Label + 131: 6(float) Load 27(d4) + 132: 23(ptr) AccessChain 9(color) 22 + 133: 6(float) Load 132 + 134: 6(float) FAdd 133 131 + 135: 23(ptr) AccessChain 9(color) 22 + Store 135 134 + Branch 124 + 124: Label + Branch 75 + 75: Label + Branch 72 + 74: Label + 136: 7(fvec4) Load 9(color) + 137: 7(fvec4) CompositeConstruct 47 47 47 47 + 138: 7(fvec4) FAdd 136 137 + Store 9(color) 138 + 141: 7(fvec4) Load 9(color) + Store 140(gl_FragColor) 141 Return FunctionEnd diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out index 1c239d03..ab487763 100755 --- a/Test/baseResults/spv.matFun.vert.out +++ b/Test/baseResults/spv.matFun.vert.out @@ -1,17 +1,20 @@ spv.matFun.vert +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 97 +// Id's are bound by 103 Capability Shader + Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 72 76 95 96 - Source GLSL 140 + EntryPoint Vertex 4 "main" 76 81 + Source GLSL 400 Name 4 "main" Name 14 "xf(mf33;vf3;" Name 12 "m" @@ -22,19 +25,32 @@ Linked vertex stage: Name 24 "m4" Name 25 "v" Name 65 "param" - Name 72 "gl_Position" - Name 74 "m4" - Name 76 "v3" - Name 77 "param" - Name 79 "param" - Name 83 "m3" - Name 84 "param" + Name 74 "gl_PerVertex" + MemberName 74(gl_PerVertex) 0 "gl_Position" + MemberName 74(gl_PerVertex) 1 "gl_PointSize" + MemberName 74(gl_PerVertex) 2 "gl_ClipDistance" + Name 76 "" + Name 77 "bl" + MemberName 77(bl) 0 "m4" + MemberName 77(bl) 1 "m3" + Name 79 "bName" + Name 81 "v3" + Name 82 "param" Name 86 "param" - Name 95 "gl_VertexID" - Name 96 "gl_InstanceID" - Decorate 72(gl_Position) BuiltIn Position - Decorate 95(gl_VertexID) BuiltIn VertexId - Decorate 96(gl_InstanceID) BuiltIn InstanceId + Name 89 "param" + Name 93 "param" + MemberDecorate 74(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 74(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 74(gl_PerVertex) 2 BuiltIn ClipDistance + Decorate 74(gl_PerVertex) Block + MemberDecorate 77(bl) 0 ColMajor + MemberDecorate 77(bl) 0 Offset 0 + MemberDecorate 77(bl) 0 MatrixStride 16 + MemberDecorate 77(bl) 1 ColMajor + MemberDecorate 77(bl) 1 Offset 64 + MemberDecorate 77(bl) 1 MatrixStride 16 + Decorate 77(bl) Block + Decorate 79(bName) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -55,39 +71,45 @@ Linked vertex stage: 43: 33(int) Constant 2 47: 6(float) Constant 1065353216 48: 6(float) Constant 0 - 71: TypePointer Output 16(fvec4) - 72(gl_Position): 71(ptr) Variable Output - 73: TypePointer UniformConstant 17 - 74(m4): 73(ptr) Variable UniformConstant - 75: TypePointer Input 7(fvec3) - 76(v3): 75(ptr) Variable Input - 82: TypePointer UniformConstant 8 - 83(m3): 82(ptr) Variable UniformConstant - 94: TypePointer Input 33(int) - 95(gl_VertexID): 94(ptr) Variable Input -96(gl_InstanceID): 94(ptr) Variable Input + 71: TypeInt 32 0 + 72: 71(int) Constant 1 + 73: TypeArray 6(float) 72 +74(gl_PerVertex): TypeStruct 16(fvec4) 6(float) 73 + 75: TypePointer Output 74(gl_PerVertex) + 76: 75(ptr) Variable Output + 77(bl): TypeStruct 17 8 + 78: TypePointer Uniform 77(bl) + 79(bName): 78(ptr) Variable Uniform + 80: TypePointer Input 7(fvec3) + 81(v3): 80(ptr) Variable Input + 83: TypePointer Uniform 17 + 90: TypePointer Uniform 8 + 101: TypePointer Output 16(fvec4) 4(main): 2 Function None 3 5: Label - 77(param): 18(ptr) Variable Function - 79(param): 10(ptr) Variable Function - 84(param): 9(ptr) Variable Function + 82(param): 18(ptr) Variable Function 86(param): 10(ptr) Variable Function - 78: 17 Load 74(m4) - Store 77(param) 78 - 80: 7(fvec3) Load 76(v3) - Store 79(param) 80 - 81: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 77(param) 79(param) - 85: 8 Load 83(m3) - Store 84(param) 85 - 87: 7(fvec3) Load 76(v3) + 89(param): 9(ptr) Variable Function + 93(param): 10(ptr) Variable Function + 84: 83(ptr) AccessChain 79(bName) 34 + 85: 17 Load 84 + Store 82(param) 85 + 87: 7(fvec3) Load 81(v3) Store 86(param) 87 - 88: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 84(param) 86(param) - 89: 7(fvec3) FAdd 81 88 - 90: 6(float) CompositeExtract 89 0 - 91: 6(float) CompositeExtract 89 1 - 92: 6(float) CompositeExtract 89 2 - 93: 16(fvec4) CompositeConstruct 90 91 92 47 - Store 72(gl_Position) 93 + 88: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 82(param) 86(param) + 91: 90(ptr) AccessChain 79(bName) 39 + 92: 8 Load 91 + Store 89(param) 92 + 94: 7(fvec3) Load 81(v3) + Store 93(param) 94 + 95: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 89(param) 93(param) + 96: 7(fvec3) FAdd 88 95 + 97: 6(float) CompositeExtract 96 0 + 98: 6(float) CompositeExtract 96 1 + 99: 6(float) CompositeExtract 96 2 + 100: 16(fvec4) CompositeConstruct 97 98 99 47 + 102: 101(ptr) AccessChain 76 34 + Store 102 100 Return FunctionEnd 14(xf(mf33;vf3;): 7(fvec3) Function None 11 diff --git a/Test/baseResults/spv.matrix.frag.out b/Test/baseResults/spv.matrix.frag.out index 62a1636c..8f0d6463 100644 --- a/Test/baseResults/spv.matrix.frag.out +++ b/Test/baseResults/spv.matrix.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 14 28 140 148 166 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 10 "sum34" diff --git a/Test/baseResults/spv.matrix2.frag.out b/Test/baseResults/spv.matrix2.frag.out index b1cd71b9..e0497b09 100644 --- a/Test/baseResults/spv.matrix2.frag.out +++ b/Test/baseResults/spv.matrix2.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 16 37 38 65 87 147 158 181 218 219 220 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 150 Name 4 "main" Name 10 "m34" diff --git a/Test/baseResults/spv.merge-unreachable.frag.out b/Test/baseResults/spv.merge-unreachable.frag.out index 65429768..6e326187 100644 --- a/Test/baseResults/spv.merge-unreachable.frag.out +++ b/Test/baseResults/spv.merge-unreachable.frag.out @@ -13,7 +13,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 9 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 9 "v" diff --git a/Test/baseResults/spv.newTexture.frag.out b/Test/baseResults/spv.newTexture.frag.out index 6ef94708..1c99ac01 100755 --- a/Test/baseResults/spv.newTexture.frag.out +++ b/Test/baseResults/spv.newTexture.frag.out @@ -16,7 +16,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 17 26 29 55 81 84 91 247 277 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 430 Name 4 "main" Name 9 "v" @@ -49,9 +49,27 @@ Linked fragment stage: Name 271 "usCube" Name 275 "us2DArray" Name 277 "ic4D" + Decorate 13(s2D) DescriptorSet 0 + Decorate 23(sCubeArrayShadow) DescriptorSet 0 + Decorate 42(s3D) DescriptorSet 0 + Decorate 51(s2DArray) DescriptorSet 0 + Decorate 64(s2DShadow) DescriptorSet 0 Decorate 81(ic3D) Flat Decorate 84(ic1D) Flat Decorate 91(ic2D) Flat + Decorate 100(sr) DescriptorSet 0 + Decorate 125(sCube) DescriptorSet 0 + Decorate 136(s2DArrayShadow) DescriptorSet 0 + Decorate 168(is2D) DescriptorSet 0 + Decorate 203(is3D) DescriptorSet 0 + Decorate 215(isCube) DescriptorSet 0 + Decorate 227(is2DArray) DescriptorSet 0 + Decorate 241(sCubeShadow) DescriptorSet 0 + Decorate 259(is2Dms) DescriptorSet 0 + Decorate 263(us2D) DescriptorSet 0 + Decorate 267(us3D) DescriptorSet 0 + Decorate 271(usCube) DescriptorSet 0 + Decorate 275(us2DArray) DescriptorSet 0 Decorate 277(ic4D) Flat 2: TypeVoid 3: TypeFunction 2 diff --git a/Test/baseResults/spv.nonSquare.vert.out b/Test/baseResults/spv.nonSquare.vert.out index abc7d362..329a71cb 100755 --- a/Test/baseResults/spv.nonSquare.vert.out +++ b/Test/baseResults/spv.nonSquare.vert.out @@ -1,19 +1,16 @@ spv.nonSquare.vert -WARNING: 0:3: attribute deprecated in version 130; may be removed in future release -WARNING: 0:4: attribute deprecated in version 130; may be removed in future release - Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 94 +// Id's are bound by 90 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 12 28 55 92 93 + EntryPoint Vertex 4 "main" 12 22 28 55 Source GLSL 140 Name 4 "main" Name 9 "a" @@ -23,11 +20,7 @@ Linked vertex stage: Name 22 "m32" Name 28 "gl_Position" Name 55 "v4" - Name 92 "gl_VertexID" - Name 93 "gl_InstanceID" Decorate 28(gl_Position) BuiltIn Position - Decorate 92(gl_VertexID) BuiltIn VertexId - Decorate 93(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -39,8 +32,8 @@ Linked vertex stage: 14: TypeMatrix 10(fvec3) 2 15: TypePointer Function 14 20: TypeMatrix 7(fvec2) 3 - 21: TypePointer UniformConstant 20 - 22(m32): 21(ptr) Variable UniformConstant + 21: TypePointer Output 20 + 22(m32): 21(ptr) Variable Output 26: TypeVector 6(float) 4 27: TypePointer Output 26(fvec4) 28(gl_Position): 27(ptr) Variable Output @@ -90,10 +83,6 @@ Linked vertex stage: 87: 6(float) Constant 1090519040 88: 7(fvec2) ConstantComposite 86 87 89: 79 ConstantComposite 82 84 85 88 - 90: TypeInt 32 1 - 91: TypePointer Input 90(int) - 92(gl_VertexID): 91(ptr) Variable Input -93(gl_InstanceID): 91(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(a): 8(ptr) Variable Function diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out index f454b857..33e4fb20 100755 --- a/Test/baseResults/spv.precision.frag.out +++ b/Test/baseResults/spv.precision.frag.out @@ -13,7 +13,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 23 59 61 73 116 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source ESSL 310 Name 4 "main" Name 12 "foo(vf3;" @@ -106,10 +106,10 @@ Linked fragment stage: 31: 15(bvec2) ConstantComposite 29 30 36: TypeInt 32 1 37: TypePointer Function 36(int) - 39: TypePointer UniformConstant 36(int) -40(uniform_medium): 39(ptr) Variable UniformConstant -42(uniform_high): 39(ptr) Variable UniformConstant - 48(uniform_low): 39(ptr) Variable UniformConstant + 39: TypePointer Private 36(int) +40(uniform_medium): 39(ptr) Variable Private +42(uniform_high): 39(ptr) Variable Private + 48(uniform_low): 39(ptr) Variable Private 52: TypePointer Function 6(float) 54: 6(float) Constant 1078774989 56: 6(float) Constant 1232730691 @@ -125,8 +125,8 @@ Linked fragment stage: 84: TypeVector 36(int) 2 92: TypeInt 32 0 93: 92(int) Constant 0 - 103: TypePointer UniformConstant 15(bvec2) - 104(ub2): 103(ptr) Variable UniformConstant + 103: TypePointer Private 15(bvec2) + 104(ub2): 103(ptr) Variable Private 111: 6(float) Constant 1065353216 114(S): TypeStruct 6(float) 6(float) 115: TypePointer Input 114(S) diff --git a/Test/baseResults/spv.prepost.frag.out b/Test/baseResults/spv.prepost.frag.out index ee77a099..9581267b 100755 --- a/Test/baseResults/spv.prepost.frag.out +++ b/Test/baseResults/spv.prepost.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 90 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "index" diff --git a/Test/baseResults/spv.pushConstant.vert.out b/Test/baseResults/spv.pushConstant.vert.out new file mode 100644 index 00000000..aff99ae9 --- /dev/null +++ b/Test/baseResults/spv.pushConstant.vert.out @@ -0,0 +1,68 @@ +spv.pushConstant.vert +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 35 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 24 + Source GLSL 400 + Name 4 "main" + Name 11 "Material" + MemberName 11(Material) 0 "kind" + MemberName 11(Material) 1 "fa" + Name 13 "matInst" + Name 24 "color" + Decorate 10 ArrayStride 4 + MemberDecorate 11(Material) 0 Offset 0 + MemberDecorate 11(Material) 1 Offset 4 + Decorate 11(Material) Block + Decorate 13(matInst) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypeFloat 32 + 8: TypeInt 32 0 + 9: 8(int) Constant 3 + 10: TypeArray 7(float) 9 + 11(Material): TypeStruct 6(int) 10 + 12: TypePointer PushConstant 11(Material) + 13(matInst): 12(ptr) Variable PushConstant + 14: 6(int) Constant 0 + 15: TypePointer PushConstant 6(int) + 22: TypeVector 7(float) 4 + 23: TypePointer Output 22(fvec4) + 24(color): 23(ptr) Variable Output + 25: 7(float) Constant 1045220557 + 26: 22(fvec4) ConstantComposite 25 25 25 25 + 28: 7(float) Constant 1056964608 + 29: 22(fvec4) ConstantComposite 28 28 28 28 + 31: 7(float) Constant 0 + 32: 22(fvec4) ConstantComposite 31 31 31 31 + 4(main): 2 Function None 3 + 5: Label + 16: 15(ptr) AccessChain 13(matInst) 14 + 17: 6(int) Load 16 + SelectionMerge 21 None + Switch 17 20 + case 1: 18 + case 2: 19 + 20: Label + Store 24(color) 32 + Branch 21 + 18: Label + Store 24(color) 26 + Branch 21 + 19: Label + Store 24(color) 29 + Branch 21 + 21: Label + Return + FunctionEnd diff --git a/Test/baseResults/spv.qualifiers.vert.out b/Test/baseResults/spv.qualifiers.vert.out index b8f60855..bedd6912 100755 --- a/Test/baseResults/spv.qualifiers.vert.out +++ b/Test/baseResults/spv.qualifiers.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 25 +// Id's are bound by 21 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 11 13 15 17 19 23 24 + EntryPoint Vertex 4 "main" 9 11 13 15 17 19 Source GLSL 430 Name 4 "main" Name 9 "outVc" @@ -21,13 +21,9 @@ Linked vertex stage: Name 15 "outVf" Name 17 "outVn" Name 19 "outVcn" - Name 23 "gl_VertexID" - Name 24 "gl_InstanceID" Decorate 15(outVf) Flat Decorate 17(outVn) NoPerspective Decorate 19(outVcn) NoPerspective - Decorate 23(gl_VertexID) BuiltIn VertexId - Decorate 24(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -40,10 +36,6 @@ Linked vertex stage: 15(outVf): 8(ptr) Variable Output 17(outVn): 8(ptr) Variable Output 19(outVcn): 8(ptr) Variable Output - 21: TypeInt 32 1 - 22: TypePointer Input 21(int) - 23(gl_VertexID): 22(ptr) Variable Input -24(gl_InstanceID): 22(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12: 7(fvec4) Load 11(inV) diff --git a/Test/baseResults/spv.queryL.frag.out b/Test/baseResults/spv.queryL.frag.out index b347ce89..6d2b2b97 100755 --- a/Test/baseResults/spv.queryL.frag.out +++ b/Test/baseResults/spv.queryL.frag.out @@ -18,7 +18,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 430 Name 4 "main" Name 9 "lod" @@ -46,6 +46,26 @@ Linked fragment stage: Name 195 "usampCubeA" Name 232 "sampBuf" Name 236 "sampRect" + Decorate 13(samp1D) DescriptorSet 0 + Decorate 24(isamp2D) DescriptorSet 0 + Decorate 36(usamp3D) DescriptorSet 0 + Decorate 49(sampCube) DescriptorSet 0 + Decorate 59(isamp1DA) DescriptorSet 0 + Decorate 69(usamp2DA) DescriptorSet 0 + Decorate 79(isampCubeA) DescriptorSet 0 + Decorate 89(samp1Ds) DescriptorSet 0 + Decorate 99(samp2Ds) DescriptorSet 0 + Decorate 109(sampCubes) DescriptorSet 0 + Decorate 119(samp1DAs) DescriptorSet 0 + Decorate 129(samp2DAs) DescriptorSet 0 + Decorate 139(sampCubeAs) DescriptorSet 0 + Decorate 154(usamp2D) DescriptorSet 0 + Decorate 163(isamp3D) DescriptorSet 0 + Decorate 172(isampCube) DescriptorSet 0 + Decorate 186(samp2DA) DescriptorSet 0 + Decorate 195(usampCubeA) DescriptorSet 0 + Decorate 232(sampBuf) DescriptorSet 0 + Decorate 236(sampRect) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.separate.frag.out b/Test/baseResults/spv.separate.frag.out new file mode 100644 index 00000000..2a71a019 --- /dev/null +++ b/Test/baseResults/spv.separate.frag.out @@ -0,0 +1,427 @@ +spv.separate.frag +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 319 + + Capability Shader + Capability SampledRect + Capability Sampled1D + Capability SampledCubeArray + Capability SampledBuffer + Capability ImageMSArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 11 34 + ExecutionMode 4 OriginUpperLeft + Source GLSL 400 + Name 4 "main" + Name 6 "foo(" + Name 11 "color" + Name 14 "t2d" + Name 18 "s" + Name 31 "t3d" + Name 34 "i" + Name 41 "sA" + Name 58 "tex2D" + Name 64 "texCube" + Name 71 "texCubeArray" + Name 77 "sShadow" + Name 84 "itexCubeArray" + Name 91 "utexCubeArray" + Name 98 "tex1DArray" + Name 106 "itex1DArray" + Name 113 "utex1D" + Name 120 "itex1D" + Name 127 "utex1DArray" + Name 134 "texBuffer" + Name 146 "tex2DArray" + Name 158 "itex2D" + Name 165 "itex3D" + Name 172 "itexCube" + Name 179 "itex2DArray" + Name 186 "utex2D" + Name 193 "utex3D" + Name 200 "utexCube" + Name 207 "utex2DArray" + Name 214 "itex2DRect" + Name 221 "utex2DRect" + Name 228 "itexBuffer" + Name 235 "utexBuffer" + Name 242 "tex2DMS" + Name 249 "itex2DMS" + Name 256 "utex2DMS" + Name 263 "tex2DMSArray" + Name 270 "itex2DMSArray" + Name 277 "utex2DMSArray" + Name 284 "tex1D" + Name 294 "tex3D" + Name 305 "tex2DRect" + Decorate 14(t2d) DescriptorSet 0 + Decorate 18(s) DescriptorSet 0 + Decorate 31(t3d) DescriptorSet 0 + Decorate 34(i) Flat + Decorate 41(sA) DescriptorSet 0 + Decorate 58(tex2D) DescriptorSet 0 + Decorate 64(texCube) DescriptorSet 0 + Decorate 71(texCubeArray) DescriptorSet 0 + Decorate 77(sShadow) DescriptorSet 0 + Decorate 84(itexCubeArray) DescriptorSet 0 + Decorate 91(utexCubeArray) DescriptorSet 0 + Decorate 98(tex1DArray) DescriptorSet 0 + Decorate 106(itex1DArray) DescriptorSet 0 + Decorate 113(utex1D) DescriptorSet 0 + Decorate 120(itex1D) DescriptorSet 0 + Decorate 127(utex1DArray) DescriptorSet 0 + Decorate 134(texBuffer) DescriptorSet 0 + Decorate 146(tex2DArray) DescriptorSet 0 + Decorate 158(itex2D) DescriptorSet 0 + Decorate 165(itex3D) DescriptorSet 0 + Decorate 172(itexCube) DescriptorSet 0 + Decorate 179(itex2DArray) DescriptorSet 0 + Decorate 186(utex2D) DescriptorSet 0 + Decorate 193(utex3D) DescriptorSet 0 + Decorate 200(utexCube) DescriptorSet 0 + Decorate 207(utex2DArray) DescriptorSet 0 + Decorate 214(itex2DRect) DescriptorSet 0 + Decorate 221(utex2DRect) DescriptorSet 0 + Decorate 228(itexBuffer) DescriptorSet 0 + Decorate 235(utexBuffer) DescriptorSet 0 + Decorate 242(tex2DMS) DescriptorSet 0 + Decorate 249(itex2DMS) DescriptorSet 0 + Decorate 256(utex2DMS) DescriptorSet 0 + Decorate 263(tex2DMSArray) DescriptorSet 0 + Decorate 270(itex2DMSArray) DescriptorSet 0 + Decorate 277(utex2DMSArray) DescriptorSet 0 + Decorate 284(tex1D) DescriptorSet 0 + Decorate 294(tex3D) DescriptorSet 0 + Decorate 305(tex2DRect) DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 8: TypeFloat 32 + 9: TypeVector 8(float) 4 + 10: TypePointer Output 9(fvec4) + 11(color): 10(ptr) Variable Output + 12: TypeImage 8(float) 2D sampled format:Unknown + 13: TypePointer UniformConstant 12 + 14(t2d): 13(ptr) Variable UniformConstant + 16: TypeSampler + 17: TypePointer UniformConstant 16 + 18(s): 17(ptr) Variable UniformConstant + 20: TypeSampledImage 12 + 22: TypeVector 8(float) 2 + 23: 8(float) Constant 1056964608 + 24: 22(fvec2) ConstantComposite 23 23 + 26: TypeImage 8(float) 3D sampled format:Unknown + 27: TypeInt 32 0 + 28: 27(int) Constant 4 + 29: TypeArray 26 28 + 30: TypePointer UniformConstant 29 + 31(t3d): 30(ptr) Variable UniformConstant + 32: TypeInt 32 1 + 33: TypePointer Input 32(int) + 34(i): 33(ptr) Variable Input + 36: TypePointer UniformConstant 26 + 39: TypeArray 16 28 + 40: TypePointer UniformConstant 39 + 41(sA): 40(ptr) Variable UniformConstant + 42: 32(int) Constant 2 + 45: TypeSampledImage 26 + 47: TypeVector 8(float) 3 + 48: 47(fvec3) ConstantComposite 23 23 23 + 58(tex2D): 13(ptr) Variable UniformConstant + 62: TypeImage 8(float) Cube sampled format:Unknown + 63: TypePointer UniformConstant 62 + 64(texCube): 63(ptr) Variable UniformConstant + 67: TypeSampledImage 62 + 69: TypeImage 8(float) Cube array sampled format:Unknown + 70: TypePointer UniformConstant 69 +71(texCubeArray): 70(ptr) Variable UniformConstant + 74: TypeSampledImage 69 + 77(sShadow): 17(ptr) Variable UniformConstant + 79: TypeImage 8(float) Cube depth array sampled format:Unknown + 80: TypeSampledImage 79 + 82: TypeImage 32(int) Cube array sampled format:Unknown + 83: TypePointer UniformConstant 82 +84(itexCubeArray): 83(ptr) Variable UniformConstant + 87: TypeSampledImage 82 + 89: TypeImage 27(int) Cube array sampled format:Unknown + 90: TypePointer UniformConstant 89 +91(utexCubeArray): 90(ptr) Variable UniformConstant + 94: TypeSampledImage 89 + 96: TypeImage 8(float) 1D array sampled format:Unknown + 97: TypePointer UniformConstant 96 + 98(tex1DArray): 97(ptr) Variable UniformConstant + 101: TypeImage 8(float) 1D depth array sampled format:Unknown + 102: TypeSampledImage 101 + 104: TypeImage 32(int) 1D array sampled format:Unknown + 105: TypePointer UniformConstant 104 +106(itex1DArray): 105(ptr) Variable UniformConstant + 109: TypeSampledImage 104 + 111: TypeImage 27(int) 1D sampled format:Unknown + 112: TypePointer UniformConstant 111 + 113(utex1D): 112(ptr) Variable UniformConstant + 116: TypeSampledImage 111 + 118: TypeImage 32(int) 1D sampled format:Unknown + 119: TypePointer UniformConstant 118 + 120(itex1D): 119(ptr) Variable UniformConstant + 123: TypeSampledImage 118 + 125: TypeImage 27(int) 1D array sampled format:Unknown + 126: TypePointer UniformConstant 125 +127(utex1DArray): 126(ptr) Variable UniformConstant + 130: TypeSampledImage 125 + 132: TypeImage 8(float) Buffer sampled format:Unknown + 133: TypePointer UniformConstant 132 + 134(texBuffer): 133(ptr) Variable UniformConstant + 137: TypeSampledImage 132 + 141: TypeImage 8(float) Cube depth sampled format:Unknown + 142: TypeSampledImage 141 + 144: TypeImage 8(float) 2D array sampled format:Unknown + 145: TypePointer UniformConstant 144 + 146(tex2DArray): 145(ptr) Variable UniformConstant + 149: TypeSampledImage 144 + 153: TypeImage 8(float) 2D depth array sampled format:Unknown + 154: TypeSampledImage 153 + 156: TypeImage 32(int) 2D sampled format:Unknown + 157: TypePointer UniformConstant 156 + 158(itex2D): 157(ptr) Variable UniformConstant + 161: TypeSampledImage 156 + 163: TypeImage 32(int) 3D sampled format:Unknown + 164: TypePointer UniformConstant 163 + 165(itex3D): 164(ptr) Variable UniformConstant + 168: TypeSampledImage 163 + 170: TypeImage 32(int) Cube sampled format:Unknown + 171: TypePointer UniformConstant 170 + 172(itexCube): 171(ptr) Variable UniformConstant + 175: TypeSampledImage 170 + 177: TypeImage 32(int) 2D array sampled format:Unknown + 178: TypePointer UniformConstant 177 +179(itex2DArray): 178(ptr) Variable UniformConstant + 182: TypeSampledImage 177 + 184: TypeImage 27(int) 2D sampled format:Unknown + 185: TypePointer UniformConstant 184 + 186(utex2D): 185(ptr) Variable UniformConstant + 189: TypeSampledImage 184 + 191: TypeImage 27(int) 3D sampled format:Unknown + 192: TypePointer UniformConstant 191 + 193(utex3D): 192(ptr) Variable UniformConstant + 196: TypeSampledImage 191 + 198: TypeImage 27(int) Cube sampled format:Unknown + 199: TypePointer UniformConstant 198 + 200(utexCube): 199(ptr) Variable UniformConstant + 203: TypeSampledImage 198 + 205: TypeImage 27(int) 2D array sampled format:Unknown + 206: TypePointer UniformConstant 205 +207(utex2DArray): 206(ptr) Variable UniformConstant + 210: TypeSampledImage 205 + 212: TypeImage 32(int) Rect sampled format:Unknown + 213: TypePointer UniformConstant 212 + 214(itex2DRect): 213(ptr) Variable UniformConstant + 217: TypeSampledImage 212 + 219: TypeImage 27(int) Rect sampled format:Unknown + 220: TypePointer UniformConstant 219 + 221(utex2DRect): 220(ptr) Variable UniformConstant + 224: TypeSampledImage 219 + 226: TypeImage 32(int) Buffer sampled format:Unknown + 227: TypePointer UniformConstant 226 + 228(itexBuffer): 227(ptr) Variable UniformConstant + 231: TypeSampledImage 226 + 233: TypeImage 27(int) Buffer sampled format:Unknown + 234: TypePointer UniformConstant 233 + 235(utexBuffer): 234(ptr) Variable UniformConstant + 238: TypeSampledImage 233 + 240: TypeImage 8(float) 2D multi-sampled sampled format:Unknown + 241: TypePointer UniformConstant 240 + 242(tex2DMS): 241(ptr) Variable UniformConstant + 245: TypeSampledImage 240 + 247: TypeImage 32(int) 2D multi-sampled sampled format:Unknown + 248: TypePointer UniformConstant 247 + 249(itex2DMS): 248(ptr) Variable UniformConstant + 252: TypeSampledImage 247 + 254: TypeImage 27(int) 2D multi-sampled sampled format:Unknown + 255: TypePointer UniformConstant 254 + 256(utex2DMS): 255(ptr) Variable UniformConstant + 259: TypeSampledImage 254 + 261: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown + 262: TypePointer UniformConstant 261 +263(tex2DMSArray): 262(ptr) Variable UniformConstant + 266: TypeSampledImage 261 + 268: TypeImage 32(int) 2D array multi-sampled sampled format:Unknown + 269: TypePointer UniformConstant 268 +270(itex2DMSArray): 269(ptr) Variable UniformConstant + 273: TypeSampledImage 268 + 275: TypeImage 27(int) 2D array multi-sampled sampled format:Unknown + 276: TypePointer UniformConstant 275 +277(utex2DMSArray): 276(ptr) Variable UniformConstant + 280: TypeSampledImage 275 + 282: TypeImage 8(float) 1D sampled format:Unknown + 283: TypePointer UniformConstant 282 + 284(tex1D): 283(ptr) Variable UniformConstant + 287: TypeSampledImage 282 + 291: TypeImage 8(float) 1D depth sampled format:Unknown + 292: TypeSampledImage 291 + 294(tex3D): 36(ptr) Variable UniformConstant + 300: TypeImage 8(float) 2D depth sampled format:Unknown + 301: TypeSampledImage 300 + 303: TypeImage 8(float) Rect sampled format:Unknown + 304: TypePointer UniformConstant 303 + 305(tex2DRect): 304(ptr) Variable UniformConstant + 308: TypeSampledImage 303 + 312: TypeImage 8(float) Rect depth sampled format:Unknown + 313: TypeSampledImage 312 + 317: TypeSampledImage 96 + 4(main): 2 Function None 3 + 5: Label + 15: 12 Load 14(t2d) + 19: 16 Load 18(s) + 21: 20 SampledImage 15 19 + 25: 9(fvec4) ImageSampleImplicitLod 21 24 + Store 11(color) 25 + 35: 32(int) Load 34(i) + 37: 36(ptr) AccessChain 31(t3d) 35 + 38: 26 Load 37 + 43: 17(ptr) AccessChain 41(sA) 42 + 44: 16 Load 43 + 46: 45 SampledImage 38 44 + 49: 9(fvec4) ImageSampleImplicitLod 46 48 + 50: 9(fvec4) Load 11(color) + 51: 9(fvec4) FAdd 50 49 + Store 11(color) 51 + 52: 12 Load 14(t2d) + 53: 16 Load 18(s) + 54: 20 SampledImage 52 53 + 55: 9(fvec4) ImageSampleImplicitLod 54 24 + 56: 9(fvec4) Load 11(color) + 57: 9(fvec4) FAdd 56 55 + Store 11(color) 57 + Return + FunctionEnd + 6(foo(): 2 Function None 3 + 7: Label + 59: 12 Load 58(tex2D) + 60: 16 Load 18(s) + 61: 20 SampledImage 59 60 + 65: 62 Load 64(texCube) + 66: 16 Load 18(s) + 68: 67 SampledImage 65 66 + 72: 69 Load 71(texCubeArray) + 73: 16 Load 18(s) + 75: 74 SampledImage 72 73 + 76: 69 Load 71(texCubeArray) + 78: 16 Load 77(sShadow) + 81: 80 SampledImage 76 78 + 85: 82 Load 84(itexCubeArray) + 86: 16 Load 18(s) + 88: 87 SampledImage 85 86 + 92: 89 Load 91(utexCubeArray) + 93: 16 Load 18(s) + 95: 94 SampledImage 92 93 + 99: 96 Load 98(tex1DArray) + 100: 16 Load 77(sShadow) + 103: 102 SampledImage 99 100 + 107: 104 Load 106(itex1DArray) + 108: 16 Load 18(s) + 110: 109 SampledImage 107 108 + 114: 111 Load 113(utex1D) + 115: 16 Load 18(s) + 117: 116 SampledImage 114 115 + 121: 118 Load 120(itex1D) + 122: 16 Load 18(s) + 124: 123 SampledImage 121 122 + 128: 125 Load 127(utex1DArray) + 129: 16 Load 18(s) + 131: 130 SampledImage 128 129 + 135: 132 Load 134(texBuffer) + 136: 16 Load 18(s) + 138: 137 SampledImage 135 136 + 139: 62 Load 64(texCube) + 140: 16 Load 77(sShadow) + 143: 142 SampledImage 139 140 + 147: 144 Load 146(tex2DArray) + 148: 16 Load 18(s) + 150: 149 SampledImage 147 148 + 151: 144 Load 146(tex2DArray) + 152: 16 Load 77(sShadow) + 155: 154 SampledImage 151 152 + 159: 156 Load 158(itex2D) + 160: 16 Load 18(s) + 162: 161 SampledImage 159 160 + 166: 163 Load 165(itex3D) + 167: 16 Load 18(s) + 169: 168 SampledImage 166 167 + 173: 170 Load 172(itexCube) + 174: 16 Load 18(s) + 176: 175 SampledImage 173 174 + 180: 177 Load 179(itex2DArray) + 181: 16 Load 18(s) + 183: 182 SampledImage 180 181 + 187: 184 Load 186(utex2D) + 188: 16 Load 18(s) + 190: 189 SampledImage 187 188 + 194: 191 Load 193(utex3D) + 195: 16 Load 18(s) + 197: 196 SampledImage 194 195 + 201: 198 Load 200(utexCube) + 202: 16 Load 18(s) + 204: 203 SampledImage 201 202 + 208: 205 Load 207(utex2DArray) + 209: 16 Load 18(s) + 211: 210 SampledImage 208 209 + 215: 212 Load 214(itex2DRect) + 216: 16 Load 18(s) + 218: 217 SampledImage 215 216 + 222: 219 Load 221(utex2DRect) + 223: 16 Load 18(s) + 225: 224 SampledImage 222 223 + 229: 226 Load 228(itexBuffer) + 230: 16 Load 18(s) + 232: 231 SampledImage 229 230 + 236: 233 Load 235(utexBuffer) + 237: 16 Load 18(s) + 239: 238 SampledImage 236 237 + 243: 240 Load 242(tex2DMS) + 244: 16 Load 18(s) + 246: 245 SampledImage 243 244 + 250: 247 Load 249(itex2DMS) + 251: 16 Load 18(s) + 253: 252 SampledImage 250 251 + 257: 254 Load 256(utex2DMS) + 258: 16 Load 18(s) + 260: 259 SampledImage 257 258 + 264: 261 Load 263(tex2DMSArray) + 265: 16 Load 18(s) + 267: 266 SampledImage 264 265 + 271: 268 Load 270(itex2DMSArray) + 272: 16 Load 18(s) + 274: 273 SampledImage 271 272 + 278: 275 Load 277(utex2DMSArray) + 279: 16 Load 18(s) + 281: 280 SampledImage 278 279 + 285: 282 Load 284(tex1D) + 286: 16 Load 18(s) + 288: 287 SampledImage 285 286 + 289: 282 Load 284(tex1D) + 290: 16 Load 77(sShadow) + 293: 292 SampledImage 289 290 + 295: 26 Load 294(tex3D) + 296: 16 Load 18(s) + 297: 45 SampledImage 295 296 + 298: 12 Load 58(tex2D) + 299: 16 Load 77(sShadow) + 302: 301 SampledImage 298 299 + 306: 303 Load 305(tex2DRect) + 307: 16 Load 18(s) + 309: 308 SampledImage 306 307 + 310: 303 Load 305(tex2DRect) + 311: 16 Load 77(sShadow) + 314: 313 SampledImage 310 311 + 315: 96 Load 98(tex1DArray) + 316: 16 Load 18(s) + 318: 317 SampledImage 315 316 + Return + FunctionEnd diff --git a/Test/baseResults/spv.set.vert.out b/Test/baseResults/spv.set.vert.out index 9448bca8..72fbaa70 100755 --- a/Test/baseResults/spv.set.vert.out +++ b/Test/baseResults/spv.set.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 25 +// Id's are bound by 22 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 23 24 + EntryPoint Vertex 4 "main" 9 Source GLSL 450 Name 4 "main" Name 9 "color" @@ -20,16 +20,12 @@ Linked vertex stage: MemberName 10(setBuf) 0 "color" Name 12 "setBufInst" Name 21 "samp2D" - Name 23 "gl_VertexID" - Name 24 "gl_InstanceID" - Decorate 10(setBuf) GLSLShared + MemberDecorate 10(setBuf) 0 Offset 0 Decorate 10(setBuf) BufferBlock Decorate 12(setBufInst) DescriptorSet 0 Decorate 12(setBufInst) Binding 8 Decorate 21(samp2D) DescriptorSet 4 Decorate 21(samp2D) Binding 7 - Decorate 23(gl_VertexID) BuiltIn VertexId - Decorate 24(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -46,9 +42,6 @@ Linked vertex stage: 19: TypeSampledImage 18 20: TypePointer UniformConstant 19 21(samp2D): 20(ptr) Variable UniformConstant - 22: TypePointer Input 13(int) - 23(gl_VertexID): 22(ptr) Variable Input -24(gl_InstanceID): 22(ptr) Variable Input 4(main): 2 Function None 3 5: Label 16: 15(ptr) AccessChain 12(setBufInst) 14 diff --git a/Test/baseResults/spv.shiftOps.frag.out b/Test/baseResults/spv.shiftOps.frag.out index 891d6899..39e40ece 100644 --- a/Test/baseResults/spv.shiftOps.frag.out +++ b/Test/baseResults/spv.shiftOps.frag.out @@ -12,8 +12,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 9 25 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 9 11 15 25 27 30 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" Name 9 "icolor" @@ -22,25 +22,29 @@ Linked fragment stage: Name 25 "ucolor" Name 27 "u3" Name 30 "i1" + Decorate 11(i3) Flat + Decorate 15(u1) Flat + Decorate 27(u3) Flat + Decorate 30(i1) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypeVector 6(int) 3 8: TypePointer Output 7(ivec3) 9(icolor): 8(ptr) Variable Output - 10: TypePointer UniformConstant 7(ivec3) - 11(i3): 10(ptr) Variable UniformConstant + 10: TypePointer Input 7(ivec3) + 11(i3): 10(ptr) Variable Input 13: TypeInt 32 0 - 14: TypePointer UniformConstant 13(int) - 15(u1): 14(ptr) Variable UniformConstant + 14: TypePointer Input 13(int) + 15(u1): 14(ptr) Variable Input 17: TypeVector 13(int) 3 20: 13(int) Constant 4 24: TypePointer Output 17(ivec3) 25(ucolor): 24(ptr) Variable Output - 26: TypePointer UniformConstant 17(ivec3) - 27(u3): 26(ptr) Variable UniformConstant - 29: TypePointer UniformConstant 6(int) - 30(i1): 29(ptr) Variable UniformConstant + 26: TypePointer Input 17(ivec3) + 27(u3): 26(ptr) Variable Input + 29: TypePointer Input 6(int) + 30(i1): 29(ptr) Variable Input 34: 6(int) Constant 5 4(main): 2 Function None 3 5: Label diff --git a/Test/baseResults/spv.shortCircuit.frag.out b/Test/baseResults/spv.shortCircuit.frag.out index 008f9705..5b39b1cb 100644 --- a/Test/baseResults/spv.shortCircuit.frag.out +++ b/Test/baseResults/spv.shortCircuit.frag.out @@ -7,26 +7,28 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 144 +// Id's are bound by 147 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 12 24 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 12 24 34 113 140 142 + ExecutionMode 4 OriginUpperLeft Source GLSL 400 Name 4 "main" Name 8 "foo(" Name 12 "of1" Name 24 "of4" Name 27 "ub" - Name 31 "ui" - Name 41 "uba" - Name 110 "uf" - Name 137 "uiv4" - Name 139 "uv4" - Name 142 "ub41" - Name 143 "ub42" + Name 34 "ui" + Name 44 "uba" + Name 113 "uf" + Name 140 "uiv4" + Name 142 "uv4" + Name 145 "ub41" + Name 146 "ub42" + Decorate 34(ui) Flat + Decorate 140(uiv4) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeBool @@ -41,185 +43,191 @@ Linked fragment stage: 23: TypePointer Output 22(fvec4) 24(of4): 23(ptr) Variable Output 25: 22(fvec4) ConstantComposite 21 21 21 21 - 26: TypePointer UniformConstant 6(bool) - 27(ub): 26(ptr) Variable UniformConstant - 29: TypeInt 32 1 - 30: TypePointer UniformConstant 29(int) - 31(ui): 30(ptr) Variable UniformConstant - 33: 29(int) Constant 2 - 41(uba): 26(ptr) Variable UniformConstant - 109: TypePointer UniformConstant 10(float) - 110(uf): 109(ptr) Variable UniformConstant - 113: 10(float) Constant 1082130432 - 135: TypeVector 29(int) 4 - 136: TypePointer UniformConstant 135(ivec4) - 137(uiv4): 136(ptr) Variable UniformConstant - 138: TypePointer UniformConstant 22(fvec4) - 139(uv4): 138(ptr) Variable UniformConstant - 140: TypeVector 6(bool) 4 - 141: TypePointer UniformConstant 140(bvec4) - 142(ub41): 141(ptr) Variable UniformConstant - 143(ub42): 141(ptr) Variable UniformConstant + 26: TypePointer Private 6(bool) + 27(ub): 26(ptr) Variable Private + 32: TypeInt 32 1 + 33: TypePointer Input 32(int) + 34(ui): 33(ptr) Variable Input + 36: 32(int) Constant 2 + 44(uba): 26(ptr) Variable Private + 112: TypePointer Input 10(float) + 113(uf): 112(ptr) Variable Input + 116: 10(float) Constant 1082130432 + 138: TypeVector 32(int) 4 + 139: TypePointer Input 138(ivec4) + 140(uiv4): 139(ptr) Variable Input + 141: TypePointer Input 22(fvec4) + 142(uv4): 141(ptr) Variable Input + 143: TypeVector 6(bool) 4 + 144: TypePointer Private 143(bvec4) + 145(ub41): 144(ptr) Variable Private + 146(ub42): 144(ptr) Variable Private 4(main): 2 Function None 3 5: Label Store 12(of1) 21 Store 24(of4) 25 28: 6(bool) Load 27(ub) - 32: 29(int) Load 31(ui) - 34: 6(bool) SGreaterThan 32 33 - 35: 6(bool) LogicalOr 28 34 - SelectionMerge 37 None - BranchConditional 35 36 37 - 36: Label - 38: 10(float) Load 12(of1) - 39: 10(float) FAdd 38 14 - Store 12(of1) 39 - Branch 37 - 37: Label - 40: 6(bool) Load 27(ub) - 42: 6(bool) Load 41(uba) - 43: 6(bool) LogicalNot 42 - 44: 6(bool) LogicalAnd 40 43 - SelectionMerge 46 None - BranchConditional 44 45 46 - 45: Label - 47: 10(float) Load 12(of1) - 48: 10(float) FAdd 47 14 - Store 12(of1) 48 - Branch 46 - 46: Label - 49: 6(bool) Load 27(ub) - 50: 6(bool) LogicalNot 49 - SelectionMerge 52 None - BranchConditional 50 51 52 - 51: Label - 53: 6(bool) FunctionCall 8(foo() - Branch 52 - 52: Label - 54: 6(bool) Phi 49 46 53 51 - SelectionMerge 56 None - BranchConditional 54 55 56 - 55: Label - 57: 10(float) Load 12(of1) - 58: 10(float) FAdd 57 14 - Store 12(of1) 58 - Branch 56 - 56: Label - 59: 6(bool) Load 27(ub) - SelectionMerge 61 None - BranchConditional 59 60 61 - 60: Label - 62: 6(bool) FunctionCall 8(foo() - Branch 61 - 61: Label - 63: 6(bool) Phi 59 56 62 60 - SelectionMerge 65 None - BranchConditional 63 64 65 - 64: Label - 66: 10(float) Load 12(of1) - 67: 10(float) FAdd 66 14 - Store 12(of1) 67 - Branch 65 - 65: Label - 68: 6(bool) FunctionCall 8(foo() - 69: 6(bool) Load 27(ub) - 70: 6(bool) LogicalOr 68 69 - SelectionMerge 72 None - BranchConditional 70 71 72 - 71: Label - 73: 10(float) Load 12(of1) - 74: 10(float) FAdd 73 14 - Store 12(of1) 74 - Branch 72 - 72: Label - 75: 6(bool) FunctionCall 8(foo() - 76: 6(bool) Load 27(ub) - 77: 6(bool) LogicalAnd 75 76 - SelectionMerge 79 None - BranchConditional 77 78 79 - 78: Label - 80: 10(float) Load 12(of1) - 81: 10(float) FAdd 80 14 - Store 12(of1) 81 - Branch 79 - 79: Label - 82: 6(bool) Load 27(ub) - 83: 6(bool) LogicalNot 82 - SelectionMerge 85 None - BranchConditional 83 84 85 - 84: Label - 86: 10(float) Load 12(of1) - 87: 10(float) FAdd 86 14 - Store 12(of1) 87 - 88: 6(bool) FOrdGreaterThan 87 14 - Branch 85 - 85: Label - 89: 6(bool) Phi 82 79 88 84 - SelectionMerge 91 None - BranchConditional 89 90 91 - 90: Label - 92: 22(fvec4) Load 24(of4) - 93: 22(fvec4) CompositeConstruct 14 14 14 14 - 94: 22(fvec4) FAdd 92 93 - Store 24(of4) 94 - Branch 91 - 91: Label - 95: 10(float) Load 12(of1) - 96: 10(float) FAdd 95 14 - Store 12(of1) 96 - 97: 6(bool) FOrdGreaterThan 96 14 - 98: 6(bool) Load 27(ub) - 99: 6(bool) LogicalOr 97 98 - SelectionMerge 101 None - BranchConditional 99 100 101 - 100: Label - 102: 22(fvec4) Load 24(of4) - 103: 22(fvec4) CompositeConstruct 14 14 14 14 - 104: 22(fvec4) FAdd 102 103 - Store 24(of4) 104 - Branch 101 - 101: Label - 105: 6(bool) Load 27(ub) - 106: 6(bool) LogicalNot 105 - SelectionMerge 108 None - BranchConditional 106 107 108 - 107: Label - 111: 10(float) Load 110(uf) - 112: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 111 - 114: 10(float) FMul 112 113 - 115: 10(float) Load 12(of1) - 116: 6(bool) FOrdGreaterThan 114 115 - Branch 108 - 108: Label - 117: 6(bool) Phi 105 101 116 107 - SelectionMerge 119 None - BranchConditional 117 118 119 - 118: Label - 120: 10(float) Load 12(of1) - 121: 10(float) FAdd 120 14 - Store 12(of1) 121 - Branch 119 - 119: Label - 122: 6(bool) Load 27(ub) - SelectionMerge 124 None - BranchConditional 122 123 124 - 123: Label - 125: 10(float) Load 110(uf) - 126: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 125 - 127: 10(float) FMul 126 113 - 128: 10(float) Load 12(of1) - 129: 6(bool) FOrdGreaterThan 127 128 - Branch 124 - 124: Label - 130: 6(bool) Phi 122 119 129 123 - SelectionMerge 132 None - BranchConditional 130 131 132 - 131: Label - 133: 10(float) Load 12(of1) - 134: 10(float) FAdd 133 14 - Store 12(of1) 134 - Branch 132 - 132: Label + 29: 6(bool) LogicalNot 28 + SelectionMerge 31 None + BranchConditional 29 30 31 + 30: Label + 35: 32(int) Load 34(ui) + 37: 6(bool) SGreaterThan 35 36 + Branch 31 + 31: Label + 38: 6(bool) Phi 28 5 37 30 + SelectionMerge 40 None + BranchConditional 38 39 40 + 39: Label + 41: 10(float) Load 12(of1) + 42: 10(float) FAdd 41 14 + Store 12(of1) 42 + Branch 40 + 40: Label + 43: 6(bool) Load 27(ub) + 45: 6(bool) Load 44(uba) + 46: 6(bool) LogicalNot 45 + 47: 6(bool) LogicalAnd 43 46 + SelectionMerge 49 None + BranchConditional 47 48 49 + 48: Label + 50: 10(float) Load 12(of1) + 51: 10(float) FAdd 50 14 + Store 12(of1) 51 + Branch 49 + 49: Label + 52: 6(bool) Load 27(ub) + 53: 6(bool) LogicalNot 52 + SelectionMerge 55 None + BranchConditional 53 54 55 + 54: Label + 56: 6(bool) FunctionCall 8(foo() + Branch 55 + 55: Label + 57: 6(bool) Phi 52 49 56 54 + SelectionMerge 59 None + BranchConditional 57 58 59 + 58: Label + 60: 10(float) Load 12(of1) + 61: 10(float) FAdd 60 14 + Store 12(of1) 61 + Branch 59 + 59: Label + 62: 6(bool) Load 27(ub) + SelectionMerge 64 None + BranchConditional 62 63 64 + 63: Label + 65: 6(bool) FunctionCall 8(foo() + Branch 64 + 64: Label + 66: 6(bool) Phi 62 59 65 63 + SelectionMerge 68 None + BranchConditional 66 67 68 + 67: Label + 69: 10(float) Load 12(of1) + 70: 10(float) FAdd 69 14 + Store 12(of1) 70 + Branch 68 + 68: Label + 71: 6(bool) FunctionCall 8(foo() + 72: 6(bool) Load 27(ub) + 73: 6(bool) LogicalOr 71 72 + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 76: 10(float) Load 12(of1) + 77: 10(float) FAdd 76 14 + Store 12(of1) 77 + Branch 75 + 75: Label + 78: 6(bool) FunctionCall 8(foo() + 79: 6(bool) Load 27(ub) + 80: 6(bool) LogicalAnd 78 79 + SelectionMerge 82 None + BranchConditional 80 81 82 + 81: Label + 83: 10(float) Load 12(of1) + 84: 10(float) FAdd 83 14 + Store 12(of1) 84 + Branch 82 + 82: Label + 85: 6(bool) Load 27(ub) + 86: 6(bool) LogicalNot 85 + SelectionMerge 88 None + BranchConditional 86 87 88 + 87: Label + 89: 10(float) Load 12(of1) + 90: 10(float) FAdd 89 14 + Store 12(of1) 90 + 91: 6(bool) FOrdGreaterThan 90 14 + Branch 88 + 88: Label + 92: 6(bool) Phi 85 82 91 87 + SelectionMerge 94 None + BranchConditional 92 93 94 + 93: Label + 95: 22(fvec4) Load 24(of4) + 96: 22(fvec4) CompositeConstruct 14 14 14 14 + 97: 22(fvec4) FAdd 95 96 + Store 24(of4) 97 + Branch 94 + 94: Label + 98: 10(float) Load 12(of1) + 99: 10(float) FAdd 98 14 + Store 12(of1) 99 + 100: 6(bool) FOrdGreaterThan 99 14 + 101: 6(bool) Load 27(ub) + 102: 6(bool) LogicalOr 100 101 + SelectionMerge 104 None + BranchConditional 102 103 104 + 103: Label + 105: 22(fvec4) Load 24(of4) + 106: 22(fvec4) CompositeConstruct 14 14 14 14 + 107: 22(fvec4) FAdd 105 106 + Store 24(of4) 107 + Branch 104 + 104: Label + 108: 6(bool) Load 27(ub) + 109: 6(bool) LogicalNot 108 + SelectionMerge 111 None + BranchConditional 109 110 111 + 110: Label + 114: 10(float) Load 113(uf) + 115: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 114 + 117: 10(float) FMul 115 116 + 118: 10(float) Load 12(of1) + 119: 6(bool) FOrdGreaterThan 117 118 + Branch 111 + 111: Label + 120: 6(bool) Phi 108 104 119 110 + SelectionMerge 122 None + BranchConditional 120 121 122 + 121: Label + 123: 10(float) Load 12(of1) + 124: 10(float) FAdd 123 14 + Store 12(of1) 124 + Branch 122 + 122: Label + 125: 6(bool) Load 27(ub) + SelectionMerge 127 None + BranchConditional 125 126 127 + 126: Label + 128: 10(float) Load 113(uf) + 129: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 128 + 130: 10(float) FMul 129 116 + 131: 10(float) Load 12(of1) + 132: 6(bool) FOrdGreaterThan 130 131 + Branch 127 + 127: Label + 133: 6(bool) Phi 125 122 132 126 + SelectionMerge 135 None + BranchConditional 133 134 135 + 134: Label + 136: 10(float) Load 12(of1) + 137: 10(float) FAdd 136 14 + Store 12(of1) 137 + Branch 135 + 135: Label Return FunctionEnd 8(foo(): 6(bool) Function None 7 diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out index 8018da8e..458a90db 100755 --- a/Test/baseResults/spv.simpleFunctionCall.frag.out +++ b/Test/baseResults/spv.simpleFunctionCall.frag.out @@ -5,20 +5,18 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 23 +// Id's are bound by 19 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 17 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 150 Name 4 "main" Name 9 "foo(" Name 12 "BaseColor" Name 17 "gl_FragColor" - Name 20 "bigColor" - Name 22 "d" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -28,10 +26,6 @@ Linked fragment stage: 12(BaseColor): 11(ptr) Variable Input 16: TypePointer Output 7(fvec4) 17(gl_FragColor): 16(ptr) Variable Output - 19: TypePointer UniformConstant 7(fvec4) - 20(bigColor): 19(ptr) Variable UniformConstant - 21: TypePointer UniformConstant 6(float) - 22(d): 21(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 18: 7(fvec4) FunctionCall 9(foo() diff --git a/Test/baseResults/spv.simpleMat.vert.out b/Test/baseResults/spv.simpleMat.vert.out index 042aa9d9..3e0f05e1 100755 --- a/Test/baseResults/spv.simpleMat.vert.out +++ b/Test/baseResults/spv.simpleMat.vert.out @@ -1,16 +1,18 @@ spv.simpleMat.vert +WARNING: 0:3: varying deprecated in version 130; may be removed in future release + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 42 +// Id's are bound by 39 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 15 19 23 34 40 41 + EntryPoint Vertex 4 "main" 9 12 15 19 23 34 Source GLSL 330 Name 4 "main" Name 9 "glPos" @@ -19,10 +21,6 @@ Linked vertex stage: Name 19 "f" Name 23 "am3" Name 34 "arraym" - Name 40 "gl_VertexID" - Name 41 "gl_InstanceID" - Decorate 40(gl_VertexID) BuiltIn VertexId - Decorate 41(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -30,8 +28,8 @@ Linked vertex stage: 8: TypePointer Output 7(fvec4) 9(glPos): 8(ptr) Variable Output 10: TypeMatrix 7(fvec4) 4 - 11: TypePointer UniformConstant 10 - 12(mvp): 11(ptr) Variable UniformConstant + 11: TypePointer Output 10 + 12(mvp): 11(ptr) Variable Output 14: TypePointer Input 7(fvec4) 15(v): 14(ptr) Variable Input 18: TypePointer Output 6(float) @@ -50,9 +48,6 @@ Linked vertex stage: 33: TypePointer Input 32 34(arraym): 33(ptr) Variable Input 35: 24(int) Constant 1 - 39: TypePointer Input 24(int) - 40(gl_VertexID): 39(ptr) Variable Input -41(gl_InstanceID): 39(ptr) Variable Input 4(main): 2 Function None 3 5: Label 13: 10 Load 12(mvp) diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out index 04e8e92d..8b794a45 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -15,8 +15,8 @@ Linked fragment stage: Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 384 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 33 48 89 360 384 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 SourceExtension "GL_ARB_sparse_texture2" Name 4 "main" @@ -45,6 +45,19 @@ Linked fragment stage: Name 289 "s2DRectShadow" Name 360 "offsets" Name 384 "outColor" + Decorate 29(s2D) DescriptorSet 0 + Decorate 44(s3D) DescriptorSet 0 + Decorate 59(isCube) DescriptorSet 0 + Decorate 71(s2DShadow) DescriptorSet 0 + Decorate 86(sCubeArrayShadow) DescriptorSet 0 + Decorate 108(usCubeArray) DescriptorSet 0 + Decorate 140(us2DRect) DescriptorSet 0 + Decorate 154(s2DArrayShadow) DescriptorSet 0 + Decorate 186(s2DMS) DescriptorSet 0 + Decorate 223(is2DArray) DescriptorSet 0 + Decorate 256(sCubeShadow) DescriptorSet 0 + Decorate 289(s2DRectShadow) DescriptorSet 0 + Decorate 360(offsets) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -68,16 +81,16 @@ Linked fragment stage: 28: TypePointer UniformConstant 27 29(s2D): 28(ptr) Variable UniformConstant 31: TypeVector 10(float) 2 - 32: TypePointer UniformConstant 31(fvec2) - 33(c2): 32(ptr) Variable UniformConstant + 32: TypePointer Input 31(fvec2) + 33(c2): 32(ptr) Variable Input 35(ResType): TypeStruct 6(int) 11(fvec4) 41: TypeImage 10(float) 3D sampled format:Unknown 42: TypeSampledImage 41 43: TypePointer UniformConstant 42 44(s3D): 43(ptr) Variable UniformConstant 46: TypeVector 10(float) 3 - 47: TypePointer UniformConstant 46(fvec3) - 48(c3): 47(ptr) Variable UniformConstant + 47: TypePointer Input 46(fvec3) + 48(c3): 47(ptr) Variable Input 50: 10(float) Constant 1073741824 56: TypeImage 6(int) Cube sampled format:Unknown 57: TypeSampledImage 56 @@ -94,8 +107,8 @@ Linked fragment stage: 84: TypeSampledImage 83 85: TypePointer UniformConstant 84 86(sCubeArrayShadow): 85(ptr) Variable UniformConstant - 88: TypePointer UniformConstant 11(fvec4) - 89(c4): 88(ptr) Variable UniformConstant + 88: TypePointer Input 11(fvec4) + 89(c4): 88(ptr) Variable Input 91: 10(float) Constant 1065353216 105: TypeImage 20(int) Cube array sampled format:Unknown 106: TypeSampledImage 105 @@ -147,8 +160,8 @@ Linked fragment stage: 335: 143(ivec2) ConstantComposite 190 190 357: 20(int) Constant 4 358: TypeArray 143(ivec2) 357 - 359: TypePointer UniformConstant 358 - 360(offsets): 359(ptr) Variable UniformConstant + 359: TypePointer Input 358 + 360(offsets): 359(ptr) Variable Input 383: TypePointer Output 11(fvec4) 384(outColor): 383(ptr) Variable Output 387: TypeBool diff --git a/Test/baseResults/spv.sparseTextureClamp.frag.out b/Test/baseResults/spv.sparseTextureClamp.frag.out index 6bf60a81..1922ac12 100644 --- a/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -16,8 +16,8 @@ Linked fragment stage: Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 345 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 33 36 51 95 345 + ExecutionMode 4 OriginUpperLeft Source GLSL 450 SourceExtension "GL_ARB_sparse_texture_clamp" Name 4 "main" @@ -45,6 +45,17 @@ Linked fragment stage: Name 286 "s2DRectShadow" Name 305 "is2DArray" Name 345 "outColor" + Decorate 29(s2D) DescriptorSet 0 + Decorate 47(s3D) DescriptorSet 0 + Decorate 63(isCube) DescriptorSet 0 + Decorate 76(s2DShadow) DescriptorSet 0 + Decorate 92(sCubeArrayShadow) DescriptorSet 0 + Decorate 154(us2DRect) DescriptorSet 0 + Decorate 170(s2DArrayShadow) DescriptorSet 0 + Decorate 218(sCubeShadow) DescriptorSet 0 + Decorate 235(usCubeArray) DescriptorSet 0 + Decorate 286(s2DRectShadow) DescriptorSet 0 + Decorate 305(is2DArray) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -68,18 +79,18 @@ Linked fragment stage: 28: TypePointer UniformConstant 27 29(s2D): 28(ptr) Variable UniformConstant 31: TypeVector 10(float) 2 - 32: TypePointer UniformConstant 31(fvec2) - 33(c2): 32(ptr) Variable UniformConstant - 35: TypePointer UniformConstant 10(float) - 36(lodClamp): 35(ptr) Variable UniformConstant + 32: TypePointer Input 31(fvec2) + 33(c2): 32(ptr) Variable Input + 35: TypePointer Input 10(float) + 36(lodClamp): 35(ptr) Variable Input 38(ResType): TypeStruct 6(int) 11(fvec4) 44: TypeImage 10(float) 3D sampled format:Unknown 45: TypeSampledImage 44 46: TypePointer UniformConstant 45 47(s3D): 46(ptr) Variable UniformConstant 49: TypeVector 10(float) 3 - 50: TypePointer UniformConstant 49(fvec3) - 51(c3): 50(ptr) Variable UniformConstant + 50: TypePointer Input 49(fvec3) + 51(c3): 50(ptr) Variable Input 54: 10(float) Constant 1073741824 60: TypeImage 6(int) Cube sampled format:Unknown 61: TypeSampledImage 60 @@ -96,8 +107,8 @@ Linked fragment stage: 90: TypeSampledImage 89 91: TypePointer UniformConstant 90 92(sCubeArrayShadow): 91(ptr) Variable UniformConstant - 94: TypePointer UniformConstant 11(fvec4) - 95(c4): 94(ptr) Variable UniformConstant + 94: TypePointer Input 11(fvec4) + 95(c4): 94(ptr) Variable Input 97: 10(float) Constant 1065353216 142: TypeVector 6(int) 3 143: 6(int) Constant 2 diff --git a/Test/baseResults/spv.specConstant.comp.out b/Test/baseResults/spv.specConstant.comp.out new file mode 100644 index 00000000..d1c9b0a6 --- /dev/null +++ b/Test/baseResults/spv.specConstant.comp.out @@ -0,0 +1,55 @@ +spv.specConstant.comp +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked compute stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 27 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 32 32 1 + Source GLSL 450 + Name 4 "main" + Name 7 "bn" + MemberName 7(bn) 0 "a" + Name 9 "bi" + MemberDecorate 7(bn) 0 Offset 0 + Decorate 7(bn) BufferBlock + Decorate 9(bi) DescriptorSet 0 + Decorate 12 SpecId 18 + Decorate 14 SpecId 19 + Decorate 16 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7(bn): TypeStruct 6(int) + 8: TypePointer Uniform 7(bn) + 9(bi): 8(ptr) Variable Uniform + 10: TypeInt 32 1 + 11: 10(int) Constant 0 + 12: 6(int) SpecConstant 32 + 13: 6(int) Constant 32 + 14: 6(int) SpecConstant 1 + 15: TypeVector 6(int) 3 + 16: 15(ivec3) SpecConstantComposite 12 13 14 + 17: 6(int) Constant 0 + 19: 6(int) Constant 1 + 22: 6(int) Constant 2 + 25: TypePointer Uniform 6(int) + 4(main): 2 Function None 3 + 5: Label + 18: 6(int) CompositeExtract 16 0 + 20: 6(int) CompositeExtract 16 1 + 21: 6(int) IMul 18 20 + 23: 6(int) CompositeExtract 16 2 + 24: 6(int) IMul 21 23 + 26: 25(ptr) AccessChain 9(bi) 11 + Store 26 24 + Return + FunctionEnd diff --git a/Test/baseResults/spv.specConstant.vert.out b/Test/baseResults/spv.specConstant.vert.out new file mode 100644 index 00000000..862dc19a --- /dev/null +++ b/Test/baseResults/spv.specConstant.vert.out @@ -0,0 +1,124 @@ +spv.specConstant.vert +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + + +Linked vertex stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 72 + + Capability Shader + Capability Float64 + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 17 19 25 50 + Source GLSL 400 + Name 4 "main" + Name 14 "foo(vf4[s1498];" + Name 13 "p" + Name 17 "color" + Name 19 "ucol" + Name 25 "size" + Name 44 "param" + Name 50 "dupUcol" + Decorate 9 SpecId 16 + Decorate 27 SpecId 17 + Decorate 31 SpecId 22 + Decorate 36 SpecId 19 + Decorate 37 SpecId 18 + Decorate 47 SpecId 116 + Decorate 57 SpecId 117 + Decorate 60 SpecId 122 + Decorate 64 SpecId 119 + Decorate 65 SpecId 118 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypeInt 32 1 + 9: 8(int) SpecConstant 5 + 10: TypeArray 7(fvec4) 9 + 11: TypePointer Function 10 + 12: TypeFunction 2 11(ptr) + 16: TypePointer Output 7(fvec4) + 17(color): 16(ptr) Variable Output + 18: TypePointer Input 10 + 19(ucol): 18(ptr) Variable Input + 20: 8(int) Constant 2 + 21: TypePointer Input 7(fvec4) + 24: TypePointer Output 8(int) + 25(size): 24(ptr) Variable Output + 26: TypeBool + 27: 26(bool) SpecConstantTrue + 30: TypeInt 32 0 + 31: 30(int) SpecConstant 2 + 35: TypeFloat 64 + 36: 35(float) SpecConstant 1413754136 1074340347 + 37: 6(float) SpecConstant 1078523331 + 47: 8(int) SpecConstant 12 + 48: TypeArray 7(fvec4) 47 + 49: TypePointer Input 48 + 50(dupUcol): 49(ptr) Variable Input + 57: 26(bool) SpecConstantTrue + 60: 30(int) SpecConstant 2 + 64: 35(float) SpecConstant 1413754136 1074340347 + 65: 6(float) SpecConstant 1078523331 + 4(main): 2 Function None 3 + 5: Label + 44(param): 11(ptr) Variable Function + 22: 21(ptr) AccessChain 19(ucol) 20 + 23: 7(fvec4) Load 22 + Store 17(color) 23 + Store 25(size) 9 + SelectionMerge 29 None + BranchConditional 27 28 29 + 28: Label + 32: 6(float) ConvertUToF 31 + 33: 7(fvec4) Load 17(color) + 34: 7(fvec4) VectorTimesScalar 33 32 + Store 17(color) 34 + Branch 29 + 29: Label + 38: 35(float) FConvert 37 + 39: 35(float) FDiv 36 38 + 40: 6(float) FConvert 39 + 41: 7(fvec4) Load 17(color) + 42: 7(fvec4) CompositeConstruct 40 40 40 40 + 43: 7(fvec4) FAdd 41 42 + Store 17(color) 43 + 45: 10 Load 19(ucol) + Store 44(param) 45 + 46: 2 FunctionCall 14(foo(vf4[s1498];) 44(param) + Return + FunctionEnd +14(foo(vf4[s1498];): 2 Function None 12 + 13(p): 11(ptr) FunctionParameter + 15: Label + 51: 21(ptr) AccessChain 50(dupUcol) 20 + 52: 7(fvec4) Load 51 + 53: 7(fvec4) Load 17(color) + 54: 7(fvec4) FAdd 53 52 + Store 17(color) 54 + 55: 8(int) Load 25(size) + 56: 8(int) IAdd 55 47 + Store 25(size) 56 + SelectionMerge 59 None + BranchConditional 57 58 59 + 58: Label + 61: 6(float) ConvertUToF 60 + 62: 7(fvec4) Load 17(color) + 63: 7(fvec4) VectorTimesScalar 62 61 + Store 17(color) 63 + Branch 59 + 59: Label + 66: 35(float) FConvert 65 + 67: 35(float) FDiv 64 66 + 68: 6(float) FConvert 67 + 69: 7(fvec4) Load 17(color) + 70: 7(fvec4) CompositeConstruct 68 68 68 68 + 71: 7(fvec4) FAdd 69 70 + Store 17(color) 71 + Return + FunctionEnd diff --git a/Test/baseResults/spv.structAssignment.frag.out b/Test/baseResults/spv.structAssignment.frag.out index 8edb4f01..7c28e103 100755 --- a/Test/baseResults/spv.structAssignment.frag.out +++ b/Test/baseResults/spv.structAssignment.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 31 44 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "lunarStruct1" @@ -33,6 +33,7 @@ Linked fragment stage: Name 40 "samp2D" Name 44 "coord" Name 49 "foo" + Decorate 40(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -40,14 +41,14 @@ Linked fragment stage: 8(lunarStruct1): TypeStruct 6(int) 7(float) 9(lunarStruct2): TypeStruct 6(int) 7(float) 8(lunarStruct1) 10(lunarStruct3): TypeStruct 9(lunarStruct2) 6(int) 7(float) 8(lunarStruct1) - 11: TypePointer UniformConstant 10(lunarStruct3) - 12(foo3): 11(ptr) Variable UniformConstant + 11: TypePointer Private 10(lunarStruct3) + 12(foo3): 11(ptr) Variable Private 13: 6(int) Constant 0 - 14: TypePointer UniformConstant 6(int) + 14: TypePointer Private 6(int) 17: TypeBool 21: TypePointer Function 9(lunarStruct2) - 23: TypePointer UniformConstant 9(lunarStruct2) - 27(foo2): 23(ptr) Variable UniformConstant + 23: TypePointer Private 9(lunarStruct2) + 27(foo2): 23(ptr) Variable Private 29: TypeVector 7(float) 4 30: TypePointer Output 29(fvec4) 31(gl_FragColor): 30(ptr) Variable Output @@ -61,8 +62,8 @@ Linked fragment stage: 42: TypeVector 7(float) 2 43: TypePointer Input 42(fvec2) 44(coord): 43(ptr) Variable Input - 48: TypePointer UniformConstant 8(lunarStruct1) - 49(foo): 48(ptr) Variable UniformConstant + 48: TypePointer Private 8(lunarStruct1) + 49(foo): 48(ptr) Variable Private 4(main): 2 Function None 3 5: Label 22(locals2): 21(ptr) Variable Function diff --git a/Test/baseResults/spv.structDeref.frag.out b/Test/baseResults/spv.structDeref.frag.out index ccfda84d..78ebdc63 100755 --- a/Test/baseResults/spv.structDeref.frag.out +++ b/Test/baseResults/spv.structDeref.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 61 99 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "s0" @@ -44,6 +44,7 @@ Linked fragment stage: Name 99 "gl_FragColor" Name 116 "samp2D" Name 122 "foo2" + Decorate 116(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -55,11 +56,11 @@ Linked fragment stage: 12: 11(int) Constant 12 13: TypeArray 10(s2) 12 14(s3): TypeStruct 13 6(int) 7(float) 9(s1) - 15: TypePointer UniformConstant 14(s3) - 16(foo3): 15(ptr) Variable UniformConstant + 15: TypePointer Private 14(s3) + 16(foo3): 15(ptr) Variable Private 17: 6(int) Constant 0 18: 6(int) Constant 9 - 19: TypePointer UniformConstant 6(int) + 19: TypePointer Private 6(int) 22: TypeBool 26: TypePointer Function 10(s2) 28: 6(int) Constant 1 @@ -78,8 +79,8 @@ Linked fragment stage: 44: TypeArray 9(s1) 43 45: TypePointer Function 44 47: 6(int) Constant 6 - 48: TypePointer UniformConstant 9(s1) - 49(foo1): 48(ptr) Variable UniformConstant + 48: TypePointer Private 9(s1) + 49(foo1): 48(ptr) Variable Private 52: TypePointer Function 8(s0) 54(s00): TypeStruct 8(s0) 55: TypePointer Function 54(s00) @@ -90,15 +91,15 @@ Linked fragment stage: 62: 11(int) Constant 0 63: TypePointer Input 7(float) 67: 11(int) Constant 1 - 70: TypePointer UniformConstant 8(s0) - 71(foo0): 70(ptr) Variable UniformConstant + 70: TypePointer Private 8(s0) + 71(foo0): 70(ptr) Variable Private 75: 7(float) Constant 1073741824 76: 7(float) Constant 1077936128 77: 7(float) Constant 1082130432 78: 7(float) Constant 1084227584 79: 38 ConstantComposite 41 29 75 76 77 78 - 85: TypePointer UniformConstant 54(s00) - 86(foo00): 85(ptr) Variable UniformConstant + 85: TypePointer Private 54(s00) + 86(foo00): 85(ptr) Variable Private 88: TypePointer Function 6(int) 91: 6(int) Constant 5 97: TypeVector 7(float) 4 @@ -109,8 +110,8 @@ Linked fragment stage: 114: TypeSampledImage 113 115: TypePointer UniformConstant 114 116(samp2D): 115(ptr) Variable UniformConstant - 121: TypePointer UniformConstant 10(s2) - 122(foo2): 121(ptr) Variable UniformConstant + 121: TypePointer Private 10(s2) + 122(foo2): 121(ptr) Variable Private 4(main): 2 Function None 3 5: Label 27(locals2): 26(ptr) Variable Function diff --git a/Test/baseResults/spv.structure.frag.out b/Test/baseResults/spv.structure.frag.out index 866a7bdf..8d91ed04 100755 --- a/Test/baseResults/spv.structure.frag.out +++ b/Test/baseResults/spv.structure.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 45 54 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "scale" @@ -28,6 +28,7 @@ Linked fragment stage: Name 50 "samp2D" Name 54 "coord" Name 59 "foo" + Decorate 50(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -46,16 +47,16 @@ Linked fragment stage: 20: TypeArray 18(lunarStruct1) 19 21(lunarStruct2): TypeStruct 13 6(float) 20 22: TypeArray 21(lunarStruct2) 12 - 23: TypePointer UniformConstant 22 - 24(foo2): 23(ptr) Variable UniformConstant + 23: TypePointer Private 22 + 24(foo2): 23(ptr) Variable Private 25: 10(int) Constant 3 26: 10(int) Constant 0 27: 10(int) Constant 4 - 28: TypePointer UniformConstant 10(int) + 28: TypePointer Private 10(int) 31: TypeBool 35: 10(int) Constant 2 36: 11(int) Constant 0 - 37: TypePointer UniformConstant 6(float) + 37: TypePointer Private 6(float) 41: 10(int) Constant 1 44: TypePointer Output 16(fvec4) 45(gl_FragColor): 44(ptr) Variable Output @@ -66,8 +67,8 @@ Linked fragment stage: 52: TypeVector 6(float) 2 53: TypePointer Input 52(fvec2) 54(coord): 53(ptr) Variable Input - 58: TypePointer UniformConstant 18(lunarStruct1) - 59(foo): 58(ptr) Variable UniformConstant + 58: TypePointer Private 18(lunarStruct1) + 59(foo): 58(ptr) Variable Private 4(main): 2 Function None 3 5: Label 8(scale): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.subpass.frag.out b/Test/baseResults/spv.subpass.frag.out new file mode 100644 index 00000000..6393f6f2 --- /dev/null +++ b/Test/baseResults/spv.subpass.frag.out @@ -0,0 +1,123 @@ +spv.subpass.frag +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 70 + + Capability Shader + Capability InputAttachment + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 15 27 54 + ExecutionMode 4 OriginUpperLeft + Source GLSL 400 + Name 4 "main" + Name 11 "foo(iIPM1;" + Name 10 "sb" + Name 15 "icolor" + Name 27 "color" + Name 30 "sub" + Name 35 "subMS" + Name 42 "isub" + Name 46 "isubMS" + Name 54 "ucolor" + Name 57 "usub" + Name 62 "usubMS" + Name 67 "param" + Decorate 30(sub) DescriptorSet 0 + Decorate 30(sub) InputAttachmentIndex 1 + Decorate 35(subMS) DescriptorSet 0 + Decorate 35(subMS) InputAttachmentIndex 2 + Decorate 42(isub) DescriptorSet 0 + Decorate 42(isub) InputAttachmentIndex 3 + Decorate 46(isubMS) DescriptorSet 0 + Decorate 46(isubMS) InputAttachmentIndex 4 + Decorate 57(usub) DescriptorSet 0 + Decorate 57(usub) InputAttachmentIndex 5 + Decorate 62(usubMS) DescriptorSet 0 + Decorate 62(usubMS) InputAttachmentIndex 6 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypeImage 6(int) SubpassData multi-sampled nonsampled format:Unknown + 8: TypePointer Function 7 + 9: TypeFunction 2 8(ptr) + 13: TypeVector 6(int) 4 + 14: TypePointer Output 13(ivec4) + 15(icolor): 14(ptr) Variable Output + 17: 6(int) Constant 3 + 18: 6(int) Constant 0 + 19: TypeVector 6(int) 2 + 20: 19(ivec2) ConstantComposite 18 18 + 24: TypeFloat 32 + 25: TypeVector 24(float) 4 + 26: TypePointer Output 25(fvec4) + 27(color): 26(ptr) Variable Output + 28: TypeImage 24(float) SubpassData nonsampled format:Unknown + 29: TypePointer UniformConstant 28 + 30(sub): 29(ptr) Variable UniformConstant + 33: TypeImage 24(float) SubpassData multi-sampled nonsampled format:Unknown + 34: TypePointer UniformConstant 33 + 35(subMS): 34(ptr) Variable UniformConstant + 40: TypeImage 6(int) SubpassData nonsampled format:Unknown + 41: TypePointer UniformConstant 40 + 42(isub): 41(ptr) Variable UniformConstant + 45: TypePointer UniformConstant 7 + 46(isubMS): 45(ptr) Variable UniformConstant + 51: TypeInt 32 0 + 52: TypeVector 51(int) 4 + 53: TypePointer Output 52(ivec4) + 54(ucolor): 53(ptr) Variable Output + 55: TypeImage 51(int) SubpassData nonsampled format:Unknown + 56: TypePointer UniformConstant 55 + 57(usub): 56(ptr) Variable UniformConstant + 60: TypeImage 51(int) SubpassData multi-sampled nonsampled format:Unknown + 61: TypePointer UniformConstant 60 + 62(usubMS): 61(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 67(param): 8(ptr) Variable Function + 31: 28 Load 30(sub) + 32: 25(fvec4) ImageRead 31 20 + Store 27(color) 32 + 36: 33 Load 35(subMS) + 37: 25(fvec4) ImageRead 36 20 Sample 17 + 38: 25(fvec4) Load 27(color) + 39: 25(fvec4) FAdd 38 37 + Store 27(color) 39 + 43: 40 Load 42(isub) + 44: 13(ivec4) ImageRead 43 20 + Store 15(icolor) 44 + 47: 7 Load 46(isubMS) + 48: 13(ivec4) ImageRead 47 20 Sample 17 + 49: 13(ivec4) Load 15(icolor) + 50: 13(ivec4) IAdd 49 48 + Store 15(icolor) 50 + 58: 55 Load 57(usub) + 59: 52(ivec4) ImageRead 58 20 + Store 54(ucolor) 59 + 63: 60 Load 62(usubMS) + 64: 52(ivec4) ImageRead 63 20 Sample 17 + 65: 52(ivec4) Load 54(ucolor) + 66: 52(ivec4) IAdd 65 64 + Store 54(ucolor) 66 + 68: 7 Load 46(isubMS) + Store 67(param) 68 + 69: 2 FunctionCall 11(foo(iIPM1;) 67(param) + Return + FunctionEnd + 11(foo(iIPM1;): 2 Function None 9 + 10(sb): 8(ptr) FunctionParameter + 12: Label + 16: 7 Load 10(sb) + 21: 13(ivec4) ImageRead 16 20 Sample 17 + 22: 13(ivec4) Load 15(icolor) + 23: 13(ivec4) IAdd 22 21 + Store 15(icolor) 23 + Return + FunctionEnd diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index f96ec88f..87ea4c87 100755 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -15,8 +15,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 75 227 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 62 75 129 227 233 + ExecutionMode 4 OriginUpperLeft Source ESSL 310 Name 4 "main" Name 15 "foo1(vf4;vf4;i1;" @@ -64,6 +64,7 @@ Linked fragment stage: Decorate 55 RelaxedPrecision Decorate 60(local) RelaxedPrecision Decorate 62(c) RelaxedPrecision + Decorate 62(c) Flat Decorate 63 RelaxedPrecision Decorate 64 RelaxedPrecision Decorate 66 RelaxedPrecision @@ -104,6 +105,7 @@ Linked fragment stage: Decorate 126 RelaxedPrecision Decorate 127 RelaxedPrecision Decorate 129(d) RelaxedPrecision + Decorate 129(d) Flat Decorate 130 RelaxedPrecision Decorate 134 RelaxedPrecision Decorate 135 RelaxedPrecision @@ -185,13 +187,13 @@ Linked fragment stage: 37: 7(fvec4) ConstantComposite 36 36 36 36 48: 6(float) Constant 1065353216 49: 7(fvec4) ConstantComposite 48 48 48 48 - 61: TypePointer UniformConstant 9(int) - 62(c): 61(ptr) Variable UniformConstant + 61: TypePointer Input 9(int) + 62(c): 61(ptr) Variable Input 65: 9(int) Constant 1 72: TypePointer Function 6(float) 74: TypePointer Input 6(float) 75(x): 74(ptr) Variable Input - 129(d): 61(ptr) Variable UniformConstant + 129(d): 61(ptr) Variable Input 156: 9(int) Constant 0 163: 9(int) Constant 10 164: TypeBool @@ -201,8 +203,8 @@ Linked fragment stage: 208: 6(float) Constant 1079739679 226: TypePointer Output 6(float) 227(color): 226(ptr) Variable Output - 232: TypePointer UniformConstant 7(fvec4) - 233(v): 232(ptr) Variable UniformConstant + 232: TypePointer Input 7(fvec4) + 233(v): 232(ptr) Variable Input 241: TypeInt 32 0 242: 241(int) Constant 1 253: 241(int) Constant 2 diff --git a/Test/baseResults/spv.swizzle.frag.out b/Test/baseResults/spv.swizzle.frag.out index 82137e27..471fed11 100755 --- a/Test/baseResults/spv.swizzle.frag.out +++ b/Test/baseResults/spv.swizzle.frag.out @@ -5,13 +5,13 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 109 +// Id's are bound by 108 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 30 69 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 14 30 69 107 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "blendscale" @@ -27,7 +27,7 @@ Linked fragment stage: Name 69 "gl_FragColor" Name 81 "c" Name 83 "rep" - Name 108 "blend" + Name 107 "blend" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -35,8 +35,8 @@ Linked fragment stage: 9: 6(float) Constant 1071971828 10: TypeVector 6(float) 4 11: TypePointer Function 10(fvec4) - 13: TypePointer UniformConstant 10(fvec4) - 14(u): 13(ptr) Variable UniformConstant + 13: TypePointer Input 10(fvec4) + 14(u): 13(ptr) Variable Input 25: TypeInt 32 0 26: 25(int) Constant 2 28: TypeVector 6(float) 2 @@ -45,8 +45,8 @@ Linked fragment stage: 35: 25(int) Constant 0 40: 25(int) Constant 1 54: TypeBool - 55: TypePointer UniformConstant 54(bool) - 56(p): 55(ptr) Variable UniformConstant + 55: TypePointer Private 54(bool) + 56(p): 55(ptr) Variable Private 60: TypePointer Input 6(float) 68: TypePointer Output 10(fvec4) 69(gl_FragColor): 68(ptr) Variable Output @@ -56,8 +56,7 @@ Linked fragment stage: 86: 10(fvec4) ConstantComposite 84 84 84 85 92: 6(float) Constant 3212836864 102: 6(float) Constant 1079613850 - 107: TypePointer UniformConstant 6(float) - 108(blend): 107(ptr) Variable UniformConstant + 107(blend): 60(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(blendscale): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.test.frag.out b/Test/baseResults/spv.test.frag.out index 5d9d1205..8f1c5260 100755 --- a/Test/baseResults/spv.test.frag.out +++ b/Test/baseResults/spv.test.frag.out @@ -7,26 +7,28 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 56 +// Id's are bound by 55 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 20 38 44 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 20 22 37 43 46 49 + ExecutionMode 4 OriginUpperLeft Source GLSL 400 Name 4 "main" Name 8 "blendscale" Name 12 "v" Name 16 "texSampler2D" Name 20 "t" - Name 23 "scale" - Name 30 "w" - Name 34 "texSampler3D" - Name 38 "coords" - Name 44 "gl_FragColor" - Name 47 "u" - Name 50 "blend" + Name 22 "scale" + Name 29 "w" + Name 33 "texSampler3D" + Name 37 "coords" + Name 43 "gl_FragColor" + Name 46 "u" + Name 49 "blend" + Decorate 16(texSampler2D) DescriptorSet 0 + Decorate 33(texSampler3D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -41,49 +43,48 @@ Linked fragment stage: 18: TypeVector 6(float) 2 19: TypePointer Input 18(fvec2) 20(t): 19(ptr) Variable Input - 22: TypePointer UniformConstant 18(fvec2) - 23(scale): 22(ptr) Variable UniformConstant - 31: TypeImage 6(float) 3D sampled format:Unknown - 32: TypeSampledImage 31 - 33: TypePointer UniformConstant 32 -34(texSampler3D): 33(ptr) Variable UniformConstant - 36: TypeVector 6(float) 3 - 37: TypePointer Input 36(fvec3) - 38(coords): 37(ptr) Variable Input - 43: TypePointer Output 10(fvec4) -44(gl_FragColor): 43(ptr) Variable Output - 46: TypePointer UniformConstant 10(fvec4) - 47(u): 46(ptr) Variable UniformConstant - 49: TypePointer UniformConstant 6(float) - 50(blend): 49(ptr) Variable UniformConstant + 22(scale): 19(ptr) Variable Input + 30: TypeImage 6(float) 3D sampled format:Unknown + 31: TypeSampledImage 30 + 32: TypePointer UniformConstant 31 +33(texSampler3D): 32(ptr) Variable UniformConstant + 35: TypeVector 6(float) 3 + 36: TypePointer Input 35(fvec3) + 37(coords): 36(ptr) Variable Input + 42: TypePointer Output 10(fvec4) +43(gl_FragColor): 42(ptr) Variable Output + 45: TypePointer Input 10(fvec4) + 46(u): 45(ptr) Variable Input + 48: TypePointer Input 6(float) + 49(blend): 48(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(blendscale): 7(ptr) Variable Function 12(v): 11(ptr) Variable Function - 30(w): 11(ptr) Variable Function + 29(w): 11(ptr) Variable Function Store 8(blendscale) 9 17: 14 Load 16(texSampler2D) 21: 18(fvec2) Load 20(t) - 24: 18(fvec2) Load 23(scale) - 25: 18(fvec2) FAdd 21 24 - 26: 18(fvec2) Load 23(scale) - 27: 18(fvec2) FDiv 25 26 - 28: 10(fvec4) ImageSampleImplicitLod 17 27 - 29: 10(fvec4) VectorShuffle 28 28 3 2 1 0 - Store 12(v) 29 - 35: 32 Load 34(texSampler3D) - 39: 36(fvec3) Load 38(coords) - 40: 10(fvec4) ImageSampleImplicitLod 35 39 - 41: 10(fvec4) Load 12(v) - 42: 10(fvec4) FAdd 40 41 - Store 30(w) 42 - 45: 10(fvec4) Load 30(w) - 48: 10(fvec4) Load 47(u) - 51: 6(float) Load 50(blend) - 52: 6(float) Load 8(blendscale) - 53: 6(float) FMul 51 52 - 54: 10(fvec4) CompositeConstruct 53 53 53 53 - 55: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 45 48 54 - Store 44(gl_FragColor) 55 + 23: 18(fvec2) Load 22(scale) + 24: 18(fvec2) FAdd 21 23 + 25: 18(fvec2) Load 22(scale) + 26: 18(fvec2) FDiv 24 25 + 27: 10(fvec4) ImageSampleImplicitLod 17 26 + 28: 10(fvec4) VectorShuffle 27 27 3 2 1 0 + Store 12(v) 28 + 34: 31 Load 33(texSampler3D) + 38: 35(fvec3) Load 37(coords) + 39: 10(fvec4) ImageSampleImplicitLod 34 38 + 40: 10(fvec4) Load 12(v) + 41: 10(fvec4) FAdd 39 40 + Store 29(w) 41 + 44: 10(fvec4) Load 29(w) + 47: 10(fvec4) Load 46(u) + 50: 6(float) Load 49(blend) + 51: 6(float) Load 8(blendscale) + 52: 6(float) FMul 50 51 + 53: 10(fvec4) CompositeConstruct 52 52 52 52 + 54: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 44 47 53 + Store 43(gl_FragColor) 54 Return FunctionEnd diff --git a/Test/baseResults/spv.test.vert.out b/Test/baseResults/spv.test.vert.out index ef7fd988..697e468d 100755 --- a/Test/baseResults/spv.test.vert.out +++ b/Test/baseResults/spv.test.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 28 +// Id's are bound by 24 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 11 15 21 26 27 + EntryPoint Vertex 4 "main" 9 11 15 18 21 Source GLSL 140 Name 4 "main" Name 9 "uv" @@ -20,11 +20,7 @@ Linked vertex stage: Name 15 "gl_Position" Name 18 "transform" Name 21 "position" - Name 26 "gl_VertexID" - Name 27 "gl_InstanceID" Decorate 15(gl_Position) BuiltIn Position - Decorate 26(gl_VertexID) BuiltIn VertexId - Decorate 27(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -37,14 +33,10 @@ Linked vertex stage: 14: TypePointer Output 13(fvec4) 15(gl_Position): 14(ptr) Variable Output 16: TypeMatrix 13(fvec4) 4 - 17: TypePointer UniformConstant 16 - 18(transform): 17(ptr) Variable UniformConstant + 17: TypePointer Input 16 + 18(transform): 17(ptr) Variable Input 20: TypePointer Input 13(fvec4) 21(position): 20(ptr) Variable Input - 24: TypeInt 32 1 - 25: TypePointer Input 24(int) - 26(gl_VertexID): 25(ptr) Variable Input -27(gl_InstanceID): 25(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12: 7(fvec2) Load 11(uv_in) diff --git a/Test/baseResults/spv.texture.frag.out b/Test/baseResults/spv.texture.frag.out index 91a6832c..df5fe2be 100755 --- a/Test/baseResults/spv.texture.frag.out +++ b/Test/baseResults/spv.texture.frag.out @@ -1,18 +1,22 @@ spv.texture.frag +WARNING: 0:10: varying deprecated in version 130; may be removed in future release +WARNING: 0:11: varying deprecated in version 130; may be removed in future release +WARNING: 0:12: varying deprecated in version 130; may be removed in future release + Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 291 +// Id's are bound by 290 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 47 276 290 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 47 276 279 282 288 289 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "blendscale" @@ -37,8 +41,14 @@ Linked fragment stage: Name 276 "gl_FragColor" Name 279 "u" Name 282 "blend" - Name 289 "scale" - Name 290 "t" + Name 288 "scale" + Name 289 "t" + Decorate 32(texSampler1D) DescriptorSet 0 + Decorate 72(texSampler2D) DescriptorSet 0 + Decorate 98(texSampler3D) DescriptorSet 0 + Decorate 124(texSamplerCube) DescriptorSet 0 + Decorate 139(shadowSampler1D) DescriptorSet 0 + Decorate 158(shadowSampler2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -97,13 +107,12 @@ Linked fragment stage: 251: 205(ivec2) ConstantComposite 249 250 275: TypePointer Output 22(fvec4) 276(gl_FragColor): 275(ptr) Variable Output - 278: TypePointer UniformConstant 22(fvec4) - 279(u): 278(ptr) Variable UniformConstant - 281: TypePointer UniformConstant 6(float) - 282(blend): 281(ptr) Variable UniformConstant - 288: TypePointer UniformConstant 45(fvec2) - 289(scale): 288(ptr) Variable UniformConstant - 290(t): 46(ptr) Variable Input + 278: TypePointer Input 22(fvec4) + 279(u): 278(ptr) Variable Input + 281: TypePointer Input 6(float) + 282(blend): 281(ptr) Variable Input + 288(scale): 46(ptr) Variable Input + 289(t): 46(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(blendscale): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.texture.vert.out b/Test/baseResults/spv.texture.vert.out index 23cf7542..179e567d 100755 --- a/Test/baseResults/spv.texture.vert.out +++ b/Test/baseResults/spv.texture.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 146 +// Id's are bound by 142 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 39 140 144 145 + EntryPoint Vertex 4 "main" 39 140 Source GLSL 140 Name 4 "main" Name 8 "lod" @@ -27,11 +27,13 @@ Linked vertex stage: Name 102 "shadowSampler1D" Name 114 "shadowSampler2D" Name 140 "gl_Position" - Name 144 "gl_VertexID" - Name 145 "gl_InstanceID" + Decorate 29(texSampler1D) DescriptorSet 0 + Decorate 54(texSampler2D) DescriptorSet 0 + Decorate 76(texSampler3D) DescriptorSet 0 + Decorate 92(texSamplerCube) DescriptorSet 0 + Decorate 102(shadowSampler1D) DescriptorSet 0 + Decorate 114(shadowSampler2D) DescriptorSet 0 Decorate 140(gl_Position) BuiltIn Position - Decorate 144(gl_VertexID) BuiltIn VertexId - Decorate 145(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -78,10 +80,6 @@ Linked vertex stage: 114(shadowSampler2D): 113(ptr) Variable UniformConstant 139: TypePointer Output 18(fvec4) 140(gl_Position): 139(ptr) Variable Output - 142: TypeInt 32 1 - 143: TypePointer Input 142(int) -144(gl_VertexID): 143(ptr) Variable Input -145(gl_InstanceID): 143(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(lod): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.types.frag.out b/Test/baseResults/spv.types.frag.out index 5355a8f0..4295370d 100755 --- a/Test/baseResults/spv.types.frag.out +++ b/Test/baseResults/spv.types.frag.out @@ -5,13 +5,13 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 268 +// Id's are bound by 260 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 94 104 114 124 134 144 154 164 168 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 91 93 100 102 109 111 118 120 127 129 136 138 145 147 154 156 160 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 8 "b" @@ -28,112 +28,108 @@ Linked fragment stage: Name 64 "i_b4" Name 89 "i" Name 91 "u_i" - Name 94 "i_i" - Name 99 "i2" - Name 101 "u_i2" - Name 104 "i_i2" - Name 109 "i3" - Name 111 "u_i3" - Name 114 "i_i3" - Name 119 "i4" - Name 121 "u_i4" - Name 124 "i_i4" - Name 129 "f" - Name 131 "u_f" - Name 134 "i_f" - Name 139 "f2" - Name 141 "u_f2" - Name 144 "i_f2" - Name 149 "f3" - Name 151 "u_f3" - Name 154 "i_f3" - Name 159 "f4" - Name 161 "u_f4" - Name 164 "i_f4" - Name 168 "gl_FragColor" - Decorate 94(i_i) Flat - Decorate 104(i_i2) Flat - Decorate 114(i_i3) Flat - Decorate 124(i_i4) Flat + Name 93 "i_i" + Name 98 "i2" + Name 100 "u_i2" + Name 102 "i_i2" + Name 107 "i3" + Name 109 "u_i3" + Name 111 "i_i3" + Name 116 "i4" + Name 118 "u_i4" + Name 120 "i_i4" + Name 125 "f" + Name 127 "u_f" + Name 129 "i_f" + Name 134 "f2" + Name 136 "u_f2" + Name 138 "i_f2" + Name 143 "f3" + Name 145 "u_f3" + Name 147 "i_f3" + Name 152 "f4" + Name 154 "u_f4" + Name 156 "i_f4" + Name 160 "gl_FragColor" + Decorate 91(u_i) Flat + Decorate 93(i_i) Flat + Decorate 100(u_i2) Flat + Decorate 102(i_i2) Flat + Decorate 109(u_i3) Flat + Decorate 111(i_i3) Flat + Decorate 118(u_i4) Flat + Decorate 120(i_i4) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeBool 7: TypePointer Function 6(bool) - 9: TypePointer UniformConstant 6(bool) - 10(u_b): 9(ptr) Variable UniformConstant - 12(i_b): 9(ptr) Variable UniformConstant + 9: TypePointer Private 6(bool) + 10(u_b): 9(ptr) Variable Private + 12(i_b): 9(ptr) Variable Private 15: TypeVector 6(bool) 2 16: TypePointer Function 15(bvec2) - 18: TypePointer UniformConstant 15(bvec2) - 19(u_b2): 18(ptr) Variable UniformConstant - 22(i_b2): 18(ptr) Variable UniformConstant + 18: TypePointer Private 15(bvec2) + 19(u_b2): 18(ptr) Variable Private + 22(i_b2): 18(ptr) Variable Private 33: TypeVector 6(bool) 3 34: TypePointer Function 33(bvec3) - 36: TypePointer UniformConstant 33(bvec3) - 37(u_b3): 36(ptr) Variable UniformConstant - 40(i_b3): 36(ptr) Variable UniformConstant + 36: TypePointer Private 33(bvec3) + 37(u_b3): 36(ptr) Variable Private + 40(i_b3): 36(ptr) Variable Private 57: TypeVector 6(bool) 4 58: TypePointer Function 57(bvec4) - 60: TypePointer UniformConstant 57(bvec4) - 61(u_b4): 60(ptr) Variable UniformConstant - 64(i_b4): 60(ptr) Variable UniformConstant + 60: TypePointer Private 57(bvec4) + 61(u_b4): 60(ptr) Variable Private + 64(i_b4): 60(ptr) Variable Private 87: TypeInt 32 1 88: TypePointer Function 87(int) - 90: TypePointer UniformConstant 87(int) - 91(u_i): 90(ptr) Variable UniformConstant - 93: TypePointer Input 87(int) - 94(i_i): 93(ptr) Variable Input - 97: TypeVector 87(int) 2 - 98: TypePointer Function 97(ivec2) - 100: TypePointer UniformConstant 97(ivec2) - 101(u_i2): 100(ptr) Variable UniformConstant - 103: TypePointer Input 97(ivec2) - 104(i_i2): 103(ptr) Variable Input - 107: TypeVector 87(int) 3 - 108: TypePointer Function 107(ivec3) - 110: TypePointer UniformConstant 107(ivec3) - 111(u_i3): 110(ptr) Variable UniformConstant - 113: TypePointer Input 107(ivec3) - 114(i_i3): 113(ptr) Variable Input - 117: TypeVector 87(int) 4 - 118: TypePointer Function 117(ivec4) - 120: TypePointer UniformConstant 117(ivec4) - 121(u_i4): 120(ptr) Variable UniformConstant - 123: TypePointer Input 117(ivec4) - 124(i_i4): 123(ptr) Variable Input - 127: TypeFloat 32 - 128: TypePointer Function 127(float) - 130: TypePointer UniformConstant 127(float) - 131(u_f): 130(ptr) Variable UniformConstant - 133: TypePointer Input 127(float) - 134(i_f): 133(ptr) Variable Input - 137: TypeVector 127(float) 2 - 138: TypePointer Function 137(fvec2) - 140: TypePointer UniformConstant 137(fvec2) - 141(u_f2): 140(ptr) Variable UniformConstant - 143: TypePointer Input 137(fvec2) - 144(i_f2): 143(ptr) Variable Input - 147: TypeVector 127(float) 3 - 148: TypePointer Function 147(fvec3) - 150: TypePointer UniformConstant 147(fvec3) - 151(u_f3): 150(ptr) Variable UniformConstant - 153: TypePointer Input 147(fvec3) - 154(i_f3): 153(ptr) Variable Input - 157: TypeVector 127(float) 4 - 158: TypePointer Function 157(fvec4) - 160: TypePointer UniformConstant 157(fvec4) - 161(u_f4): 160(ptr) Variable UniformConstant - 163: TypePointer Input 157(fvec4) - 164(i_f4): 163(ptr) Variable Input - 167: TypePointer Output 157(fvec4) -168(gl_FragColor): 167(ptr) Variable Output - 201: TypeInt 32 0 - 202: 201(int) Constant 0 - 206: 201(int) Constant 1 - 216: 201(int) Constant 2 - 229: 201(int) Constant 3 - 265: 127(float) Constant 1065353216 - 266: 157(fvec4) ConstantComposite 265 265 265 265 + 90: TypePointer Input 87(int) + 91(u_i): 90(ptr) Variable Input + 93(i_i): 90(ptr) Variable Input + 96: TypeVector 87(int) 2 + 97: TypePointer Function 96(ivec2) + 99: TypePointer Input 96(ivec2) + 100(u_i2): 99(ptr) Variable Input + 102(i_i2): 99(ptr) Variable Input + 105: TypeVector 87(int) 3 + 106: TypePointer Function 105(ivec3) + 108: TypePointer Input 105(ivec3) + 109(u_i3): 108(ptr) Variable Input + 111(i_i3): 108(ptr) Variable Input + 114: TypeVector 87(int) 4 + 115: TypePointer Function 114(ivec4) + 117: TypePointer Input 114(ivec4) + 118(u_i4): 117(ptr) Variable Input + 120(i_i4): 117(ptr) Variable Input + 123: TypeFloat 32 + 124: TypePointer Function 123(float) + 126: TypePointer Input 123(float) + 127(u_f): 126(ptr) Variable Input + 129(i_f): 126(ptr) Variable Input + 132: TypeVector 123(float) 2 + 133: TypePointer Function 132(fvec2) + 135: TypePointer Input 132(fvec2) + 136(u_f2): 135(ptr) Variable Input + 138(i_f2): 135(ptr) Variable Input + 141: TypeVector 123(float) 3 + 142: TypePointer Function 141(fvec3) + 144: TypePointer Input 141(fvec3) + 145(u_f3): 144(ptr) Variable Input + 147(i_f3): 144(ptr) Variable Input + 150: TypeVector 123(float) 4 + 151: TypePointer Function 150(fvec4) + 153: TypePointer Input 150(fvec4) + 154(u_f4): 153(ptr) Variable Input + 156(i_f4): 153(ptr) Variable Input + 159: TypePointer Output 150(fvec4) +160(gl_FragColor): 159(ptr) Variable Output + 193: TypeInt 32 0 + 194: 193(int) Constant 0 + 198: 193(int) Constant 1 + 208: 193(int) Constant 2 + 221: 193(int) Constant 3 + 257: 123(float) Constant 1065353216 + 258: 150(fvec4) ConstantComposite 257 257 257 257 4(main): 2 Function None 3 5: Label 8(b): 7(ptr) Variable Function @@ -141,14 +137,14 @@ Linked fragment stage: 35(b3): 34(ptr) Variable Function 59(b4): 58(ptr) Variable Function 89(i): 88(ptr) Variable Function - 99(i2): 98(ptr) Variable Function - 109(i3): 108(ptr) Variable Function - 119(i4): 118(ptr) Variable Function - 129(f): 128(ptr) Variable Function - 139(f2): 138(ptr) Variable Function - 149(f3): 148(ptr) Variable Function - 159(f4): 158(ptr) Variable Function - 169: 158(ptr) Variable Function + 98(i2): 97(ptr) Variable Function + 107(i3): 106(ptr) Variable Function + 116(i4): 115(ptr) Variable Function + 125(f): 124(ptr) Variable Function + 134(f2): 133(ptr) Variable Function + 143(f3): 142(ptr) Variable Function + 152(f4): 151(ptr) Variable Function + 161: 151(ptr) Variable Function 11: 6(bool) Load 10(u_b) 13: 6(bool) Load 12(i_b) 14: 6(bool) LogicalAnd 11 13 @@ -211,134 +207,134 @@ Linked fragment stage: 86: 57(bvec4) CompositeConstruct 85 85 85 85 Store 59(b4) 86 92: 87(int) Load 91(u_i) - 95: 87(int) Load 94(i_i) - 96: 87(int) IAdd 92 95 - Store 89(i) 96 - 102: 97(ivec2) Load 101(u_i2) - 105: 97(ivec2) Load 104(i_i2) - 106: 97(ivec2) IAdd 102 105 - Store 99(i2) 106 - 112: 107(ivec3) Load 111(u_i3) - 115: 107(ivec3) Load 114(i_i3) - 116: 107(ivec3) IAdd 112 115 - Store 109(i3) 116 - 122: 117(ivec4) Load 121(u_i4) - 125: 117(ivec4) Load 124(i_i4) - 126: 117(ivec4) IAdd 122 125 - Store 119(i4) 126 - 132: 127(float) Load 131(u_f) - 135: 127(float) Load 134(i_f) - 136: 127(float) FAdd 132 135 - Store 129(f) 136 - 142: 137(fvec2) Load 141(u_f2) - 145: 137(fvec2) Load 144(i_f2) - 146: 137(fvec2) FAdd 142 145 - Store 139(f2) 146 - 152: 147(fvec3) Load 151(u_f3) - 155: 147(fvec3) Load 154(i_f3) - 156: 147(fvec3) FAdd 152 155 - Store 149(f3) 156 - 162: 157(fvec4) Load 161(u_f4) - 165: 157(fvec4) Load 164(i_f4) - 166: 157(fvec4) FAdd 162 165 - Store 159(f4) 166 - 170: 6(bool) Load 8(b) - 171: 15(bvec2) Load 17(b2) - 172: 6(bool) CompositeExtract 171 0 - 173: 6(bool) LogicalOr 170 172 - 174: 15(bvec2) Load 17(b2) - 175: 6(bool) CompositeExtract 174 1 - 176: 6(bool) LogicalOr 173 175 - 177: 33(bvec3) Load 35(b3) - 178: 6(bool) CompositeExtract 177 0 - 179: 6(bool) LogicalOr 176 178 - 180: 33(bvec3) Load 35(b3) - 181: 6(bool) CompositeExtract 180 1 - 182: 6(bool) LogicalOr 179 181 - 183: 33(bvec3) Load 35(b3) - 184: 6(bool) CompositeExtract 183 2 - 185: 6(bool) LogicalOr 182 184 - 186: 57(bvec4) Load 59(b4) - 187: 6(bool) CompositeExtract 186 0 - 188: 6(bool) LogicalOr 185 187 - 189: 57(bvec4) Load 59(b4) - 190: 6(bool) CompositeExtract 189 1 - 191: 6(bool) LogicalOr 188 190 - 192: 57(bvec4) Load 59(b4) - 193: 6(bool) CompositeExtract 192 2 - 194: 6(bool) LogicalOr 191 193 - 195: 57(bvec4) Load 59(b4) - 196: 6(bool) CompositeExtract 195 3 - 197: 6(bool) LogicalOr 194 196 - SelectionMerge 199 None - BranchConditional 197 198 264 - 198: Label - 200: 87(int) Load 89(i) - 203: 88(ptr) AccessChain 99(i2) 202 - 204: 87(int) Load 203 - 205: 87(int) IAdd 200 204 - 207: 88(ptr) AccessChain 99(i2) 206 - 208: 87(int) Load 207 - 209: 87(int) IAdd 205 208 - 210: 88(ptr) AccessChain 109(i3) 202 - 211: 87(int) Load 210 - 212: 87(int) IAdd 209 211 - 213: 88(ptr) AccessChain 109(i3) 206 - 214: 87(int) Load 213 - 215: 87(int) IAdd 212 214 - 217: 88(ptr) AccessChain 109(i3) 216 - 218: 87(int) Load 217 - 219: 87(int) IAdd 215 218 - 220: 88(ptr) AccessChain 119(i4) 202 - 221: 87(int) Load 220 - 222: 87(int) IAdd 219 221 - 223: 88(ptr) AccessChain 119(i4) 206 - 224: 87(int) Load 223 - 225: 87(int) IAdd 222 224 - 226: 88(ptr) AccessChain 119(i4) 216 - 227: 87(int) Load 226 - 228: 87(int) IAdd 225 227 - 230: 88(ptr) AccessChain 119(i4) 229 - 231: 87(int) Load 230 - 232: 87(int) IAdd 228 231 - 233: 127(float) ConvertSToF 232 - 234: 127(float) Load 129(f) - 235: 127(float) FAdd 233 234 - 236: 128(ptr) AccessChain 139(f2) 202 - 237: 127(float) Load 236 - 238: 127(float) FAdd 235 237 - 239: 128(ptr) AccessChain 139(f2) 206 - 240: 127(float) Load 239 - 241: 127(float) FAdd 238 240 - 242: 128(ptr) AccessChain 149(f3) 202 - 243: 127(float) Load 242 - 244: 127(float) FAdd 241 243 - 245: 128(ptr) AccessChain 149(f3) 206 - 246: 127(float) Load 245 - 247: 127(float) FAdd 244 246 - 248: 128(ptr) AccessChain 149(f3) 216 - 249: 127(float) Load 248 - 250: 127(float) FAdd 247 249 - 251: 128(ptr) AccessChain 159(f4) 202 - 252: 127(float) Load 251 - 253: 127(float) FAdd 250 252 - 254: 128(ptr) AccessChain 159(f4) 206 - 255: 127(float) Load 254 - 256: 127(float) FAdd 253 255 - 257: 128(ptr) AccessChain 159(f4) 216 - 258: 127(float) Load 257 - 259: 127(float) FAdd 256 258 - 260: 128(ptr) AccessChain 159(f4) 229 - 261: 127(float) Load 260 - 262: 127(float) FAdd 259 261 - 263: 157(fvec4) CompositeConstruct 262 262 262 262 - Store 169 263 - Branch 199 - 264: Label - Store 169 266 - Branch 199 - 199: Label - 267: 157(fvec4) Load 169 - Store 168(gl_FragColor) 267 + 94: 87(int) Load 93(i_i) + 95: 87(int) IAdd 92 94 + Store 89(i) 95 + 101: 96(ivec2) Load 100(u_i2) + 103: 96(ivec2) Load 102(i_i2) + 104: 96(ivec2) IAdd 101 103 + Store 98(i2) 104 + 110: 105(ivec3) Load 109(u_i3) + 112: 105(ivec3) Load 111(i_i3) + 113: 105(ivec3) IAdd 110 112 + Store 107(i3) 113 + 119: 114(ivec4) Load 118(u_i4) + 121: 114(ivec4) Load 120(i_i4) + 122: 114(ivec4) IAdd 119 121 + Store 116(i4) 122 + 128: 123(float) Load 127(u_f) + 130: 123(float) Load 129(i_f) + 131: 123(float) FAdd 128 130 + Store 125(f) 131 + 137: 132(fvec2) Load 136(u_f2) + 139: 132(fvec2) Load 138(i_f2) + 140: 132(fvec2) FAdd 137 139 + Store 134(f2) 140 + 146: 141(fvec3) Load 145(u_f3) + 148: 141(fvec3) Load 147(i_f3) + 149: 141(fvec3) FAdd 146 148 + Store 143(f3) 149 + 155: 150(fvec4) Load 154(u_f4) + 157: 150(fvec4) Load 156(i_f4) + 158: 150(fvec4) FAdd 155 157 + Store 152(f4) 158 + 162: 6(bool) Load 8(b) + 163: 15(bvec2) Load 17(b2) + 164: 6(bool) CompositeExtract 163 0 + 165: 6(bool) LogicalOr 162 164 + 166: 15(bvec2) Load 17(b2) + 167: 6(bool) CompositeExtract 166 1 + 168: 6(bool) LogicalOr 165 167 + 169: 33(bvec3) Load 35(b3) + 170: 6(bool) CompositeExtract 169 0 + 171: 6(bool) LogicalOr 168 170 + 172: 33(bvec3) Load 35(b3) + 173: 6(bool) CompositeExtract 172 1 + 174: 6(bool) LogicalOr 171 173 + 175: 33(bvec3) Load 35(b3) + 176: 6(bool) CompositeExtract 175 2 + 177: 6(bool) LogicalOr 174 176 + 178: 57(bvec4) Load 59(b4) + 179: 6(bool) CompositeExtract 178 0 + 180: 6(bool) LogicalOr 177 179 + 181: 57(bvec4) Load 59(b4) + 182: 6(bool) CompositeExtract 181 1 + 183: 6(bool) LogicalOr 180 182 + 184: 57(bvec4) Load 59(b4) + 185: 6(bool) CompositeExtract 184 2 + 186: 6(bool) LogicalOr 183 185 + 187: 57(bvec4) Load 59(b4) + 188: 6(bool) CompositeExtract 187 3 + 189: 6(bool) LogicalOr 186 188 + SelectionMerge 191 None + BranchConditional 189 190 256 + 190: Label + 192: 87(int) Load 89(i) + 195: 88(ptr) AccessChain 98(i2) 194 + 196: 87(int) Load 195 + 197: 87(int) IAdd 192 196 + 199: 88(ptr) AccessChain 98(i2) 198 + 200: 87(int) Load 199 + 201: 87(int) IAdd 197 200 + 202: 88(ptr) AccessChain 107(i3) 194 + 203: 87(int) Load 202 + 204: 87(int) IAdd 201 203 + 205: 88(ptr) AccessChain 107(i3) 198 + 206: 87(int) Load 205 + 207: 87(int) IAdd 204 206 + 209: 88(ptr) AccessChain 107(i3) 208 + 210: 87(int) Load 209 + 211: 87(int) IAdd 207 210 + 212: 88(ptr) AccessChain 116(i4) 194 + 213: 87(int) Load 212 + 214: 87(int) IAdd 211 213 + 215: 88(ptr) AccessChain 116(i4) 198 + 216: 87(int) Load 215 + 217: 87(int) IAdd 214 216 + 218: 88(ptr) AccessChain 116(i4) 208 + 219: 87(int) Load 218 + 220: 87(int) IAdd 217 219 + 222: 88(ptr) AccessChain 116(i4) 221 + 223: 87(int) Load 222 + 224: 87(int) IAdd 220 223 + 225: 123(float) ConvertSToF 224 + 226: 123(float) Load 125(f) + 227: 123(float) FAdd 225 226 + 228: 124(ptr) AccessChain 134(f2) 194 + 229: 123(float) Load 228 + 230: 123(float) FAdd 227 229 + 231: 124(ptr) AccessChain 134(f2) 198 + 232: 123(float) Load 231 + 233: 123(float) FAdd 230 232 + 234: 124(ptr) AccessChain 143(f3) 194 + 235: 123(float) Load 234 + 236: 123(float) FAdd 233 235 + 237: 124(ptr) AccessChain 143(f3) 198 + 238: 123(float) Load 237 + 239: 123(float) FAdd 236 238 + 240: 124(ptr) AccessChain 143(f3) 208 + 241: 123(float) Load 240 + 242: 123(float) FAdd 239 241 + 243: 124(ptr) AccessChain 152(f4) 194 + 244: 123(float) Load 243 + 245: 123(float) FAdd 242 244 + 246: 124(ptr) AccessChain 152(f4) 198 + 247: 123(float) Load 246 + 248: 123(float) FAdd 245 247 + 249: 124(ptr) AccessChain 152(f4) 208 + 250: 123(float) Load 249 + 251: 123(float) FAdd 248 250 + 252: 124(ptr) AccessChain 152(f4) 221 + 253: 123(float) Load 252 + 254: 123(float) FAdd 251 253 + 255: 150(fvec4) CompositeConstruct 254 254 254 254 + Store 161 255 + Branch 191 + 256: Label + Store 161 258 + Branch 191 + 191: Label + 259: 150(fvec4) Load 161 + Store 160(gl_FragColor) 259 Return FunctionEnd diff --git a/Test/baseResults/spv.uint.frag.out b/Test/baseResults/spv.uint.frag.out index 4ac9c58f..7d934ff1 100755 --- a/Test/baseResults/spv.uint.frag.out +++ b/Test/baseResults/spv.uint.frag.out @@ -12,8 +12,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 15 68 77 200 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 15 68 77 200 202 204 + ExecutionMode 4 OriginUpperLeft Source ESSL 310 Name 4 "main" Name 8 "count" @@ -63,6 +63,7 @@ Linked fragment stage: Decorate 62 RelaxedPrecision Decorate 68(c) RelaxedPrecision Decorate 72(usampler) RelaxedPrecision + Decorate 72(usampler) DescriptorSet 0 Decorate 73 RelaxedPrecision Decorate 77(tc) RelaxedPrecision Decorate 78 RelaxedPrecision @@ -139,7 +140,9 @@ Linked fragment stage: Decorate 198 RelaxedPrecision Decorate 200(f) RelaxedPrecision Decorate 202(v) RelaxedPrecision + Decorate 202(v) Flat Decorate 204(i) RelaxedPrecision + Decorate 204(i) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -192,12 +195,12 @@ Linked fragment stage: 161: 10(int) Constant 2737 199: TypePointer Input 74(float) 200(f): 199(ptr) Variable Input - 201: TypePointer UniformConstant 66(ivec4) - 202(v): 201(ptr) Variable UniformConstant - 203: TypePointer UniformConstant 6(int) - 204(i): 203(ptr) Variable UniformConstant - 205: TypePointer UniformConstant 22(bool) - 206(b): 205(ptr) Variable UniformConstant + 201: TypePointer Input 66(ivec4) + 202(v): 201(ptr) Variable Input + 203: TypePointer Input 6(int) + 204(i): 203(ptr) Variable Input + 205: TypePointer Private 22(bool) + 206(b): 205(ptr) Variable Private 4(main): 2 Function None 3 5: Label 8(count): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.uniformArray.frag.out b/Test/baseResults/spv.uniformArray.frag.out old mode 100755 new mode 100644 index 747aa17e..e66eda6b --- a/Test/baseResults/spv.uniformArray.frag.out +++ b/Test/baseResults/spv.uniformArray.frag.out @@ -10,8 +10,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 47 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 14 25 35 47 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "texColor" @@ -20,6 +20,7 @@ Linked fragment stage: Name 35 "alpha" Name 47 "gl_FragColor" Name 52 "texSampler2D" + Decorate 52(texSampler2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -28,20 +29,20 @@ Linked fragment stage: 10: TypeInt 32 0 11: 10(int) Constant 6 12: TypeArray 7(fvec4) 11 - 13: TypePointer UniformConstant 12 - 14(color): 13(ptr) Variable UniformConstant + 13: TypePointer Input 12 + 14(color): 13(ptr) Variable Input 15: TypeInt 32 1 16: 15(int) Constant 1 - 17: TypePointer UniformConstant 7(fvec4) + 17: TypePointer Input 7(fvec4) 23: TypeVector 6(float) 3 - 24: TypePointer UniformConstant 23(fvec3) - 25(inColor): 24(ptr) Variable UniformConstant + 24: TypePointer Input 23(fvec3) + 25(inColor): 24(ptr) Variable Input 32: 10(int) Constant 16 33: TypeArray 6(float) 32 - 34: TypePointer UniformConstant 33 - 35(alpha): 34(ptr) Variable UniformConstant + 34: TypePointer Input 33 + 35(alpha): 34(ptr) Variable Input 36: 15(int) Constant 12 - 37: TypePointer UniformConstant 6(float) + 37: TypePointer Input 6(float) 40: 10(int) Constant 3 41: TypePointer Function 6(float) 46: TypePointer Output 7(fvec4) diff --git a/Test/baseResults/spv.variableArrayIndex.frag.out b/Test/baseResults/spv.variableArrayIndex.frag.out index 3d8162a6..75ed07ee 100755 --- a/Test/baseResults/spv.variableArrayIndex.frag.out +++ b/Test/baseResults/spv.variableArrayIndex.frag.out @@ -1,18 +1,20 @@ spv.variableArrayIndex.frag +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 93 +// Id's are bound by 97 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 54 63 - ExecutionMode 4 OriginLowerLeft - Source GLSL 140 + EntryPoint Fragment 4 "main" 10 21 37 40 58 67 + ExecutionMode 4 OriginUpperLeft + Source GLSL 400 Name 4 "main" Name 8 "iLocal" Name 10 "Count" @@ -23,120 +25,157 @@ Linked fragment stage: MemberName 14(lunarStruct2) 0 "i" MemberName 14(lunarStruct2) 1 "f" MemberName 14(lunarStruct2) 2 "s1_1" - Name 18 "lunarStruct3" - MemberName 18(lunarStruct3) 0 "s2_1" - MemberName 18(lunarStruct3) 1 "i" - MemberName 18(lunarStruct3) 2 "f" - MemberName 18(lunarStruct3) 3 "s1_1" - Name 20 "foo3" - Name 30 "scale" - Name 34 "foo2" - Name 36 "foo" - Name 54 "gl_FragColor" - Name 59 "samp2D" - Name 63 "coord" - Name 69 "constructed" + Name 18 "lunarStruct1" + MemberName 18(lunarStruct1) 0 "i" + MemberName 18(lunarStruct1) 1 "f" + Name 19 "lunarStruct3" + MemberName 19(lunarStruct3) 0 "s2_1" + MemberName 19(lunarStruct3) 1 "i" + MemberName 19(lunarStruct3) 2 "f" + MemberName 19(lunarStruct3) 3 "s1_1" + Name 21 "foo3" + Name 31 "scale" + Name 32 "lunarStruct1" + MemberName 32(lunarStruct1) 0 "i" + MemberName 32(lunarStruct1) 1 "f" + Name 33 "lunarStruct2" + MemberName 33(lunarStruct2) 0 "i" + MemberName 33(lunarStruct2) 1 "f" + MemberName 33(lunarStruct2) 2 "s1_1" + Name 37 "foo2" + Name 38 "lunarStruct1" + MemberName 38(lunarStruct1) 0 "i" + MemberName 38(lunarStruct1) 1 "f" + Name 40 "foo" + Name 58 "gl_FragColor" + Name 63 "samp2D" + Name 67 "coord" + Name 73 "constructed" + Decorate 10(Count) Flat + MemberDecorate 13(lunarStruct1) 0 Flat + MemberDecorate 13(lunarStruct1) 1 Flat + MemberDecorate 14(lunarStruct2) 0 Flat + MemberDecorate 14(lunarStruct2) 1 Flat + MemberDecorate 14(lunarStruct2) 2 Flat + MemberDecorate 18(lunarStruct1) 0 Flat + MemberDecorate 18(lunarStruct1) 1 Flat + MemberDecorate 19(lunarStruct3) 0 Flat + MemberDecorate 19(lunarStruct3) 1 Flat + MemberDecorate 19(lunarStruct3) 2 Flat + MemberDecorate 19(lunarStruct3) 3 Flat + MemberDecorate 32(lunarStruct1) 0 Flat + MemberDecorate 32(lunarStruct1) 1 Flat + MemberDecorate 33(lunarStruct2) 0 Flat + MemberDecorate 33(lunarStruct2) 1 Flat + MemberDecorate 33(lunarStruct2) 2 Flat + MemberDecorate 38(lunarStruct1) 0 Flat + MemberDecorate 38(lunarStruct1) 1 Flat + Decorate 63(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypePointer Function 6(int) - 9: TypePointer UniformConstant 6(int) - 10(Count): 9(ptr) Variable UniformConstant + 9: TypePointer Input 6(int) + 10(Count): 9(ptr) Variable Input 12: TypeFloat 32 13(lunarStruct1): TypeStruct 6(int) 12(float) 14(lunarStruct2): TypeStruct 6(int) 12(float) 13(lunarStruct1) 15: TypeInt 32 0 16: 15(int) Constant 3 17: TypeArray 14(lunarStruct2) 16 -18(lunarStruct3): TypeStruct 17 6(int) 12(float) 13(lunarStruct1) - 19: TypePointer UniformConstant 18(lunarStruct3) - 20(foo3): 19(ptr) Variable UniformConstant - 21: 6(int) Constant 0 - 22: 6(int) Constant 1 - 25: TypeBool - 29: TypePointer Function 12(float) - 31: 15(int) Constant 5 - 32: TypeArray 14(lunarStruct2) 31 - 33: TypePointer UniformConstant 32 - 34(foo2): 33(ptr) Variable UniformConstant - 35: TypePointer UniformConstant 13(lunarStruct1) - 36(foo): 35(ptr) Variable UniformConstant - 41: 6(int) Constant 2 - 46: TypePointer UniformConstant 12(float) - 52: TypeVector 12(float) 4 - 53: TypePointer Output 52(fvec4) -54(gl_FragColor): 53(ptr) Variable Output - 56: TypeImage 12(float) 2D sampled format:Unknown - 57: TypeSampledImage 56 - 58: TypePointer UniformConstant 57 - 59(samp2D): 58(ptr) Variable UniformConstant - 61: TypeVector 12(float) 2 - 62: TypePointer Input 61(fvec2) - 63(coord): 62(ptr) Variable Input - 67: TypeArray 61(fvec2) 16 - 68: TypePointer Function 67 - 73: 12(float) Constant 1065353216 - 74: 12(float) Constant 1073741824 - 75: 61(fvec2) ConstantComposite 73 74 - 79: TypePointer Function 61(fvec2) +18(lunarStruct1): TypeStruct 6(int) 12(float) +19(lunarStruct3): TypeStruct 17 6(int) 12(float) 18(lunarStruct1) + 20: TypePointer Input 19(lunarStruct3) + 21(foo3): 20(ptr) Variable Input + 22: 6(int) Constant 0 + 23: 6(int) Constant 1 + 26: TypeBool + 30: TypePointer Function 12(float) +32(lunarStruct1): TypeStruct 6(int) 12(float) +33(lunarStruct2): TypeStruct 6(int) 12(float) 32(lunarStruct1) + 34: 15(int) Constant 5 + 35: TypeArray 33(lunarStruct2) 34 + 36: TypePointer Input 35 + 37(foo2): 36(ptr) Variable Input +38(lunarStruct1): TypeStruct 6(int) 12(float) + 39: TypePointer Input 38(lunarStruct1) + 40(foo): 39(ptr) Variable Input + 45: 6(int) Constant 2 + 50: TypePointer Input 12(float) + 56: TypeVector 12(float) 4 + 57: TypePointer Output 56(fvec4) +58(gl_FragColor): 57(ptr) Variable Output + 60: TypeImage 12(float) 2D sampled format:Unknown + 61: TypeSampledImage 60 + 62: TypePointer UniformConstant 61 + 63(samp2D): 62(ptr) Variable UniformConstant + 65: TypeVector 12(float) 2 + 66: TypePointer Input 65(fvec2) + 67(coord): 66(ptr) Variable Input + 71: TypeArray 65(fvec2) 16 + 72: TypePointer Function 71 + 77: 12(float) Constant 1065353216 + 78: 12(float) Constant 1073741824 + 79: 65(fvec2) ConstantComposite 77 78 + 83: TypePointer Function 65(fvec2) 4(main): 2 Function None 3 5: Label 8(iLocal): 7(ptr) Variable Function - 30(scale): 29(ptr) Variable Function - 69(constructed): 68(ptr) Variable Function + 31(scale): 30(ptr) Variable Function + 73(constructed): 72(ptr) Variable Function 11: 6(int) Load 10(Count) Store 8(iLocal) 11 - 23: 9(ptr) AccessChain 20(foo3) 21 22 21 - 24: 6(int) Load 23 - 26: 25(bool) SGreaterThan 24 21 - SelectionMerge 28 None - BranchConditional 26 27 49 - 27: Label - 37: 9(ptr) AccessChain 36(foo) 21 - 38: 6(int) Load 37 - 39: 9(ptr) AccessChain 20(foo3) 21 38 21 - 40: 6(int) Load 39 - 42: 6(int) IAdd 40 41 - 43: 6(int) Load 8(iLocal) - 44: 6(int) IAdd 43 22 - Store 8(iLocal) 44 - 45: 6(int) IAdd 42 44 - 47: 46(ptr) AccessChain 34(foo2) 45 41 22 - 48: 12(float) Load 47 - Store 30(scale) 48 - Branch 28 - 49: Label - 50: 46(ptr) AccessChain 20(foo3) 21 21 41 22 - 51: 12(float) Load 50 - Store 30(scale) 51 - Branch 28 - 28: Label - 55: 12(float) Load 30(scale) - 60: 57 Load 59(samp2D) - 64: 61(fvec2) Load 63(coord) - 65: 52(fvec4) ImageSampleImplicitLod 60 64 - 66: 52(fvec4) VectorTimesScalar 65 55 - Store 54(gl_FragColor) 66 - 70: 61(fvec2) Load 63(coord) - 71: 12(float) Load 30(scale) - 72: 61(fvec2) CompositeConstruct 71 71 - 76: 67 CompositeConstruct 70 72 75 - Store 69(constructed) 76 - 77: 9(ptr) AccessChain 36(foo) 21 - 78: 6(int) Load 77 - 80: 79(ptr) AccessChain 69(constructed) 78 - 81: 61(fvec2) Load 80 - 82: 9(ptr) AccessChain 36(foo) 21 - 83: 6(int) Load 82 - 84: 79(ptr) AccessChain 69(constructed) 83 - 85: 61(fvec2) Load 84 - 86: 12(float) CompositeExtract 81 0 - 87: 12(float) CompositeExtract 81 1 - 88: 12(float) CompositeExtract 85 0 - 89: 12(float) CompositeExtract 85 1 - 90: 52(fvec4) CompositeConstruct 86 87 88 89 - 91: 52(fvec4) Load 54(gl_FragColor) - 92: 52(fvec4) FAdd 91 90 - Store 54(gl_FragColor) 92 + 24: 9(ptr) AccessChain 21(foo3) 22 23 22 + 25: 6(int) Load 24 + 27: 26(bool) SGreaterThan 25 22 + SelectionMerge 29 None + BranchConditional 27 28 53 + 28: Label + 41: 9(ptr) AccessChain 40(foo) 22 + 42: 6(int) Load 41 + 43: 9(ptr) AccessChain 21(foo3) 22 42 22 + 44: 6(int) Load 43 + 46: 6(int) IAdd 44 45 + 47: 6(int) Load 8(iLocal) + 48: 6(int) IAdd 47 23 + Store 8(iLocal) 48 + 49: 6(int) IAdd 46 48 + 51: 50(ptr) AccessChain 37(foo2) 49 45 23 + 52: 12(float) Load 51 + Store 31(scale) 52 + Branch 29 + 53: Label + 54: 50(ptr) AccessChain 21(foo3) 22 22 45 23 + 55: 12(float) Load 54 + Store 31(scale) 55 + Branch 29 + 29: Label + 59: 12(float) Load 31(scale) + 64: 61 Load 63(samp2D) + 68: 65(fvec2) Load 67(coord) + 69: 56(fvec4) ImageSampleImplicitLod 64 68 + 70: 56(fvec4) VectorTimesScalar 69 59 + Store 58(gl_FragColor) 70 + 74: 65(fvec2) Load 67(coord) + 75: 12(float) Load 31(scale) + 76: 65(fvec2) CompositeConstruct 75 75 + 80: 71 CompositeConstruct 74 76 79 + Store 73(constructed) 80 + 81: 9(ptr) AccessChain 40(foo) 22 + 82: 6(int) Load 81 + 84: 83(ptr) AccessChain 73(constructed) 82 + 85: 65(fvec2) Load 84 + 86: 9(ptr) AccessChain 40(foo) 22 + 87: 6(int) Load 86 + 88: 83(ptr) AccessChain 73(constructed) 87 + 89: 65(fvec2) Load 88 + 90: 12(float) CompositeExtract 85 0 + 91: 12(float) CompositeExtract 85 1 + 92: 12(float) CompositeExtract 89 0 + 93: 12(float) CompositeExtract 89 1 + 94: 56(fvec4) CompositeConstruct 90 91 92 93 + 95: 56(fvec4) Load 58(gl_FragColor) + 96: 56(fvec4) FAdd 95 94 + Store 58(gl_FragColor) 96 Return FunctionEnd diff --git a/Test/baseResults/spv.varyingArray.frag.out b/Test/baseResults/spv.varyingArray.frag.out index 91ec96a6..4a7d2ee6 100755 --- a/Test/baseResults/spv.varyingArray.frag.out +++ b/Test/baseResults/spv.varyingArray.frag.out @@ -11,7 +11,7 @@ Linked fragment stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 19 34 39 45 48 - ExecutionMode 4 OriginLowerLeft + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "texColor" @@ -21,6 +21,7 @@ Linked fragment stage: Name 39 "alpha" Name 45 "gl_FragColor" Name 48 "foo" + Decorate 13(texSampler2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.varyingArrayIndirect.frag.out b/Test/baseResults/spv.varyingArrayIndirect.frag.out index 01b7e43e..410fd3c4 100755 --- a/Test/baseResults/spv.varyingArrayIndirect.frag.out +++ b/Test/baseResults/spv.varyingArrayIndirect.frag.out @@ -10,8 +10,8 @@ Linked fragment stage: Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 19 30 45 50 56 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 19 22 30 31 45 50 56 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "texColor" @@ -23,6 +23,9 @@ Linked fragment stage: Name 45 "color" Name 50 "alpha" Name 56 "gl_FragColor" + Decorate 13(texSampler2D) DescriptorSet 0 + Decorate 22(b) Flat + Decorate 31(a) Flat 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -38,14 +41,14 @@ Linked fragment stage: 18: TypePointer Input 17 19(userIn): 18(ptr) Variable Input 20: TypeInt 32 1 - 21: TypePointer UniformConstant 20(int) - 22(b): 21(ptr) Variable UniformConstant + 21: TypePointer Input 20(int) + 22(b): 21(ptr) Variable Input 24: TypePointer Input 7(fvec4) 27: 15(int) Constant 6 28: TypeArray 7(fvec4) 27 29: TypePointer Input 28 30(TexCoord): 29(ptr) Variable Input - 31(a): 21(ptr) Variable UniformConstant + 31(a): 21(ptr) Variable Input 36: 20(int) Constant 5 40: TypeVector 6(float) 2 45(color): 24(ptr) Variable Input diff --git a/Test/baseResults/spv.voidFunction.frag.out b/Test/baseResults/spv.voidFunction.frag.out index 6b9179b8..1d4b694b 100755 --- a/Test/baseResults/spv.voidFunction.frag.out +++ b/Test/baseResults/spv.voidFunction.frag.out @@ -1,18 +1,20 @@ spv.voidFunction.frag +Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 44 +// Id's are bound by 43 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 37 41 - ExecutionMode 4 OriginLowerLeft - Source GLSL 140 + EntryPoint Fragment 4 "main" 24 37 40 42 + ExecutionMode 4 OriginUpperLeft + Source GLSL 400 Name 4 "main" Name 6 "foo(" Name 8 "foo2(" @@ -20,8 +22,8 @@ Linked fragment stage: Name 22 "outColor" Name 24 "bigColor" Name 37 "gl_FragColor" - Name 41 "BaseColor" - Name 43 "d" + Name 40 "BaseColor" + Name 42 "d" 2: TypeVoid 3: TypeFunction 2 10: TypeFloat 32 @@ -31,17 +33,16 @@ Linked fragment stage: 15: 10(float) Constant 1065353216 20: TypeVector 10(float) 4 21: TypePointer Function 20(fvec4) - 23: TypePointer UniformConstant 20(fvec4) - 24(bigColor): 23(ptr) Variable UniformConstant + 23: TypePointer Input 20(fvec4) + 24(bigColor): 23(ptr) Variable Input 29: TypeInt 32 0 30: 29(int) Constant 0 31: TypePointer Function 10(float) 36: TypePointer Output 20(fvec4) 37(gl_FragColor): 36(ptr) Variable Output - 40: TypePointer Input 20(fvec4) - 41(BaseColor): 40(ptr) Variable Input - 42: TypePointer UniformConstant 10(float) - 43(d): 42(ptr) Variable UniformConstant + 40(BaseColor): 23(ptr) Variable Input + 41: TypePointer Input 10(float) + 42(d): 41(ptr) Variable Input 4(main): 2 Function None 3 5: Label 22(outColor): 21(ptr) Variable Function diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index 8086e3b0..2ec33102 100644 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -7,12 +7,12 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 44 +// Id's are bound by 41 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 42 43 + EntryPoint Vertex 4 "main" Source ESSL 310 Name 4 "main" Name 8 "i" @@ -20,10 +20,6 @@ Linked vertex stage: Name 27 "B" Name 29 "C" Name 39 "D" - Name 42 "gl_VertexID" - Name 43 "gl_InstanceID" - Decorate 42(gl_VertexID) BuiltIn VertexId - Decorate 43(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -35,9 +31,6 @@ Linked vertex stage: 22: 6(int) Constant 2 31: 6(int) Constant 5 40: 6(int) Constant 3 - 41: TypePointer Input 6(int) - 42(gl_VertexID): 41(ptr) Variable Input -43(gl_InstanceID): 41(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index 04f53561..0c1c8221 100755 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -7,19 +7,15 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 25 +// Id's are bound by 22 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 23 24 + EntryPoint Vertex 4 "main" Source ESSL 310 Name 4 "main" Name 8 "i" - Name 23 "gl_VertexID" - Name 24 "gl_InstanceID" - Decorate 23(gl_VertexID) BuiltIn VertexId - Decorate 24(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -28,9 +24,6 @@ Linked vertex stage: 16: 6(int) Constant 10 17: TypeBool 20: 6(int) Constant 1 - 22: TypePointer Input 6(int) - 23(gl_VertexID): 22(ptr) Variable Input -24(gl_InstanceID): 22(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index 56e2d1c4..8de5e956 100755 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -5,20 +5,20 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 36 +// Id's are bound by 35 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 11 34 - ExecutionMode 4 OriginLowerLeft + EntryPoint Fragment 4 "main" 11 24 28 33 + ExecutionMode 4 OriginUpperLeft Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" Name 24 "d" - Name 29 "bigColor" - Name 34 "gl_FragColor" + Name 28 "bigColor" + Name 33 "gl_FragColor" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -29,13 +29,12 @@ Linked fragment stage: 18: TypeInt 32 0 19: 18(int) Constant 0 20: TypePointer Function 6(float) - 23: TypePointer UniformConstant 6(float) - 24(d): 23(ptr) Variable UniformConstant + 23: TypePointer Input 6(float) + 24(d): 23(ptr) Variable Input 26: TypeBool - 28: TypePointer UniformConstant 7(fvec4) - 29(bigColor): 28(ptr) Variable UniformConstant - 33: TypePointer Output 7(fvec4) -34(gl_FragColor): 33(ptr) Variable Output + 28(bigColor): 10(ptr) Variable Input + 32: TypePointer Output 7(fvec4) +33(gl_FragColor): 32(ptr) Variable Output 4(main): 2 Function None 3 5: Label 9(color): 8(ptr) Variable Function @@ -52,15 +51,15 @@ Linked fragment stage: 27: 26(bool) FOrdLessThan 22 25 BranchConditional 27 14 15 14: Label - 30: 7(fvec4) Load 29(bigColor) - 31: 7(fvec4) Load 9(color) - 32: 7(fvec4) FAdd 31 30 - Store 9(color) 32 + 29: 7(fvec4) Load 28(bigColor) + 30: 7(fvec4) Load 9(color) + 31: 7(fvec4) FAdd 30 29 + Store 9(color) 31 Branch 16 16: Label Branch 13 15: Label - 35: 7(fvec4) Load 9(color) - Store 34(gl_FragColor) 35 + 34: 7(fvec4) Load 9(color) + Store 33(gl_FragColor) 34 Return FunctionEnd diff --git a/Test/baseResults/vulkan.comp.out b/Test/baseResults/vulkan.comp.out new file mode 100644 index 00000000..7f1fd18a --- /dev/null +++ b/Test/baseResults/vulkan.comp.out @@ -0,0 +1,11 @@ +vulkan.comp +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:5: 'local_size' : cannot change previously set size +ERROR: 1 compilation errors. No code generated. + + + +Linked compute stage: + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/vulkan.frag.out b/Test/baseResults/vulkan.frag.out new file mode 100644 index 00000000..b5b9d91a --- /dev/null +++ b/Test/baseResults/vulkan.frag.out @@ -0,0 +1,42 @@ +vulkan.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments +ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type +ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type +ERROR: 0:17: 'sampler2D' : sampler-constructor second argument must be a scalar type 'sampler' +ERROR: 0:18: 'sampler2D' : sampler-constructor second argument must be a scalar type 'sampler' +ERROR: 0:19: 'sampler2D' : sampler-constructor second argument must be a scalar type 'sampler' +ERROR: 0:21: 'sampler3D' : sampler-constructor cannot make an array of samplers +ERROR: 0:22: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type +ERROR: 0:23: 'sampler2D' : sampler-constructor first argument must match type and dimensionality of constructor type +ERROR: 0:24: 'sampler2D' : sampler-constructor second argument presence of shadow must match constructor presence of shadow +ERROR: 0:25: 'sampler2DShadow' : sampler-constructor second argument presence of shadow must match constructor presence of shadow +ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D +ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers +ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d +ERROR: 0:29: '=' : cannot convert from 'const float' to 'global 4-element array of sampler3D' +ERROR: 0:39: 'push_constant' : can only be used with a uniform +ERROR: 0:43: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan +ERROR: 0:43: 'push_constant' : can only be used with a block +ERROR: 0:45: 'push_constant' : cannot declare a default, can only be used on a block +ERROR: 0:47: 'push_constant' : requires an instance name +ERROR: 0:52: 'input_attachment_index' : can only be used with a subpass +ERROR: 0:53: 'input_attachment_index' : can only be used with a subpass +ERROR: 0:54: 'subpass' : requires an input_attachment_index layout qualifier +ERROR: 0:60: 'subpassLoadMS' : no matching overloaded function found +ERROR: 0:61: 'subpassLoad' : no matching overloaded function found +ERROR: 0:63: 'subpassLoadMS' : no matching overloaded function found +ERROR: 0:66: 'subroutine' : not allowed when generating SPIR-V +ERROR: 0:66: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan +ERROR: 0:67: 'subroutine' : not allowed when generating SPIR-V +ERROR: 0:67: 'uniform' : no qualifiers allowed for function return +ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan +ERROR: 31 compilation errors. No code generated. + + + +Linked fragment stage: + +ERROR: Linking fragment stage: Only one push_constant block is allowed per stage + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/vulkan.vert.out b/Test/baseResults/vulkan.vert.out new file mode 100644 index 00000000..1e70b5b2 --- /dev/null +++ b/Test/baseResults/vulkan.vert.out @@ -0,0 +1,32 @@ +vulkan.vert +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:3: 'subpass input' : not supported in this stage: vertex +ERROR: 0:4: 'subpass input' : not supported in this stage: vertex +ERROR: 0:5: 'subpass input' : not supported in this stage: vertex +ERROR: 0:6: 'subpass input' : not supported in this stage: vertex +ERROR: 0:7: 'subpass input' : not supported in this stage: vertex +ERROR: 0:8: 'subpass input' : not supported in this stage: vertex +ERROR: 0:12: 'constant_id' : can only be applied to a scalar +ERROR: 0:13: 'constant_id' : specialization-constant id already used +ERROR: 0:13: 'constant_id' : can only be applied to 'const'-qualified scalar +ERROR: 0:13: 'constant_id' : cannot be applied to this type +ERROR: 0:14: 'constant_id' : specialization-constant id is too large +ERROR: 0:15: 'constant_id' : can only be applied to a scalar +ERROR: 0:16: 'constant_id' : specialization-constant id already used +ERROR: 0:16: 'constant_id' : cannot declare a default, can only be used on a scalar +ERROR: 0:20: 'subpassLoad' : no matching overloaded function found +ERROR: 0:20: 'assign' : cannot convert from 'const float' to 'smooth out 4-component vector of float' +ERROR: 0:23: 'atomic counter types' : not allowed when using GLSL for Vulkan +ERROR: 0:24: 'shared' : not allowed when using GLSL for Vulkan +ERROR: 0:25: 'packed' : not allowed when using GLSL for Vulkan +ERROR: 0:32: 'initializer' : can't use with types containing arrays sized with a specialization constant +ERROR: 0:34: '=' : can't use with types containing arrays sized with a specialization constant +ERROR: 0:35: '==' : can't use with types containing arrays sized with a specialization constant +ERROR: 22 compilation errors. No code generated. + + + +Linked vertex stage: + + +SPIR-V is not generated for failed compile or link diff --git a/Test/nonVulkan.frag b/Test/nonVulkan.frag new file mode 100644 index 00000000..c8cf4674 --- /dev/null +++ b/Test/nonVulkan.frag @@ -0,0 +1,5 @@ +#version 450 + +layout(constant_id = 17) const int arraySize = 12; // ERROR +layout(input_attachment_index = 1) int foo; // ERROR +layout(push_constant) uniform ubn { int a; } ubi; // ERROR \ No newline at end of file diff --git a/Test/spv.100ops.frag b/Test/spv.100ops.frag index b0daf8e2..43452a1f 100644 --- a/Test/spv.100ops.frag +++ b/Test/spv.100ops.frag @@ -2,7 +2,7 @@ lowp float foo(); -uniform int low, high; +in lowp float low, high; lowp float face1 = 11.0; @@ -12,7 +12,7 @@ void main() { int z = 3; - if (2 * low + 1 < high) + if (2.0 * low + 1.0 < high) ++z; Color = face1 * vec4(z) + foo(); diff --git a/Test/spv.130.frag b/Test/spv.130.frag index dcbd5be1..e7fdd388 100644 --- a/Test/spv.130.frag +++ b/Test/spv.130.frag @@ -82,11 +82,6 @@ uniform sampler2DRectShadow s2DRS; uniform sampler1D s1D; uniform sampler2DShadow s2DS; -uniform float f; -uniform vec2 v2; -uniform vec3 v3; -uniform vec4 v4; - void main() { o = textureGather(sampC, vec3(0.2)); diff --git a/Test/spv.150.vert b/Test/spv.150.vert index 686b14b0..382e3c9b 100644 --- a/Test/spv.150.vert +++ b/Test/spv.150.vert @@ -2,8 +2,8 @@ in vec4 iv4; -uniform float ps; -uniform int ui; +in float ps; +in int ui; uniform sampler2D s2D; invariant gl_Position; diff --git a/Test/spv.300BuiltIns.vert b/Test/spv.300BuiltIns.vert index 0f40c251..46c3f0fe 100644 --- a/Test/spv.300BuiltIns.vert +++ b/Test/spv.300BuiltIns.vert @@ -6,12 +6,9 @@ invariant gl_Position; void main() { - mediump int i = (4 * gl_VertexID - 10); - mediump int j = (4 * gl_VertexID - 10); - gl_Position = vec4(ps); - gl_Position *= float(i); + gl_Position *= float(4 - gl_VertexIndex); gl_PointSize = ps; - gl_PointSize *= float(j); + gl_PointSize *= float(5 - gl_InstanceIndex); } diff --git a/Test/spv.300layout.vert b/Test/spv.300layout.vert index d2db127c..81218b5d 100644 --- a/Test/spv.300layout.vert +++ b/Test/spv.300layout.vert @@ -28,7 +28,7 @@ layout(column_major) uniform T3 { // shared and column_major uvec3 uv3a[4]; }; -uniform uint uiuin; +in uint uiuin; struct S { vec3 c; diff --git a/Test/spv.300layoutp.vert b/Test/spv.300layoutp.vert index 79d4093c..d14aa1cd 100644 --- a/Test/spv.300layoutp.vert +++ b/Test/spv.300layoutp.vert @@ -7,7 +7,7 @@ out vec4 pos; out vec3 color; flat out int iout; -layout(shared, column_major, row_major) uniform; // default is now shared and row_major +layout(row_major) uniform; // default is now row_major layout(std140) uniform Transform { // layout of this block is std140 mat4 M1; // row_major @@ -28,7 +28,7 @@ layout(column_major) uniform T3 { // shared and column_major uvec3 uv3a[4]; }; -uniform uint uiuin; +uint uiuin; struct S { vec3 c; diff --git a/Test/spv.420.geom b/Test/spv.420.geom index afb04bc9..92186ae8 100644 --- a/Test/spv.420.geom +++ b/Test/spv.420.geom @@ -16,8 +16,8 @@ layout(invocations = 4) in; uniform sampler2D s2D; in vec2 coord[]; -uniform vec4 v4; -uniform int i; + +int i; void main() { diff --git a/Test/spv.430.vert b/Test/spv.430.vert index b5571ccc..d0b05ecd 100644 --- a/Test/spv.430.vert +++ b/Test/spv.430.vert @@ -1,6 +1,6 @@ #version 430 core -layout(location = 4) uniform vec4 uv4; + out gl_PerVertex { float gl_ClipDistance[]; @@ -13,7 +13,7 @@ highp in vec4 badorder; out invariant vec4 badorder2; out flat vec4 badorder3; -uniform float f; +in float f; void main() { diff --git a/Test/spv.AofA.frag b/Test/spv.AofA.frag index 606d73b0..62847100 100644 --- a/Test/spv.AofA.frag +++ b/Test/spv.AofA.frag @@ -12,7 +12,7 @@ float[4][5][6] many[1][2][3]; float g4[4][7]; in float g5[5][7]; -uniform int i, j, k; +flat in int i, j, k; float[4][7] foo(float a[5][7]) { diff --git a/Test/spv.Operations.frag b/Test/spv.Operations.frag index de0fa2d6..5c8c8af0 100644 --- a/Test/spv.Operations.frag +++ b/Test/spv.Operations.frag @@ -1,14 +1,13 @@ #version 450 -uniform ivec4 uiv4; -uniform vec4 uv4; -uniform bool ub; -uniform bvec4 ub41, ub42; -uniform float uf; -uniform int ui; - -uniform uvec4 uuv4; -uniform uint uui; +flat in ivec4 uiv4; +in vec4 uv4; +bool ub; +bvec4 ub41, ub42; +in float uf; +flat in int ui; +flat in uvec4 uuv4; +flat in uint uui; out vec4 FragColor; diff --git a/Test/spv.accessChain.frag b/Test/spv.accessChain.frag index 0cbf6b3c..41ec0ca3 100644 --- a/Test/spv.accessChain.frag +++ b/Test/spv.accessChain.frag @@ -7,7 +7,7 @@ struct S layout(location = 0) out vec3 OutColor; -uniform int u; +flat in int u; void GetColor1(const S i) { diff --git a/Test/spv.aggOps.frag b/Test/spv.aggOps.frag index c31186df..bc34d7ac 100644 --- a/Test/spv.aggOps.frag +++ b/Test/spv.aggOps.frag @@ -17,13 +17,8 @@ struct s2 { s1 s1_1; }; -uniform s1 foo1; -uniform s2 foo2a; -uniform s2 foo2b; - -layout(std140) uniform bn { - s2 foo2a; -} bi; +layout(std140) uniform ub1 { s2 foo2a; } uName1; +layout(std430) buffer ub2 { s2 foo2b; } uName2; void main() { @@ -32,7 +27,7 @@ void main() a = s1[3](s1(int(u.x), u.y), s1(int(u.z), u.w), s1(14, 14.0)); b = s1[3](s1(17, 17.0), s1(int(w.x), w.y), s1(int(w.z), w.w)); - if (foo2a == foo2b) + if (uName1.foo2a == uName2.foo2b) v = texture(samp2D, coord); else v = texture(samp2D, 2.0*coord); @@ -52,8 +47,5 @@ void main() if (a != b) v *= 7.0; - if (bi.foo2a != foo2a) - v *= 8.0; - color = v; } diff --git a/Test/spv.atomic.comp b/Test/spv.atomic.comp index 76e0c3df..d1215f7c 100644 --- a/Test/spv.atomic.comp +++ b/Test/spv.atomic.comp @@ -1,9 +1,11 @@ #version 310 es +#extension GL_ARB_gl_spirv : enable + layout(binding = 0) uniform atomic_uint counter; layout(binding = 0, offset = 4) uniform atomic_uint countArr[4]; -uniform uint value; +shared uint value; int arrX[gl_WorkGroupSize.x]; int arrY[gl_WorkGroupSize.y]; diff --git a/Test/spv.bitCast.frag b/Test/spv.bitCast.frag index db7d453e..73c7e303 100644 --- a/Test/spv.bitCast.frag +++ b/Test/spv.bitCast.frag @@ -1,19 +1,19 @@ #version 450 -uniform int i1; -uniform ivec2 i2; -uniform ivec3 i3; -uniform ivec4 i4; +flat in int i1; +flat in ivec2 i2; +flat in ivec3 i3; +flat in ivec4 i4; -uniform uint u1; -uniform uvec2 u2; -uniform uvec3 u3; -uniform uvec4 u4; +flat in uint u1; +flat in uvec2 u2; +flat in uvec3 u3; +flat in uvec4 u4; -uniform float f1; -uniform vec2 f2; -uniform vec3 f3; -uniform vec4 f4; +in float f1; +in vec2 f2; +in vec3 f3; +in vec4 f4; out vec4 fragColor; diff --git a/Test/spv.branch-return.vert b/Test/spv.branch-return.vert index e7a7e387..4b2f5d44 100644 --- a/Test/spv.branch-return.vert +++ b/Test/spv.branch-return.vert @@ -1,6 +1,6 @@ #version 310 es void main() { - switch (gl_InstanceID) { + switch (gl_InstanceIndex) { case 0: return; case 1: gl_Position = vec4(0.0); break; case 2: return; diff --git a/Test/spv.conversion.frag b/Test/spv.conversion.frag index dbd14e29..3b5e5123 100644 --- a/Test/spv.conversion.frag +++ b/Test/spv.conversion.frag @@ -1,24 +1,24 @@ #version 140 -uniform bool u_b; -uniform bvec2 u_b2; -uniform bvec3 u_b3; -uniform bvec4 u_b4; +bool u_b; +bvec2 u_b2; +bvec3 u_b3; +bvec4 u_b4; -uniform int u_i; -uniform ivec2 u_i2; -uniform ivec3 u_i3; -uniform ivec4 u_i4; - -uniform float u_f; -uniform vec2 u_f2; -uniform vec3 u_f3; -uniform vec4 u_f4; +int u_i; +ivec2 u_i2; +ivec3 u_i3; +ivec4 u_i4; -uniform bool i_b; -uniform bvec2 i_b2; -uniform bvec3 i_b3; -uniform bvec4 i_b4; +float u_f; +vec2 u_f2; +vec3 u_f3; +vec4 u_f4; + +bool i_b; +bvec2 i_b2; +bvec3 i_b3; +bvec4 i_b4; flat in int i_i; flat in ivec2 i_i2; diff --git a/Test/spv.dataOutIndirect.frag b/Test/spv.dataOutIndirect.frag index 979a9406..88a32d58 100644 --- a/Test/spv.dataOutIndirect.frag +++ b/Test/spv.dataOutIndirect.frag @@ -2,9 +2,11 @@ in vec4 Color; -uniform int i; +out vec4 fcolor[4]; + +uniform b { int i; } bName; void main() { - gl_FragData[i] = Color; + fcolor[bName.i] = Color; } diff --git a/Test/spv.doWhileLoop.frag b/Test/spv.doWhileLoop.frag index f4b52403..5abdb61b 100644 --- a/Test/spv.doWhileLoop.frag +++ b/Test/spv.doWhileLoop.frag @@ -1,8 +1,8 @@ #version 140 -uniform vec4 bigColor; +in vec4 bigColor; in vec4 BaseColor; -uniform float d; +in float d; void main() { diff --git a/Test/spv.double.comp b/Test/spv.double.comp index 8f4a7893..6397e630 100644 --- a/Test/spv.double.comp +++ b/Test/spv.double.comp @@ -10,7 +10,7 @@ buffer bufName { double d; } bufInst; -uniform double roll; + uniform writeonly image2D destTex; void main() diff --git a/Test/spv.earlyReturnDiscard.frag b/Test/spv.earlyReturnDiscard.frag index d0d15c23..bba4b76d 100644 --- a/Test/spv.earlyReturnDiscard.frag +++ b/Test/spv.earlyReturnDiscard.frag @@ -1,20 +1,20 @@ #version 140 -uniform float d; -uniform vec4 bigColor, smallColor; -uniform vec4 otherColor; +in float d; +in vec4 bigColor, smallColor; +in vec4 otherColor; in float c; -uniform float threshhold; -uniform float threshhold2; -uniform float threshhold3; +in float threshhold; +in float threshhold2; +in float threshhold3; -uniform float minimum; +in float minimum; in vec4 BaseColor; -uniform bool b; +bool b; void main() { diff --git a/Test/spv.flowControl.frag b/Test/spv.flowControl.frag index 86046c32..f10c7673 100644 --- a/Test/spv.flowControl.frag +++ b/Test/spv.flowControl.frag @@ -1,8 +1,8 @@ #version 140 -uniform float d; -uniform vec4 bigColor, smallColor; -uniform vec4 otherColor; +in float d; +in vec4 bigColor, smallColor; +in vec4 otherColor; in float c; in vec4 BaseColor; diff --git a/Test/spv.forLoop.frag b/Test/spv.forLoop.frag index 0da72e19..dfa58ad4 100644 --- a/Test/spv.forLoop.frag +++ b/Test/spv.forLoop.frag @@ -1,11 +1,11 @@ #version 140 -uniform vec4 bigColor; +in vec4 bigColor; in vec4 BaseColor; in float f; -uniform int Count; -uniform uvec4 v4; +flat in int Count; +flat in uvec4 v4; void main() { diff --git a/Test/spv.forwardFun.frag b/Test/spv.forwardFun.frag index c113e85f..0a71521e 100644 --- a/Test/spv.forwardFun.frag +++ b/Test/spv.forwardFun.frag @@ -2,9 +2,9 @@ precision mediump float; -uniform vec4 bigColor; +in vec4 bigColor; in vec4 BaseColor; -uniform float d; +in float d; void bar(); float foo(vec4); diff --git a/Test/spv.functionCall.frag b/Test/spv.functionCall.frag index bf911fd2..139638d2 100644 --- a/Test/spv.functionCall.frag +++ b/Test/spv.functionCall.frag @@ -1,8 +1,8 @@ #version 140 -uniform vec4 bigColor; -in vec4 BaseColor; -uniform float d; +varying vec4 bigColor; +varying vec4 BaseColor; +varying float d; float h = 0.0; diff --git a/Test/spv.functionSemantics.frag b/Test/spv.functionSemantics.frag index 67ff5f51..a9b59b76 100644 --- a/Test/spv.functionSemantics.frag +++ b/Test/spv.functionSemantics.frag @@ -1,6 +1,6 @@ #version 400 -uniform float u; +in float u; int foo(int a, const int b, in int c, const in int d, out int e, inout int f) { diff --git a/Test/spv.image.frag b/Test/spv.image.frag index 433687dc..30b339ce 100644 --- a/Test/spv.image.frag +++ b/Test/spv.image.frag @@ -15,14 +15,14 @@ layout(rgba32f, binding = 10) uniform image2DMSArray i2DMSArray; layout(r32i, binding = 11) uniform iimage1D ii1D; layout(r32ui, binding = 12) uniform uimage2D ui2D; +flat in int ic1D; +flat in ivec2 ic2D; +flat in ivec3 ic3D; +flat in ivec4 ic4D; + writeonly layout(binding = 1) uniform image2D wo2D; -uniform int ic1D; -uniform ivec2 ic2D; -uniform ivec3 ic3D; -uniform ivec4 ic4D; - -uniform uint value; +flat in uint value; out vec4 fragData; diff --git a/Test/spv.interpOps.frag b/Test/spv.interpOps.frag index fccf304a..afe28dc3 100644 --- a/Test/spv.interpOps.frag +++ b/Test/spv.interpOps.frag @@ -5,8 +5,8 @@ in vec2 if2; in vec3 if3; in vec4 if4; -uniform int samp; -uniform vec2 offset; +flat in int samp; +flat in vec2 offset; out vec4 fragColor; diff --git a/Test/spv.length.frag b/Test/spv.length.frag index 5221c833..3b3db0b4 100644 --- a/Test/spv.length.frag +++ b/Test/spv.length.frag @@ -1,6 +1,6 @@ #version 140 -uniform vec4 u[3]; +vec4 u[3]; in vec2 v[2]; diff --git a/Test/spv.localAggregates.frag b/Test/spv.localAggregates.frag index 47224ba3..9bdb11b7 100644 --- a/Test/spv.localAggregates.frag +++ b/Test/spv.localAggregates.frag @@ -1,4 +1,4 @@ -#version 140 +#version 400 uniform sampler2D samp2D; in vec2 coord; @@ -24,12 +24,12 @@ struct s3 { }; -uniform s1 foo; -uniform s2 foo2; -uniform s3 foo3; +flat in s1 foo; +flat in s2 foo2; +flat in s3 foo3; -uniform float[16] uFloatArray; -uniform int condition; + +flat in int condition; void main() { diff --git a/Test/spv.loops.frag b/Test/spv.loops.frag index b9e960a6..b9ec0997 100644 --- a/Test/spv.loops.frag +++ b/Test/spv.loops.frag @@ -1,54 +1,36 @@ #version 140 -uniform vec4 bigColor; -uniform vec4 bigColor1_1; -uniform vec4 bigColor1_2; -uniform vec4 bigColor1_3; -uniform vec4 bigColor2; -uniform vec4 bigColor3; -uniform vec4 bigColor4; -uniform vec4 bigColor5; -uniform vec4 bigColor6; -uniform vec4 bigColor7; -uniform vec4 bigColor8; +in vec4 bigColor; +in vec4 bigColor1_1; +in vec4 bigColor1_2; +in vec4 bigColor1_3; +in vec4 bigColor2; +in vec4 bigColor3; +in vec4 bigColor4; +in vec4 bigColor5; +in vec4 bigColor6; +in vec4 bigColor7; +in vec4 bigColor8; in vec4 BaseColor; -uniform float d; -uniform float d2; -uniform float d3; -uniform float d4; -uniform float d5; -uniform float d6; -uniform float d7; -uniform float d8; -uniform float d9; -uniform float d10; -uniform float d11; -uniform float d12; -uniform float d13; -uniform float d14; -uniform float d15; -uniform float d16; -uniform float d17; -uniform float d18; -uniform float d19; -uniform float d20; -uniform float d21; -uniform float d22; -uniform float d23; -uniform float d24; -uniform float d25; -uniform float d26; -uniform float d27; -uniform float d28; -uniform float d29; -uniform float d30; -uniform float d31; -uniform float d32; -uniform float d33; -uniform float d34; - -uniform int Count; +in float d; +in float d2; +in float d3; +in float d4; +in float d5; +in float d6; +in float d7; +in float d8; +in float d9; +in float d10; +in float d11; +in float d12; +in float d14; +in float d15; +in float d16; +in float d17; +in float d18; +flat in int Count; void main() { diff --git a/Test/spv.loopsArtificial.frag b/Test/spv.loopsArtificial.frag index 05b3dcbc..ae380b94 100644 --- a/Test/spv.loopsArtificial.frag +++ b/Test/spv.loopsArtificial.frag @@ -1,54 +1,25 @@ #version 140 -uniform vec4 bigColor; -uniform vec4 bigColor1_1; -uniform vec4 bigColor1_2; -uniform vec4 bigColor1_3; -uniform vec4 bigColor2; -uniform vec4 bigColor3; -uniform vec4 bigColor4; -uniform vec4 bigColor5; -uniform vec4 bigColor6; -uniform vec4 bigColor7; -uniform vec4 bigColor8; +in vec4 bigColor; +in vec4 bigColor1_1; +in vec4 bigColor1_2; +in vec4 bigColor1_3; +in vec4 bigColor2; +in vec4 bigColor3; +in vec4 bigColor4; +in vec4 bigColor5; +in vec4 bigColor6; +in vec4 bigColor7; +in vec4 bigColor8; in vec4 BaseColor; -uniform float d; -uniform float d2; -uniform float d3; -uniform float d4; -uniform float d5; -uniform float d6; -uniform float d7; -uniform float d8; -uniform float d9; -uniform float d10; -uniform float d11; -uniform float d12; -uniform float d13; -uniform float d14; -uniform float d15; -uniform float d16; -uniform float d17; -uniform float d18; -uniform float d19; -uniform float d20; -uniform float d21; -uniform float d22; -uniform float d23; -uniform float d24; -uniform float d25; -uniform float d26; -uniform float d27; -uniform float d28; -uniform float d29; -uniform float d30; -uniform float d31; -uniform float d32; -uniform float d33; -uniform float d34; +in float d; +in float d2; +in float d3; +in float d4; +in float d13; -uniform int Count; +flat in int Count; void main() { diff --git a/Test/spv.matFun.vert b/Test/spv.matFun.vert index 64328d72..49e882f4 100644 --- a/Test/spv.matFun.vert +++ b/Test/spv.matFun.vert @@ -1,7 +1,9 @@ -#version 140 +#version 400 -uniform mat4 m4; -uniform mat3 m3; +uniform bl { + uniform mat4 m4; + uniform mat3 m3; +} bName; in vec3 v3; @@ -22,5 +24,5 @@ vec3 mxv(mat4 m4, vec3 v) void main() { - gl_Position = vec4(mxv(m4, v3) + xf(m3, v3), 1.0); + gl_Position = vec4(mxv(bName.m4, v3) + xf(bName.m3, v3), 1.0); } diff --git a/Test/spv.nonSquare.vert b/Test/spv.nonSquare.vert index 9ef70559..9f7125bd 100644 --- a/Test/spv.nonSquare.vert +++ b/Test/spv.nonSquare.vert @@ -1,9 +1,9 @@ #version 140 -attribute vec3 v3; -attribute vec4 v4; +in vec3 v3; +in vec4 v4; -uniform mat3x2 m32; +out mat3x2 m32; const vec2 cv2 = vec2(10.0, 20.0); const mat2x4 m24 = mat2x4(3.0); diff --git a/Test/spv.precision.frag b/Test/spv.precision.frag index 997e4ead..090c1a6a 100644 --- a/Test/spv.precision.frag +++ b/Test/spv.precision.frag @@ -4,10 +4,10 @@ in lowp float lowfin; in mediump float mediumfin; in highp vec4 highfin; -uniform highp int uniform_high; -uniform mediump int uniform_medium; -uniform lowp int uniform_low; -uniform bvec2 ub2; +highp int uniform_high; +mediump int uniform_medium; +lowp int uniform_low; +bvec2 ub2; out mediump vec4 mediumfout; diff --git a/Test/spv.pushConstant.vert b/Test/spv.pushConstant.vert new file mode 100644 index 00000000..b1721bc6 --- /dev/null +++ b/Test/spv.pushConstant.vert @@ -0,0 +1,17 @@ +#version 400 + +layout(push_constant) uniform Material { + int kind; + float fa[3]; +} matInst; + +out vec4 color; + +void main() +{ + switch (matInst.kind) { + case 1: color = vec4(0.2); break; + case 2: color = vec4(0.5); break; + default: color = vec4(0.0); break; + } +} diff --git a/Test/spv.separate.frag b/Test/spv.separate.frag new file mode 100644 index 00000000..21e5db33 --- /dev/null +++ b/Test/spv.separate.frag @@ -0,0 +1,95 @@ +#version 400 + +uniform sampler s; +uniform samplerShadow sShadow; +uniform sampler sA[4]; +uniform texture2D t2d; +uniform texture3D t3d[4]; +flat in int i; + +out vec4 color; + +void main() +{ + color = texture(sampler2D(t2d, s), vec2(0.5)); + color += texture(sampler3D(t3d[i], sA[2]), vec3(0.5)); + color += texture(sampler2D(t2d, s), vec2(0.5)); +} + +uniform texture2D tex2D; +uniform textureCube texCube; +uniform textureCubeArray texCubeArray; +uniform itextureCubeArray itexCubeArray; +uniform utextureCubeArray utexCubeArray; +uniform itexture1DArray itex1DArray; +uniform utexture1D utex1D; +uniform itexture1D itex1D; +uniform utexture1DArray utex1DArray; +uniform textureBuffer texBuffer; +uniform texture2DArray tex2DArray; +uniform itexture2D itex2D; +uniform itexture3D itex3D; +uniform itextureCube itexCube; +uniform itexture2DArray itex2DArray; +uniform utexture2D utex2D; +uniform utexture3D utex3D; +uniform utextureCube utexCube; +uniform utexture2DArray utex2DArray; +uniform itexture2DRect itex2DRect; +uniform utexture2DRect utex2DRect; +uniform itextureBuffer itexBuffer; +uniform utextureBuffer utexBuffer; +uniform texture2DMS tex2DMS; +uniform itexture2DMS itex2DMS; +uniform utexture2DMS utex2DMS; +uniform texture2DMSArray tex2DMSArray; +uniform itexture2DMSArray itex2DMSArray; +uniform utexture2DMSArray utex2DMSArray; +uniform texture1D tex1D; +uniform texture3D tex3D; +uniform texture2DRect tex2DRect; +uniform texture1DArray tex1DArray; + +void foo() +{ + sampler2D (tex2D, s); + samplerCube (texCube, s); + samplerCubeArray (texCubeArray, s); + samplerCubeArrayShadow (texCubeArray, sShadow); + isamplerCubeArray (itexCubeArray, s); + usamplerCubeArray (utexCubeArray, s); + sampler1DArrayShadow (tex1DArray, sShadow); + isampler1DArray (itex1DArray, s); + usampler1D (utex1D, s); + isampler1D (itex1D, s); + usampler1DArray (utex1DArray, s); + samplerBuffer (texBuffer, s); + samplerCubeShadow (texCube, sShadow); + sampler2DArray (tex2DArray, s); + sampler2DArrayShadow (tex2DArray, sShadow); + isampler2D (itex2D, s); + isampler3D (itex3D, s); + isamplerCube (itexCube, s); + isampler2DArray (itex2DArray, s); + usampler2D (utex2D, s); + usampler3D (utex3D, s); + usamplerCube (utexCube, s); + usampler2DArray (utex2DArray, s); + isampler2DRect (itex2DRect, s); + usampler2DRect (utex2DRect, s); + isamplerBuffer (itexBuffer, s); + usamplerBuffer (utexBuffer, s); + sampler2DMS (tex2DMS, s); + isampler2DMS (itex2DMS, s); + usampler2DMS (utex2DMS, s); + sampler2DMSArray (tex2DMSArray, s); + isampler2DMSArray (itex2DMSArray, s); + usampler2DMSArray (utex2DMSArray, s); + sampler1D (tex1D, s); + sampler1DShadow (tex1D, sShadow); + sampler3D (tex3D, s); + sampler2DShadow (tex2D, sShadow); + sampler2DRect (tex2DRect, s); + sampler2DRectShadow (tex2DRect, sShadow); + sampler1DArray (tex1DArray, s); +} diff --git a/Test/spv.shiftOps.frag b/Test/spv.shiftOps.frag index 498d5bd1..7fb937f4 100644 --- a/Test/spv.shiftOps.frag +++ b/Test/spv.shiftOps.frag @@ -1,10 +1,9 @@ #version 450 -uniform int i1; -uniform uint u1; - -uniform ivec3 i3; -uniform uvec3 u3; +flat in int i1; +flat in uint u1; +flat in ivec3 i3; +flat in uvec3 u3; out ivec3 icolor; out uvec3 ucolor; diff --git a/Test/spv.shortCircuit.frag b/Test/spv.shortCircuit.frag index dc1bf79a..4a626417 100755 --- a/Test/spv.shortCircuit.frag +++ b/Test/spv.shortCircuit.frag @@ -1,12 +1,12 @@ #version 400 -uniform ivec4 uiv4; -uniform vec4 uv4; -uniform bool ub; -uniform bool uba; -uniform bvec4 ub41, ub42; -uniform float uf; -uniform int ui; +flat in ivec4 uiv4; +in vec4 uv4; +bool ub; +bool uba; +bvec4 ub41, ub42; +in float uf; +flat in int ui; out float of1; out vec4 of4; diff --git a/Test/spv.simpleFunctionCall.frag b/Test/spv.simpleFunctionCall.frag index a302c334..496bb93d 100644 --- a/Test/spv.simpleFunctionCall.frag +++ b/Test/spv.simpleFunctionCall.frag @@ -1,8 +1,6 @@ #version 150 -uniform vec4 bigColor; in vec4 BaseColor; -uniform float d; vec4 foo() { diff --git a/Test/spv.simpleMat.vert b/Test/spv.simpleMat.vert index afbc0db1..897a8986 100644 --- a/Test/spv.simpleMat.vert +++ b/Test/spv.simpleMat.vert @@ -1,6 +1,6 @@ #version 330 -uniform mat4 mvp; +varying mat4 mvp; in vec4 v; in mat3 am3; diff --git a/Test/spv.sparseTexture.frag b/Test/spv.sparseTexture.frag index 06c89e54..e4aefc53 100644 --- a/Test/spv.sparseTexture.frag +++ b/Test/spv.sparseTexture.frag @@ -16,11 +16,11 @@ uniform isampler2DArray is2DArray; uniform usamplerCubeArray usCubeArray; uniform usampler2DRect us2DRect; -uniform vec2 c2; -uniform vec3 c3; -uniform vec4 c4; +in vec2 c2; +in vec3 c3; +in vec4 c4; -uniform ivec2 offsets[4]; +in flat ivec2 offsets[4]; out vec4 outColor; diff --git a/Test/spv.sparseTextureClamp.frag b/Test/spv.sparseTextureClamp.frag index 848d3774..97317938 100644 --- a/Test/spv.sparseTextureClamp.frag +++ b/Test/spv.sparseTextureClamp.frag @@ -15,11 +15,11 @@ uniform isampler2DArray is2DArray; uniform usamplerCubeArray usCubeArray; uniform usampler2DRect us2DRect; -uniform vec2 c2; -uniform vec3 c3; -uniform vec4 c4; +in vec2 c2; +in vec3 c3; +in vec4 c4; -uniform float lodClamp; +in float lodClamp; out vec4 outColor; diff --git a/Test/spv.specConstant.comp b/Test/spv.specConstant.comp new file mode 100644 index 00000000..ae8ae19d --- /dev/null +++ b/Test/spv.specConstant.comp @@ -0,0 +1,13 @@ +#version 450 + +layout(local_size_x_id = 18, local_size_z_id = 19) in; +layout(local_size_x = 32, local_size_y = 32) in; + +buffer bn { + uint a; +} bi; + +void main() +{ + bi.a = gl_WorkGroupSize.x * gl_WorkGroupSize.y * gl_WorkGroupSize.z; +} diff --git a/Test/spv.specConstant.vert b/Test/spv.specConstant.vert new file mode 100644 index 00000000..0f9764d4 --- /dev/null +++ b/Test/spv.specConstant.vert @@ -0,0 +1,43 @@ +#version 400 + +layout(constant_id = 16) const int arraySize = 5; +in vec4 ucol[arraySize]; + +layout(constant_id = 17) const bool spBool = true; +layout(constant_id = 18) const float spFloat = 3.14; +layout(constant_id = 19) const double spDouble = 3.1415926535897932384626433832795; +layout(constant_id = 22) const uint scale = 2; + +out vec4 color; +out int size; + +// parameter should be considered same type as ucol +void foo(vec4 p[arraySize]); + +void main() +{ + color = ucol[2]; + size = arraySize; + if (spBool) + color *= scale; + color += float(spDouble / spFloat); + + foo(ucol); +} + +layout(constant_id = 116) const int dupArraySize = 12; +in vec4 dupUcol[dupArraySize]; + +layout(constant_id = 117) const bool spDupBool = true; +layout(constant_id = 118) const float spDupFloat = 3.14; +layout(constant_id = 119) const double spDupDouble = 3.1415926535897932384626433832795; +layout(constant_id = 122) const uint dupScale = 2; + +void foo(vec4 p[arraySize]) +{ + color += dupUcol[2]; + size += dupArraySize; + if (spDupBool) + color *= dupScale; + color += float(spDupDouble / spDupFloat); +} diff --git a/Test/spv.structAssignment.frag b/Test/spv.structAssignment.frag index 0199e9a8..72984f2d 100644 --- a/Test/spv.structAssignment.frag +++ b/Test/spv.structAssignment.frag @@ -22,9 +22,9 @@ struct lunarStruct3 { }; -uniform lunarStruct1 foo; -uniform lunarStruct2 foo2; -uniform lunarStruct3 foo3; +lunarStruct1 foo; +lunarStruct2 foo2; +lunarStruct3 foo3; void main() { diff --git a/Test/spv.structDeref.frag b/Test/spv.structDeref.frag index 919361e7..11822cdc 100644 --- a/Test/spv.structDeref.frag +++ b/Test/spv.structDeref.frag @@ -31,12 +31,12 @@ struct s3 { }; -uniform s0 foo0; -uniform s1 foo1; -uniform s2 foo2; -uniform s3 foo3; +s0 foo0; +s1 foo1; +s2 foo2; +s3 foo3; -uniform s00 foo00; +s00 foo00; void main() { diff --git a/Test/spv.structure.frag b/Test/spv.structure.frag index 770ad92b..b81b9547 100644 --- a/Test/spv.structure.frag +++ b/Test/spv.structure.frag @@ -14,8 +14,8 @@ struct lunarStruct2 { lunarStruct1 s1_1[7]; }; -uniform lunarStruct1 foo; -uniform lunarStruct2 foo2[5]; +lunarStruct1 foo; +lunarStruct2 foo2[5]; void main() { diff --git a/Test/spv.subpass.frag b/Test/spv.subpass.frag new file mode 100644 index 00000000..42411d99 --- /dev/null +++ b/Test/spv.subpass.frag @@ -0,0 +1,29 @@ +#version 400 + +layout(input_attachment_index = 1) uniform subpassInput sub; +layout(input_attachment_index = 2) uniform subpassInputMS subMS; +layout(input_attachment_index = 3) uniform isubpassInput isub; +layout(input_attachment_index = 4) uniform isubpassInputMS isubMS; +layout(input_attachment_index = 5) uniform usubpassInput usub; +layout(input_attachment_index = 6) uniform usubpassInputMS usubMS; + +out vec4 color; +out ivec4 icolor; +out uvec4 ucolor; + +void foo(isubpassInputMS sb) +{ + icolor += subpassLoad(sb, 3); +} + +void main() +{ + color = subpassLoad(sub); + color += subpassLoad(subMS, 3); + icolor = subpassLoad(isub); + icolor += subpassLoad(isubMS, 3); + ucolor = subpassLoad(usub); + ucolor += subpassLoad(usubMS, 3); + + foo(isubMS); +} diff --git a/Test/spv.switch.frag b/Test/spv.switch.frag index 828b069f..1808086a 100644 --- a/Test/spv.switch.frag +++ b/Test/spv.switch.frag @@ -1,9 +1,9 @@ #version 310 es precision mediump float; -uniform int c, d; +flat in int c, d; in float x; out float color; -uniform vec4 v; +in vec4 v; vec4 foo1(vec4 v1, vec4 v2, int i1) { diff --git a/Test/spv.swizzle.frag b/Test/spv.swizzle.frag index 476136fb..5a5a203c 100644 --- a/Test/spv.swizzle.frag +++ b/Test/spv.swizzle.frag @@ -1,8 +1,8 @@ #version 140 -uniform float blend; -uniform vec4 u; -uniform bool p; +in float blend; +in vec4 u; +bool p; in vec2 t; diff --git a/Test/spv.test.frag b/Test/spv.test.frag index c4fe62d2..3d4d8f96 100644 --- a/Test/spv.test.frag +++ b/Test/spv.test.frag @@ -3,9 +3,9 @@ uniform sampler2D texSampler2D; uniform sampler3D texSampler3D; -uniform float blend; -uniform vec2 scale; -uniform vec4 u; +in float blend; +in vec2 scale; +in vec4 u; in vec2 t; in vec3 coords; diff --git a/Test/spv.test.vert b/Test/spv.test.vert index c1d58aa5..e2e16aa5 100644 --- a/Test/spv.test.vert +++ b/Test/spv.test.vert @@ -1,6 +1,6 @@ #version 140 -uniform mat4 transform; +in mat4 transform; attribute vec4 position; in vec2 uv_in; diff --git a/Test/spv.texture.frag b/Test/spv.texture.frag index 83de4e31..73884d1c 100644 --- a/Test/spv.texture.frag +++ b/Test/spv.texture.frag @@ -7,9 +7,9 @@ uniform samplerCube texSamplerCube; uniform sampler1DShadow shadowSampler1D; uniform sampler2DShadow shadowSampler2D; -uniform float blend; -uniform vec2 scale; -uniform vec4 u; +varying float blend; +varying vec2 scale; +varying vec4 u; in vec2 t; in vec2 coords2D; diff --git a/Test/spv.types.frag b/Test/spv.types.frag index 038ebd4d..a2ab1d32 100644 --- a/Test/spv.types.frag +++ b/Test/spv.types.frag @@ -1,24 +1,21 @@ #version 140 -uniform bool u_b; -uniform bvec2 u_b2; -uniform bvec3 u_b3; -uniform bvec4 u_b4; - -uniform int u_i; -uniform ivec2 u_i2; -uniform ivec3 u_i3; -uniform ivec4 u_i4; - -uniform float u_f; -uniform vec2 u_f2; -uniform vec3 u_f3; -uniform vec4 u_f4; - -uniform bool i_b; -uniform bvec2 i_b2; -uniform bvec3 i_b3; -uniform bvec4 i_b4; +bool u_b; +bvec2 u_b2; +bvec3 u_b3; +bvec4 u_b4; +flat in int u_i; +flat in ivec2 u_i2; +flat in ivec3 u_i3; +flat in ivec4 u_i4; + in float u_f; + in vec2 u_f2; + in vec3 u_f3; + in vec4 u_f4; +bool i_b; +bvec2 i_b2; +bvec3 i_b3; +bvec4 i_b4; flat in int i_i; flat in ivec2 i_i2; diff --git a/Test/spv.uint.frag b/Test/spv.uint.frag index eea01665..92a8f962 100644 --- a/Test/spv.uint.frag +++ b/Test/spv.uint.frag @@ -4,9 +4,9 @@ flat in uvec2 t; in float f; in vec2 tc; -uniform uvec4 v; -uniform int i; -uniform bool b; +flat in uvec4 v; +flat in int i; +bool b; out uvec4 c; diff --git a/Test/spv.uniformArray.frag b/Test/spv.uniformArray.frag index 11a353a5..b7625afe 100644 --- a/Test/spv.uniformArray.frag +++ b/Test/spv.uniformArray.frag @@ -1,8 +1,9 @@ #version 140 + uniform sampler2D texSampler2D; -uniform vec3 inColor; -uniform vec4 color[6]; -uniform float alpha[16]; +in vec3 inColor; +in vec4 color[6]; +in float alpha[16]; void main() { diff --git a/Test/spv.variableArrayIndex.frag b/Test/spv.variableArrayIndex.frag index 2d28c234..cc304b8e 100644 --- a/Test/spv.variableArrayIndex.frag +++ b/Test/spv.variableArrayIndex.frag @@ -1,4 +1,5 @@ -#version 140 +#version 400 + uniform sampler2D samp2D; in vec2 coord; @@ -21,10 +22,10 @@ struct lunarStruct3 { }; -uniform lunarStruct1 foo; -uniform lunarStruct2 foo2[5]; -uniform lunarStruct3 foo3; -uniform int Count; +flat in lunarStruct1 foo; +flat in lunarStruct2 foo2[5]; +flat in lunarStruct3 foo3; +flat in int Count; void main() { diff --git a/Test/spv.varyingArrayIndirect.frag b/Test/spv.varyingArrayIndirect.frag index 2ab5e205..a556c9eb 100644 --- a/Test/spv.varyingArrayIndirect.frag +++ b/Test/spv.varyingArrayIndirect.frag @@ -7,7 +7,7 @@ in vec4 TexCoord[6]; in vec4 userIn[2]; -uniform int a, b; +flat in int a, b; void main() { diff --git a/Test/spv.voidFunction.frag b/Test/spv.voidFunction.frag index 6658ada2..228ea1ff 100644 --- a/Test/spv.voidFunction.frag +++ b/Test/spv.voidFunction.frag @@ -1,8 +1,8 @@ -#version 140 +#version 400 -uniform vec4 bigColor; +in vec4 bigColor; in vec4 BaseColor; -uniform float d; +in float d; float bar = 2.0; diff --git a/Test/spv.whileLoop.frag b/Test/spv.whileLoop.frag index ef577213..f7b7141e 100644 --- a/Test/spv.whileLoop.frag +++ b/Test/spv.whileLoop.frag @@ -1,8 +1,8 @@ #version 140 -uniform vec4 bigColor; +in vec4 bigColor; in vec4 BaseColor; -uniform float d; +in float d; void main() { diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 2182cad9..51e2e8f3 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -91,7 +91,15 @@ spv.varyingArray.frag spv.varyingArrayIndirect.frag spv.voidFunction.frag spv.whileLoop.frag -spv.atomic.comp spv.AofA.frag spv.queryL.frag +spv.separate.frag spv.shortCircuit.frag +spv.pushConstant.vert +spv.subpass.frag +spv.specConstant.vert +spv.specConstant.comp +# GLSL-level semantics +vulkan.frag +vulkan.vert +vulkan.comp diff --git a/Test/testlist b/Test/testlist index 34780403..d60fbca4 100644 --- a/Test/testlist +++ b/Test/testlist @@ -127,3 +127,5 @@ varyingArray.frag varyingArrayIndirect.frag voidFunction.frag whileLoop.frag +nonVulkan.frag +spv.atomic.comp diff --git a/Test/vulkan.comp b/Test/vulkan.comp new file mode 100644 index 00000000..6b6f4cf3 --- /dev/null +++ b/Test/vulkan.comp @@ -0,0 +1,12 @@ +#version 450 + +layout(local_size_x_id = 18, local_size_z_id = 19) in; +layout(local_size_x = 32, local_size_y = 32) in; +layout(local_size_z_id = 14) in; // ERROR, can't change this + +void main() +{ + gl_WorkGroupSize; +} + +layout(local_size_y_id = 19) in; // ERROR, already used: TODO not yet reported diff --git a/Test/vulkan.frag b/Test/vulkan.frag new file mode 100644 index 00000000..b96647c7 --- /dev/null +++ b/Test/vulkan.frag @@ -0,0 +1,69 @@ +#version 450 + +uniform sampler s; +uniform sampler sA[4]; +uniform texture2D t2d; +uniform texture3D t3d[4]; +int i; +uniform samplerShadow sShadow; +uniform texture3D t3d5[5]; +writeonly uniform image2D i2d; + +void badConst() +{ + sampler2D(t2d); // ERROR, need 2 args + sampler2D(s, s); // ERROR, wrong type + sampler2D(i, i); // ERROR, wrong type + sampler2D(t2d, i); // ERROR, wrong type + sampler2D(t2d, t2d); // ERROR, wrong type + sampler2D(t2d, sA); // ERROR, wrong type + + sampler3D[4](t3d5, sA[2]); // ERROR, can't make array + sampler2D(i2d, s); // ERROR, image instead of texture + sampler2D(t3d[1], s); // ERROR, 3D not 2D + sampler2D(t2d, sShadow); // ERROR, shadow mismatch + sampler2DShadow(t2d, s); // ERROR, shadow mismatch +} + +sampler2D s2D = sampler2D(t2d, s); // ERROR, no sampler constructor +sampler3D s3d[4] = sampler3D[4](t3d, sA[2]); // ERROR, no sampler constructor + +out vec4 color; + +void main() +{ + color = texture(s2D, vec2(0.5)); + color += texture(s3d[i], vec3(0.5)); +} + +layout(push_constant) buffer pcb { // ERROR, not on a buffer + int a; +} pcbInst; + +layout(push_constant) uniform float pcfloat; // ERROR 2X: not on a non-block, and non-opaque outside block + +layout(push_constant) uniform; // ERROR, needs an object + +layout(push_constant) uniform pcb2 { + int a; +}; // ERROR, no instance name + +layout(input_attachment_index = 2) uniform subpassInput subD; +layout(input_attachment_index = 3) uniform texture2D subDbad1; // ERROR, not a texture +layout(input_attachment_index = 4) writeonly uniform image2D subDbad2; // ERROR, not an image +uniform subpassInput subDbad3; // ERROR, need attachment number +layout(input_attachment_index = 2) uniform subpassInputMS subDMS; + +void foo() +{ + vec4 v = subpassLoad(subD); + v += subpassLoadMS(subD); // ERROR, no such function + v += subpassLoad(subD, 2); // ERROR, no such sig. + v += subpassLoad(subDMS, 2); + v += subpassLoadMS(subDMS, 2); // ERROR, no such function +} + +subroutine int fooS; // ERROR, not in SPV +subroutine int fooSub(); // ERROR, not in SPV + +uniform vec4 dv4; // ERROR, no default uniforms diff --git a/Test/vulkan.vert b/Test/vulkan.vert new file mode 100644 index 00000000..a4ee9cd1 --- /dev/null +++ b/Test/vulkan.vert @@ -0,0 +1,37 @@ +#version 450 + +layout(input_attachment_index = 2) uniform subpassInput subD1; // ERROR, not this stage +layout(input_attachment_index = 2) uniform isubpassInput subD2; // ERROR, not this stage +layout(input_attachment_index = 2) uniform usubpassInput subD3; // ERROR, not this stage +layout(input_attachment_index = 2) uniform subpassInputMS subD4; // ERROR, not this stage +layout(input_attachment_index = 2) uniform isubpassInputMS subD5; // ERROR, not this stage +layout(input_attachment_index = 2) uniform usubpassInputMS subD6; // ERROR, not this stage + +out vec4 color; + +layout(constant_id = 17) const ivec2 arraySizes = ivec2(12,13); // ERROR, not a scalar +layout(constant_id = 17) uniform sampler2D s2D; // ERROR, not the right type or qualifier +layout(constant_id = 4000) const int c1 = 12; // ERROR, too big +layout(constant_id = 4) const float c2[2] = float[2](1.0, 2.0); // ERROR, not a scalar +layout(constant_id = 4) in; + +void main() +{ + color = subpassLoad(subD1); // ERROR, no such function in this stage +} + +layout(binding = 0) uniform atomic_uint aui; // ERROR, no atomics in Vulkan +layout(shared) uniform ub1n { int a; } ub1i; // ERROR, no shared +layout(packed) uniform ub2n { int a; } ub2i; // ERROR, no packed + +layout(constant_id=222) const int arraySize = 4; + +void foo() +{ + int a1[arraySize]; + int a2[arraySize] = a1; // ERROR, can't use in initializer + + a1 = a2; // ERROR, can't assign, even though the same type + if (a1 == a2) // ERROR, can't compare either + ++color; +} \ No newline at end of file diff --git a/glslang/Include/BaseTypes.h b/glslang/Include/BaseTypes.h index 35d47af2..ca1fa4c3 100644 --- a/glslang/Include/BaseTypes.h +++ b/glslang/Include/BaseTypes.h @@ -130,6 +130,8 @@ enum TBuiltInVariable { EbvLocalInvocationIndex, EbvVertexId, EbvInstanceId, + EbvVertexIndex, + EbvInstanceIndex, EbvBaseVertex, EbvBaseInstance, EbvDrawId, @@ -221,6 +223,8 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvLocalInvocationIndex: return "LocalInvocationIndex"; case EbvVertexId: return "VertexId"; case EbvInstanceId: return "InstanceId"; + case EbvVertexIndex: return "VertexIndex"; + case EbvInstanceIndex: return "InstanceIndex"; case EbvBaseVertex: return "BaseVertex"; case EbvBaseInstance: return "BaseInstance"; case EbvDrawId: return "DrawId"; diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index f1695839..1d78130a 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -1,6 +1,7 @@ // //Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//Copyright (C) 2012-2013 LunarG, Inc. +//Copyright (C) 2012-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -63,6 +64,7 @@ enum TSamplerDim { EsdCube, EsdRect, EsdBuffer, + EsdSubpass, // goes only with non-sampled image (image is true) EsdNumDims }; @@ -73,8 +75,16 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool shadow : 1; bool ms : 1; bool image : 1; // image, combined should be false + bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler + bool sampler : 1; // true means a pure sampler, other fields should be clear() bool external : 1; // GL_OES_EGL_image_external + bool isImage() const { return image && dim != EsdSubpass; } + bool isSubpass() const { return dim == EsdSubpass; } + bool isCombined() const { return combined; } + bool isPureSampler() const { return sampler; } + bool isTexture() const { return !sampler && !image; } + void clear() { type = EbtVoid; @@ -83,6 +93,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler, shadow = false; ms = false; image = false; + combined = false; + sampler = false; external = false; } @@ -95,6 +107,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler, arrayed = a; shadow = s; ms = m; + combined = true; } // make an image @@ -109,6 +122,35 @@ struct TSampler { // misnomer now; includes images, textures without sampler, image = true; } + // make a texture with no sampler + void setTexture(TBasicType t, TSamplerDim d, bool a = false, bool s = false, bool m = false) + { + clear(); + type = t; + dim = d; + arrayed = a; + shadow = s; + ms = m; + } + + // make a subpass input attachment + void setSubpass(TBasicType t, bool m = false) + { + clear(); + type = t; + image = true; + dim = EsdSubpass; + ms = m; + } + + // make a pure sampler, no texture, no image, nothing combined, the 'sampler' keyword + void setPureSampler(bool s) + { + clear(); + sampler = true; + shadow = s; + } + bool operator==(const TSampler& right) const { return type == right.type && @@ -117,6 +159,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler, shadow == right.shadow && ms == right.ms && image == right.image && + combined == right.combined && + sampler == right.sampler && external == right.external; } @@ -129,6 +173,11 @@ struct TSampler { // misnomer now; includes images, textures without sampler, { TString s; + if (sampler) { + s.append("sampler"); + return s; + } + switch (type) { case EbtFloat: break; case EbtInt: s.append("i"); break; @@ -136,9 +185,14 @@ struct TSampler { // misnomer now; includes images, textures without sampler, default: break; // some compilers want this } if (image) { - s.append("image"); - } else { + if (dim == EsdSubpass) + s.append("subpass"); + else + s.append("image"); + } else if (combined) { s.append("sampler"); + } else { + s.append("texture"); } if (external) { s.append("ExternalOES"); @@ -151,6 +205,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler, case EsdCube: s.append("Cube"); break; case EsdRect: s.append("2DRect"); break; case EsdBuffer: s.append("Buffer"); break; + case EsdSubpass: s.append("Input"); break; default: break; // some compilers want this } if (ms) @@ -352,6 +407,7 @@ public: restrict = false; readonly = false; writeonly = false; + specConstant = false; clearLayout(); } @@ -370,6 +426,7 @@ public: bool restrict : 1; bool readonly : 1; bool writeonly : 1; + bool specConstant : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant bool isMemory() const { @@ -505,8 +562,12 @@ public: layoutXfbBuffer = layoutXfbBufferEnd; layoutXfbStride = layoutXfbStrideEnd; layoutXfbOffset = layoutXfbOffsetEnd; + layoutAttachment = layoutAttachmentEnd; + layoutSpecConstantId = layoutSpecConstantIdEnd; layoutFormat = ElfNone; + + layoutPushConstant = false; } bool hasLayout() const { @@ -515,7 +576,8 @@ public: hasBinding() || hasStream() || hasXfb() || - hasFormat(); + hasFormat() || + layoutPushConstant; } TLayoutMatrix layoutMatrix : 3; TLayoutPacking layoutPacking : 4; @@ -549,8 +611,16 @@ public: unsigned int layoutXfbOffset : 10; static const unsigned int layoutXfbOffsetEnd = 0x3FF; + unsigned int layoutAttachment : 8; // for input_attachment_index + static const unsigned int layoutAttachmentEnd = 0XFF; + + unsigned int layoutSpecConstantId : 11; + static const unsigned int layoutSpecConstantIdEnd = 0x7FF; + TLayoutFormat layoutFormat : 8; + bool layoutPushConstant; + bool hasUniformLayout() const { return hasMatrix() || @@ -627,6 +697,38 @@ public: { return layoutXfbOffset != layoutXfbOffsetEnd; } + bool hasAttachment() const + { + return layoutAttachment != layoutAttachmentEnd; + } + bool hasSpecConstantId() const + { + // Not the same thing as being a specialization constant, this + // is just whether or not it was declared with an ID. + return layoutSpecConstantId != layoutSpecConstantIdEnd; + } + bool isSpecConstant() const + { + // True if type is a specialization constant, whether or not it + // had a specialization-constant ID, and false if it is not a + // true front-end constant. + return specConstant; + } + bool isFrontEndConstant() const + { + // True if the front-end knows the final constant value. + // This allows front-end constant folding. + return storage == EvqConst && ! specConstant; + } + bool isConstant() const + { + // True if is either kind of constant; specialization or regular. + return isFrontEndConstant() || isSpecConstant(); + } + void makeSpecConstant() + { + specConstant = true; + } static const char* getLayoutPackingString(TLayoutPacking packing) { switch (packing) { @@ -781,6 +883,7 @@ struct TShaderQualifiers { TVertexOrder order; bool pointMode; int localSize[3]; // compute shader + int localSizeSpecId[3]; // compute shader specialization id for gl_WorkGroupSize bool earlyFragmentTests; // fragment input TLayoutDepth layoutDepth; bool blendEquation; // true if any blend equation was specified @@ -798,6 +901,9 @@ struct TShaderQualifiers { localSize[0] = 1; localSize[1] = 1; localSize[2] = 1; + localSizeSpecId[0] = TQualifier::layoutNotSet; + localSizeSpecId[1] = TQualifier::layoutNotSet; + localSizeSpecId[2] = TQualifier::layoutNotSet; earlyFragmentTests = false; layoutDepth = EldNone; blendEquation = false; @@ -827,6 +933,10 @@ struct TShaderQualifiers { if (src.localSize[i] > 1) localSize[i] = src.localSize[i]; } + for (int i = 0; i < 3; ++i) { + if (src.localSizeSpecId[i] != TQualifier::layoutNotSet) + localSizeSpecId[i] = src.localSizeSpecId[i]; + } if (src.earlyFragmentTests) earlyFragmentTests = true; if (src.layoutDepth) @@ -902,7 +1012,9 @@ public: return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr; } - bool isImage() const { return basicType == EbtSampler && sampler.image; } + // "Image" is a superset of "Subpass" + bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } + bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } }; // @@ -1112,7 +1224,9 @@ public: virtual bool isRuntimeSizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage == EvqBuffer; } virtual bool isStruct() const { return structure != nullptr; } - virtual bool isImage() const { return basicType == EbtSampler && getSampler().image; } + // "Image" is a superset of "Subpass" + virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } + virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } // Recursively checks if the type contains the given basic type virtual bool containsBasicType(TBasicType checkType) const @@ -1181,6 +1295,42 @@ public: return false; } + virtual bool containsNonOpaque() const + { + // list all non-opaque types + switch (basicType) { + case EbtVoid: + case EbtFloat: + case EbtDouble: + case EbtInt: + case EbtUint: + case EbtBool: + return true; + default: + break; + } + if (! structure) + return false; + for (unsigned int i = 0; i < structure->size(); ++i) { + if ((*structure)[i].type->containsNonOpaque()) + return true; + } + return false; + } + + virtual bool containsSpecializationSize() const + { + if (isArray() && arraySizes->containsNode()) + return true; + if (! structure) + return false; + for (unsigned int i = 0; i < structure->size(); ++i) { + if ((*structure)[i].type->containsSpecializationSize()) + return true; + } + return false; + } + // Array editing methods. Array descriptors can be shared across // type instances. This allows all uses of the same array // to be updated at once. E.g., all nodes can be explicitly sized @@ -1218,7 +1368,7 @@ public: arraySizes->addOuterSizes(s); } void changeOuterArraySize(int s) { arraySizes->changeOuterSize(s); } - void setImplicitArraySize (int s) { arraySizes->setImplicitSize(s); } + void setImplicitArraySize(int s) { arraySizes->setImplicitSize(s); } // Recursively make the implicit array size the explicit array size, through the type tree. void adoptImplicitArraySizes() @@ -1296,6 +1446,12 @@ public: p += snprintf(p, end - p, "xfb_offset=%d ", qualifier.layoutXfbOffset); if (qualifier.hasXfbStride()) p += snprintf(p, end - p, "xfb_stride=%d ", qualifier.layoutXfbStride); + if (qualifier.hasAttachment()) + p += snprintf(p, end - p, "input_attachment_index=%d ", qualifier.layoutAttachment); + if (qualifier.hasSpecConstantId()) + p += snprintf(p, end - p, "constant_id=%d ", qualifier.layoutSpecConstantId); + if (qualifier.layoutPushConstant) + p += snprintf(p, end - p, "push_constant "); p += snprintf(p, end - p, ") "); } } @@ -1324,6 +1480,8 @@ public: p += snprintf(p, end - p, "readonly "); if (qualifier.writeonly) p += snprintf(p, end - p, "writeonly "); + if (qualifier.specConstant) + p += snprintf(p, end - p, "specialization-constant "); p += snprintf(p, end - p, "%s ", getStorageQualifierString()); if (arraySizes) { for(int i = 0; i < (int)arraySizes->getNumDims(); ++i) { diff --git a/glslang/Include/arrays.h b/glslang/Include/arrays.h index 1d8ec435..a50088d2 100644 --- a/glslang/Include/arrays.h +++ b/glslang/Include/arrays.h @@ -46,6 +46,26 @@ namespace glslang { // This is used to mean there is no size yet (unsized), it is waiting to get a size from somewhere else. const int UnsizedArraySize = 0; +class TIntermTyped; +extern bool SameSpecializationConstants(TIntermTyped*, TIntermTyped*); + +// Specialization constants need both a nominal size and a node that defines +// the specialization constant being used. Array types are the same when their +// size and specialization constant nodes are the same. +struct TArraySize { + unsigned int size; + TIntermTyped* node; // nullptr means no specialization constant node + bool operator==(const TArraySize& rhs) const + { + if (size != rhs.size) + return false; + if (node == nullptr || rhs.node == nullptr) + return node == rhs.node; + + return SameSpecializationConstants(node, rhs.node); + } +}; + // // TSmallArrayVector is used as the container for the set of sizes in TArraySizes. // It has generic-container semantics, while TArraySizes has array-of-array semantics. @@ -83,22 +103,31 @@ struct TSmallArrayVector { return (int)sizes->size(); } - unsigned int front() const + unsigned int frontSize() const { assert(sizes != nullptr && sizes->size() > 0); - return sizes->front(); + return sizes->front().size; + } + + TIntermTyped* frontNode() const + { + assert(sizes != nullptr && sizes->size() > 0); + return sizes->front().node; } void changeFront(unsigned int s) { assert(sizes != nullptr); - sizes->front() = s; + // this should only happen for implicitly sized arrays, not specialization constants + assert(sizes->front().node == nullptr); + sizes->front().size = s; } - void push_back(unsigned int e) + void push_back(unsigned int e, TIntermTyped* n) { alloc(); - sizes->push_back(e); + TArraySize pair = { e, n }; + sizes->push_back(pair); } void push_front(const TSmallArrayVector& newDims) @@ -129,16 +158,23 @@ struct TSmallArrayVector { } } - unsigned int operator[](int i) const + unsigned int getDimSize(int i) const { - assert(sizes != nullptr && (int)sizes->size() > i); - return (*sizes)[i]; + assert(sizes != nullptr && (int)sizes->size() > i); + return (*sizes)[i].size; } - unsigned int& operator[](int i) + void setDimSize(int i, unsigned int size) const { - assert(sizes != nullptr && (int)sizes->size() > i); - return (*sizes)[i]; + assert(sizes != nullptr && (int)sizes->size() > i); + assert((*sizes)[i].node == nullptr); + (*sizes)[i].size = size; + } + + TIntermTyped* getDimNode(int i) const + { + assert(sizes != nullptr && (int)sizes->size() > i); + return (*sizes)[i].node; } bool operator==(const TSmallArrayVector& rhs) const @@ -157,7 +193,7 @@ protected: void alloc() { if (sizes == nullptr) - sizes = new TVector; + sizes = new TVector; } void dealloc() { @@ -165,7 +201,7 @@ protected: sizes = nullptr; } - TVector* sizes; // will either hold such a pointer, or in the future, hold the two array sizes + TVector* sizes; // will either hold such a pointer, or in the future, hold the two array sizes }; // @@ -197,28 +233,32 @@ struct TArraySizes { // translate from array-of-array semantics to container semantics int getNumDims() const { return sizes.size(); } - int getDimSize(int dim) const { return sizes[dim]; } - void setDimSize(int dim, int size) { sizes[dim] = size; } - int getOuterSize() const { return sizes.front(); } + int getDimSize(int dim) const { return sizes.getDimSize(dim); } + TIntermTyped* getDimNode(int dim) const { return sizes.getDimNode(dim); } + void setDimSize(int dim, int size) { sizes.setDimSize(dim, size); } + int getOuterSize() const { return sizes.frontSize(); } + TIntermTyped* getOuterNode() const { return sizes.frontNode(); } int getCumulativeSize() const { int size = 1; for (int d = 0; d < sizes.size(); ++d) { // this only makes sense in paths that have a known array size - assert(sizes[d] != UnsizedArraySize); - size *= sizes[d]; + assert(sizes.getDimSize(d) != UnsizedArraySize); + size *= sizes.getDimSize(d); } return size; } - void addInnerSize() { sizes.push_back((unsigned)UnsizedArraySize); } - void addInnerSize(int s) { sizes.push_back((unsigned)s); } + void addInnerSize() { addInnerSize((unsigned)UnsizedArraySize); } + void addInnerSize(int s) { addInnerSize((unsigned)s, nullptr); } + void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); } + void addInnerSize(TArraySize pair) { sizes.push_back(pair.size, pair.node); } void changeOuterSize(int s) { sizes.changeFront((unsigned)s); } int getImplicitSize() const { return (int)implicitArraySize; } void setImplicitSize(int s) { implicitArraySize = s; } bool isInnerImplicit() const { for (int d = 1; d < sizes.size(); ++d) { - if (sizes[d] == (unsigned)UnsizedArraySize) + if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize) return true; } @@ -240,13 +280,26 @@ struct TArraySizes { return false; for (int d = 1; d < sizes.size(); ++d) { - if (sizes[d] != rhs.sizes[d]) + if (sizes.getDimSize(d) != rhs.sizes.getDimSize(d) || + sizes.getDimNode(d) != rhs.sizes.getDimNode(d)) return false; } return true; } + // Returns true if any of the dimensions of the array is sized with a node + // instead of a front-end compile-time constant. + bool containsNode() + { + for (int d = 0; d < sizes.size(); ++d) { + if (sizes.getDimNode(d) != nullptr) + return true; + } + + return false; + } + bool operator==(const TArraySizes& rhs) { return sizes == rhs.sizes; } bool operator!=(const TArraySizes& rhs) { return sizes != rhs.sizes; } diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 54bd96e1..ce5fb775 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -324,6 +324,7 @@ enum TOperator { EOpConstructDMat4x3, EOpConstructDMat4x4, EOpConstructStruct, + EOpConstructTextureSampler, EOpConstructGuardEnd, // @@ -371,6 +372,8 @@ enum TOperator { EOpImageAtomicExchange, EOpImageAtomicCompSwap, + EOpSubpassLoad, + EOpSubpassLoadMS, EOpSparseImageLoad, EOpImageGuardEnd, @@ -606,7 +609,7 @@ protected: // class TIntermSymbol : public TIntermTyped { public: - // if symbol is initialized as symbol(sym), the memory comes from the poolallocator of sym. If sym comes from + // if symbol is initialized as symbol(sym), the memory comes from the pool allocator of sym. If sym comes from // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol TIntermSymbol(int i, const TString& n, const TType& t) : @@ -619,9 +622,9 @@ public: void setConstArray(const TConstUnionArray& c) { unionArray = c; } const TConstUnionArray& getConstArray() const { return unionArray; } protected: - int id; - TString name; - TConstUnionArray unionArray; + int id; // the unique id of the symbol this node represents + TString name; // the name of the symbol this node represents + TConstUnionArray unionArray; // if the symbol is a front-end compile-time constant, this is its value }; class TIntermConstantUnion : public TIntermTyped { @@ -651,6 +654,7 @@ struct TCrackedTextureOp { bool offsets; bool gather; bool grad; + bool subpass; bool lodClamp; }; @@ -681,6 +685,7 @@ public: cracked.offsets = false; cracked.gather = false; cracked.grad = false; + cracked.subpass = false; cracked.lodClamp = false; switch (op) { @@ -790,6 +795,10 @@ public: cracked.gather = true; cracked.offsets = true; break; + case EOpSubpassLoad: + case EOpSubpassLoadMS: + cracked.subpass = true; + break; default: break; } @@ -937,7 +946,7 @@ enum TVisit // // Explicitly set postVisit to true if you want post visiting, otherwise, // filled in methods will only be called at pre-visit time (before processing -// the subtree). Similary for inVisit for in-order visiting of nodes with +// the subtree). Similarly for inVisit for in-order visiting of nodes with // multiple children. // // If you only want post-visits, explicitly turn off preVisit (and inVisit) @@ -970,7 +979,7 @@ public: void incrementDepth(TIntermNode *current) { depth++; - maxDepth = std::max(maxDepth, depth); + maxDepth = (std::max)(maxDepth, depth); path.push_back(current); } @@ -1000,6 +1009,14 @@ protected: TVector path; }; +// KHR_vulkan_glsl says "Two arrays sized with specialization constants are the same type only if +// sized with the same symbol, involving no operations" +inline bool SameSpecializationConstants(TIntermTyped* node1, TIntermTyped* node2) +{ + return node1->getAsSymbolNode() && node2->getAsSymbolNode() && + node1->getAsSymbolNode()->getId() == node2->getAsSymbolNode()->getId(); +} + } // end namespace glslang #endif // __INTERMEDIATE_H diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index b14b74ad..e338849d 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "SPIRV99.866" -#define GLSLANG_DATE "24-Dec-2015" +#define GLSLANG_REVISION "SPIRV99.947" +#define GLSLANG_DATE "15-Feb-2016" diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 4b0c0153..5f1c3d9f 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -1,6 +1,7 @@ // //Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//Copyright (C) 2012-2013 LunarG, Inc. +//Copyright (C) 2012-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -85,6 +86,7 @@ TBuiltIns::TBuiltIns() dimMap[Esd3D] = 3; dimMap[EsdCube] = 3; dimMap[EsdBuffer] = 1; + dimMap[EsdSubpass] = 2; // potientially unused for now } TBuiltIns::~TBuiltIns() @@ -99,7 +101,7 @@ TBuiltIns::~TBuiltIns() // Most built-ins variables can be added as simple text strings. Some need to // be added programmatically, which is done later in IdentifyBuiltIns() below. // -void TBuiltIns::initialize(int version, EProfile profile, int spv) +void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan) { //============================================================================ // @@ -1080,17 +1082,19 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) "\n"); } - // - // Atomic counter functions. - // - if ((profile != EEsProfile && version >= 300) || - (profile == EEsProfile && version >= 310)) { - commonBuiltins.append( - "uint atomicCounterIncrement(atomic_uint x);" - "uint atomicCounterDecrement(atomic_uint x);" - "uint atomicCounter(atomic_uint x);" + if (vulkan == 0) { + // + // Atomic counter functions. + // + if ((profile != EEsProfile && version >= 300) || + (profile == EEsProfile && version >= 310)) { + commonBuiltins.append( + "uint atomicCounterIncrement(atomic_uint x);" + "uint atomicCounterDecrement(atomic_uint x);" + "uint atomicCounter(atomic_uint x);" - "\n"); + "\n"); + } } // Bitfield @@ -1434,28 +1438,31 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) // // Depth range in window coordinates, p. 33 // - commonBuiltins.append( - "struct gl_DepthRangeParameters {" - ); - if (profile == EEsProfile) { + if (vulkan == 0) { commonBuiltins.append( - "highp float near;" // n - "highp float far;" // f - "highp float diff;" // f - n + "struct gl_DepthRangeParameters {" ); - } else { - commonBuiltins.append( - "float near;" // n - "float far;" // f - "float diff;" // f - n - ); - } - commonBuiltins.append( - "};" - "uniform gl_DepthRangeParameters gl_DepthRange;" - "\n"); + if (profile == EEsProfile) { + commonBuiltins.append( + "highp float near;" // n + "highp float far;" // f + "highp float diff;" // f - n + ); + } else { + commonBuiltins.append( + "float near;" // n + "float far;" // f + "float diff;" // f - n + ); + } - if (IncludeLegacy(version, profile, spv)) { + commonBuiltins.append( + "};" + "uniform gl_DepthRangeParameters gl_DepthRange;" + "\n"); + } + + if (vulkan == 0 && IncludeLegacy(version, profile, spv)) { // // Matrix state. p. 31, 32, 37, 39, 40. // @@ -1693,14 +1700,19 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) "};" "\n"); } - if (version >= 130) + if (version >= 130 && vulkan == 0) stageBuiltins[EShLangVertex].append( "int gl_VertexID;" // needs qualifier fixed later ); - if (version >= 140) + if (version >= 140 && vulkan == 0) stageBuiltins[EShLangVertex].append( "int gl_InstanceID;" // needs qualifier fixed later ); + if (spv > 0 && version >= 140) + stageBuiltins[EShLangVertex].append( + "in int gl_VertexIndex;" + "in int gl_InstanceIndex;" + ); if (version >= 440) { stageBuiltins[EShLangVertex].append( "in int gl_BaseVertexARB;" @@ -1716,10 +1728,16 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) "mediump float gl_PointSize;" // needs qualifier fixed later ); } else { - stageBuiltins[EShLangVertex].append( - "highp int gl_VertexID;" // needs qualifier fixed later - "highp int gl_InstanceID;" // needs qualifier fixed later - ); + if (vulkan == 0) + stageBuiltins[EShLangVertex].append( + "in highp int gl_VertexID;" // needs qualifier fixed later + "in highp int gl_InstanceID;" // needs qualifier fixed later + ); + if (spv > 0) + stageBuiltins[EShLangVertex].append( + "in highp int gl_VertexIndex;" + "in highp int gl_InstanceIndex;" + ); if (version < 310) stageBuiltins[EShLangVertex].append( "highp vec4 gl_Position;" // needs qualifier fixed later @@ -2071,7 +2089,7 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) stageBuiltins[EShLangFragment].append("\n"); if (version >= 130) - add2ndGenerationSamplingImaging(version, profile, spv); + add2ndGenerationSamplingImaging(version, profile, spv, vulkan); //printf("%s\n", commonBuiltins.c_str()); //printf("%s\n", stageBuiltins[EShLangFragment].c_str()); @@ -2081,7 +2099,7 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv) // Helper function for initialize(), to add the second set of names for texturing, // when adding context-independent built-in functions. // -void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, int spv) +void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, int /*spv*/, int vulkan) { // // In this function proper, enumerate the types, then calls the next set of functions @@ -2108,9 +2126,13 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, i for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, 2D, ..., buffer + if (dim == EsdSubpass && vulkan == 0) + continue; + if (dim == EsdSubpass && (image || shadow || arrayed)) + continue; if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile) continue; - if (dim != Esd2D && ms) + if (dim != Esd2D && dim != EsdSubpass && ms) continue; if ((dim == Esd3D || dim == EsdRect) && arrayed) continue; @@ -2138,7 +2160,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, i // TSampler sampler; - if (image) { + if (dim == EsdSubpass) { + sampler.setSubpass(bTypes[bType], ms ? true : false); + } else if (image) { sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false, shadow ? true : false, ms ? true : false); @@ -2150,6 +2174,11 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, i TString typeName = sampler.getString(); + if (dim == EsdSubpass) { + addSubpassSampling(sampler, typeName, version, profile); + continue; + } + addQueryFunctions(sampler, typeName, version, profile); if (image) @@ -2342,6 +2371,23 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi } } +// +// Helper function for initialize(), +// when adding context-independent built-in functions. +// +// Add all the subpass access functions for the given type. +// +void TBuiltIns::addSubpassSampling(TSampler sampler, TString& typeName, int /*version*/, EProfile /*profile*/) +{ + stageBuiltins[EShLangFragment].append(prefixes[sampler.type]); + stageBuiltins[EShLangFragment].append("vec4 subpassLoad"); + stageBuiltins[EShLangFragment].append("("); + stageBuiltins[EShLangFragment].append(typeName.c_str()); + if (sampler.ms) + stageBuiltins[EShLangFragment].append(", int"); + stageBuiltins[EShLangFragment].append(");\n"); +} + // // Helper function for add2ndGenerationSamplingImaging(), // when adding context-independent built-in functions. @@ -2682,7 +2728,7 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers // add stage-specific entries to the commonBuiltins, and only if that stage // was requested. // -void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, int spv, EShLanguage language) +void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, int spv, int vulkan, EShLanguage language) { // // Initialize the context-dependent (resource-dependent) built-in strings for parsing. @@ -2845,7 +2891,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents); s.append(builtInConstant); - if (IncludeLegacy(version, profile, spv)) { + if (vulkan == 0 && IncludeLegacy(version, profile, spv)) { // // OpenGL'uniform' state. Page numbers are in reference to version // 1.4 of the OpenGL specification. @@ -3189,7 +3235,7 @@ void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable b // 3) Tag extension-related symbols added to their base version with their extensions, so // that if an early version has the extension turned off, there is an error reported on use. // -void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage language, TSymbolTable& symbolTable) +void IdentifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage language, TSymbolTable& symbolTable) { // // Tag built-in variables and functions with additional qualifier and extension information @@ -3254,6 +3300,14 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic); } + if (vulkan == 0) { + SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable); + SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); + } + + BuiltInVariable("gl_VertexIndex", EbvVertexIndex, symbolTable); + BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable); + // Fall through case EShLangTessControl: @@ -3269,8 +3323,6 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable); SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable); SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable); - SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable); - SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); BuiltInVariable("gl_in", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_in", "gl_PointSize", EbvPointSize, symbolTable); @@ -3674,6 +3726,9 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua symbolTable.relateToOperator("imageAtomicExchange", EOpImageAtomicExchange); symbolTable.relateToOperator("imageAtomicCompSwap", EOpImageAtomicCompSwap); + symbolTable.relateToOperator("subpassLoad", EOpSubpassLoad); + symbolTable.relateToOperator("subpassLoadMS", EOpSubpassLoadMS); + symbolTable.relateToOperator("textureSize", EOpTextureQuerySize); symbolTable.relateToOperator("textureQueryLod", EOpTextureQueryLod); symbolTable.relateToOperator("textureQueryLevels", EOpTextureQueryLevels); @@ -3834,7 +3889,7 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua // 2) Tag extension-related symbols added to their base version with their extensions, so // that if an early version has the extension turned off, there is an error reported on use. // -void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) +void IdentifyBuiltIns(int version, EProfile profile, int spv, int /*vulkan*/, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) { if (profile != EEsProfile && version >= 430 && version < 440) { symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts); diff --git a/glslang/MachineIndependent/Initialize.h b/glslang/MachineIndependent/Initialize.h index 156db7d7..ab21a2f9 100644 --- a/glslang/MachineIndependent/Initialize.h +++ b/glslang/MachineIndependent/Initialize.h @@ -59,13 +59,14 @@ public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TBuiltIns(); virtual ~TBuiltIns(); - void initialize(int version, EProfile, int spv); - void initialize(const TBuiltInResource& resources, int version, EProfile, int spv, EShLanguage); + void initialize(int version, EProfile, int spv, int vulkan); + void initialize(const TBuiltInResource& resources, int version, EProfile, int spv, int vulkan, EShLanguage); const TString& getCommonString() const { return commonBuiltins; } const TString& getStageString(EShLanguage language) const { return stageBuiltins[language]; } protected: - void add2ndGenerationSamplingImaging(int version, EProfile profile, int spv); + void add2ndGenerationSamplingImaging(int version, EProfile profile, int spv, int vulkan); + void addSubpassSampling(TSampler, TString& typeName, int version, EProfile profile); void addQueryFunctions(TSampler, TString& typeName, int version, EProfile profile); void addImageFunctions(TSampler, TString& typeName, int version, EProfile profile); void addSamplingFunctions(TSampler, TString& typeName, int version, EProfile profile); @@ -81,8 +82,8 @@ protected: int dimMap[EsdNumDims]; }; -void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage, TSymbolTable&); -void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage, TSymbolTable&, const TBuiltInResource &resources); +void IdentifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage, TSymbolTable&); +void IdentifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage, TSymbolTable&, const TBuiltInResource &resources); } // end namespace glslang diff --git a/glslang/MachineIndependent/IntermTraverse.cpp b/glslang/MachineIndependent/IntermTraverse.cpp index b0ac4c76..44743eaf 100644 --- a/glslang/MachineIndependent/IntermTraverse.cpp +++ b/glslang/MachineIndependent/IntermTraverse.cpp @@ -54,7 +54,7 @@ namespace glslang { // // -// Traversal functions for terminals are straighforward.... +// Traversal functions for terminals are straightforward.... // void TIntermMethod::traverse(TIntermTraverser*) { diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index dcd310ea..bafcb917 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -1,6 +1,7 @@ // //Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//Copyright (C) 2012-2013 LunarG, Inc. +//Copyright (C) 2012-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -59,6 +60,7 @@ namespace glslang { // // Returns the added node. // + TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, const TSourceLoc& loc) { TIntermSymbol* node = new TIntermSymbol(id, name, type); @@ -67,9 +69,17 @@ TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType return node; } +TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, const TConstUnionArray& constArray, const TSourceLoc& loc) +{ + TIntermSymbol* node = addSymbol(id, name, type, loc); + node->setConstArray(constArray); + + return node; +} + TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable, const TSourceLoc& loc) { - return addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), loc); + return addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), variable.getConstArray(), loc); } // @@ -112,10 +122,9 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn node->updatePrecision(); // - // If they are both constants, they must be folded. + // If they are both (non-specialization) constants, they must be folded. // (Unless it's the sequence (comma) operator, but that's handled in addComma().) // - TIntermConstantUnion *leftTempConstant = left->getAsConstantUnion(); TIntermConstantUnion *rightTempConstant = right->getAsConstantUnion(); if (leftTempConstant && rightTempConstant) { @@ -124,6 +133,13 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn return folded; } + // If either is a specialization constant, while the other is + // a constant (or specialization constant), the result is still + // a specialization constant. + if (( left->getType().getQualifier().isSpecConstant() && right->getType().getQualifier().isConstant()) || + (right->getType().getQualifier().isSpecConstant() && left->getType().getQualifier().isConstant())) + node->getWritableType().getQualifier().makeSpecConstant(); + return node; } @@ -261,9 +277,14 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo node->updatePrecision(); + // If it's a (non-specialization) constant, it must be folded. if (child->getAsConstantUnion()) return child->getAsConstantUnion()->fold(op, node->getType()); + // If it's a specialiation constant, the result is too. + if (child->getType().getQualifier().isSpecConstant()) + node->getWritableType().getQualifier().makeSpecConstant(); + return node; } @@ -379,35 +400,37 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) const { // - // Does the base type allow operation? + // Does the base type even allow the operation? // switch (node->getBasicType()) { case EbtVoid: return 0; case EbtAtomicUint: case EbtSampler: - if (op != EOpFunctionCall) - return 0; - break; + // opaque types can be passed to functions + if (op == EOpFunction) + break; + // samplers can get assigned via a sampler constructor + // (well, not yet, but code in the rest of this function is ready for it) + if (node->getBasicType() == EbtSampler && op == EOpAssign && + node->getAsOperator() != nullptr && node->getAsOperator()->getOp() == EOpConstructTextureSampler) + break; + + // otherwise, opaque types can't even be operated on, let alone converted + return 0; default: break; } - // // Otherwise, if types are identical, no problem - // if (type == node->getType()) return node; - // // If one's a structure, then no conversions. - // if (type.isStruct() || node->isStruct()) return 0; - // // If one's an array, then no conversions. - // if (type.isArray() || node->getType().isArray()) return 0; @@ -1144,13 +1167,19 @@ bool TIntermBinary::promote() setType(left->getType()); type.getQualifier().clear(); - // Finish all array and structure operations. - if (left->isArray() || left->getBasicType() == EbtStruct) { + // Composite and opaque types don't having pending operator changes, e.g., + // array, structure, and samplers. Just establish final type and correctness. + if (left->isArray() || left->getBasicType() == EbtStruct || left->getBasicType() == EbtSampler) { switch (op) { case EOpEqual: case EOpNotEqual: - // Promote to conditional - setType(TType(EbtBool)); + if (left->getBasicType() == EbtSampler) { + // can't compare samplers + return false; + } else { + // Promote to conditional + setType(TType(EbtBool)); + } return true; diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 73684938..b97c96c2 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1,6 +1,7 @@ // //Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//Copyright (C) 2012-2013 LunarG, Inc. +//Copyright (C) 2012-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -47,10 +48,10 @@ extern int yyparse(glslang::TParseContext*); namespace glslang { -TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, bool pb, int v, EProfile p, int spv, EShLanguage L, TInfoSink& is, +TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, bool pb, int v, EProfile p, int spv, int vulkan, EShLanguage L, TInfoSink& is, bool fc, EShMessages m) : intermediate(interm), symbolTable(symt), infoSink(is), language(L), - version(v), profile(p), spv(spv), forwardCompatible(fc), + version(v), profile(p), spv(spv), vulkan(vulkan), forwardCompatible(fc), contextPragma(true, false), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0), statementNestingLevel(0), postMainReturn(false), tokensBeforeEOF(false), limits(resources.limits), messages(m), currentScanner(nullptr), @@ -97,11 +98,11 @@ TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, bool pb, globalUniformDefaults.clear(); globalUniformDefaults.layoutMatrix = ElmColumnMajor; - globalUniformDefaults.layoutPacking = ElpShared; + globalUniformDefaults.layoutPacking = vulkan > 0 ? ElpStd140 : ElpShared; globalBufferDefaults.clear(); globalBufferDefaults.layoutMatrix = ElmColumnMajor; - globalBufferDefaults.layoutPacking = ElpShared; + globalBufferDefaults.layoutPacking = vulkan > 0 ? ElpStd430 : ElpShared; globalInputDefaults.clear(); globalOutputDefaults.clear(); @@ -463,7 +464,7 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb if (! variable) variable = new TVariable(string, TType(EbtVoid)); - if (variable->getType().getQualifier().storage == EvqConst) + if (variable->getType().getQualifier().isFrontEndConstant()) node = intermediate.addConstantUnion(variable->getConstArray(), variable->getType(), loc); else node = intermediate.addSymbol(*variable, loc); @@ -610,6 +611,16 @@ void TParseContext::makeEditable(TSymbol*& symbol) intermediate.addSymbolLinkageNode(linkage, *symbol); } +TVariable* TParseContext::getEditableVariable(const char* name) +{ + bool builtIn; + TSymbol* symbol = symbolTable.find(name, &builtIn); + if (builtIn) + makeEditable(symbol); + + return symbol->getAsVariable(); +} + // Return true if this is a geometry shader input array or tessellation control output array. bool TParseContext::isIoResizeArray(const TType& type) const { @@ -813,7 +824,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm } } - if (base->getType().getQualifier().storage == EvqConst) + if (base->getType().getQualifier().isFrontEndConstant()) result = intermediate.foldSwizzle(base, fields, loc); else { if (fields.num == 1) { @@ -1682,6 +1693,8 @@ TOperator TParseContext::mapTypeToConstructorOp(const TType& type) const op = EOpConstructStruct; break; case EbtSampler: + if (type.getSampler().combined) + op = EOpConstructTextureSampler; break; case EbtFloat: if (type.isMatrix()) { @@ -2154,6 +2167,8 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T bool constructingMatrix = false; switch(op) { + case EOpConstructTextureSampler: + return constructorTextureSamplerError(loc, function); case EOpConstructMat2x2: case EOpConstructMat2x3: case EOpConstructMat2x4: @@ -2309,6 +2324,66 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T return false; } +// Verify all the correct semantics for constructing a combined texture/sampler. +// Return true if the semantics are incorrect. +bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const TFunction& function) +{ + TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change + const char* token = constructorName.c_str(); + + // exactly two arguments needed + if (function.getParamCount() != 2) { + error(loc, "sampler-constructor requires two arguments", token, ""); + return true; + } + + // For now, not allowing arrayed constructors, the rest of this function + // is set up to allow them, if this test is removed: + if (function.getType().isArray()) { + error(loc, "sampler-constructor cannot make an array of samplers", token, ""); + return true; + } + + // first argument + // * the constructor's first argument must be a texture type + // * the dimensionality (1D, 2D, 3D, Cube, Rect, Buffer, MS, and Array) + // of the texture type must match that of the constructed sampler type + // (that is, the suffixes of the type of the first argument and the + // type of the constructor will be spelled the same way) + if (function[0].type->getBasicType() != EbtSampler || + ! function[0].type->getSampler().isTexture() || + function[0].type->isArray()) { + error(loc, "sampler-constructor first argument must be a scalar textureXXX type", token, ""); + return true; + } + // simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=() + TSampler texture = function.getType().getSampler(); + texture.combined = false; + texture.shadow = false; + if (texture != function[0].type->getSampler()) { + error(loc, "sampler-constructor first argument must match type and dimensionality of constructor type", token, ""); + return true; + } + + // second argument + // * the constructor's second argument must be a scalar of type + // *sampler* or *samplerShadow* + // * the presence or absence of depth comparison (Shadow) must match + // between the constructed sampler type and the type of the second argument + if ( function[1].type->getBasicType() != EbtSampler || + ! function[1].type->getSampler().isPureSampler() || + function[1].type->isArray()) { + error(loc, "sampler-constructor second argument must be a scalar type 'sampler'", token, ""); + return true; + } + if (function.getType().getSampler().shadow != function[1].type->getSampler().shadow) { + error(loc, "sampler-constructor second argument presence of shadow must match constructor presence of shadow", token, ""); + return true; + } + + return false; +} + // Checks to see if a void variable has been declared and raise an error message for such a case // // returns true in case of an error @@ -2337,7 +2412,7 @@ void TParseContext::boolCheck(const TSourceLoc& loc, const TPublicType& pType) error(loc, "boolean expression expected", "", ""); } -void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) +void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const TString& identifier, TIntermTyped* /*initializer*/) { if (type.getQualifier().storage == EvqUniform) return; @@ -2345,6 +2420,9 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str()); else if (type.getBasicType() == EbtSampler && type.getQualifier().storage != EvqUniform) { + // non-uniform sampler + // not yet: okay if it has an initializer + // if (! initializer) error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); } } @@ -2360,6 +2438,19 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); } +void TParseContext::transparentCheck(const TSourceLoc& loc, const TType& type, const TString& /*identifier*/) +{ + // double standard due to gl_NumSamples + if (parsingBuiltins) + return; + + // Vulkan doesn't allow transparent uniforms outside of blocks + if (vulkan == 0 || type.getQualifier().storage != EvqUniform) + return; + if (type.containsNonOpaque()) + vulkanRemoved(loc, "non-opaque uniforms outside a block"); +} + // // Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level. // @@ -2605,6 +2696,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(restrict); MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); + MERGE_SINGLETON(specConstant); if (repeated) error(loc, "replicated qualifiers", "", ""); @@ -2707,22 +2799,35 @@ bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType bas // // Do size checking for an array type's size. // -void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, int& size) +void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair) { - TIntermConstantUnion* constant = expr->getAsConstantUnion(); - if (constant == nullptr || (constant->getBasicType() != EbtInt && constant->getBasicType() != EbtUint)) { - error(loc, "array size must be a constant integer expression", "", ""); - size = 1; + bool isConst = false; + sizePair.size = 1; + sizePair.node = nullptr; + TIntermConstantUnion* constant = expr->getAsConstantUnion(); + if (constant) { + // handle true (non-specialization) constant + sizePair.size = constant->getConstArray()[0].getIConst(); + isConst = true; + } else { + // see if it's a specialization constant instead + if (expr->getQualifier().isSpecConstant()) { + isConst = true; + sizePair.node = expr; + TIntermSymbol* symbol = expr->getAsSymbolNode(); + if (symbol && symbol->getConstArray().size() > 0) + sizePair.size = symbol->getConstArray()[0].getIConst(); + } + } + + if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) { + error(loc, "array size must be a constant integer expression", "", ""); return; } - size = constant->getConstArray()[0].getIConst(); - - if (size <= 0) { + if (sizePair.size <= 0) { error(loc, "array size must be a positive integer", "", ""); - size = 1; - return; } } @@ -3390,6 +3495,12 @@ void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const error(loc, "can't use with samplers or structs containing samplers", op, ""); } +void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op) +{ + if (type.containsSpecializationSize()) + error(loc, "can't use with types containing arrays sized with a specialization constant", op, ""); +} + void TParseContext::structTypeCheck(const TSourceLoc& /*loc*/, TPublicType& publicType) { const TTypeList& typeList = *publicType.userDef->getStruct(); @@ -3605,10 +3716,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi return; } if (id == TQualifier::getLayoutPackingString(ElpPacked)) { + if (vulkan > 0) + vulkanRemoved(loc, "packed"); publicType.qualifier.layoutPacking = ElpPacked; return; } if (id == TQualifier::getLayoutPackingString(ElpShared)) { + if (vulkan > 0) + vulkanRemoved(loc, "shared"); publicType.qualifier.layoutPacking = ElpShared; return; } @@ -3636,6 +3751,11 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi return; } } + if (id == "push_constant") { + requireVulkan(loc, "push_constant"); + publicType.qualifier.layoutPushConstant = true; + return; + } if (language == EShLangGeometry || language == EShLangTessEvaluation) { if (id == TQualifier::getGeometryString(ElgTriangles)) { publicType.shaderQualifiers.geometry = ElgTriangles; @@ -3874,6 +3994,27 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } } + if (id == "input_attachment_index") { + requireVulkan(loc, "input_attachment_index"); + if (value >= (int)TQualifier::layoutAttachmentEnd) + error(loc, "attachment index is too large", id.c_str(), ""); + else + publicType.qualifier.layoutAttachment = value; + return; + } + if (id == "constant_id") { + requireSpv(loc, "constant_id"); + if (value >= (int)TQualifier::layoutSpecConstantIdEnd) { + error(loc, "specialization-constant id is too large", id.c_str(), ""); + } else { + publicType.qualifier.layoutSpecConstantId = value; + publicType.qualifier.specConstant = true; + if (! intermediate.addUsedConstantId(value)) + error(loc, "specialization-constant id already used", id.c_str(), ""); + } + return; + } + switch (language) { case EShLangVertex: break; @@ -3924,17 +4065,33 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi break; case EShLangCompute: - if (id == "local_size_x") { - publicType.shaderQualifiers.localSize[0] = value; - return; - } - if (id == "local_size_y") { - publicType.shaderQualifiers.localSize[1] = value; - return; - } - if (id == "local_size_z") { - publicType.shaderQualifiers.localSize[2] = value; - return; + if (id.compare(0, 11, "local_size_") == 0) { + if (id == "local_size_x") { + publicType.shaderQualifiers.localSize[0] = value; + return; + } + if (id == "local_size_y") { + publicType.shaderQualifiers.localSize[1] = value; + return; + } + if (id == "local_size_z") { + publicType.shaderQualifiers.localSize[2] = value; + return; + } + if (spv > 0) { + if (id == "local_size_x_id") { + publicType.shaderQualifiers.localSizeSpecId[0] = value; + return; + } + if (id == "local_size_y_id") { + publicType.shaderQualifiers.localSizeSpecId[1] = value; + return; + } + if (id == "local_size_z_id") { + publicType.shaderQualifiers.localSizeSpecId[2] = value; + return; + } + } } break; @@ -3999,6 +4156,13 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie dst.layoutXfbStride = src.layoutXfbStride; if (src.hasXfbOffset()) dst.layoutXfbOffset = src.layoutXfbOffset; + if (src.hasAttachment()) + dst.layoutAttachment = src.layoutAttachment; + if (src.hasSpecConstantId()) + dst.layoutSpecConstantId = src.layoutSpecConstantId; + + if (src.layoutPushConstant) + dst.layoutPushConstant = true; } } @@ -4041,6 +4205,8 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb // "The align qualifier can only be used on blocks or block members..." if (qualifier.hasAlign()) error(loc, "cannot specify on a variable declaration", "align", ""); + if (qualifier.layoutPushConstant) + error(loc, "can only specify on a uniform block", "push_constant", ""); } break; default: @@ -4055,7 +4221,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) { const TQualifier& qualifier = type.getQualifier(); - // first, intra layout qualifier-only error checking + // first, intra-layout qualifier-only error checking layoutQualifierCheck(loc, qualifier); // now, error checking combining type and qualifier @@ -4087,7 +4253,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) case EvqBuffer: break; default: - error(loc, "can only appy to uniform, buffer, in, or out storage qualifiers", "location", ""); + error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", ""); break; } @@ -4181,6 +4347,38 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) } } else if (type.isImage() && ! qualifier.writeonly) error(loc, "image variables not declared 'writeonly' must have a format layout qualifier", "", ""); + + if (qualifier.layoutPushConstant && type.getBasicType() != EbtBlock) + error(loc, "can only be used with a block", "push_constant", ""); + + // input attachment + if (type.isSubpass()) { + if (! qualifier.hasAttachment()) + error(loc, "requires an input_attachment_index layout qualifier", "subpass", ""); + } else { + if (qualifier.hasAttachment()) + error(loc, "can only be used with a subpass", "input_attachment_index", ""); + } + + // specialization-constant id + if (qualifier.hasSpecConstantId()) { + if (type.getQualifier().storage != EvqConst) + error(loc, "can only be applied to 'const'-qualified scalar", "constant_id", ""); + if (! type.isScalar()) + error(loc, "can only be applied to a scalar", "constant_id", ""); + switch (type.getBasicType()) + { + case EbtInt: + case EbtUint: + case EbtBool: + case EbtFloat: + case EbtDouble: + break; + default: + error(loc, "cannot be applied to this type", "constant_id", ""); + break; + } + } } // Do layout error checking that can be done within a layout qualifier proper, not needing to know @@ -4275,6 +4473,10 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "offset/align can only be used on a uniform or buffer", "layout", ""); } } + if (qualifier.layoutPushConstant) { + if (qualifier.storage != EvqUniform) + error(loc, "can only be used with a uniform", "push_constant", ""); + } } // For places that can't have shader-level layout qualifiers @@ -4297,6 +4499,8 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua for (int i = 0; i < 3; ++i) { if (shaderQualifiers.localSize[i] > 1) error(loc, message, "local_size", ""); + if (shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) + error(loc, message, "local_size id", ""); } if (shaderQualifiers.blendEquation) error(loc, message, "blend equation", ""); @@ -4490,8 +4694,9 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden else nonInitConstCheck(loc, identifier, type); - samplerCheck(loc, type, identifier); + samplerCheck(loc, type, identifier, initializer); atomicUintCheck(loc, type, identifier); + transparentCheck(loc, type, identifier); if (identifier != "gl_FragCoord" && (publicType.shaderQualifiers.originUpperLeft || publicType.shaderQualifiers.pixelCenterInteger)) error(loc, "can only apply origin_upper_left and pixel_center_origin to gl_FragCoord", "layout qualifier", ""); @@ -4690,7 +4895,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp } if (qualifier == EvqConst || qualifier == EvqUniform) { - // Compile-time tagging of the variable with it's constant value... + // Compile-time tagging of the variable with its constant value... initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer); if (! initializer || ! initializer->getAsConstantUnion() || variable->getType() != initializer->getType()) { @@ -4703,6 +4908,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp variable->setConstArray(initializer->getAsConstantUnion()->getConstArray()); } else { // normal assigning of a value to a variable... + specializationCheck(loc, initializer->getType(), "initializer"); TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc); TIntermNode* initNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, loc); if (! initNode) @@ -4716,7 +4922,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp // // Reprocess any initializer-list { ... } parts of the initializer. -// Need to heirarchically assign correct types and implicit +// Need to hierarchically assign correct types and implicit // conversions. Will do this mimicking the same process used for // creating a constructor-style initializer, ensuring we get the // same form. @@ -4811,6 +5017,11 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* TIntermAggregate* aggrNode = node->getAsAggregate(); + // Combined texture-sampler constructors are completely semantic checked + // in constructorTextureSamplerError() + if (op == EOpConstructTextureSampler) + return intermediate.setAggregateOperator(aggrNode, op, type, loc); + TTypeList::const_iterator memberTypes; if (op == EOpConstructStruct) memberTypes = type.getStruct()->begin(); @@ -4997,7 +5208,7 @@ TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes) { blockStageIoCheck(loc, currentBlockQualifier); - blockQualifierCheck(loc, currentBlockQualifier); + blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr); if (arraySizes) { arrayUnsizedCheck(loc, currentBlockQualifier, arraySizes, false, false); arrayDimCheck(loc, arraySizes, 0); @@ -5052,6 +5263,11 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con default: defaultQualification.clear(); break; } + // Special case for "push_constant uniform", which has a default of std430, + // contrary to normal uniform defaults, and can't have a default tracked for it. + if (currentBlockQualifier.layoutPushConstant && !currentBlockQualifier.hasPacking()) + currentBlockQualifier.layoutPacking = ElpStd430; + // fix and check for member layout qualifiers mergeObjectLayoutQualifiers(defaultQualification, currentBlockQualifier, true); @@ -5197,7 +5413,7 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q case EvqUniform: profileRequires(loc, EEsProfile, 300, nullptr, "uniform block"); profileRequires(loc, ENoProfile, 140, nullptr, "uniform block"); - if (currentBlockQualifier.layoutPacking == ElpStd430) + if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.layoutPushConstant) error(loc, "requires the 'buffer' storage qualifier", "std430", ""); break; case EvqBuffer: @@ -5227,7 +5443,7 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q } // Do all block-declaration checking regarding its qualifers. -void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier) +void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier, bool instanceName) { // The 4.5 specification says: // @@ -5254,6 +5470,11 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& error(loc, "cannot use sample qualifier on an interface block", "sample", ""); if (qualifier.invariant) error(loc, "cannot use invariant qualifier on an interface block", "invariant", ""); + if (qualifier.layoutPushConstant) { + intermediate.addPushConstantCount(); + if (! instanceName) + error(loc, "requires an instance name", "push_constant", ""); + } } // @@ -5541,16 +5762,22 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", ""); // Fix the existing constant gl_WorkGroupSize with this new information. - bool builtIn; - TSymbol* symbol = symbolTable.find("gl_WorkGroupSize", &builtIn); - if (builtIn) - makeEditable(symbol); - TVariable* workGroupSize = symbol->getAsVariable(); + TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize"); workGroupSize->getWritableConstArray()[i].setUConst(intermediate.getLocalSize(i)); } } else error(loc, "can only apply to 'in'", "local_size", ""); } + if (publicType.shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) { + if (publicType.qualifier.storage == EvqVaryingIn) { + if (! intermediate.setLocalSizeSpecId(i, publicType.shaderQualifiers.localSizeSpecId[i])) + error(loc, "cannot change previously set size", "local_size", ""); + } else + error(loc, "can only apply to 'in'", "local_size id", ""); + // Set the workgroup built-in variable as a specialization constant + TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize"); + workGroupSize->getWritableType().getQualifier().specConstant = true; + } } if (publicType.shaderQualifiers.earlyFragmentTests) { if (publicType.qualifier.storage == EvqVaryingIn) @@ -5614,6 +5841,10 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con error(loc, "cannot declare a default, use a full declaration", "location/component/index", ""); if (qualifier.hasXfbOffset()) error(loc, "cannot declare a default, use a full declaration", "xfb_offset", ""); + if (qualifier.layoutPushConstant) + error(loc, "cannot declare a default, can only be used on a block", "push_constant", ""); + if (qualifier.hasSpecConstantId()) + error(loc, "cannot declare a default, can only be used on a scalar", "constant_id", ""); } // diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h index 19a8a240..ac1932d5 100644 --- a/glslang/MachineIndependent/ParseHelper.h +++ b/glslang/MachineIndependent/ParseHelper.h @@ -65,7 +65,7 @@ typedef std::set TIdSetType; // class TParseContext { public: - TParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins, int version, EProfile, int spv, EShLanguage, TInfoSink&, + TParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins, int version, EProfile, int spv, int vulkan, EShLanguage, TInfoSink&, bool forwardCompatible = false, EShMessages messages = EShMsgDefault); virtual ~TParseContext(); @@ -98,6 +98,7 @@ public: void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void makeEditable(TSymbol*&); + TVariable* getEditableVariable(const char* name); bool isIoResizeArray(const TType&) const; void fixIoArraySize(const TSourceLoc&, TType&); void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier); @@ -132,7 +133,8 @@ public: void integerCheck(const TIntermTyped* node, const char* token); void globalCheck(const TSourceLoc&, const char* token); bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&); - void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, int& size); + bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&); + void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&); bool arrayQualifierError(const TSourceLoc&, const TQualifier&); bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); @@ -145,8 +147,9 @@ public: bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType); void boolCheck(const TSourceLoc&, const TIntermTyped*); void boolCheck(const TSourceLoc&, const TPublicType&); - void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier); + void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer); void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier); + void transparentCheck(const TSourceLoc&, const TType&, const TString& identifier); void globalQualifierFixCheck(const TSourceLoc&, TQualifier&); void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); @@ -165,6 +168,7 @@ public: void nestedStructCheck(const TSourceLoc&); void arrayObjectCheck(const TSourceLoc&, const TType&, const char* op); void opaqueCheck(const TSourceLoc&, const TType&, const char* op); + void specializationCheck(const TSourceLoc&, const TType&, const char* op); void structTypeCheck(const TSourceLoc&, TPublicType&); void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop); void arrayLimitCheck(const TSourceLoc&, const TString&, int size); @@ -193,7 +197,7 @@ public: TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0); void blockStageIoCheck(const TSourceLoc&, const TQualifier&); - void blockQualifierCheck(const TSourceLoc&, const TQualifier&); + void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); void fixBlockXfbOffsets(TQualifier&, TTypeList&); void fixBlockUniformOffsets(TQualifier&, TTypeList&); @@ -244,6 +248,10 @@ public: void updateExtensionBehavior(int line, const char* const extension, const char* behavior); void fullIntegerCheck(const TSourceLoc&, const char* op); void doubleCheck(const TSourceLoc&, const char* op); + void spvRemoved(const TSourceLoc&, const char* op); + void vulkanRemoved(const TSourceLoc&, const char* op); + void requireVulkan(const TSourceLoc&, const char* op); + void requireSpv(const TSourceLoc&, const char* op); void setVersionCallback(const std::function& func) { versionCallback = func; } void setPragmaCallback(const std::function&)>& func) { pragmaCallback = func; } @@ -281,6 +289,7 @@ public: int version; // version, updated by #version in the shader EProfile profile; // the declared profile in the shader (core by default) int spv; // SPIR-V version; 0 means not SPIR-V + int vulkan; // Vulkan version; 0 means not vulkan bool forwardCompatible; // true if errors are to be given for use of deprecated features // Current state of parsing diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index 80a077ce..f3c98aaf 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -494,6 +494,50 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["samplerExternalOES"] = SAMPLEREXTERNALOES; // GL_OES_EGL_image_external + (*KeywordMap)["sampler"] = SAMPLER; + (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW; + + (*KeywordMap)["texture2D"] = TEXTURE2D; + (*KeywordMap)["textureCube"] = TEXTURECUBE; + (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY; + (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY; + (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY; + (*KeywordMap)["itexture1DArray"] = ITEXTURE1DARRAY; + (*KeywordMap)["utexture1D"] = UTEXTURE1D; + (*KeywordMap)["itexture1D"] = ITEXTURE1D; + (*KeywordMap)["utexture1DArray"] = UTEXTURE1DARRAY; + (*KeywordMap)["textureBuffer"] = TEXTUREBUFFER; + (*KeywordMap)["texture2DArray"] = TEXTURE2DARRAY; + (*KeywordMap)["itexture2D"] = ITEXTURE2D; + (*KeywordMap)["itexture3D"] = ITEXTURE3D; + (*KeywordMap)["itextureCube"] = ITEXTURECUBE; + (*KeywordMap)["itexture2DArray"] = ITEXTURE2DARRAY; + (*KeywordMap)["utexture2D"] = UTEXTURE2D; + (*KeywordMap)["utexture3D"] = UTEXTURE3D; + (*KeywordMap)["utextureCube"] = UTEXTURECUBE; + (*KeywordMap)["utexture2DArray"] = UTEXTURE2DARRAY; + (*KeywordMap)["itexture2DRect"] = ITEXTURE2DRECT; + (*KeywordMap)["utexture2DRect"] = UTEXTURE2DRECT; + (*KeywordMap)["itextureBuffer"] = ITEXTUREBUFFER; + (*KeywordMap)["utextureBuffer"] = UTEXTUREBUFFER; + (*KeywordMap)["texture2DMS"] = TEXTURE2DMS; + (*KeywordMap)["itexture2DMS"] = ITEXTURE2DMS; + (*KeywordMap)["utexture2DMS"] = UTEXTURE2DMS; + (*KeywordMap)["texture2DMSArray"] = TEXTURE2DMSARRAY; + (*KeywordMap)["itexture2DMSArray"] = ITEXTURE2DMSARRAY; + (*KeywordMap)["utexture2DMSArray"] = UTEXTURE2DMSARRAY; + (*KeywordMap)["texture1D"] = TEXTURE1D; + (*KeywordMap)["texture3D"] = TEXTURE3D; + (*KeywordMap)["texture2DRect"] = TEXTURE2DRECT; + (*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY; + + (*KeywordMap)["subpassInput"] = SUBPASSINPUT; + (*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS; + (*KeywordMap)["isubpassInput"] = ISUBPASSINPUT; + (*KeywordMap)["isubpassInputMS"] = ISUBPASSINPUTMS; + (*KeywordMap)["usubpassInput"] = USUBPASSINPUT; + (*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS; + (*KeywordMap)["noperspective"] = NOPERSPECTIVE; (*KeywordMap)["smooth"] = SMOOTH; (*KeywordMap)["flat"] = FLAT; @@ -987,6 +1031,57 @@ int TScanContext::tokenizeIdentifier() return keyword; return identifierOrType(); + case TEXTURE2D: + case TEXTURECUBE: + case TEXTURECUBEARRAY: + case ITEXTURECUBEARRAY: + case UTEXTURECUBEARRAY: + case ITEXTURE1DARRAY: + case UTEXTURE1D: + case ITEXTURE1D: + case UTEXTURE1DARRAY: + case TEXTUREBUFFER: + case TEXTURE2DARRAY: + case ITEXTURE2D: + case ITEXTURE3D: + case ITEXTURECUBE: + case ITEXTURE2DARRAY: + case UTEXTURE2D: + case UTEXTURE3D: + case UTEXTURECUBE: + case UTEXTURE2DARRAY: + case ITEXTURE2DRECT: + case UTEXTURE2DRECT: + case ITEXTUREBUFFER: + case UTEXTUREBUFFER: + case TEXTURE2DMS: + case ITEXTURE2DMS: + case UTEXTURE2DMS: + case TEXTURE2DMSARRAY: + case ITEXTURE2DMSARRAY: + case UTEXTURE2DMSARRAY: + case TEXTURE1D: + case TEXTURE3D: + case TEXTURE2DRECT: + case TEXTURE1DARRAY: + case SAMPLER: + case SAMPLERSHADOW: + if (parseContext.spv > 0) + return keyword; + else + return identifierOrType(); + + case SUBPASSINPUT: + case SUBPASSINPUTMS: + case ISUBPASSINPUT: + case ISUBPASSINPUTMS: + case USUBPASSINPUT: + case USUBPASSINPUTMS: + if (parseContext.spv > 0) + return keyword; + else + return identifierOrType(); + case NOPERSPECTIVE: return es30ReservedFromGLSL(130); diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index a2d7181e..1f835539 100644 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -1,6 +1,7 @@ // //Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//Copyright (C) 2013 LunarG, Inc. +//Copyright (C) 2013-2015 LunarG, Inc. +//Copyright (C) 2015-2016 Google, Inc. // //All rights reserved. // @@ -124,12 +125,12 @@ TPoolAllocator* PerProcessGPA = 0; // // Parse and add to the given symbol table the content of the given shader string. // -bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profile, int spv, EShLanguage language, TInfoSink& infoSink, +bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profile, int spv, int vulkan, EShLanguage language, TInfoSink& infoSink, TSymbolTable& symbolTable) { TIntermediate intermediate(language, version, profile); - TParseContext parseContext(symbolTable, intermediate, true, version, profile, spv, language, infoSink); + TParseContext parseContext(symbolTable, intermediate, true, version, profile, spv, vulkan, language, infoSink); TPpContext ppContext(parseContext, TShader::ForbidInclude()); TScanContext scanContext(parseContext); parseContext.setScanContext(&scanContext); @@ -168,11 +169,11 @@ int CommonIndex(EProfile profile, EShLanguage language) // // To initialize per-stage shared tables, with the common table already complete. // -void InitializeStageSymbolTable(TBuiltIns& builtIns, int version, EProfile profile, int spv, EShLanguage language, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables) +void InitializeStageSymbolTable(TBuiltIns& builtIns, int version, EProfile profile, int spv, int vulkan, EShLanguage language, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables) { (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]); - InitializeSymbolTable(builtIns.getStageString(language), version, profile, spv, language, infoSink, *symbolTables[language]); - IdentifyBuiltIns(version, profile, spv, language, *symbolTables[language]); + InitializeSymbolTable(builtIns.getStageString(language), version, profile, spv, vulkan, language, infoSink, *symbolTables[language]); + IdentifyBuiltIns(version, profile, spv, vulkan, language, *symbolTables[language]); if (profile == EEsProfile && version >= 300) (*symbolTables[language]).setNoBuiltInRedeclarations(); if (version == 110) @@ -183,49 +184,49 @@ void InitializeStageSymbolTable(TBuiltIns& builtIns, int version, EProfile profi // Initialize the full set of shareable symbol tables; // The common (cross-stage) and those shareable per-stage. // -bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, int spv) +bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, int spv, int vulkan) { TBuiltIns builtIns; - builtIns.initialize(version, profile, spv); + builtIns.initialize(version, profile, spv, vulkan); // do the common tables - InitializeSymbolTable(builtIns.getCommonString(), version, profile, spv, EShLangVertex, infoSink, *commonTable[EPcGeneral]); + InitializeSymbolTable(builtIns.getCommonString(), version, profile, spv, vulkan, EShLangVertex, infoSink, *commonTable[EPcGeneral]); if (profile == EEsProfile) - InitializeSymbolTable(builtIns.getCommonString(), version, profile, spv, EShLangFragment, infoSink, *commonTable[EPcFragment]); + InitializeSymbolTable(builtIns.getCommonString(), version, profile, spv, vulkan, EShLangFragment, infoSink, *commonTable[EPcFragment]); // do the per-stage tables // always have vertex and fragment - InitializeStageSymbolTable(builtIns, version, profile, spv, EShLangVertex, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(builtIns, version, profile, spv, EShLangFragment, infoSink, commonTable, symbolTables); + InitializeStageSymbolTable(builtIns, version, profile, spv, vulkan, EShLangVertex, infoSink, commonTable, symbolTables); + InitializeStageSymbolTable(builtIns, version, profile, spv, vulkan, EShLangFragment, infoSink, commonTable, symbolTables); // check for tessellation if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { - InitializeStageSymbolTable(builtIns, version, profile, spv, EShLangTessControl, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(builtIns, version, profile, spv, EShLangTessEvaluation, infoSink, commonTable, symbolTables); + InitializeStageSymbolTable(builtIns, version, profile, spv, vulkan, EShLangTessControl, infoSink, commonTable, symbolTables); + InitializeStageSymbolTable(builtIns, version, profile, spv, vulkan, EShLangTessEvaluation, infoSink, commonTable, symbolTables); } // check for geometry if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) - InitializeStageSymbolTable(builtIns, version, profile, spv, EShLangGeometry, infoSink, commonTable, symbolTables); + InitializeStageSymbolTable(builtIns, version, profile, spv, vulkan, EShLangGeometry, infoSink, commonTable, symbolTables); // check for compute if ((profile != EEsProfile && version >= 430) || (profile == EEsProfile && version >= 310)) - InitializeStageSymbolTable(builtIns, version, profile, spv, EShLangCompute, infoSink, commonTable, symbolTables); + InitializeStageSymbolTable(builtIns, version, profile, spv, vulkan, EShLangCompute, infoSink, commonTable, symbolTables); return true; } -bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& infoSink, TSymbolTable& symbolTable, int version, EProfile profile, int spv, EShLanguage language) +bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& infoSink, TSymbolTable& symbolTable, int version, EProfile profile, int spv, int vulkan, EShLanguage language) { TBuiltIns builtIns; - builtIns.initialize(*resources, version, profile, spv, language); - InitializeSymbolTable(builtIns.getCommonString(), version, profile, spv, language, infoSink, symbolTable); - IdentifyBuiltIns(version, profile, spv, language, symbolTable, *resources); + builtIns.initialize(*resources, version, profile, spv, vulkan, language); + InitializeSymbolTable(builtIns.getCommonString(), version, profile, spv, vulkan, language, infoSink, symbolTable); + IdentifyBuiltIns(version, profile, spv, vulkan, language, symbolTable, *resources); return true; } @@ -242,7 +243,7 @@ bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& inf // This only gets done the first time any thread needs a particular symbol table // (lazy evaluation). // -void SetupBuiltinSymbolTable(int version, EProfile profile, int spv) +void SetupBuiltinSymbolTable(int version, EProfile profile, int spv, int vulkan) { TInfoSink infoSink; @@ -272,7 +273,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, int spv) stageTables[stage] = new TSymbolTable; // Generate the local symbol tables using the new pool - InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spv); + InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spv, vulkan); // Switch to the process-global pool SetThreadPoolAllocator(*PerProcessGPA); @@ -471,7 +472,7 @@ bool ProcessDeferred( const char* customPreamble, const EShOptimizationLevel optLevel, const TBuiltInResource* resources, - int defaultVersion, // use 100 for ES environment, 110 for desktop + int defaultVersion, // use 100 for ES environment, 110 for desktop; this is the GLSL version, not SPIR-V or Vulkan EProfile defaultProfile, // set version/profile to defaultVersion/defaultProfile regardless of the #version // directive in the source code @@ -550,7 +551,7 @@ bool ProcessDeferred( profile = defaultProfile; } - int spv = (messages & EShMsgSpvRules) ? 100 : 0; + int spv = (messages & EShMsgSpvRules) ? 100 : 0; // TODO find path to get real version number here, for now non-0 is what matters bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, version, profile, spv); bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); bool warnVersionNotFirst = false; @@ -561,10 +562,13 @@ bool ProcessDeferred( versionWillBeError = true; } + int vulkan = (messages & EShMsgVulkanRules) ? 100 : 0; // TODO find path to get real version number here, for now non-0 is what matters intermediate.setVersion(version); intermediate.setProfile(profile); intermediate.setSpv(spv); - SetupBuiltinSymbolTable(version, profile, spv); + if (vulkan) + intermediate.setOriginUpperLeft(); + SetupBuiltinSymbolTable(version, profile, spv, vulkan); TSymbolTable* cachedTable = SharedSymbolTables[MapVersionToIndex(version)] [MapProfileToIndex(profile)] @@ -578,13 +582,13 @@ bool ProcessDeferred( // Add built-in symbols that are potentially context dependent; // they get popped again further down. - AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spv, compiler->getLanguage()); + AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spv, vulkan, compiler->getLanguage()); // // Now we can process the full shader under proper symbols and rules. // - TParseContext parseContext(symbolTable, intermediate, false, version, profile, spv, compiler->getLanguage(), compiler->infoSink, forwardCompatible, messages); + TParseContext parseContext(symbolTable, intermediate, false, version, profile, spv, vulkan, compiler->getLanguage(), compiler->infoSink, forwardCompatible, messages); glslang::TScanContext scanContext(parseContext); TPpContext ppContext(parseContext, includer); parseContext.setScanContext(&scanContext); diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index 092fe205..001ebe07 100644 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -87,6 +87,7 @@ void TType::buildMangledName(TString& mangledName) case EsdCube: mangledName += "C"; break; case EsdRect: mangledName += "R2"; break; case EsdBuffer: mangledName += "B"; break; + case EsdSubpass: mangledName += "P"; break; default: break; // some compilers want this } if (sampler.ms) @@ -115,7 +116,13 @@ void TType::buildMangledName(TString& mangledName) const int maxSize = 11; char buf[maxSize]; for (int i = 0; i < arraySizes->getNumDims(); ++i) { - snprintf(buf, maxSize, "%d", arraySizes->getDimSize(i)); + if (arraySizes->getDimNode(i)) { + if (arraySizes->getDimNode(i)->getAsSymbolNode()) + snprintf(buf, maxSize, "s%d", arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); + else + snprintf(buf, maxSize, "s%x", arraySizes->getDimNode(i)); + } else + snprintf(buf, maxSize, "%d", arraySizes->getDimSize(i)); mangledName += '['; mangledName += buf; mangledName += ']'; diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index fb11f1be..676f4fd6 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -173,6 +173,7 @@ void TParseContext::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_derivative_control] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_image_samples] = EBhDisable; extensionBehavior[E_GL_ARB_viewport_array] = EBhDisable; + extensionBehavior[E_GL_ARB_gl_spirv] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable; // extensionBehavior[E_GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members @@ -276,6 +277,7 @@ const char* TParseContext::getPreamble() "#define GL_ARB_derivative_control 1\n" "#define GL_ARB_shader_texture_image_samples 1\n" "#define GL_ARB_viewport_array 1\n" + "#define GL_ARB_gl_spirv 1\n" "#define GL_ARB_sparse_texture2 1\n" "#define GL_ARB_sparse_texture_clamp 1\n" @@ -564,6 +566,9 @@ void TParseContext::updateExtensionBehavior(int line, const char* extension, con updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString); else if (strcmp(extension, "GL_GOOGLE_include_directive") == 0) updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString); + // SPIR-V + else if (strcmp(extension, "GL_ARB_gl_spirv") == 0) + spv = 100; } void TParseContext::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior) @@ -606,18 +611,14 @@ void TParseContext::updateExtensionBehavior(const char* extension, TExtensionBeh } } -// // Call for any operation needing full GLSL integer data-type support. -// void TParseContext::fullIntegerCheck(const TSourceLoc& loc, const char* op) { profileRequires(loc, ENoProfile, 130, nullptr, op); profileRequires(loc, EEsProfile, 300, nullptr, op); } -// // Call for any operation needing GLSL double data-type support. -// void TParseContext::doubleCheck(const TSourceLoc& loc, const char* op) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); @@ -625,4 +626,32 @@ void TParseContext::doubleCheck(const TSourceLoc& loc, const char* op) profileRequires(loc, ECompatibilityProfile, 400, nullptr, op); } +// Call for any operation removed because SPIR-V is in use. +void TParseContext::spvRemoved(const TSourceLoc& loc, const char* op) +{ + if (spv > 0) + error(loc, "not allowed when generating SPIR-V", op, ""); +} + +// Call for any operation removed because Vulkan SPIR-V is being generated. +void TParseContext::vulkanRemoved(const TSourceLoc& loc, const char* op) +{ + if (vulkan > 0) + error(loc, "not allowed when using GLSL for Vulkan", op, ""); +} + +// Call for any operation that requires Vulkan. +void TParseContext::requireVulkan(const TSourceLoc& loc, const char* op) +{ + if (vulkan == 0) + error(loc, "only allowed when using GLSL for Vulkan", op, ""); +} + +// Call for any operation that requires SPIR-V. +void TParseContext::requireSpv(const TSourceLoc& loc, const char* op) +{ + if (spv == 0) + error(loc, "only allowed when generating SPIR-V", op, ""); +} + } // end namespace glslang diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h index 0d79fab4..d022d876 100644 --- a/glslang/MachineIndependent/Versions.h +++ b/glslang/MachineIndependent/Versions.h @@ -111,6 +111,7 @@ const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_pa const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_control"; const char* const E_GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples"; const char* const E_GL_ARB_viewport_array = "GL_ARB_viewport_array"; +const char* const E_GL_ARB_gl_spirv = "GL_ARB_gl_spirv"; const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2"; const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp"; //const char* const E_GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index 73805941..847bcc9a 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -148,6 +148,24 @@ extern int yylex(YYSTYPE*, TParseContext&); %token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY %token SAMPLEREXTERNALOES +// pure sampler +%token SAMPLER SAMPLERSHADOW + +// texture without sampler +%token TEXTURE1D TEXTURE2D TEXTURE3D TEXTURECUBE +%token TEXTURE1DARRAY TEXTURE2DARRAY +%token ITEXTURE1D ITEXTURE2D ITEXTURE3D ITEXTURECUBE +%token ITEXTURE1DARRAY ITEXTURE2DARRAY UTEXTURE1D UTEXTURE2D UTEXTURE3D +%token UTEXTURECUBE UTEXTURE1DARRAY UTEXTURE2DARRAY +%token TEXTURE2DRECT ITEXTURE2DRECT UTEXTURE2DRECT +%token TEXTUREBUFFER ITEXTUREBUFFER UTEXTUREBUFFER +%token TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY +%token TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS +%token TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY + +// input attachments +%token SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS + %token IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D %token UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D %token IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT @@ -503,6 +521,7 @@ equality_expression | equality_expression EQ_OP relational_expression { parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); parseContext.opaqueCheck($2.loc, $1->getType(), "=="); + parseContext.specializationCheck($2.loc, $1->getType(), "=="); $$ = parseContext.handleBinaryMath($2.loc, "==", EOpEqual, $1, $3); if ($$ == 0) $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); @@ -510,6 +529,7 @@ equality_expression | equality_expression NE_OP relational_expression { parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); parseContext.opaqueCheck($2.loc, $1->getType(), "!="); + parseContext.specializationCheck($2.loc, $1->getType(), "!="); $$ = parseContext.handleBinaryMath($2.loc, "!=", EOpNotEqual, $1, $3); if ($$ == 0) $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); @@ -597,6 +617,7 @@ assignment_expression | unary_expression assignment_operator assignment_expression { parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment"); parseContext.opaqueCheck($2.loc, $1->getType(), "="); + parseContext.specializationCheck($2.loc, $1->getType(), "="); parseContext.lValueErrorCheck($2.loc, "assign", $1); parseContext.rValueErrorCheck($2.loc, "assign", $3); $$ = parseContext.intermediate.addAssign($2.op, $1, $3, $2.loc); @@ -1201,11 +1222,13 @@ storage_qualifier $$.qualifier.writeonly = true; } | SUBROUTINE { + parseContext.spvRemoved($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine"); $$.init($1.loc); $$.qualifier.storage = EvqUniform; } | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN { + parseContext.spvRemoved($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine"); $$.init($1.loc); $$.qualifier.storage = EvqUniform; @@ -1242,11 +1265,11 @@ array_specifier $$.arraySizes = new TArraySizes; $$.arraySizes->addInnerSize(); } - | LEFT_BRACKET constant_expression RIGHT_BRACKET { + | LEFT_BRACKET conditional_expression RIGHT_BRACKET { $$.loc = $1.loc; $$.arraySizes = new TArraySizes; - int size; + TArraySize size; parseContext.arraySizeCheck($2->getLoc(), $2, size); $$.arraySizes->addInnerSize(size); } @@ -1254,10 +1277,10 @@ array_specifier $$ = $1; $$.arraySizes->addInnerSize(); } - | array_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET { + | array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET { $$ = $1; - int size; + TArraySize size; parseContext.arraySizeCheck($3->getLoc(), $3, size); $$.arraySizes->addInnerSize(size); } @@ -1504,6 +1527,7 @@ type_specifier_nonarray $$.setMatrix(4, 4); } | ATOMIC_UINT { + parseContext.vulkanRemoved($1.loc, "atomic counter types"); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtAtomicUint; } @@ -1707,6 +1731,181 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtUint, Esd2D, true, false, true); } + | SAMPLER { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setPureSampler(false); + } + | SAMPLERSHADOW { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setPureSampler(true); + } + | TEXTURE1D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd1D); + } + | TEXTURE2D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd2D); + } + | TEXTURE3D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd3D); + } + | TEXTURECUBE { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, EsdCube); + } + | TEXTURE1DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd1D, true); + } + | TEXTURE2DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd2D, true); + } + | TEXTURECUBEARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, EsdCube, true); + } + | ITEXTURE1D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd1D); + } + | ITEXTURE2D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd2D); + } + | ITEXTURE3D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd3D); + } + | ITEXTURECUBE { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, EsdCube); + } + | ITEXTURE1DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd1D, true); + } + | ITEXTURE2DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd2D, true); + } + | ITEXTURECUBEARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, EsdCube, true); + } + | UTEXTURE1D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd1D); + } + | UTEXTURE2D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd2D); + } + | UTEXTURE3D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd3D); + } + | UTEXTURECUBE { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, EsdCube); + } + | UTEXTURE1DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd1D, true); + } + | UTEXTURE2DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd2D, true); + } + | UTEXTURECUBEARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, EsdCube, true); + } + | TEXTURE2DRECT { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, EsdRect); + } + | ITEXTURE2DRECT { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, EsdRect); + } + | UTEXTURE2DRECT { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, EsdRect); + } + | TEXTUREBUFFER { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, EsdBuffer); + } + | ITEXTUREBUFFER { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, EsdBuffer); + } + | UTEXTUREBUFFER { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, EsdBuffer); + } + | TEXTURE2DMS { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true); + } + | ITEXTURE2DMS { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd2D, false, false, true); + } + | UTEXTURE2DMS { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd2D, false, false, true); + } + | TEXTURE2DMSARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true); + } + | ITEXTURE2DMSARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtInt, Esd2D, true, false, true); + } + | UTEXTURE2DMSARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtUint, Esd2D, true, false, true); + } | IMAGE1D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -1878,6 +2077,42 @@ type_specifier_nonarray $$.sampler.set(EbtFloat, Esd2D); $$.sampler.external = true; } + | SUBPASSINPUT { + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtFloat); + } + | SUBPASSINPUTMS { + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtFloat, true); + } + | ISUBPASSINPUT { + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtInt); + } + | ISUBPASSINPUTMS { + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtInt, true); + } + | USUBPASSINPUT { + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtUint); + } + | USUBPASSINPUTMS { + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtUint, true); + } | struct_specifier { $$ = $1; $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index dd0769f5..409e29a1 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -385,6 +385,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructDMat4x3: out.debug << "Construct dmat4x3"; break; case EOpConstructDMat4x4: out.debug << "Construct dmat4"; break; case EOpConstructStruct: out.debug << "Construct structure"; break; + case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; case EOpLessThan: out.debug << "Compare Less Than"; break; case EOpGreaterThan: out.debug << "Compare Greater Than"; break; @@ -755,6 +756,20 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) case EShLangCompute: infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n"; + { + bool dumpSpecIds = false; + for (auto c : localSizeSpecId) { + if (c != TQualifier::layoutNotSet) + dumpSpecIds = true; + } + + if (dumpSpecIds) { + infoSink.debug << "local_size ids = (" << + localSizeSpecId[0] << ", " << + localSizeSpecId[1] << ", " << + localSizeSpecId[2] << ")\n"; + } + } break; default: diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index d0e7b021..6fef4fb7 100644 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -71,6 +71,7 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) { numMains += unit.numMains; numErrors += unit.numErrors; + numPushConstants += unit.numPushConstants; callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end()); if ((profile != EEsProfile && unit.profile == EEsProfile) || @@ -129,6 +130,11 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) localSize[i] = unit.localSize[i]; else if (localSize[i] != unit.localSize[i]) error(infoSink, "Contradictory local size"); + + if (localSizeSpecId[i] != TQualifier::layoutNotSet) + localSizeSpecId[i] = unit.localSizeSpecId[i]; + else if (localSizeSpecId[i] != unit.localSizeSpecId[i]) + error(infoSink, "Contradictory local size specialization ids"); } if (unit.xfbMode) @@ -353,6 +359,9 @@ void TIntermediate::finalCheck(TInfoSink& infoSink) if (numMains < 1) error(infoSink, "Missing entry point: Each stage requires one \"void main()\" entry point"); + if (numPushConstants > 1) + error(infoSink, "Only one push_constant block is allowed per stage"); + // recursion checking checkCallGraphCycles(infoSink); @@ -690,6 +699,19 @@ int TIntermediate::addUsedOffsets(int binding, int offset, int numOffsets) return -1; // no collision } +// Accumulate used constant_id values. +// +// Return false is one was already used. +bool TIntermediate::addUsedConstantId(int id) +{ + if (usedConstantId.find(id) != usedConstantId.end()) + return false; + + usedConstantId.insert(id); + + return true; +} + // Recursively figure out how many locations are used up by an input or output type. // Return the size of type, as measured by "locations". int TIntermediate::computeTypeLocationSize(const TType& type) const diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 043d31fa..00908b0b 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -93,7 +93,7 @@ struct TIoRange { int index; }; -// An IO range is a 2-D rectangle; the set of (binding, offset) pairs all lying +// An offset range is a 2-D rectangle; the set of (binding, offset) pairs all lying // within the same binding and offset range. struct TOffsetRange { TOffsetRange(TRange binding, TRange offset) @@ -125,7 +125,7 @@ class TVariable; class TIntermediate { public: explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) : language(l), treeRoot(0), profile(p), version(v), spv(0), - numMains(0), numErrors(0), recursive(false), + numMains(0), numErrors(0), numPushConstants(0), recursive(false), invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false), vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), depthLayout(EldNone), depthReplacing(false), blendEquations(0), xfbMode(false) @@ -133,6 +133,9 @@ public: localSize[0] = 1; localSize[1] = 1; localSize[2] = 1; + localSizeSpecId[0] = TQualifier::layoutNotSet; + localSizeSpecId[1] = TQualifier::layoutNotSet; + localSizeSpecId[2] = TQualifier::layoutNotSet; xfbBuffers.resize(TQualifier::layoutXfbBufferEnd); } void setLimits(const TBuiltInResource& r) { resources = r; } @@ -156,8 +159,10 @@ public: void addMainCount() { ++numMains; } int getNumMains() const { return numMains; } int getNumErrors() const { return numErrors; } + void addPushConstantCount() { ++numPushConstants; } bool isRecursive() const { return recursive; } + TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, const TSourceLoc&); TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TSourceLoc&); TIntermSymbol* addSymbol(const TVariable&, const TSourceLoc&); TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*) const; @@ -255,6 +260,15 @@ public: } unsigned int getLocalSize(int dim) const { return localSize[dim]; } + bool setLocalSizeSpecId(int dim, int id) + { + if (localSizeSpecId[dim] != TQualifier::layoutNotSet) + return id == localSizeSpecId[dim]; + localSizeSpecId[dim] = id; + return true; + } + unsigned int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; } + void setXfbMode() { xfbMode = true; } bool getXfbMode() const { return xfbMode; } bool setOutputPrimitive(TLayoutGeometry p) @@ -294,6 +308,7 @@ public: int addUsedLocation(const TQualifier&, const TType&, bool& typeCollision); int addUsedOffsets(int binding, int offset, int numOffsets); + bool addUsedConstantId(int id); int computeTypeLocationSize(const TType&) const; bool setXfbBufferStride(int buffer, unsigned stride) @@ -328,6 +343,7 @@ protected: TBuiltInResource resources; int numMains; int numErrors; + int numPushConstants; bool recursive; int invocations; int vertices; @@ -339,6 +355,7 @@ protected: TVertexOrder vertexOrder; bool pointMode; int localSize[3]; + int localSizeSpecId[3]; bool earlyFragmentTests; TLayoutDepth depthLayout; bool depthReplacing; @@ -352,6 +369,7 @@ protected: std::vector usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers std::vector usedAtomics; // sets of bindings used by atomic counters std::vector xfbBuffers; // all the data we need to track per xfb buffer + std::unordered_set usedConstantId; // specialization constant ids used private: void operator=(TIntermediate&); // prevent assignments diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h index 0c97e39f..702b66f4 100644 --- a/glslang/Public/ShaderLang.h +++ b/glslang/Public/ShaderLang.h @@ -303,7 +303,7 @@ public: // Returns an error message for any #include directive. class ForbidInclude : public Includer { public: - std::pair include(const char* filename) const override + std::pair include(const char* /*filename*/) const override { return std::make_pair("", "unexpected include directive"); } From 4fe1efa1a96684ab70f2e8f2b72901355c708372 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 18 Feb 2016 06:16:11 -0500 Subject: [PATCH 60/84] Error out if bison is not found on non-Windows operating systems. We cannot just default to use tools/bison.exe when it is not on Windows. --- glslang/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 878eca5d..803203df 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -66,8 +66,12 @@ set(HEADERS find_package(BISON) if(NOT BISON_FOUND) - set(BISON_EXECUTABLE ../tools/bison.exe) - message("bison not found. Assuming it is at ${BISON_EXECUTABLE}") + if (WIN32) + set(BISON_EXECUTABLE ../tools/bison.exe) + message("bison not found. Assuming it is at ${BISON_EXECUTABLE}") + else() + message(FATAL_ERROR "bison required but not found. Please install via your package management tool.") + endif() endif() # Always use a custom command since our use of --defines isn't assumed by CMake's BISON_TARGET, From 5047c6f7a70924bfac38c2c9e487299b3416a7f9 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Thu, 18 Feb 2016 19:47:33 -0700 Subject: [PATCH 61/84] SPV: Fix Linux build warning. --- glslang/MachineIndependent/SymbolTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index 001ebe07..9794a5d2 100644 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -120,7 +120,7 @@ void TType::buildMangledName(TString& mangledName) if (arraySizes->getDimNode(i)->getAsSymbolNode()) snprintf(buf, maxSize, "s%d", arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); else - snprintf(buf, maxSize, "s%x", arraySizes->getDimNode(i)); + snprintf(buf, maxSize, "s%p", arraySizes->getDimNode(i)); } else snprintf(buf, maxSize, "%d", arraySizes->getDimSize(i)); mangledName += '['; From 5eafa472d3cf197edcbb34b0d9dcd4fd4b7782b5 Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Fri, 19 Feb 2016 22:24:03 +0800 Subject: [PATCH 62/84] SPV: Support the new OpCode - OpImageSparseRead --- SPIRV/GlslangToSpv.cpp | 32 +++++- Test/baseResults/spv.sparseTexture.frag.out | 102 +++++++++++++++----- Test/spv.sparseTexture.frag | 15 ++- 3 files changed, 116 insertions(+), 33 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 864902cc..becb3b43 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -2087,7 +2087,7 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& glslang::TSampler sampler = {}; bool cubeCompare = false; - if (node.isTexture()) { + if (node.isTexture() || node.isImage()) { sampler = glslangArguments[0]->getAsTyped()->getType().getSampler(); cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; } @@ -2110,6 +2110,10 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 0) lvalue = true; break; + case glslang::EOpSparseImageLoad: + if ((sampler.ms && i == 3) || (! sampler.ms && i == 2)) + lvalue = true; + break; case glslang::EOpSparseTexture: if ((cubeCompare && i == 3) || (! cubeCompare && i == 2)) lvalue = true; @@ -2253,9 +2257,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO operands.push_back(spv::ImageOperandsSampleMask); operands.push_back(*opIt); } - return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands); if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); + return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands); } else if (node->getOp() == glslang::EOpImageStore) { if (sampler.ms) { operands.push_back(*(opIt + 1)); @@ -2267,9 +2271,27 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageWriteWithoutFormat); return spv::NoResult; - } else if (node->isSparseImage()) { - spv::MissingFunctionality("sparse image functions"); - return spv::NoResult; + } else if (node->getOp() == glslang::EOpSparseImageLoad) { + builder.addCapability(spv::CapabilitySparseResidency); + if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) + builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); + + if (sampler.ms) { + operands.push_back(spv::ImageOperandsSampleMask); + operands.push_back(*opIt++); + } + + // Create the return type that was a special structure + spv::Id texelOut = *opIt; + spv::Id typeId0 = convertGlslangToSpvType(node->getType()); + spv::Id typeId1 = builder.getDerefTypeId(texelOut); + spv::Id resultTypeId = builder.makeStructResultType(typeId0, typeId1); + + spv::Id resultId = builder.createOp(spv::OpImageSparseRead, resultTypeId, operands); + + // Decode the return type + builder.createStore(builder.createCompositeExtract(resultId, typeId1, 1), texelOut); + return builder.createCompositeExtract(resultId, typeId0, 0); } else { // Process image atomic operations diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out index 8b794a45..315e1bb4 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -7,7 +7,7 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 399 +// Id's are bound by 433 Capability Shader Capability SampledRect @@ -15,7 +15,7 @@ Linked fragment stage: Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 33 48 89 360 384 + EntryPoint Fragment 4 "main" 33 48 89 360 388 400 418 ExecutionMode 4 OriginUpperLeft Source GLSL 450 SourceExtension "GL_ARB_sparse_texture2" @@ -44,7 +44,12 @@ Linked fragment stage: Name 256 "sCubeShadow" Name 289 "s2DRectShadow" Name 360 "offsets" - Name 384 "outColor" + Name 385 "i2D" + Name 388 "ic2" + Name 397 "ii3D" + Name 400 "ic3" + Name 409 "i2DMS" + Name 418 "outColor" Decorate 29(s2D) DescriptorSet 0 Decorate 44(s3D) DescriptorSet 0 Decorate 59(isCube) DescriptorSet 0 @@ -58,6 +63,11 @@ Linked fragment stage: Decorate 256(sCubeShadow) DescriptorSet 0 Decorate 289(s2DRectShadow) DescriptorSet 0 Decorate 360(offsets) Flat + Decorate 385(i2D) DescriptorSet 0 + Decorate 388(ic2) Flat + Decorate 397(ii3D) DescriptorSet 0 + Decorate 400(ic3) Flat + Decorate 409(i2DMS) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -162,16 +172,29 @@ Linked fragment stage: 358: TypeArray 143(ivec2) 357 359: TypePointer Input 358 360(offsets): 359(ptr) Variable Input - 383: TypePointer Output 11(fvec4) - 384(outColor): 383(ptr) Variable Output - 387: TypeBool + 383: TypeImage 10(float) 2D nonsampled format:Rgba32f + 384: TypePointer UniformConstant 383 + 385(i2D): 384(ptr) Variable UniformConstant + 387: TypePointer Input 143(ivec2) + 388(ic2): 387(ptr) Variable Input + 395: TypeImage 6(int) 3D nonsampled format:Rgba32i + 396: TypePointer UniformConstant 395 + 397(ii3D): 396(ptr) Variable UniformConstant + 399: TypePointer Input 129(ivec3) + 400(ic3): 399(ptr) Variable Input + 407: TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f + 408: TypePointer UniformConstant 407 + 409(i2DMS): 408(ptr) Variable UniformConstant + 417: TypePointer Output 11(fvec4) + 418(outColor): 417(ptr) Variable Output + 421: TypeBool 4(main): 2 Function None 3 5: Label 8(resident): 7(ptr) Variable Function 13(texel): 12(ptr) Variable Function 18(itexel): 17(ptr) Variable Function 23(utexel): 22(ptr) Variable Function - 385: 12(ptr) Variable Function + 419: 12(ptr) Variable Function Store 8(resident) 9 Store 13(texel) 15 Store 18(itexel) 19 @@ -515,24 +538,51 @@ Linked fragment stage: 381: 6(int) Load 8(resident) 382: 6(int) BitwiseOr 381 380 Store 8(resident) 382 - 386: 6(int) Load 8(resident) - 388: 387(bool) ImageSparseTexelsResident 386 - SelectionMerge 390 None - BranchConditional 388 389 392 - 389: Label - 391: 11(fvec4) Load 13(texel) - Store 385 391 - Branch 390 - 392: Label - 393: 16(ivec4) Load 18(itexel) - 394: 11(fvec4) ConvertSToF 393 - 395: 21(ivec4) Load 23(utexel) - 396: 11(fvec4) ConvertUToF 395 - 397: 11(fvec4) FAdd 394 396 - Store 385 397 - Branch 390 - 390: Label - 398: 11(fvec4) Load 385 - Store 384(outColor) 398 + 386: 383 Load 385(i2D) + 389: 143(ivec2) Load 388(ic2) + 390: 35(ResType) ImageSparseRead 386 389 + 391: 11(fvec4) CompositeExtract 390 1 + Store 13(texel) 391 + 392: 6(int) CompositeExtract 390 0 + 393: 6(int) Load 8(resident) + 394: 6(int) BitwiseOr 393 392 + Store 8(resident) 394 + 398: 395 Load 397(ii3D) + 401: 129(ivec3) Load 400(ic3) + 402: 62(ResType) ImageSparseRead 398 401 + 403: 16(ivec4) CompositeExtract 402 1 + Store 18(itexel) 403 + 404: 6(int) CompositeExtract 402 0 + 405: 6(int) Load 8(resident) + 406: 6(int) BitwiseOr 405 404 + Store 8(resident) 406 + 410: 407 Load 409(i2DMS) + 411: 143(ivec2) Load 388(ic2) + 412: 35(ResType) ImageSparseRead 410 411 Sample 144 + 413: 11(fvec4) CompositeExtract 412 1 + Store 13(texel) 413 + 414: 6(int) CompositeExtract 412 0 + 415: 6(int) Load 8(resident) + 416: 6(int) BitwiseOr 415 414 + Store 8(resident) 416 + 420: 6(int) Load 8(resident) + 422: 421(bool) ImageSparseTexelsResident 420 + SelectionMerge 424 None + BranchConditional 422 423 426 + 423: Label + 425: 11(fvec4) Load 13(texel) + Store 419 425 + Branch 424 + 426: Label + 427: 16(ivec4) Load 18(itexel) + 428: 11(fvec4) ConvertSToF 427 + 429: 21(ivec4) Load 23(utexel) + 430: 11(fvec4) ConvertUToF 429 + 431: 11(fvec4) FAdd 428 430 + Store 419 431 + Branch 424 + 424: Label + 432: 11(fvec4) Load 419 + Store 418(outColor) 432 Return FunctionEnd diff --git a/Test/spv.sparseTexture.frag b/Test/spv.sparseTexture.frag index e4aefc53..c995ee2a 100644 --- a/Test/spv.sparseTexture.frag +++ b/Test/spv.sparseTexture.frag @@ -16,10 +16,17 @@ uniform isampler2DArray is2DArray; uniform usamplerCubeArray usCubeArray; uniform usampler2DRect us2DRect; +layout(rgba32f) uniform image2D i2D; +layout(rgba32i) uniform iimage3D ii3D; +layout(rgba32f) uniform image2DMS i2DMS; + in vec2 c2; in vec3 c3; in vec4 c4; +in flat ivec2 ic2; +in flat ivec3 ic3; + in flat ivec2 offsets[4]; out vec4 outColor; @@ -70,11 +77,15 @@ void main() resident |= sparseTextureGatherOffsetARB(s2D, c2, ivec2(4), texel); resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2); - resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel); + resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel); resident |= sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel); resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2); - resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel); + resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel); + + resident |= sparseImageLoadARB(i2D, ic2, texel); + resident |= sparseImageLoadARB(ii3D, ic3, itexel); + resident |= sparseImageLoadARB(i2DMS, ic2, 3, texel); outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel); } \ No newline at end of file From 0967748fbce0773625dcba0f1185e1dd79092c0d Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 19 Feb 2016 12:21:50 -0700 Subject: [PATCH 63/84] SPV: Fix 'location' inheritance bug. --- SPIRV/GlslangToSpv.cpp | 30 ++++++++++++++++++++++-------- Test/baseResults/spv.430.vert.out | 16 ++++++++++++---- Test/spv.430.vert | 3 ++- glslang/Include/BaseTypes.h | 2 +- 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 864902cc..21a04b0e 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -535,8 +535,6 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa child.patch = true; if (parent.sample) child.sample = true; - - child.layoutLocation = parent.layoutLocation; } bool HasNonLayoutQualifiers(const glslang::TQualifier& qualifier) @@ -1723,10 +1721,14 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // modify just this child's view of the qualifier glslang::TQualifier subQualifier = glslangType.getQualifier(); InheritQualifiers(subQualifier, qualifier); - if (qualifier.hasLocation()) { - subQualifier.layoutLocation += locationOffset; + + // manually inherit location; it's more complex + if (! subQualifier.hasLocation() && qualifier.hasLocation()) + subQualifier.layoutLocation = qualifier.layoutLocation + locationOffset; + if (qualifier.hasLocation()) locationOffset += glslangIntermediate->computeTypeLocationSize(glslangType); - } + + // recurse structFields.push_back(convertGlslangToSpvType(glslangType, explicitLayout, subQualifier)); } } @@ -1756,10 +1758,22 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty addMemberDecoration(spvType, member, TranslatePrecisionDecoration(glslangType)); addMemberDecoration(spvType, member, TranslateInterpolationDecoration(subQualifier)); addMemberDecoration(spvType, member, TranslateInvariantDecoration(subQualifier)); - if (qualifier.hasLocation()) { - builder.addMemberDecoration(spvType, member, spv::DecorationLocation, qualifier.layoutLocation + locationOffset); + + // compute location decoration; tricky based on whether inheritance is at play + // TODO: This algorithm (and it's cousin above doing almost the same thing) should + // probably move to the linker stage of the front end proper, and just have the + // answer sitting already distributed throughout the individual member locations. + int location = -1; // will only decorate if present or inherited + if (subQualifier.hasLocation()) // no inheritance, or override of inheritance + location = subQualifier.layoutLocation; + else if (qualifier.hasLocation()) // inheritance + location = qualifier.layoutLocation + locationOffset; + if (qualifier.hasLocation()) // track for upcoming inheritance locationOffset += glslangIntermediate->computeTypeLocationSize(glslangType); - } + if (location >= 0) + builder.addMemberDecoration(spvType, member, spv::DecorationLocation, location); + + // component, XFB, others if (glslangType.getQualifier().hasComponent()) builder.addMemberDecoration(spvType, member, spv::DecorationComponent, glslangType.getQualifier().layoutComponent); if (glslangType.getQualifier().hasXfbOffset()) diff --git a/Test/baseResults/spv.430.vert.out b/Test/baseResults/spv.430.vert.out index a851b1c4..a1487d53 100755 --- a/Test/baseResults/spv.430.vert.out +++ b/Test/baseResults/spv.430.vert.out @@ -1,5 +1,5 @@ spv.430.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. Linked vertex stage: @@ -7,14 +7,14 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 63 +// Id's are bound by 66 Capability Shader Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 12 23 34 38 41 42 62 - Source GLSL 430 + EntryPoint Vertex 4 "main" 12 23 34 38 41 42 62 65 + Source GLSL 450 Name 4 "main" Name 10 "gl_PerVertex" MemberName 10(gl_PerVertex) 0 "gl_ClipDistance" @@ -42,6 +42,9 @@ Linked vertex stage: MemberName 60(SS) 1 "s" MemberName 60(SS) 2 "c" Name 62 "var" + Name 63 "MS" + MemberName 63(MS) 0 "f" + Name 65 "outMS" MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance Decorate 10(gl_PerVertex) Block Decorate 34(badorder3) Flat @@ -72,6 +75,8 @@ Linked vertex stage: MemberDecorate 60(SS) 1 Location 1 MemberDecorate 60(SS) 2 Flat MemberDecorate 60(SS) 2 Location 4 + MemberDecorate 63(MS) 0 Location 17 + Decorate 63(MS) Block 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -121,6 +126,9 @@ Linked vertex stage: 60(SS): TypeStruct 19(fvec4) 59(S) 19(fvec4) 61: TypePointer Output 60(SS) 62(var): 61(ptr) Variable Output + 63(MS): TypeStruct 6(float) + 64: TypePointer Output 63(MS) + 65(outMS): 64(ptr) Variable Output 4(main): 2 Function None 3 5: Label 18: 17(ptr) AccessChain 12 14 15 diff --git a/Test/spv.430.vert b/Test/spv.430.vert index d0b05ecd..f52ff4a6 100644 --- a/Test/spv.430.vert +++ b/Test/spv.430.vert @@ -1,4 +1,4 @@ -#version 430 core +#version 450 core @@ -34,3 +34,4 @@ layout(binding = 31) uniform sampler2D sampb4; struct S { mediump float a; highp uvec2 b; highp vec3 c; }; struct SS { vec4 b; S s; vec4 c; }; layout(location = 0) flat out SS var; +out MS { layout(location = 17) float f; } outMS; diff --git a/glslang/Include/BaseTypes.h b/glslang/Include/BaseTypes.h index ca1fa4c3..5a57664f 100644 --- a/glslang/Include/BaseTypes.h +++ b/glslang/Include/BaseTypes.h @@ -71,7 +71,7 @@ enum TStorageQualifier { EvqGlobal, // For globals read/write EvqConst, // User-defined constant values, will be semantically constant and constant folded EvqVaryingIn, // pipeline input, read only, also supercategory for all built-ins not included in this enum (see TBuiltInVariable) - EvqVaryingOut, // pipeline ouput, read/write, also supercategory for all built-ins not included in this enum (see TBuiltInVariable) + EvqVaryingOut, // pipeline output, read/write, also supercategory for all built-ins not included in this enum (see TBuiltInVariable) EvqUniform, // read only, shared with app EvqBuffer, // read/write, shared with app EvqShared, // compute shader's read/write 'shared' qualifier From 1da878f6d1fa5595a710db1029d9cf63028a6364 Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Sun, 21 Feb 2016 20:59:01 +0800 Subject: [PATCH 64/84] SPV: Add support for memory qualifiers. --- SPIRV/GlslangToSpv.cpp | 39 ++++ Test/baseResults/spv.double.comp.out | 1 + Test/baseResults/spv.image.frag.out | 1 + Test/baseResults/spv.memoryQualifier.frag.out | 181 ++++++++++++++++++ Test/spv.memoryQualifier.frag | 38 ++++ Test/test-spirv-list | 1 + 6 files changed, 261 insertions(+) create mode 100644 Test/baseResults/spv.memoryQualifier.frag.out create mode 100644 Test/spv.memoryQualifier.frag diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 21a04b0e..cebc7478 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -265,6 +265,21 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type) return (spv::Decoration)spv::BadValue; } +// Translate glslang type to SPIR-V memory decorations. +void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector& memory) +{ + if (qualifier.coherent) + memory.push_back(spv::DecorationCoherent); + if (qualifier.volatil) + memory.push_back(spv::DecorationVolatile); + if (qualifier.restrict) + memory.push_back(spv::DecorationRestrict); + if (qualifier.readonly) + memory.push_back(spv::DecorationNonWritable); + if (qualifier.writeonly) + memory.push_back(spv::DecorationNonReadable); +} + // Translate glslang type to SPIR-V layout decorations. spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::TLayoutMatrix matrixLayout) { @@ -535,6 +550,16 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa child.patch = true; if (parent.sample) child.sample = true; + if (parent.coherent) + child.coherent = true; + if (parent.volatil) + child.volatil = true; + if (parent.restrict) + child.restrict = true; + if (parent.readonly) + child.readonly = true; + if (parent.writeonly) + child.writeonly = true; } bool HasNonLayoutQualifiers(const glslang::TQualifier& qualifier) @@ -1759,6 +1784,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty addMemberDecoration(spvType, member, TranslateInterpolationDecoration(subQualifier)); addMemberDecoration(spvType, member, TranslateInvariantDecoration(subQualifier)); + if (qualifier.storage == glslang::EvqBuffer) { + std::vector memory; + TranslateMemoryDecoration(subQualifier, memory); + for (unsigned int i = 0; i < memory.size(); ++i) + addMemberDecoration(spvType, member, memory[i]); + } + // compute location decoration; tricky based on whether inheritance is at play // TODO: This algorithm (and it's cousin above doing almost the same thing) should // probably move to the linker stage of the front end proper, and just have the @@ -3575,6 +3607,13 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer); } + if (symbol->getType().isImage()) { + std::vector memory; + TranslateMemoryDecoration(symbol->getType().getQualifier(), memory); + for (unsigned int i = 0; i < memory.size(); ++i) + addDecoration(id, memory[i]); + } + // built-in variable decorations spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn); if (builtIn != spv::BadValue) diff --git a/Test/baseResults/spv.double.comp.out b/Test/baseResults/spv.double.comp.out index fcd2f02b..766f839a 100755 --- a/Test/baseResults/spv.double.comp.out +++ b/Test/baseResults/spv.double.comp.out @@ -35,6 +35,7 @@ Linked compute stage: Decorate 26(gl_GlobalInvocationID) BuiltIn GlobalInvocationId Decorate 33(gl_LocalInvocationID) BuiltIn LocalInvocationId Decorate 59(destTex) DescriptorSet 0 + Decorate 59(destTex) NonReadable 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index 9cb1ec4d..2bd26f79 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -79,6 +79,7 @@ Linked fragment stage: Decorate 248(value) Flat Decorate 357(wo2D) DescriptorSet 0 Decorate 357(wo2D) Binding 1 + Decorate 357(wo2D) NonReadable Decorate 377(ic4D) Flat 2: TypeVoid 3: TypeFunction 2 diff --git a/Test/baseResults/spv.memoryQualifier.frag.out b/Test/baseResults/spv.memoryQualifier.frag.out new file mode 100644 index 00000000..e2bfb392 --- /dev/null +++ b/Test/baseResults/spv.memoryQualifier.frag.out @@ -0,0 +1,181 @@ +spv.memoryQualifier.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 97 + + Capability Shader + Capability SampledRect + Capability Sampled1D + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + Name 4 "main" + Name 9 "texel" + Name 12 "i1D" + Name 19 "i2D" + Name 28 "i2DRect" + Name 35 "i3D" + Name 44 "iCube" + Name 49 "Data" + MemberName 49(Data) 0 "f1" + MemberName 49(Data) 1 "f2" + Name 50 "Buffer" + MemberName 50(Buffer) 0 "f1" + MemberName 50(Buffer) 1 "f2" + MemberName 50(Buffer) 2 "f3" + MemberName 50(Buffer) 3 "f4" + MemberName 50(Buffer) 4 "i1" + MemberName 50(Buffer) 5 "data" + Name 52 "" + Decorate 12(i1D) DescriptorSet 0 + Decorate 12(i1D) Binding 0 + Decorate 12(i1D) Coherent + Decorate 19(i2D) DescriptorSet 0 + Decorate 19(i2D) Binding 1 + Decorate 19(i2D) Volatile + Decorate 28(i2DRect) DescriptorSet 0 + Decorate 28(i2DRect) Binding 2 + Decorate 28(i2DRect) Restrict + Decorate 35(i3D) DescriptorSet 0 + Decorate 35(i3D) Binding 3 + Decorate 35(i3D) NonWritable + Decorate 44(iCube) DescriptorSet 0 + Decorate 44(iCube) Binding 3 + Decorate 44(iCube) NonReadable + MemberDecorate 49(Data) 0 Coherent + MemberDecorate 49(Data) 0 Offset 0 + MemberDecorate 49(Data) 1 Coherent + MemberDecorate 49(Data) 1 Offset 8 + MemberDecorate 50(Buffer) 0 Coherent + MemberDecorate 50(Buffer) 0 Volatile + MemberDecorate 50(Buffer) 0 Offset 0 + MemberDecorate 50(Buffer) 1 Coherent + MemberDecorate 50(Buffer) 1 Restrict + MemberDecorate 50(Buffer) 1 Offset 8 + MemberDecorate 50(Buffer) 2 Coherent + MemberDecorate 50(Buffer) 2 NonWritable + MemberDecorate 50(Buffer) 2 Offset 16 + MemberDecorate 50(Buffer) 3 Coherent + MemberDecorate 50(Buffer) 3 NonReadable + MemberDecorate 50(Buffer) 3 Offset 32 + MemberDecorate 50(Buffer) 4 Coherent + MemberDecorate 50(Buffer) 4 Offset 48 + MemberDecorate 50(Buffer) 5 Coherent + MemberDecorate 50(Buffer) 5 Offset 56 + Decorate 50(Buffer) BufferBlock + Decorate 52 DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 10: TypeImage 6(float) 1D nonsampled format:R32f + 11: TypePointer UniformConstant 10 + 12(i1D): 11(ptr) Variable UniformConstant + 14: TypeInt 32 1 + 15: 14(int) Constant 1 + 17: TypeImage 6(float) 2D nonsampled format:R32f + 18: TypePointer UniformConstant 17 + 19(i2D): 18(ptr) Variable UniformConstant + 21: TypeVector 14(int) 2 + 22: 21(ivec2) ConstantComposite 15 15 + 26: TypeImage 6(float) Rect nonsampled format:R32f + 27: TypePointer UniformConstant 26 + 28(i2DRect): 27(ptr) Variable UniformConstant + 33: TypeImage 6(float) 3D nonsampled format:R32f + 34: TypePointer UniformConstant 33 + 35(i3D): 34(ptr) Variable UniformConstant + 37: TypeVector 14(int) 3 + 38: 37(ivec3) ConstantComposite 15 15 15 + 42: TypeImage 6(float) Cube nonsampled format:R32f + 43: TypePointer UniformConstant 42 + 44(iCube): 43(ptr) Variable UniformConstant + 47: TypeVector 6(float) 2 + 48: TypeVector 6(float) 3 + 49(Data): TypeStruct 6(float) 47(fvec2) + 50(Buffer): TypeStruct 6(float) 47(fvec2) 48(fvec3) 7(fvec4) 14(int) 49(Data) + 51: TypePointer Uniform 50(Buffer) + 52: 51(ptr) Variable Uniform + 53: 14(int) Constant 4 + 54: TypePointer Uniform 14(int) + 57: 14(int) Constant 0 + 58: TypePointer Uniform 6(float) + 61: TypePointer Function 6(float) + 63: TypePointer Uniform 47(fvec2) + 71: 14(int) Constant 2 + 72: TypePointer Uniform 48(fvec3) + 80: 14(int) Constant 5 + 83: TypeInt 32 0 + 84: 83(int) Constant 1 + 88: 83(int) Constant 3 + 93: 14(int) Constant 3 + 95: TypePointer Uniform 7(fvec4) + 4(main): 2 Function None 3 + 5: Label + 9(texel): 8(ptr) Variable Function + 13: 10 Load 12(i1D) + 16: 7(fvec4) ImageRead 13 15 + Store 9(texel) 16 + 20: 17 Load 19(i2D) + 23: 7(fvec4) ImageRead 20 22 + 24: 7(fvec4) Load 9(texel) + 25: 7(fvec4) FAdd 24 23 + Store 9(texel) 25 + 29: 26 Load 28(i2DRect) + 30: 7(fvec4) ImageRead 29 22 + 31: 7(fvec4) Load 9(texel) + 32: 7(fvec4) FAdd 31 30 + Store 9(texel) 32 + 36: 33 Load 35(i3D) + 39: 7(fvec4) ImageRead 36 38 + 40: 7(fvec4) Load 9(texel) + 41: 7(fvec4) FAdd 40 39 + Store 9(texel) 41 + 45: 42 Load 44(iCube) + 46: 7(fvec4) Load 9(texel) + ImageWrite 45 38 46 + 55: 54(ptr) AccessChain 52 53 + 56: 14(int) Load 55 + 59: 58(ptr) AccessChain 52 57 + 60: 6(float) Load 59 + 62: 61(ptr) AccessChain 9(texel) 56 + Store 62 60 + 64: 63(ptr) AccessChain 52 15 + 65: 47(fvec2) Load 64 + 66: 7(fvec4) Load 9(texel) + 67: 47(fvec2) VectorShuffle 66 66 0 1 + 68: 47(fvec2) FAdd 67 65 + 69: 7(fvec4) Load 9(texel) + 70: 7(fvec4) VectorShuffle 69 68 4 5 2 3 + Store 9(texel) 70 + 73: 72(ptr) AccessChain 52 71 + 74: 48(fvec3) Load 73 + 75: 7(fvec4) Load 9(texel) + 76: 48(fvec3) VectorShuffle 75 75 0 1 2 + 77: 48(fvec3) FSub 76 74 + 78: 7(fvec4) Load 9(texel) + 79: 7(fvec4) VectorShuffle 78 77 4 5 6 3 + Store 9(texel) 79 + 81: 58(ptr) AccessChain 52 80 57 + 82: 6(float) Load 81 + 85: 58(ptr) AccessChain 52 80 15 84 + 86: 6(float) Load 85 + 87: 6(float) FAdd 82 86 + 89: 61(ptr) AccessChain 9(texel) 88 + 90: 6(float) Load 89 + 91: 6(float) FAdd 90 87 + 92: 61(ptr) AccessChain 9(texel) 88 + Store 92 91 + 94: 7(fvec4) Load 9(texel) + 96: 95(ptr) AccessChain 52 93 + Store 96 94 + Return + FunctionEnd diff --git a/Test/spv.memoryQualifier.frag b/Test/spv.memoryQualifier.frag new file mode 100644 index 00000000..85e71478 --- /dev/null +++ b/Test/spv.memoryQualifier.frag @@ -0,0 +1,38 @@ +#version 450 + +layout(binding = 0, r32f) uniform coherent image1D i1D; +layout(binding = 1, r32f) uniform volatile image2D i2D; +layout(binding = 2, r32f) uniform restrict image2DRect i2DRect; +layout(binding = 3, r32f) uniform readonly image3D i3D; +layout(binding = 3, r32f) uniform writeonly imageCube iCube; + +struct Data +{ + float f1; + vec2 f2; +}; + +coherent buffer Buffer +{ + volatile float f1; + restrict vec2 f2; + readonly vec3 f3; + writeonly vec4 f4; + int i1; + Data data; +}; + +void main() +{ + vec4 texel = imageLoad(i1D, 1); + texel += imageLoad(i2D, ivec2(1)); + texel += imageLoad(i2DRect, ivec2(1)); + texel += imageLoad(i3D, ivec3(1)); + imageStore(iCube, ivec3(1), texel); + + texel[i1] = f1; + texel.xy += f2; + texel.xyz -= f3; + texel.w += data.f1 + data.f2[1]; + f4 = texel; +} \ No newline at end of file diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 51e2e8f3..f22d500e 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -60,6 +60,7 @@ spv.loopsArtificial.frag spv.matFun.vert spv.matrix.frag spv.matrix2.frag +spv.memoryQualifier.frag spv.merge-unreachable.frag spv.newTexture.frag spv.nonSquare.vert From 6df2cdbb8a0d09a381bfa230e0c91b05fc6b36fa Mon Sep 17 00:00:00 2001 From: Hubert Jarosz Date: Tue, 23 Feb 2016 01:32:37 +0100 Subject: [PATCH 65/84] =?UTF-8?q?fix=20#171=20-=20error:=20=E2=80=98isinf?= =?UTF-8?q?=E2=80=99=20was=20not=20declared=20in=20this=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit glslang/MachineIndependent/intermOut.cpp used `isinf`, but it's in `std` namespace, so should use `std::isinf`. --- glslang/MachineIndependent/intermOut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index 409e29a1..11ef0e07 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -48,7 +48,7 @@ namespace { bool is_positive_infinity(double x) { #ifdef _MSC_VER return _fpclass(x) == _FPCLASS_PINF; -#elif defined __ANDROID__ +#elif defined __ANDROID__ || defined __linux__ return std::isinf(x) && (x >= 0); #else return isinf(x) && (x >= 0); From 18b637f9dc30ee8418a4ec33ffc498b2278e98d7 Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Tue, 23 Feb 2016 12:17:11 -0500 Subject: [PATCH 66/84] Fix warnings/errors for strict aliasing & function prototypes This fixes various issues related to gcc's strict-aliasing warning by using unions. It also handles various cases hit with gcc's missing-declarations warning. --- SPIRV/SpvBuilder.cpp | 8 ++++++-- SPIRV/disassemble.cpp | 4 ++-- SPIRV/doc.h | 3 +++ glslang/Include/ShHandle.h | 2 ++ glslang/MachineIndependent/Constant.cpp | 19 ++++++++++++++----- glslang/MachineIndependent/Initialize.cpp | 6 +++--- glslang/MachineIndependent/PoolAlloc.cpp | 2 +- glslang/MachineIndependent/Scan.cpp | 5 ++++- glslang/MachineIndependent/intermOut.cpp | 4 ++-- glslang/OSDependent/Unix/ossource.cpp | 2 +- glslang/OSDependent/osinclude.h | 1 + 11 files changed, 39 insertions(+), 17 deletions(-) mode change 100755 => 100644 SPIRV/SpvBuilder.cpp mode change 100755 => 100644 SPIRV/disassemble.cpp mode change 100755 => 100644 SPIRV/doc.h diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp old mode 100755 new mode 100644 index c6699444..bc405312 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -698,7 +698,9 @@ Id Builder::makeFloatConstant(float f, bool specConstant) { Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(32); - unsigned value = *(unsigned int*)&f; + union { float fl; unsigned int ui; } u; + u.fl = f; + unsigned value = u.ui; // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. @@ -721,7 +723,9 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) { Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(64); - unsigned long long value = *(unsigned long long*)&d; + union { double db; unsigned long long ull; } u; + u.db = d; + unsigned long long value = u.ull; unsigned op1 = value & 0xFFFFFFFF; unsigned op2 = value >> 32; diff --git a/SPIRV/disassemble.cpp b/SPIRV/disassemble.cpp old mode 100755 new mode 100644 index b2d30bec..e0a5f2b2 --- a/SPIRV/disassemble.cpp +++ b/SPIRV/disassemble.cpp @@ -59,7 +59,7 @@ const char* GlslStd450DebugNames[spv::GLSLstd450Count]; namespace spv { -void Kill(std::ostream& out, const char* message) +static void Kill(std::ostream& out, const char* message) { out << std::endl << "Disassembly failed: " << message << std::endl; exit(1); @@ -481,7 +481,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, return; } -void GLSLstd450GetDebugNames(const char** names) +static void GLSLstd450GetDebugNames(const char** names) { for (int i = 0; i < GLSLstd450Count; ++i) names[i] = "Unknown"; diff --git a/SPIRV/doc.h b/SPIRV/doc.h old mode 100755 new mode 100644 index 948b6fe0..b7929793 --- a/SPIRV/doc.h +++ b/SPIRV/doc.h @@ -67,6 +67,8 @@ const char* SamplerFilterModeString(int); const char* ImageFormatString(int); const char* ImageChannelOrderString(int); const char* ImageChannelTypeString(int); +const char* ImageChannelDataTypeString(int type); +const char* ImageOperandsString(int format); const char* ImageOperands(int); const char* FPFastMathString(int); const char* FPRoundingModeString(int); @@ -81,6 +83,7 @@ const char* KernelEnqueueFlagsString(int); const char* KernelProfilingInfoString(int); const char* CapabilityString(int); const char* OpcodeString(int); +const char* ScopeString(int mem); // For grouping opcodes into subsections enum OpcodeClass { diff --git a/glslang/Include/ShHandle.h b/glslang/Include/ShHandle.h index 68b56cc6..fee64139 100644 --- a/glslang/Include/ShHandle.h +++ b/glslang/Include/ShHandle.h @@ -162,7 +162,9 @@ protected: TCompiler* ConstructCompiler(EShLanguage, int); TShHandleBase* ConstructLinker(EShExecutable, int); +TShHandleBase* ConstructBindings(); void DeleteLinker(TShHandleBase*); +void DeleteBindingList(TShHandleBase* bindingList); TUniformMap* ConstructUniformMap(); void DeleteCompiler(TCompiler*); diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp index b4d0695c..db2f70da 100644 --- a/glslang/MachineIndependent/Constant.cpp +++ b/glslang/MachineIndependent/Constant.cpp @@ -43,22 +43,31 @@ namespace { using namespace glslang; +typedef union { + double d; + int i[2]; +} DoubleIntUnion; + // Some helper functions bool isNan(double x) { + DoubleIntUnion u; // tough to find a platform independent library function, do it directly - int bitPatternL = *(int*)&x; - int bitPatternH = *((int*)&x + 1); + u.d = x; + int bitPatternL = u.i[0]; + int bitPatternH = u.i[1]; return (bitPatternH & 0x7ff80000) == 0x7ff80000 && ((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0); } bool isInf(double x) { + DoubleIntUnion u; // tough to find a platform independent library function, do it directly - int bitPatternL = *(int*)&x; - int bitPatternH = *((int*)&x + 1); + u.d = x; + int bitPatternL = u.i[0]; + int bitPatternH = u.i[1]; return (bitPatternH & 0x7ff00000) == 0x7ff00000 && (bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0; } @@ -173,7 +182,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right case EbtInt: if (rightUnionArray[i] == 0) newConstArray[i].setIConst(0x7FFFFFFF); - else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == 0x80000000) + else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == (int)0x80000000) newConstArray[i].setIConst(0x80000000); else newConstArray[i].setIConst(leftUnionArray[i].getIConst() / rightUnionArray[i].getIConst()); diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 5f1c3d9f..2e094f02 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -3175,7 +3175,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf // New built-in variables should use a generic (textually declarable) qualifier in // TStoraregQualifier and only call BuiltInVariable(). // -void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVariable builtIn, TSymbolTable& symbolTable) +static void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVariable builtIn, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(name); if (symbol) { @@ -3195,7 +3195,7 @@ void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVar // // Safe to call even if name is not present. // -void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable) +static void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(name); if (! symbol) @@ -3212,7 +3212,7 @@ void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& s // // See comments above for other detail. // -void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable) +static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(blockName); if (! symbol) diff --git a/glslang/MachineIndependent/PoolAlloc.cpp b/glslang/MachineIndependent/PoolAlloc.cpp index 12f45cb8..a41cadf1 100644 --- a/glslang/MachineIndependent/PoolAlloc.cpp +++ b/glslang/MachineIndependent/PoolAlloc.cpp @@ -190,7 +190,7 @@ void TAllocation::checkGuardBlock(unsigned char*, unsigned char, const char*) co #endif { #ifdef GUARD_BLOCKS - for (int x = 0; x < guardBlockSize; x++) { + for (size_t x = 0; x < guardBlockSize; x++) { if (blockMem[x] != val) { const int maxSize = 80; char assertMsg[maxSize]; diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index f3c98aaf..098f0bd0 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -53,8 +53,11 @@ #include "preprocessor/PpContext.h" #include "preprocessor/PpTokens.h" -namespace glslang { +// Required to avoid missing prototype warnings for some compilers +int yylex(YYSTYPE*, glslang::TParseContext&); +namespace glslang { + // read past any white space void TInputScanner::consumeWhiteSpace(bool& foundNonSpaceTab) { diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index 409e29a1..884daed3 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -96,7 +96,7 @@ protected: // Helper functions for printing, not part of traversing. // -void OutputTreeText(TInfoSink& infoSink, const TIntermNode* node, const int depth) +static void OutputTreeText(TInfoSink& infoSink, const TIntermNode* node, const int depth) { int i; @@ -529,7 +529,7 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node return false; } -void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstUnionArray& constUnion, int depth) +static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstUnionArray& constUnion, int depth) { int size = node->getType().computeNumComponents(); diff --git a/glslang/OSDependent/Unix/ossource.cpp b/glslang/OSDependent/Unix/ossource.cpp index 7dee4df1..5ce882ab 100644 --- a/glslang/OSDependent/Unix/ossource.cpp +++ b/glslang/OSDependent/Unix/ossource.cpp @@ -54,7 +54,7 @@ namespace glslang { // Wrapper for Linux call to DetachThread. This is required as pthread_cleanup_push() expects // the cleanup routine to return void. // -void DetachThreadLinux(void *) +static void DetachThreadLinux(void *) { DetachThread(); } diff --git a/glslang/OSDependent/osinclude.h b/glslang/OSDependent/osinclude.h index 0f370a00..33f88038 100644 --- a/glslang/OSDependent/osinclude.h +++ b/glslang/OSDependent/osinclude.h @@ -56,6 +56,7 @@ typedef unsigned int (*TThreadEntrypoint)(void*); void* OS_CreateThread(TThreadEntrypoint); void OS_WaitForAllThreads(void* threads, int numThreads); +void OS_CleanupThreadData(void); void OS_Sleep(int milliseconds); void OS_DumpMemoryCounters(); From 32084e889d19572ff354d395a2e4db2a800b604c Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 23 Feb 2016 22:17:38 +0100 Subject: [PATCH 67/84] Fix compilation issues with MSVC 2010 (mostly by eliminating use of range-based for loops and std::tie) --- SPIRV/GlslangToSpv.cpp | 4 ++-- SPIRV/InReadableOrder.cpp | 5 +++-- SPIRV/SpvBuilder.cpp | 16 ++++++++-------- StandAlone/StandAlone.cpp | 7 ++++--- StandAlone/spirv-remap.cpp | 6 ++++-- glslang/Include/Common.h | 2 +- glslang/MachineIndependent/intermOut.cpp | 10 +++------- glslang/MachineIndependent/preprocessor/Pp.cpp | 6 +++--- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 21a04b0e..20c58f74 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -688,8 +688,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls void TGlslangToSpvTraverser::dumpSpv(std::vector& out) { // finish off the entry-point SPV instruction by adding the Input/Output - for (auto it : iOSet) - entryPoint->addIdOperand(it); + for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it) + entryPoint->addIdOperand(*it); builder.dump(out); } diff --git a/SPIRV/InReadableOrder.cpp b/SPIRV/InReadableOrder.cpp index 9180dc8c..142d716b 100644 --- a/SPIRV/InReadableOrder.cpp +++ b/SPIRV/InReadableOrder.cpp @@ -91,8 +91,9 @@ public: delayed_[continueBlock] = true; } } - for (const auto succ : block->getSuccessors()) - visit(succ); + const auto successors = block->getSuccessors(); + for (auto it = successors.cbegin(); it != successors.cend(); ++it) + visit(*it); if (continueBlock) { delayed_[continueBlock] = false; visit(continueBlock); diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index c6699444..aee4d326 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -1141,8 +1141,8 @@ void Builder::createNoResultOp(Op opCode, Id operand) void Builder::createNoResultOp(Op opCode, const std::vector& operands) { Instruction* op = new Instruction(opCode); - for (auto operand : operands) - op->addIdOperand(operand); + for (auto it = operands.cbegin(); it != operands.cend(); ++it) + op->addIdOperand(*it); buildPoint->addInstruction(std::unique_ptr(op)); } @@ -1197,8 +1197,8 @@ Id Builder::createTriOp(Op opCode, Id typeId, Id op1, Id op2, Id op3) Id Builder::createOp(Op opCode, Id typeId, const std::vector& operands) { Instruction* op = new Instruction(getUniqueId(), typeId, opCode); - for (auto operand : operands) - op->addIdOperand(operand); + for (auto it = operands.cbegin(); it != operands.cend(); ++it) + op->addIdOperand(*it); buildPoint->addInstruction(std::unique_ptr(op)); return op->getResultId(); @@ -2106,9 +2106,9 @@ Id Builder::accessChainGetInferredType() type = getContainedTypeId(type); // dereference each index - for (auto deref : accessChain.indexChain) { + for (auto it = accessChain.indexChain.cbegin(); it != accessChain.indexChain.cend(); ++it) { if (isStructType(type)) - type = getContainedTypeId(type, getConstantScalar(deref)); + type = getContainedTypeId(type, getConstantScalar(*it)); else type = getContainedTypeId(type); } @@ -2136,9 +2136,9 @@ void Builder::dump(std::vector& out) const out.push_back(0); // Capabilities - for (auto cap : capabilities) { + for (auto it = capabilities.cbegin(); it != capabilities.cend(); ++it) { Instruction capInst(0, 0, OpCapability); - capInst.addImmediateOperand(cap); + capInst.addImmediateOperand(*it); capInst.dump(out); } diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 3c54d4f9..a1a2957d 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -689,7 +689,8 @@ void CompileAndLinkShaderUnits(std::vector compUnits) // glslang::TProgram& program = *new glslang::TProgram; - for (auto compUnit : compUnits) { + for (auto it = compUnits.cbegin(); it != compUnits.cend(); ++it) { + const auto &compUnit = *it; glslang::TShader* shader = new glslang::TShader(compUnit.stage); shader->setStrings(compUnit.text, 1); shaders.push_back(shader); @@ -822,8 +823,8 @@ void CompileAndLinkShaderFiles() glslang::OS_DumpMemoryCounters(); } - for (auto c : compUnits) - FreeFileData(c.text); + for (auto it = compUnits.begin(); it != compUnits.end(); ++it) + FreeFileData(it->text); } int C_DECL main(int argc, char* argv[]) diff --git a/StandAlone/spirv-remap.cpp b/StandAlone/spirv-remap.cpp index 2091feb1..f35b58ed 100644 --- a/StandAlone/spirv-remap.cpp +++ b/StandAlone/spirv-remap.cpp @@ -120,7 +120,8 @@ namespace { if (fp.fail()) errHandler(std::string("error opening file for write: ") + outFile); - for (auto word : spv) { + for (auto it = spv.cbegin(); it != spv.cend(); ++it) { + SpvWord word = *it; fp.write((char *)&word, sizeof(word)); if (fp.fail()) errHandler(std::string("error writing file: ") + outFile); @@ -157,7 +158,8 @@ namespace { void execute(const std::vector& inputFile, const std::string& outputDir, int opts, int verbosity) { - for (const auto& filename : inputFile) { + for (auto it = inputFile.cbegin(); it != inputFile.cend(); ++it) { + const std::string &filename = *it; std::vector spv; read(spv, filename, verbosity); spv::spirvbin_t(verbosity).remap(spv, opts); diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index 826ab14f..2872fac8 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -206,7 +206,7 @@ struct TSourceLoc { { if (name != nullptr) return quoteStringName ? ("\"" + std::string(name) + "\"") : name; - return std::to_string(string); + return std::to_string((long long)string); } const char* name; // descriptive name for this string int string; diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index 409e29a1..f339065a 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -757,13 +757,9 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) case EShLangCompute: infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n"; { - bool dumpSpecIds = false; - for (auto c : localSizeSpecId) { - if (c != TQualifier::layoutNotSet) - dumpSpecIds = true; - } - - if (dumpSpecIds) { + if (localSizeSpecId[0] != TQualifier::layoutNotSet || + localSizeSpecId[1] != TQualifier::layoutNotSet || + localSizeSpecId[2] != TQualifier::layoutNotSet) { infoSink.debug << "local_size ids = (" << localSizeSpecId[0] << ", " << localSizeSpecId[1] << ", " << diff --git a/glslang/MachineIndependent/preprocessor/Pp.cpp b/glslang/MachineIndependent/preprocessor/Pp.cpp index 72dbcae4..9a33a776 100644 --- a/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -611,9 +611,9 @@ int TPpContext::CPPinclude(TPpToken* ppToken) if (token != '\n' && token != EndOfInput) { parseContext.ppError(ppToken->loc, "extra content after file designation", "#include", ""); } else { - std::string sourceName; - std::string replacement; - std::tie(sourceName, replacement) = includer.include(filename.c_str()); + auto include = includer.include(filename.c_str()); + std::string sourceName = include.first; + std::string replacement = include.second; if (!sourceName.empty()) { if (!replacement.empty()) { const bool forNextLine = parseContext.lineDirectiveShouldSetNextLine(); From 52e61acf26319387cb0092231ebee5b2c850a20c Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 23 Feb 2016 12:03:21 -1000 Subject: [PATCH 68/84] SPV: Ensure Parameterize is called during Disassemble --- SPIRV/disassemble.cpp | 1 + StandAlone/StandAlone.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIRV/disassemble.cpp b/SPIRV/disassemble.cpp index b2d30bec..d334375e 100755 --- a/SPIRV/disassemble.cpp +++ b/SPIRV/disassemble.cpp @@ -568,6 +568,7 @@ void GLSLstd450GetDebugNames(const char** names) void Disassemble(std::ostream& out, const std::vector& stream) { SpirvStream SpirvStream(out, stream); + spv::Parameterize(); GLSLstd450GetDebugNames(GlslStd450DebugNames); SpirvStream.validate(); SpirvStream.processInstructions(); diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 3c54d4f9..b6554906 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -753,7 +753,6 @@ void CompileAndLinkShaderUnits(std::vector compUnits) if (! (Options & EOptionMemoryLeakMode)) { glslang::OutputSpv(spirv, GetBinaryName((EShLanguage)stage)); if (Options & EOptionHumanReadableSpv) { - spv::Parameterize(); spv::Disassemble(std::cout, spirv); } } From 2725323bba789de1eb524f57ae5d2f0386d4f40a Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Tue, 23 Feb 2016 17:51:09 +0800 Subject: [PATCH 69/84] SPV: Fix an issue caused by bool-to-uint32 conversion. This issue is related with the commit 103bef9d74d768f0690ed53f52681baead384d1e. --- SPIRV/GlslangToSpv.cpp | 52 ++++++++- Test/baseResults/spv.boolInBlock.frag.out | 124 ++++++++++++++++++++++ Test/spv.boolInBlock.frag | 26 +++++ Test/test-spirv-list | 1 + 4 files changed, 199 insertions(+), 4 deletions(-) create mode 100644 Test/baseResults/spv.boolInBlock.frag.out create mode 100644 Test/spv.boolInBlock.frag diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 21a04b0e..81f7cc1c 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -98,6 +98,7 @@ protected: spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&); spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim); spv::Id accessChainLoad(const glslang::TType& type); + void accessChainStore(const glslang::TType& type, spv::Id rvalue); glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const; int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix); int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix); @@ -805,7 +806,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T // store the result builder.setAccessChain(lValue); - builder.accessChainStore(rValue); + accessChainStore(node->getType(), rValue); // assignments are expressions having an rValue after they are evaluated... builder.clearAccessChain(); @@ -1904,12 +1905,55 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), nominalTypeId); // Need to convert to abstract types when necessary - if (builder.isScalarType(nominalTypeId) && type.getBasicType() == glslang::EbtBool && nominalTypeId != builder.makeBoolType()) - loadedId = builder.createBinOp(spv::OpINotEqual, builder.makeBoolType(), loadedId, builder.makeUintConstant(0)); + if (type.getBasicType() == glslang::EbtBool) { + if (builder.isScalarType(nominalTypeId)) { + // Conversion for bool + spv::Id boolType = builder.makeBoolType(); + if (nominalTypeId != boolType) + loadedId = builder.createBinOp(spv::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0)); + } else if (builder.isVectorType(nominalTypeId)) { + // Conversion for bvec + int vecSize = builder.getNumTypeComponents(nominalTypeId); + spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); + if (nominalTypeId != bvecType) + loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId, makeSmearedConstant(builder.makeUintConstant(0), vecSize)); + } + } return loadedId; } +// Wrap the builder's accessChainStore to: +// - do conversion of concrete to abstract type +void TGlslangToSpvTraverser::accessChainStore(const glslang::TType& type, spv::Id rvalue) +{ + // Need to convert to abstract types when necessary + if (type.getBasicType() == glslang::EbtBool) { + spv::Id nominalTypeId = builder.accessChainGetInferredType(); + + if (builder.isScalarType(nominalTypeId)) { + // Conversion for bool + spv::Id boolType = builder.makeBoolType(); + if (nominalTypeId != boolType) { + spv::Id zero = builder.makeUintConstant(0); + spv::Id one = builder.makeUintConstant(1); + rvalue = builder.createTriOp(spv::OpSelect, nominalTypeId, rvalue, one, zero); + } + } else if (builder.isVectorType(nominalTypeId)) { + // Conversion for bvec + int vecSize = builder.getNumTypeComponents(nominalTypeId); + spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); + if (nominalTypeId != bvecType) { + spv::Id zero = makeSmearedConstant(builder.makeUintConstant(0), vecSize); + spv::Id one = makeSmearedConstant(builder.makeUintConstant(1), vecSize); + rvalue = builder.createTriOp(spv::OpSelect, nominalTypeId, rvalue, one, zero); + } + } + } + + builder.accessChainStore(rvalue); +} + // Decide whether or not this type should be // decorated with offsets and strides, and if so // whether std140 or std430 rules should be applied. @@ -2470,7 +2514,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) { spv::Id copy = builder.createLoad(spvArgs[a]); builder.setAccessChain(lValues[lValueCount]); - builder.accessChainStore(copy); + accessChainStore(glslangArgs[a]->getAsTyped()->getType(), copy); } ++lValueCount; } diff --git a/Test/baseResults/spv.boolInBlock.frag.out b/Test/baseResults/spv.boolInBlock.frag.out new file mode 100644 index 00000000..e49d0678 --- /dev/null +++ b/Test/baseResults/spv.boolInBlock.frag.out @@ -0,0 +1,124 @@ +spv.boolInBlock.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 72 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + Name 4 "main" + Name 14 "foo(vb4;vb2;" + Name 12 "paramb4" + Name 13 "paramb2" + Name 17 "b1" + Name 24 "Buffer" + MemberName 24(Buffer) 0 "b2" + Name 26 "" + Name 39 "Uniform" + MemberName 39(Uniform) 0 "b4" + Name 41 "" + Name 62 "param" + Name 67 "param" + MemberDecorate 24(Buffer) 0 Offset 0 + Decorate 24(Buffer) BufferBlock + Decorate 26 DescriptorSet 0 + Decorate 26 Binding 1 + MemberDecorate 39(Uniform) 0 Offset 0 + Decorate 39(Uniform) Block + Decorate 41 DescriptorSet 0 + Decorate 41 Binding 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeBool + 7: TypeVector 6(bool) 4 + 8: TypePointer Function 7(bvec4) + 9: TypeVector 6(bool) 2 + 10: TypePointer Function 9(bvec2) + 11: TypeFunction 2 8(ptr) 10(ptr) + 16: TypePointer Function 6(bool) + 22: TypeInt 32 0 + 23: TypeVector 22(int) 2 + 24(Buffer): TypeStruct 23(ivec2) + 25: TypePointer Uniform 24(Buffer) + 26: 25(ptr) Variable Uniform + 27: TypeInt 32 1 + 28: 27(int) Constant 0 + 29: 6(bool) ConstantFalse + 30: 9(bvec2) ConstantComposite 29 29 + 31: 22(int) Constant 0 + 32: 23(ivec2) ConstantComposite 31 31 + 33: 22(int) Constant 1 + 34: 23(ivec2) ConstantComposite 33 33 + 36: TypePointer Uniform 23(ivec2) + 38: TypeVector 22(int) 4 + 39(Uniform): TypeStruct 38(ivec4) + 40: TypePointer Uniform 39(Uniform) + 41: 40(ptr) Variable Uniform + 42: TypePointer Uniform 38(ivec4) + 65: 38(ivec4) ConstantComposite 31 31 31 31 + 4(main): 2 Function None 3 + 5: Label + 62(param): 8(ptr) Variable Function + 67(param): 10(ptr) Variable Function + 35: 23(ivec2) Select 30 34 32 + 37: 36(ptr) AccessChain 26 28 + Store 37 35 + 43: 42(ptr) AccessChain 41 28 + 44: 38(ivec4) Load 43 + 45: 22(int) CompositeExtract 44 2 + 46: 6(bool) INotEqual 45 31 + SelectionMerge 48 None + BranchConditional 46 47 48 + 47: Label + 49: 42(ptr) AccessChain 41 28 + 50: 38(ivec4) Load 49 + 51: 22(int) CompositeExtract 50 0 + 52: 6(bool) INotEqual 51 31 + 53: 9(bvec2) CompositeConstruct 52 52 + 54: 23(ivec2) Select 53 34 32 + 55: 36(ptr) AccessChain 26 28 + Store 55 54 + Branch 48 + 48: Label + 56: 36(ptr) AccessChain 26 28 + 57: 23(ivec2) Load 56 + 58: 22(int) CompositeExtract 57 0 + 59: 6(bool) INotEqual 58 31 + SelectionMerge 61 None + BranchConditional 59 60 61 + 60: Label + 63: 42(ptr) AccessChain 41 28 + 64: 38(ivec4) Load 63 + 66: 7(bvec4) INotEqual 64 65 + Store 62(param) 66 + 68: 2 FunctionCall 14(foo(vb4;vb2;) 62(param) 67(param) + 69: 9(bvec2) Load 67(param) + 70: 23(ivec2) Select 69 34 32 + 71: 36(ptr) AccessChain 26 28 + Store 71 70 + Branch 61 + 61: Label + Return + FunctionEnd +14(foo(vb4;vb2;): 2 Function None 11 + 12(paramb4): 8(ptr) FunctionParameter + 13(paramb2): 10(ptr) FunctionParameter + 15: Label + 17(b1): 16(ptr) Variable Function + 18: 7(bvec4) Load 12(paramb4) + 19: 6(bool) CompositeExtract 18 2 + Store 17(b1) 19 + 20: 6(bool) Load 17(b1) + 21: 9(bvec2) CompositeConstruct 20 20 + Store 13(paramb2) 21 + Return + FunctionEnd diff --git a/Test/spv.boolInBlock.frag b/Test/spv.boolInBlock.frag new file mode 100644 index 00000000..96b2de0e --- /dev/null +++ b/Test/spv.boolInBlock.frag @@ -0,0 +1,26 @@ +#version 450 + +layout(binding = 0, std140) uniform Uniform +{ + bvec4 b4; +}; + +layout(binding = 1, std430) buffer Buffer +{ + bvec2 b2; +}; + +void foo(bvec4 paramb4, out bvec2 paramb2) +{ + bool b1 = paramb4.z; + paramb2 = bvec2(b1); +} + +void main() +{ + b2 = bvec2(0.0); + if (b4.z) + b2 = bvec2(b4.x); + if (b2.x) + foo(b4, b2); +} \ No newline at end of file diff --git a/Test/test-spirv-list b/Test/test-spirv-list index 51e2e8f3..477067f4 100644 --- a/Test/test-spirv-list +++ b/Test/test-spirv-list @@ -35,6 +35,7 @@ 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 From 227e026dbf3b306ad018dc9467a539140734ada0 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 10 Feb 2016 19:41:29 +0100 Subject: [PATCH 70/84] MSVC warning fix - conversion from size_t to int, possible loss of data --- SPIRV/SpvBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index bc405312..74ed611b 100644 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -2121,7 +2121,7 @@ Id Builder::accessChainGetInferredType() if (accessChain.swizzle.size() == 1) type = getContainedTypeId(type); else if (accessChain.swizzle.size() > 1) - type = makeVectorType(getContainedTypeId(type), accessChain.swizzle.size()); + type = makeVectorType(getContainedTypeId(type), (int)accessChain.swizzle.size()); // dereference component selection if (accessChain.component) From 9cc6cd3ef4de7cbe9d04d6690e93379e0aeddbbb Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 10 Feb 2016 20:04:20 +0100 Subject: [PATCH 71/84] GCC warning fix - unhandled enums in switch statement --- SPIRV/GlslangToSpv.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 21a04b0e..eeb40598 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -351,6 +351,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case EShLangTessEvaluation: builder.addCapability(spv::CapabilityTessellationPointSize); break; + default: + break; } return spv::BuiltInPointSize; From 1be2ffa7cd7bf9409d8a4be79e600aae2d68b1e0 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 25 Feb 2016 21:47:14 +0100 Subject: [PATCH 72/84] GCC/Clang warning fix - unsigned/signed mismatch in comparison --- glslang/MachineIndependent/localintermediate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 00908b0b..60bf68ed 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -267,7 +267,7 @@ public: localSizeSpecId[dim] = id; return true; } - unsigned int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; } + int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; } void setXfbMode() { xfbMode = true; } bool getXfbMode() const { return xfbMode; } From 768fb8b49eca2b4840463fc54011d6d327d36ed7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 1 Jan 2016 00:29:11 +0100 Subject: [PATCH 73/84] Remove bison binaries see issue #103 --- tools/bison.exe | Bin 513536 -> 0 bytes tools/data/Makefile.am | 30 - tools/data/Makefile.in | 1639 ---------------- tools/data/README | 70 - tools/data/bison.m4 | 610 ------ tools/data/c++-skel.m4 | 26 - tools/data/c++.m4 | 205 -- tools/data/c-like.m4 | 44 - tools/data/c-skel.m4 | 26 - tools/data/c.m4 | 722 ------- tools/data/glr.c | 2589 -------------------------- tools/data/glr.cc | 346 ---- tools/data/java-skel.m4 | 26 - tools/data/java.m4 | 304 --- tools/data/lalr1.cc | 1143 ------------ tools/data/lalr1.java | 927 --------- tools/data/location.cc | 299 --- tools/data/m4sugar/foreach.m4 | 362 ---- tools/data/m4sugar/m4sugar.m4 | 3301 --------------------------------- tools/data/stack.hh | 121 -- tools/data/xslt/bison.xsl | 105 -- tools/data/xslt/xml2dot.xsl | 397 ---- tools/data/xslt/xml2text.xsl | 569 ------ tools/data/xslt/xml2xhtml.xsl | 745 -------- tools/data/yacc.c | 2065 --------------------- 25 files changed, 16671 deletions(-) delete mode 100755 tools/bison.exe delete mode 100644 tools/data/Makefile.am delete mode 100644 tools/data/Makefile.in delete mode 100644 tools/data/README delete mode 100644 tools/data/bison.m4 delete mode 100644 tools/data/c++-skel.m4 delete mode 100644 tools/data/c++.m4 delete mode 100644 tools/data/c-like.m4 delete mode 100644 tools/data/c-skel.m4 delete mode 100644 tools/data/c.m4 delete mode 100644 tools/data/glr.c delete mode 100644 tools/data/glr.cc delete mode 100644 tools/data/java-skel.m4 delete mode 100644 tools/data/java.m4 delete mode 100644 tools/data/lalr1.cc delete mode 100644 tools/data/lalr1.java delete mode 100644 tools/data/location.cc delete mode 100644 tools/data/m4sugar/foreach.m4 delete mode 100644 tools/data/m4sugar/m4sugar.m4 delete mode 100644 tools/data/stack.hh delete mode 100644 tools/data/xslt/bison.xsl delete mode 100644 tools/data/xslt/xml2dot.xsl delete mode 100644 tools/data/xslt/xml2text.xsl delete mode 100644 tools/data/xslt/xml2xhtml.xsl delete mode 100644 tools/data/yacc.c diff --git a/tools/bison.exe b/tools/bison.exe deleted file mode 100755 index bdc1101efbbda2be1841ae9b2d4bd52a711d49e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 513536 zcmeFae|*!`^*^38ueJeF5+sEJMXScyEzY3@rKZJFNLz$L($WNhf;!z^R;LIFqPDe= zR(Wv=s~b%8t^ZUzh{6WrlZ@lA6*nu}O`K z@N3jh#P2YXuj1D4in6|};G{>x%j=$9AH_{w4rI<&Uhnr02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?VNgYMe5nzS5Hsww?Nb^d4i$p8HTH;Xj9KIT0O}p zN{Bqo1ob?V)Duln&ouQPH)9shcB^`}x$5cW^L(Fdgpu7$|DGYwgAp%+3lHSn=He zs diff --git a/tools/data/Makefile.am b/tools/data/Makefile.am deleted file mode 100644 index e209325c..00000000 --- a/tools/data/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -dist_pkgdata_DATA = README bison.m4 \ - c-like.m4 \ - c-skel.m4 c.m4 yacc.c glr.c \ - c++-skel.m4 c++.m4 location.cc lalr1.cc glr.cc stack.hh \ - java-skel.m4 java.m4 lalr1.java - -m4sugardir = $(pkgdatadir)/m4sugar -dist_m4sugar_DATA = m4sugar/m4sugar.m4 m4sugar/foreach.m4 - -xsltdir = $(pkgdatadir)/xslt -dist_xslt_DATA = \ - xslt/bison.xsl \ - xslt/xml2dot.xsl \ - xslt/xml2text.xsl \ - xslt/xml2xhtml.xsl diff --git a/tools/data/Makefile.in b/tools/data/Makefile.in deleted file mode 100644 index a15e670b..00000000 --- a/tools/data/Makefile.in +++ /dev/null @@ -1,1639 +0,0 @@ -# Makefile.in generated by automake 1.12.5 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2012 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = data -DIST_COMMON = README $(dist_m4sugar_DATA) $(dist_pkgdata_DATA) \ - $(dist_xslt_DATA) $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/bison-i18n.m4 \ - $(top_srcdir)/m4/c-working.m4 $(top_srcdir)/m4/calloc.m4 \ - $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \ - $(top_srcdir)/m4/cxx.m4 $(top_srcdir)/m4/dirname.m4 \ - $(top_srcdir)/m4/dmalloc.m4 \ - $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \ - $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ - $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ - $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ - $(top_srcdir)/m4/extensions.m4 \ - $(top_srcdir)/m4/extern-inline.m4 \ - $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fcntl-o.m4 \ - $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \ - $(top_srcdir)/m4/flex.m4 $(top_srcdir)/m4/float_h.m4 \ - $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \ - $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fprintf-posix.m4 \ - $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ - $(top_srcdir)/m4/fseterr.m4 $(top_srcdir)/m4/fstat.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getopt.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ - $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/include_next.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ - $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnan.m4 \ - $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ - $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ - $(top_srcdir)/m4/javacomp.m4 $(top_srcdir)/m4/javaexec.m4 \ - $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/ldexp.m4 \ - $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libunistring-base.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/m4.m4 $(top_srcdir)/m4/malloc.m4 \ - $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ - $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \ - $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/memchr.m4 \ - $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ - $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack-printf.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \ - $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe2.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix_spawn.m4 \ - $(top_srcdir)/m4/printf-frexp.m4 \ - $(top_srcdir)/m4/printf-frexpl.m4 \ - $(top_srcdir)/m4/printf-posix-rpl.m4 \ - $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ - $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \ - $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/sched_h.m4 \ - $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \ - $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \ - $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \ - $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf-posix.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/spawn-pipe.m4 \ - $(top_srcdir)/m4/spawn_h.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strchrnul.m4 \ - $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ - $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ - $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ - $(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strverscmp.m4 \ - $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ - $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/threadlib.m4 \ - $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/timevar.m4 \ - $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ - $(top_srcdir)/m4/vfprintf-posix.m4 \ - $(top_srcdir)/m4/vsnprintf-posix.m4 \ - $(top_srcdir)/m4/vsnprintf.m4 \ - $(top_srcdir)/m4/vsprintf-posix.m4 \ - $(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ - $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(m4sugardir)" "$(DESTDIR)$(pkgdatadir)" \ - "$(DESTDIR)$(xsltdir)" -DATA = $(dist_m4sugar_DATA) $(dist_pkgdata_DATA) $(dist_xslt_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOM4TE = @AUTOM4TE@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BISON_CXX_WORKS = @BISON_CXX_WORKS@ -BISON_C_WORKS = @BISON_C_WORKS@ -BISON_LOCALEDIR = @BISON_LOCALEDIR@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CLASSPATH = @CLASSPATH@ -CLASSPATH_SEPARATOR = @CLASSPATH_SEPARATOR@ -CONFIG_INCLUDE = @CONFIG_INCLUDE@ -CONF_JAVA = @CONF_JAVA@ -CONF_JAVAC = @CONF_JAVAC@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_COMPILER_POSIXLY_CORRECT = @CXX_COMPILER_POSIXLY_CORRECT@ -CYGPATH_W = @CYGPATH_W@ -C_COMPILER_POSIXLY_CORRECT = @C_COMPILER_POSIXLY_CORRECT@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOT = @DOT@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FLOAT_H = @FLOAT_H@ -GCC = @GCC@ -GETOPT_H = @GETOPT_H@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC21 = @GLIBC21@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GNULIB_ACOSF = @GNULIB_ACOSF@ -GNULIB_ACOSL = @GNULIB_ACOSL@ -GNULIB_ASINF = @GNULIB_ASINF@ -GNULIB_ASINL = @GNULIB_ASINL@ -GNULIB_ATAN2F = @GNULIB_ATAN2F@ -GNULIB_ATANF = @GNULIB_ATANF@ -GNULIB_ATANL = @GNULIB_ATANL@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_BTOWC = @GNULIB_BTOWC@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CBRT = @GNULIB_CBRT@ -GNULIB_CBRTF = @GNULIB_CBRTF@ -GNULIB_CBRTL = @GNULIB_CBRTL@ -GNULIB_CEIL = @GNULIB_CEIL@ -GNULIB_CEILF = @GNULIB_CEILF@ -GNULIB_CEILL = @GNULIB_CEILL@ -GNULIB_CHDIR = @GNULIB_CHDIR@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ -GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ -GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ -GNULIB_COSF = @GNULIB_COSF@ -GNULIB_COSHF = @GNULIB_COSHF@ -GNULIB_COSL = @GNULIB_COSL@ -GNULIB_DPRINTF = @GNULIB_DPRINTF@ -GNULIB_DUP = @GNULIB_DUP@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_EXP2 = @GNULIB_EXP2@ -GNULIB_EXP2F = @GNULIB_EXP2F@ -GNULIB_EXP2L = @GNULIB_EXP2L@ -GNULIB_EXPF = @GNULIB_EXPF@ -GNULIB_EXPL = @GNULIB_EXPL@ -GNULIB_EXPM1 = @GNULIB_EXPM1@ -GNULIB_EXPM1F = @GNULIB_EXPM1F@ -GNULIB_EXPM1L = @GNULIB_EXPM1L@ -GNULIB_FABSF = @GNULIB_FABSF@ -GNULIB_FABSL = @GNULIB_FABSL@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_FFLUSH = @GNULIB_FFLUSH@ -GNULIB_FFSL = @GNULIB_FFSL@ -GNULIB_FFSLL = @GNULIB_FFSLL@ -GNULIB_FGETC = @GNULIB_FGETC@ -GNULIB_FGETS = @GNULIB_FGETS@ -GNULIB_FLOOR = @GNULIB_FLOOR@ -GNULIB_FLOORF = @GNULIB_FLOORF@ -GNULIB_FLOORL = @GNULIB_FLOORL@ -GNULIB_FMA = @GNULIB_FMA@ -GNULIB_FMAF = @GNULIB_FMAF@ -GNULIB_FMAL = @GNULIB_FMAL@ -GNULIB_FMOD = @GNULIB_FMOD@ -GNULIB_FMODF = @GNULIB_FMODF@ -GNULIB_FMODL = @GNULIB_FMODL@ -GNULIB_FOPEN = @GNULIB_FOPEN@ -GNULIB_FPRINTF = @GNULIB_FPRINTF@ -GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE = @GNULIB_FPURGE@ -GNULIB_FPUTC = @GNULIB_FPUTC@ -GNULIB_FPUTS = @GNULIB_FPUTS@ -GNULIB_FREAD = @GNULIB_FREAD@ -GNULIB_FREOPEN = @GNULIB_FREOPEN@ -GNULIB_FREXP = @GNULIB_FREXP@ -GNULIB_FREXPF = @GNULIB_FREXPF@ -GNULIB_FREXPL = @GNULIB_FREXPL@ -GNULIB_FSCANF = @GNULIB_FSCANF@ -GNULIB_FSEEK = @GNULIB_FSEEK@ -GNULIB_FSEEKO = @GNULIB_FSEEKO@ -GNULIB_FSTAT = @GNULIB_FSTAT@ -GNULIB_FSTATAT = @GNULIB_FSTATAT@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTELL = @GNULIB_FTELL@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ -GNULIB_HYPOT = @GNULIB_HYPOT@ -GNULIB_HYPOTF = @GNULIB_HYPOTF@ -GNULIB_HYPOTL = @GNULIB_HYPOTL@ -GNULIB_ILOGB = @GNULIB_ILOGB@ -GNULIB_ILOGBF = @GNULIB_ILOGBF@ -GNULIB_ILOGBL = @GNULIB_ILOGBL@ -GNULIB_IMAXABS = @GNULIB_IMAXABS@ -GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ -GNULIB_ISATTY = @GNULIB_ISATTY@ -GNULIB_ISFINITE = @GNULIB_ISFINITE@ -GNULIB_ISINF = @GNULIB_ISINF@ -GNULIB_ISNAN = @GNULIB_ISNAN@ -GNULIB_ISNAND = @GNULIB_ISNAND@ -GNULIB_ISNANF = @GNULIB_ISNANF@ -GNULIB_ISNANL = @GNULIB_ISNANL@ -GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ -GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ -GNULIB_LCHMOD = @GNULIB_LCHMOD@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LDEXPF = @GNULIB_LDEXPF@ -GNULIB_LDEXPL = @GNULIB_LDEXPL@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LOG = @GNULIB_LOG@ -GNULIB_LOG10 = @GNULIB_LOG10@ -GNULIB_LOG10F = @GNULIB_LOG10F@ -GNULIB_LOG10L = @GNULIB_LOG10L@ -GNULIB_LOG1P = @GNULIB_LOG1P@ -GNULIB_LOG1PF = @GNULIB_LOG1PF@ -GNULIB_LOG1PL = @GNULIB_LOG1PL@ -GNULIB_LOG2 = @GNULIB_LOG2@ -GNULIB_LOG2F = @GNULIB_LOG2F@ -GNULIB_LOG2L = @GNULIB_LOG2L@ -GNULIB_LOGB = @GNULIB_LOGB@ -GNULIB_LOGBF = @GNULIB_LOGBF@ -GNULIB_LOGBL = @GNULIB_LOGBL@ -GNULIB_LOGF = @GNULIB_LOGF@ -GNULIB_LOGL = @GNULIB_LOGL@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_LSTAT = @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_MODF = @GNULIB_MODF@ -GNULIB_MODFF = @GNULIB_MODFF@ -GNULIB_MODFL = @GNULIB_MODFL@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ -GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN = @GNULIB_OPEN@ -GNULIB_OPENAT = @GNULIB_OPENAT@ -GNULIB_PCLOSE = @GNULIB_PCLOSE@ -GNULIB_PERROR = @GNULIB_PERROR@ -GNULIB_PIPE = @GNULIB_PIPE@ -GNULIB_PIPE2 = @GNULIB_PIPE2@ -GNULIB_POPEN = @GNULIB_POPEN@ -GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ -GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@ -GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@ -GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@ -GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@ -GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@ -GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@ -GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@ -GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@ -GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@ -GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@ -GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@ -GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@ -GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@ -GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@ -GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@ -GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@ -GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ -GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ -GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ -GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@ -GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@ -GNULIB_POWF = @GNULIB_POWF@ -GNULIB_PREAD = @GNULIB_PREAD@ -GNULIB_PRINTF = @GNULIB_PRINTF@ -GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ -GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ -GNULIB_PTSNAME = @GNULIB_PTSNAME@ -GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ -GNULIB_PUTC = @GNULIB_PUTC@ -GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ -GNULIB_PUTENV = @GNULIB_PUTENV@ -GNULIB_PUTS = @GNULIB_PUTS@ -GNULIB_PWRITE = @GNULIB_PWRITE@ -GNULIB_RAISE = @GNULIB_RAISE@ -GNULIB_RANDOM = @GNULIB_RANDOM@ -GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ -GNULIB_READ = @GNULIB_READ@ -GNULIB_READLINK = @GNULIB_READLINK@ -GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMAINDER = @GNULIB_REMAINDER@ -GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ -GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -GNULIB_RENAME = @GNULIB_RENAME@ -GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ -GNULIB_RINT = @GNULIB_RINT@ -GNULIB_RINTF = @GNULIB_RINTF@ -GNULIB_RINTL = @GNULIB_RINTL@ -GNULIB_RMDIR = @GNULIB_RMDIR@ -GNULIB_ROUND = @GNULIB_ROUND@ -GNULIB_ROUNDF = @GNULIB_ROUNDF@ -GNULIB_ROUNDL = @GNULIB_ROUNDL@ -GNULIB_RPMATCH = @GNULIB_RPMATCH@ -GNULIB_SCANF = @GNULIB_SCANF@ -GNULIB_SETENV = @GNULIB_SETENV@ -GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ -GNULIB_SIGACTION = @GNULIB_SIGACTION@ -GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ -GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ -GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ -GNULIB_SINF = @GNULIB_SINF@ -GNULIB_SINHF = @GNULIB_SINHF@ -GNULIB_SINL = @GNULIB_SINL@ -GNULIB_SLEEP = @GNULIB_SLEEP@ -GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ -GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ -GNULIB_SQRTF = @GNULIB_SQRTF@ -GNULIB_SQRTL = @GNULIB_SQRTL@ -GNULIB_STAT = @GNULIB_STAT@ -GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ -GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ -GNULIB_STPCPY = @GNULIB_STPCPY@ -GNULIB_STPNCPY = @GNULIB_STPNCPY@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TANF = @GNULIB_TANF@ -GNULIB_TANHF = @GNULIB_TANHF@ -GNULIB_TANL = @GNULIB_TANL@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TRUNC = @GNULIB_TRUNC@ -GNULIB_TRUNCF = @GNULIB_TRUNCF@ -GNULIB_TRUNCL = @GNULIB_TRUNCL@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ACOSF = @HAVE_ACOSF@ -HAVE_ACOSL = @HAVE_ACOSL@ -HAVE_ASINF = @HAVE_ASINF@ -HAVE_ASINL = @HAVE_ASINL@ -HAVE_ATAN2F = @HAVE_ATAN2F@ -HAVE_ATANF = @HAVE_ATANF@ -HAVE_ATANL = @HAVE_ATANL@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ -HAVE_CBRT = @HAVE_CBRT@ -HAVE_CBRTF = @HAVE_CBRTF@ -HAVE_CBRTL = @HAVE_CBRTL@ -HAVE_CHOWN = @HAVE_CHOWN@ -HAVE_COPYSIGN = @HAVE_COPYSIGN@ -HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ -HAVE_COSF = @HAVE_COSF@ -HAVE_COSHF = @HAVE_COSHF@ -HAVE_COSL = @HAVE_COSL@ -HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ -HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ -HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ -HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ -HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ -HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ -HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ -HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ -HAVE_DECL_COSL = @HAVE_DECL_COSL@ -HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ -HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ -HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ -HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ -HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ -HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ -HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ -HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ -HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ -HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ -HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ -HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ -HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ -HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ -HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ -HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ -HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ -HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ -HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ -HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ -HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ -HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ -HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ -HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ -HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ -HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ -HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ -HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ -HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ -HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ -HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ -HAVE_DECL_SINL = @HAVE_DECL_SINL@ -HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ -HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ -HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ -HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ -HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ -HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ -HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ -HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ -HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ -HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ -HAVE_DECL_TANL = @HAVE_DECL_TANL@ -HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ -HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ -HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ -HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ -HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ -HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_EXPF = @HAVE_EXPF@ -HAVE_EXPL = @HAVE_EXPL@ -HAVE_EXPM1 = @HAVE_EXPM1@ -HAVE_EXPM1F = @HAVE_EXPM1F@ -HAVE_FABSF = @HAVE_FABSF@ -HAVE_FABSL = @HAVE_FABSL@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -HAVE_FCHDIR = @HAVE_FCHDIR@ -HAVE_FCHMODAT = @HAVE_FCHMODAT@ -HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ -HAVE_FCNTL = @HAVE_FCNTL@ -HAVE_FDATASYNC = @HAVE_FDATASYNC@ -HAVE_FEATURES_H = @HAVE_FEATURES_H@ -HAVE_FFSL = @HAVE_FFSL@ -HAVE_FFSLL = @HAVE_FFSLL@ -HAVE_FMA = @HAVE_FMA@ -HAVE_FMAF = @HAVE_FMAF@ -HAVE_FMAL = @HAVE_FMAL@ -HAVE_FMODF = @HAVE_FMODF@ -HAVE_FMODL = @HAVE_FMODL@ -HAVE_FREXPF = @HAVE_FREXPF@ -HAVE_FSEEKO = @HAVE_FSEEKO@ -HAVE_FSTATAT = @HAVE_FSTATAT@ -HAVE_FSYNC = @HAVE_FSYNC@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GCJ_C = @HAVE_GCJ_C@ -HAVE_GCJ_IN_PATH = @HAVE_GCJ_IN_PATH@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GIJ = @HAVE_GIJ@ -HAVE_GIJ_IN_PATH = @HAVE_GIJ_IN_PATH@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_HYPOTF = @HAVE_HYPOTF@ -HAVE_HYPOTL = @HAVE_HYPOTL@ -HAVE_ILOGB = @HAVE_ILOGB@ -HAVE_ILOGBF = @HAVE_ILOGBF@ -HAVE_ILOGBL = @HAVE_ILOGBL@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISNAND = @HAVE_ISNAND@ -HAVE_ISNANF = @HAVE_ISNANF@ -HAVE_ISNANL = @HAVE_ISNANL@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_JAVA = @HAVE_JAVA@ -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DIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_MODFF = @HAVE_MODFF@ -HAVE_MODFL = @HAVE_MODFL@ -HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ -HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ -HAVE_OPENAT = @HAVE_OPENAT@ -HAVE_OS_H = @HAVE_OS_H@ -HAVE_PCLOSE = @HAVE_PCLOSE@ -HAVE_PIPE = @HAVE_PIPE@ -HAVE_PIPE2 = @HAVE_PIPE2@ -HAVE_POPEN = @HAVE_POPEN@ -HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ -HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ -HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@ -HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@ -HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ -HAVE_POWF = @HAVE_POWF@ -HAVE_PREAD = @HAVE_PREAD@ -HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ -HAVE_PTSNAME = @HAVE_PTSNAME@ -HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ -HAVE_PWRITE = @HAVE_PWRITE@ -HAVE_RAISE = @HAVE_RAISE@ -HAVE_RANDOM = @HAVE_RANDOM@ -HAVE_RANDOM_H = @HAVE_RANDOM_H@ -HAVE_RANDOM_R = @HAVE_RANDOM_R@ -HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALPATH = @HAVE_REALPATH@ -HAVE_REMAINDER = @HAVE_REMAINDER@ -HAVE_REMAINDERF = @HAVE_REMAINDERF@ -HAVE_RENAMEAT = @HAVE_RENAMEAT@ -HAVE_RINT = @HAVE_RINT@ -HAVE_RINTL = @HAVE_RINTL@ -HAVE_RPMATCH = @HAVE_RPMATCH@ -HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ -HAVE_SCHED_H = @HAVE_SCHED_H@ -HAVE_SETENV = @HAVE_SETENV@ -HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ -HAVE_SIGACTION = @HAVE_SIGACTION@ -HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ -HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ -HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ -HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ -HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ -HAVE_SIGSET_T = @HAVE_SIGSET_T@ -HAVE_SINF = @HAVE_SINF@ -HAVE_SINHF = @HAVE_SINHF@ -HAVE_SINL = @HAVE_SINL@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_SPAWN_H = @HAVE_SPAWN_H@ -HAVE_SQRTF = @HAVE_SQRTF@ -HAVE_SQRTL = @HAVE_SQRTL@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@ -HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TANF = @HAVE_TANF@ -HAVE_TANHF = @HAVE_TANHF@ -HAVE_TANL = @HAVE_TANL@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE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EMSET = @HAVE_WMEMSET@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -HELP2MAN = @HELP2MAN@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -ISNAND_LIBM = @ISNAND_LIBM@ -ISNANF_LIBM = @ISNANF_LIBM@ -ISNANL_LIBM = @ISNANL_LIBM@ -ISNAN_LIBM = @ISNAN_LIBM@ -LDEXPL_LIBM = @LDEXPL_LIBM@ -LDEXP_LIBM = @LDEXP_LIBM@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_IS_FLEX = @LEX_IS_FLEX@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBBISON_LIBDEPS = @LIBBISON_LIBDEPS@ -LIBBISON_LTLIBDEPS = @LIBBISON_LTLIBDEPS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ -LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ -LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -M4 = @M4@ -M4_DEBUGFILE = @M4_DEBUGFILE@ -M4_GNU = @M4_GNU@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ -NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@ -NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ -NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ -NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_ERRNO_H = @NEXT_ERRNO_H@ -NEXT_FCNTL_H = @NEXT_FCNTL_H@ -NEXT_FLOAT_H = @NEXT_FLOAT_H@ -NEXT_GETOPT_H = @NEXT_GETOPT_H@ -NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ -NEXT_MATH_H = @NEXT_MATH_H@ -NEXT_SCHED_H = @NEXT_SCHED_H@ -NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ -NEXT_SPAWN_H = @NEXT_SPAWN_H@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_STRING_H = @NEXT_STRING_H@ -NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ -NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ -NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ -NEXT_TIME_H = @NEXT_TIME_H@ -NEXT_UNISTD_H = @NEXT_UNISTD_H@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_COPYRIGHT_YEAR = @PACKAGE_COPYRIGHT_YEAR@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -POSUB = @POSUB@ -PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ -PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ -PRIPTR_PREFIX = @PRIPTR_PREFIX@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ -PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ -RANLIB = @RANLIB@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CBRTF = @REPLACE_CBRTF@ -REPLACE_CBRTL = @REPLACE_CBRTL@ -REPLACE_CEIL = @REPLACE_CEIL@ -REPLACE_CEILF = @REPLACE_CEILF@ -REPLACE_CEILL = @REPLACE_CEILL@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_EXP2 = @REPLACE_EXP2@ -REPLACE_EXP2L = @REPLACE_EXP2L@ -REPLACE_EXPM1 = @REPLACE_EXPM1@ -REPLACE_EXPM1F = @REPLACE_EXPM1F@ -REPLACE_FABSL = @REPLACE_FABSL@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FLOOR = @REPLACE_FLOOR@ -REPLACE_FLOORF = @REPLACE_FLOORF@ -REPLACE_FLOORL = @REPLACE_FLOORL@ -REPLACE_FMA = @REPLACE_FMA@ -REPLACE_FMAF = @REPLACE_FMAF@ -REPLACE_FMAL = @REPLACE_FMAL@ -REPLACE_FMOD = @REPLACE_FMOD@ -REPLACE_FMODF = @REPLACE_FMODF@ -REPLACE_FMODL = @REPLACE_FMODL@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FREXP = @REPLACE_FREXP@ -REPLACE_FREXPF = @REPLACE_FREXPF@ -REPLACE_FREXPL = @REPLACE_FREXPL@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ -REPLACE_GETLINE = @REPLACE_GETLINE@ -REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ -REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ -REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ -REPLACE_HYPOT = @REPLACE_HYPOT@ -REPLACE_HYPOTF = @REPLACE_HYPOTF@ -REPLACE_HYPOTL = @REPLACE_HYPOTL@ -REPLACE_ILOGB = @REPLACE_ILOGB@ -REPLACE_ILOGBF = @REPLACE_ILOGBF@ -REPLACE_ISATTY = @REPLACE_ISATTY@ -REPLACE_ISFINITE = @REPLACE_ISFINITE@ -REPLACE_ISINF = @REPLACE_ISINF@ -REPLACE_ISNAN = @REPLACE_ISNAN@ -REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ -REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ -REPLACE_ITOLD = @REPLACE_ITOLD@ -REPLACE_LCHOWN = @REPLACE_LCHOWN@ -REPLACE_LDEXPL = @REPLACE_LDEXPL@ -REPLACE_LINK = @REPLACE_LINK@ -REPLACE_LINKAT = @REPLACE_LINKAT@ -REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ -REPLACE_LOG = @REPLACE_LOG@ -REPLACE_LOG10 = @REPLACE_LOG10@ -REPLACE_LOG10F = @REPLACE_LOG10F@ -REPLACE_LOG10L = @REPLACE_LOG10L@ -REPLACE_LOG1P = @REPLACE_LOG1P@ -REPLACE_LOG1PF = @REPLACE_LOG1PF@ -REPLACE_LOG1PL = @REPLACE_LOG1PL@ -REPLACE_LOG2 = @REPLACE_LOG2@ -REPLACE_LOG2F = @REPLACE_LOG2F@ -REPLACE_LOG2L = @REPLACE_LOG2L@ -REPLACE_LOGB = @REPLACE_LOGB@ -REPLACE_LOGBF = @REPLACE_LOGBF@ -REPLACE_LOGBL = @REPLACE_LOGBL@ -REPLACE_LOGF = @REPLACE_LOGF@ -REPLACE_LOGL = @REPLACE_LOGL@ -REPLACE_LSEEK = @REPLACE_LSEEK@ -REPLACE_LSTAT = @REPLACE_LSTAT@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_MODF = @REPLACE_MODF@ -REPLACE_MODFF = @REPLACE_MODFF@ -REPLACE_MODFL = @REPLACE_MODFL@ -REPLACE_NAN = @REPLACE_NAN@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_PERROR = @REPLACE_PERROR@ -REPLACE_POPEN = @REPLACE_POPEN@ -REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@ -REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ -REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ -REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ -REPLACE_PREAD = @REPLACE_PREAD@ -REPLACE_PRINTF = @REPLACE_PRINTF@ -REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ -REPLACE_PTSNAME = @REPLACE_PTSNAME@ -REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ -REPLACE_PUTENV = @REPLACE_PUTENV@ -REPLACE_PWRITE = @REPLACE_PWRITE@ -REPLACE_RAISE = @REPLACE_RAISE@ -REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ -REPLACE_READ = @REPLACE_READ@ -REPLACE_READLINK = @REPLACE_READLINK@ -REPLACE_REALLOC = @REPLACE_REALLOC@ -REPLACE_REALPATH = @REPLACE_REALPATH@ -REPLACE_REMAINDER = @REPLACE_REMAINDER@ -REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ -REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_ROUND = @REPLACE_ROUND@ -REPLACE_ROUNDF = @REPLACE_ROUNDF@ -REPLACE_ROUNDL = @REPLACE_ROUNDL@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ -REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ -REPLACE_SLEEP = @REPLACE_SLEEP@ -REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ -REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_SQRTL = @REPLACE_SQRTL@ -REPLACE_STAT = @REPLACE_STAT@ -REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ -REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ -REPLACE_STPNCPY = @REPLACE_STPNCPY@ -REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ -REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ -REPLACE_STRDUP = @REPLACE_STRDUP@ -REPLACE_STRERROR = @REPLACE_STRERROR@ -REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_SYMLINK = @REPLACE_SYMLINK@ -REPLACE_TIMEGM = @REPLACE_TIMEGM@ -REPLACE_TMPFILE = @REPLACE_TMPFILE@ -REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -REPLACE_TRUNC = @REPLACE_TRUNC@ -REPLACE_TRUNCF = @REPLACE_TRUNCF@ -REPLACE_TRUNCL = @REPLACE_TRUNCL@ -REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -REPLACE_UNLINK = @REPLACE_UNLINK@ -REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SCHED_H = @SCHED_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ -UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ -UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ -UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -USE_NLS = @USE_NLS@ -VALGRIND = @VALGRIND@ -VALGRIND_PREBISON = @VALGRIND_PREBISON@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -WARN_CFLAGS_TEST = @WARN_CFLAGS_TEST@ -WARN_CXXFLAGS = @WARN_CXXFLAGS@ -WARN_CXXFLAGS_TEST = @WARN_CXXFLAGS_TEST@ -WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ -WERROR_CFLAGS = @WERROR_CFLAGS@ -WERROR_CXXFLAGS = @WERROR_CXXFLAGS@ -WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ -WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -WINT_T_SUFFIX = @WINT_T_SUFFIX@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XSLTPROC = @XSLTPROC@ -YACC = @YACC@ -YACC_LIBRARY = @YACC_LIBRARY@ -YACC_SCRIPT = @YACC_SCRIPT@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -aclocaldir = @aclocaldir@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -dist_pkgdata_DATA = README bison.m4 \ - c-like.m4 \ - c-skel.m4 c.m4 yacc.c glr.c \ - c++-skel.m4 c++.m4 location.cc lalr1.cc glr.cc stack.hh \ - java-skel.m4 java.m4 lalr1.java - -m4sugardir = $(pkgdatadir)/m4sugar -dist_m4sugar_DATA = m4sugar/m4sugar.m4 m4sugar/foreach.m4 -xsltdir = $(pkgdatadir)/xslt -dist_xslt_DATA = \ - xslt/bison.xsl \ - xslt/xml2dot.xsl \ - xslt/xml2text.xsl \ - xslt/xml2xhtml.xsl - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits data/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnits data/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-dist_m4sugarDATA: $(dist_m4sugar_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_m4sugar_DATA)'; test -n "$(m4sugardir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(m4sugardir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(m4sugardir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4sugardir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(m4sugardir)" || exit $$?; \ - done - -uninstall-dist_m4sugarDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_m4sugar_DATA)'; test -n "$(m4sugardir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(m4sugardir)'; $(am__uninstall_files_from_dir) -install-dist_pkgdataDATA: $(dist_pkgdata_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ - done - -uninstall-dist_pkgdataDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) -install-dist_xsltDATA: $(dist_xslt_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_xslt_DATA)'; test -n "$(xsltdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(xsltdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(xsltdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xsltdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(xsltdir)" || exit $$?; \ - done - -uninstall-dist_xsltDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_xslt_DATA)'; test -n "$(xsltdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(xsltdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(m4sugardir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(xsltdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_m4sugarDATA install-dist_pkgdataDATA \ - install-dist_xsltDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-dist_m4sugarDATA uninstall-dist_pkgdataDATA \ - uninstall-dist_xsltDATA - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dist_m4sugarDATA install-dist_pkgdataDATA \ - install-dist_xsltDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am \ - uninstall-dist_m4sugarDATA uninstall-dist_pkgdataDATA \ - uninstall-dist_xsltDATA - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tools/data/README b/tools/data/README deleted file mode 100644 index d88e5aa9..00000000 --- a/tools/data/README +++ /dev/null @@ -1,70 +0,0 @@ --*- outline -*- - -This directory contains data needed by Bison. - -* Skeletons -Bison skeletons: the general shapes of the different parser kinds, -that are specialized for specific grammars by the bison program. - -Currently, the supported skeletons are: - -- yacc.c - It used to be named bison.simple: it corresponds to C Yacc - compatible LALR(1) parsers. - -- lalr1.cc - Produces a C++ parser class. - -- lalr1.java - Produces a Java parser class. - -- glr.c - A Generalized LR C parser based on Bison's LALR(1) tables. - -- glr.cc - A Generalized LR C++ parser. Actually a C++ wrapper around glr.c. - -These skeletons are the only ones supported by the Bison team. -Because the interface between skeletons and the bison program is not -finished, *we are not bound to it*. In particular, Bison is not -mature enough for us to consider that ``foreign skeletons'' are -supported. - -* m4sugar -This directory contains M4sugar, sort of an extended library for M4, -which is used by Bison to instantiate the skeletons. - -* xslt -This directory contains XSLT programs that transform Bison's XML output -into various formats. - -- bison.xsl - A library of routines used by the other XSLT programs. - -- xml2dot.xsl - Conversion into GraphViz's dot format. - -- xml2text.xsl - Conversion into text. - -- xml2xhtml.xsl - Conversion into XHTML. - ------ - -Copyright (C) 2002, 2008-2012 Free Software Foundation, Inc. - -This file is part of GNU Bison. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . diff --git a/tools/data/bison.m4 b/tools/data/bison.m4 deleted file mode 100644 index 102d5fbd..00000000 --- a/tools/data/bison.m4 +++ /dev/null @@ -1,610 +0,0 @@ - -*- Autoconf -*- - -# Language-independent M4 Macros for Bison. - -# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -## ---------------- ## -## Identification. ## -## ---------------- ## - -# b4_copyright(TITLE, YEARS) -# -------------------------- -m4_define([b4_copyright], -[b4_comment([A Bison parser, made by GNU Bison b4_version.]) - -b4_comment([$1 - -m4_text_wrap([Copyright (C) $2 Free Software Foundation, Inc.], [ ]) - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see .]) - -b4_comment([As a special exception, you may create a larger work that contains -part or all of the Bison parser skeleton and distribute that work -under terms of your choice, so long as that work isn't itself a -parser generator using the skeleton or a modified version thereof -as a parser skeleton. Alternatively, if you modify or redistribute -the parser skeleton itself, you may (at your option) remove this -special exception, which will cause the skeleton and the resulting -Bison output files to be licensed under the GNU General Public -License without this special exception. - -This special exception was added by the Free Software Foundation in -version 2.2 of Bison.])]) - - -## -------- ## -## Output. ## -## -------- ## - -# b4_output_begin(FILE) -# --------------------- -# Enable output, i.e., send to diversion 0, expand after "#", and -# generate the tag to output into FILE. Must be followed by EOL. -m4_define([b4_output_begin], -[m4_changecom() -m4_divert_push(0)dnl -@output(m4_unquote([$1])@)@dnl -]) - - -# b4_output_end() -# --------------- -# Output nothing, restore # as comment character (no expansions after #). -m4_define([b4_output_end], -[m4_divert_pop(0) -m4_changecom([#]) -]) - - -## ---------------- ## -## Error handling. ## -## ---------------- ## - -# The following error handling macros print error directives that should not -# become arguments of other macro invocations since they would likely then be -# mangled. Thus, they print to stdout directly. - -# b4_cat(TEXT) -# ------------ -# Write TEXT to stdout. Precede the final newline with an @ so that it's -# escaped. For example: -# -# b4_cat([[@complain(invalid input@)]]) -m4_define([b4_cat], -[m4_syscmd([cat <<'_m4eof' -]m4_bpatsubst(m4_dquote($1), [_m4eof], [_m4@`eof])[@ -_m4eof -])dnl -m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write to stdout])])]) - -# b4_error(KIND, FORMAT, [ARG1], [ARG2], ...) -# ------------------------------------------- -# Write @KIND(FORMAT@,ARG1@,ARG2@,...@) to stdout. -# -# For example: -# -# b4_error([[warn]], [[invalid value for '%s': %s]], [[foo]], [[3]]) -m4_define([b4_error], -[b4_cat([[@]$1[(]$2[]]dnl -[m4_if([$#], [2], [], - [m4_foreach([b4_arg], - m4_dquote(m4_shift(m4_shift($@))), - [[@,]b4_arg])])[@)]])]) - -# b4_error_at(KIND, START, END, FORMAT, [ARG1], [ARG2], ...) -# ---------------------------------------------------------- -# Write @KIND_at(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout. -# -# For example: -# -# b4_error_at([[complain]], [[input.y:2.3]], [[input.y:5.4]], -# [[invalid %s]], [[foo]]) -m4_define([b4_error_at], -[b4_cat([[@]$1[_at(]$2[@,]$3[@,]$4[]]dnl -[m4_if([$#], [4], [], - [m4_foreach([b4_arg], - m4_dquote(m4_shift(m4_shift(m4_shift(m4_shift($@))))), - [[@,]b4_arg])])[@)]])]) - -# b4_warn(FORMAT, [ARG1], [ARG2], ...) -# ------------------------------------ -# Write @warn(FORMAT@,ARG1@,ARG2@,...@) to stdout. -# -# For example: -# -# b4_warn([[invalid value for '%s': %s]], [[foo]], [[3]]) -# -# As a simple test suite, this: -# -# m4_divert(-1) -# m4_define([asdf], [ASDF]) -# m4_define([fsa], [FSA]) -# m4_define([fdsa], [FDSA]) -# b4_warn([[[asdf), asdf]]], [[[fsa), fsa]]], [[[fdsa), fdsa]]]) -# b4_warn([[asdf), asdf]], [[fsa), fsa]], [[fdsa), fdsa]]) -# b4_warn() -# b4_warn(1) -# b4_warn(1, 2) -# -# Should produce this without newlines: -# -# @warn([asdf), asdf]@,[fsa), fsa]@,[fdsa), fdsa]@) -# @warn(asdf), asdf@,fsa), fsa@,fdsa), fdsa@) -# @warn(@) -# @warn(1@) -# @warn(1@,2@) -m4_define([b4_warn], -[b4_error([[warn]], $@)]) - -# b4_warn_at(START, END, FORMAT, [ARG1], [ARG2], ...) -# --------------------------------------------------- -# Write @warn(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout. -# -# For example: -# -# b4_warn_at([[input.y:2.3]], [[input.y:5.4]], [[invalid %s]], [[foo]]) -m4_define([b4_warn_at], -[b4_error_at([[warn]], $@)]) - -# b4_complain(FORMAT, [ARG1], [ARG2], ...) -# ---------------------------------------- -# Write @complain(FORMAT@,ARG1@,ARG2@,...@) to stdout. -# -# See b4_warn example. -m4_define([b4_complain], -[b4_error([[complain]], $@)]) - -# b4_complain_at(START, END, FORMAT, [ARG1], [ARG2], ...) -# ------------------------------------------------------- -# Write @complain(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout. -# -# See b4_warn_at example. -m4_define([b4_complain_at], -[b4_error_at([[complain]], $@)]) - -# b4_fatal(FORMAT, [ARG1], [ARG2], ...) -# ------------------------------------- -# Write @fatal(FORMAT@,ARG1@,ARG2@,...@) to stdout and exit. -# -# See b4_warn example. -m4_define([b4_fatal], -[b4_error([[fatal]], $@)dnl -m4_exit(1)]) - -# b4_fatal_at(START, END, FORMAT, [ARG1], [ARG2], ...) -# ---------------------------------------------------- -# Write @fatal(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout and exit. -# -# See b4_warn_at example. -m4_define([b4_fatal_at], -[b4_error_at([[fatal]], $@)dnl -m4_exit(1)]) - - -## ------------ ## -## Data Types. ## -## ------------ ## - -# b4_ints_in(INT1, INT2, LOW, HIGH) -# --------------------------------- -# Return 1 iff both INT1 and INT2 are in [LOW, HIGH], 0 otherwise. -m4_define([b4_ints_in], -[m4_eval([$3 <= $1 && $1 <= $4 && $3 <= $2 && $2 <= $4])]) - - - -## ------------------ ## -## Decoding options. ## -## ------------------ ## - -# b4_flag_if(FLAG, IF-TRUE, IF-FALSE) -# ----------------------------------- -# Run IF-TRUE if b4_FLAG_flag is 1, IF-FALSE if FLAG is 0, otherwise fail. -m4_define([b4_flag_if], -[m4_case(b4_$1_flag, - [0], [$3], - [1], [$2], - [m4_fatal([invalid $1 value: ]$1)])]) - - -# b4_define_flag_if(FLAG) -# ----------------------- -# Define "b4_FLAG_if(IF-TRUE, IF-FALSE)" that depends on the -# value of the Boolean FLAG. -m4_define([b4_define_flag_if], -[_b4_define_flag_if($[1], $[2], [$1])]) - -# _b4_define_flag_if($1, $2, FLAG) -# -------------------------------- -# Work around the impossibility to define macros inside macros, -# because issuing `[$1]' is not possible in M4. GNU M4 should provide -# $$1 a la M5/TeX. -m4_define([_b4_define_flag_if], -[m4_if([$1$2], $[1]$[2], [], - [m4_fatal([$0: Invalid arguments: $@])])dnl -m4_define([b4_$3_if], - [b4_flag_if([$3], [$1], [$2])])]) - - -# b4_FLAG_if(IF-TRUE, IF-FALSE) -# ----------------------------- -# Expand IF-TRUE, if FLAG is true, IF-FALSE otherwise. -b4_define_flag_if([defines]) # Whether headers are requested. -b4_define_flag_if([error_verbose]) # Whether error are verbose. -b4_define_flag_if([glr]) # Whether a GLR parser is requested. -b4_define_flag_if([locations]) # Whether locations are tracked. -b4_define_flag_if([nondeterministic]) # Whether conflicts should be handled. -b4_define_flag_if([token_table]) # Whether yytoken_table is demanded. -b4_define_flag_if([yacc]) # Whether POSIX Yacc is emulated. - -# yytoken_table is needed to support verbose errors. -b4_error_verbose_if([m4_define([b4_token_table_flag], [1])]) - - - -## ----------- ## -## Synclines. ## -## ----------- ## - -# b4_basename(NAME) -# ----------------- -# Similar to POSIX basename; the differences don't matter here. -# Beware that NAME is not evaluated. -m4_define([b4_basename], -[m4_bpatsubst([$1], [^.*/\([^/]+\)/*$], [\1])]) - - -# b4_syncline(LINE, FILE) -# ----------------------- -m4_define([b4_syncline], -[b4_flag_if([synclines], -[b4_sync_end([__line__], [b4_basename(m4_quote(__file__))]) -b4_sync_start([$1], [$2])])]) - -m4_define([b4_sync_end], [b4_comment([Line $1 of $2])]) -m4_define([b4_sync_start], [b4_comment([Line $1 of $2])]) - -# b4_user_code(USER-CODE) -# ----------------------- -# Emit code from the user, ending it with synclines. -m4_define([b4_user_code], -[$1 -b4_syncline([@oline@], [@ofile@])]) - - -# b4_define_user_code(MACRO) -# -------------------------- -# From b4_MACRO, build b4_user_MACRO that includes the synclines. -m4_define([b4_define_user_code], -[m4_define([b4_user_$1], -[b4_user_code([b4_$1])])]) - - -# b4_user_actions -# b4_user_initial_action -# b4_user_post_prologue -# b4_user_pre_prologue -# b4_user_stype -# ---------------------- -# Macros that issue user code, ending with synclines. -b4_define_user_code([actions]) -b4_define_user_code([initial_action]) -b4_define_user_code([post_prologue]) -b4_define_user_code([pre_prologue]) -b4_define_user_code([stype]) - - -# b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE) -# ----------------------------------------------------- -# Complain if any name of type WHAT is used by the user (as recorded in -# USER-LIST) but is not used by Bison (as recorded by macros in the -# namespace BISON-NAMESPACE). -# -# USER-LIST must expand to a list specifying all user occurrences of all names -# of type WHAT. Each item in the list must be a triplet specifying one -# occurrence: name, start boundary, and end boundary. Empty string names are -# fine. An empty list is fine. -# -# For example, to define b4_foo_user_names to be used for USER-LIST with three -# name occurrences and with correct quoting: -# -# m4_define([b4_foo_user_names], -# [[[[[[bar]], [[parser.y:1.7]], [[parser.y:1.16]]]], -# [[[[bar]], [[parser.y:5.7]], [[parser.y:5.16]]]], -# [[[[baz]], [[parser.y:8.7]], [[parser.y:8.16]]]]]]) -# -# The macro BISON-NAMESPACE(bar) must be defined iff the name bar of type WHAT -# is used by Bison (in the front-end or in the skeleton). Empty string names -# are fine, but it would be ugly for Bison to actually use one. -# -# For example, to use b4_foo_bison_names for BISON-NAMESPACE and define that -# the names bar and baz are used by Bison: -# -# m4_define([b4_foo_bison_names(bar)]) -# m4_define([b4_foo_bison_names(baz)]) -# -# To invoke b4_check_user_names with TYPE foo, with USER-LIST -# b4_foo_user_names, with BISON-NAMESPACE b4_foo_bison_names, and with correct -# quoting: -# -# b4_check_user_names([[foo]], [b4_foo_user_names], -# [[b4_foo_bison_names]]) -m4_define([b4_check_user_names], -[m4_foreach([b4_occurrence], $2, -[m4_pushdef([b4_occurrence], b4_occurrence)dnl -m4_pushdef([b4_user_name], m4_car(b4_occurrence))dnl -m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl -m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl -m4_ifndef($3[(]m4_quote(b4_user_name)[)], - [b4_complain_at([b4_start], [b4_end], - [[%s '%s' is not used]], - [$1], [b4_user_name])])[]dnl -m4_popdef([b4_occurrence])dnl -m4_popdef([b4_user_name])dnl -m4_popdef([b4_start])dnl -m4_popdef([b4_end])dnl -])]) - - - - -## --------------------- ## -## b4_percent_define_*. ## -## --------------------- ## - - -# b4_percent_define_use(VARIABLE) -# ------------------------------- -# Declare that VARIABLE was used. -m4_define([b4_percent_define_use], -[m4_define([b4_percent_define_bison_variables(]$1[)])dnl -]) - -# b4_percent_define_get(VARIABLE, [DEFAULT]) -# ------------------------------------------ -# Mimic muscle_percent_define_get in ../src/muscle-tab.h. That is, if -# the %define variable VARIABLE is defined, emit its value. Contrary -# to its C counterpart, return DEFAULT otherwise. Also, record -# Bison's usage of VARIABLE by defining -# b4_percent_define_bison_variables(VARIABLE). -# -# For example: -# -# b4_percent_define_get([[foo]]) -m4_define([b4_percent_define_get], -[b4_percent_define_use([$1])dnl -m4_ifdef([b4_percent_define(]$1[)], - [m4_indir([b4_percent_define(]$1[)])], - [$2])]) - - -# b4_percent_define_get_loc(VARIABLE) -# ----------------------------------- -# Mimic muscle_percent_define_get_loc in ../src/muscle-tab.h exactly. That is, -# if the %define variable VARIABLE is undefined, complain fatally since that's -# a Bison or skeleton error. Otherwise, return its definition location in a -# form approriate for the first two arguments of b4_warn_at, b4_complain_at, or -# b4_fatal_at. Don't record this as a Bison usage of VARIABLE as there's no -# reason to suspect that the user-supplied value has yet influenced the output. -# -# For example: -# -# b4_complain_at(b4_percent_define_get_loc([[foo]]), [[invalid foo]]) -m4_define([b4_percent_define_get_loc], -[m4_ifdef([b4_percent_define_loc(]$1[)], - [m4_pushdef([b4_loc], m4_indir([b4_percent_define_loc(]$1[)]))dnl -b4_loc[]dnl -m4_popdef([b4_loc])], - [b4_fatal([[b4_percent_define_get_loc: undefined %%define variable '%s']], [$1])])]) - -# b4_percent_define_get_syncline(VARIABLE) -# ---------------------------------------- -# Mimic muscle_percent_define_get_syncline in ../src/muscle-tab.h exactly. -# That is, if the %define variable VARIABLE is undefined, complain fatally -# since that's a Bison or skeleton error. Otherwise, return its definition -# location as a b4_syncline invocation. Don't record this as a Bison usage of -# VARIABLE as there's no reason to suspect that the user-supplied value has yet -# influenced the output. -# -# For example: -# -# b4_percent_define_get_syncline([[foo]]) -m4_define([b4_percent_define_get_syncline], -[m4_ifdef([b4_percent_define_syncline(]$1[)], - [m4_indir([b4_percent_define_syncline(]$1[)])], - [b4_fatal([[b4_percent_define_get_syncline: undefined %%define variable '%s']], [$1])])]) - -# b4_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE]) -# ------------------------------------------------------ -# Mimic muscle_percent_define_ifdef in ../src/muscle-tab.h exactly. That is, -# if the %define variable VARIABLE is defined, expand IF-TRUE, else expand -# IF-FALSE. Also, record Bison's usage of VARIABLE by defining -# b4_percent_define_bison_variables(VARIABLE). -# -# For example: -# -# b4_percent_define_ifdef([[foo]], [[it's defined]], [[it's undefined]]) -m4_define([b4_percent_define_ifdef], -[m4_ifdef([b4_percent_define(]$1[)], - [m4_define([b4_percent_define_bison_variables(]$1[)])$2], - [$3])]) - -# b4_percent_define_flag_if(VARIABLE, IF-TRUE, [IF-FALSE]) -# -------------------------------------------------------- -# Mimic muscle_percent_define_flag_if in ../src/muscle-tab.h exactly. That is, -# if the %define variable VARIABLE is defined to "" or "true", expand IF-TRUE. -# If it is defined to "false", expand IF-FALSE. Complain if it is undefined -# (a Bison or skeleton error since the default value should have been set -# already) or defined to any other value (possibly a user error). Also, record -# Bison's usage of VARIABLE by defining -# b4_percent_define_bison_variables(VARIABLE). -# -# For example: -# -# b4_percent_define_flag_if([[foo]], [[it's true]], [[it's false]]) -m4_define([b4_percent_define_flag_if], -[b4_percent_define_ifdef([$1], - [m4_case(b4_percent_define_get([$1]), - [], [$2], [true], [$2], [false], [$3], - [m4_expand_once([b4_complain_at(b4_percent_define_get_loc([$1]), - [[invalid value for %%define Boolean variable '%s']], - [$1])], - [[b4_percent_define_flag_if($1)]])])], - [b4_fatal([[b4_percent_define_flag_if: undefined %%define variable '%s']], [$1])])]) - -# b4_percent_define_default(VARIABLE, DEFAULT) -# -------------------------------------------- -# Mimic muscle_percent_define_default in ../src/muscle-tab.h exactly. That is, -# if the %define variable VARIABLE is undefined, set its value to DEFAULT. -# Don't record this as a Bison usage of VARIABLE as there's no reason to -# suspect that the value has yet influenced the output. -# -# For example: -# -# b4_percent_define_default([[foo]], [[default value]]) -m4_define([b4_percent_define_default], -[m4_ifndef([b4_percent_define(]$1[)], - [m4_define([b4_percent_define(]$1[)], [$2])dnl - m4_define([b4_percent_define_loc(]$1[)], - [[[[:-1.-1]], - [[:-1.-1]]]])dnl - m4_define([b4_percent_define_syncline(]$1[)], [[]])])]) - -# b4_percent_define_check_values(VALUES) -# -------------------------------------- -# Mimic muscle_percent_define_check_values in ../src/muscle-tab.h exactly -# except that the VALUES structure is more appropriate for M4. That is, VALUES -# is a list of sublists of strings. For each sublist, the first string is the -# name of a %define variable, and all remaining strings in that sublist are the -# valid values for that variable. Complain if such a variable is undefined (a -# Bison error since the default value should have been set already) or defined -# to any other value (possibly a user error). Don't record this as a Bison -# usage of the variable as there's no reason to suspect that the value has yet -# influenced the output. -# -# For example: -# -# b4_percent_define_check_values([[[[foo]], [[foo-value1]], [[foo-value2]]]], -# [[[[bar]], [[bar-value1]]]]) -m4_define([b4_percent_define_check_values], -[m4_foreach([b4_sublist], m4_quote($@), - [_b4_percent_define_check_values(b4_sublist)])]) - -m4_define([_b4_percent_define_check_values], -[m4_ifdef([b4_percent_define(]$1[)], - [m4_pushdef([b4_good_value], [0])dnl - m4_if($#, 1, [], - [m4_foreach([b4_value], m4_dquote(m4_shift($@)), - [m4_if(m4_indir([b4_percent_define(]$1[)]), b4_value, - [m4_define([b4_good_value], [1])])])])dnl - m4_if(b4_good_value, [0], - [b4_complain_at(b4_percent_define_get_loc([$1]), - [[invalid value for %%define variable '%s': '%s']], - [$1], - m4_dquote(m4_indir([b4_percent_define(]$1[)]))) - m4_foreach([b4_value], m4_dquote(m4_shift($@)), - [b4_complain_at(b4_percent_define_get_loc([$1]), - [[accepted value: '%s']], - m4_dquote(b4_value))])])dnl - m4_popdef([b4_good_value])], - [b4_fatal([[b4_percent_define_check_values: undefined %%define variable '%s']], [$1])])]) - -# b4_percent_code_get([QUALIFIER]) -# -------------------------------- -# If any %code blocks for QUALIFIER are defined, emit them beginning with a -# comment and ending with synclines and a newline. If QUALIFIER is not -# specified or empty, do this for the unqualified %code blocks. Also, record -# Bison's usage of QUALIFIER (if specified) by defining -# b4_percent_code_bison_qualifiers(QUALIFIER). -# -# For example, to emit any unqualified %code blocks followed by any %code -# blocks for the qualifier foo: -# -# b4_percent_code_get -# b4_percent_code_get([[foo]]) -m4_define([b4_percent_code_get], -[m4_pushdef([b4_macro_name], [[b4_percent_code(]$1[)]])dnl -m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])dnl -m4_ifdef(b4_macro_name, -[b4_comment([m4_if([$#], [0], [[Unqualified %code]], - [["%code ]$1["]])[ blocks.]]) -b4_user_code([m4_indir(b4_macro_name)]) -])dnl -m4_popdef([b4_macro_name])]) - -# b4_percent_code_ifdef(QUALIFIER, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------- -# If any %code blocks for QUALIFIER (or unqualified %code blocks if -# QUALIFIER is empty) are defined, expand IF-TRUE, else expand IF-FALSE. -# Also, record Bison's usage of QUALIFIER (if specified) by defining -# b4_percent_code_bison_qualifiers(QUALIFIER). -m4_define([b4_percent_code_ifdef], -[m4_ifdef([b4_percent_code(]$1[)], - [m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])$2], - [$3])]) - - -## ----------------------------------------------------------- ## -## After processing the skeletons, check that all the user's ## -## %define variables and %code qualifiers were used by Bison. ## -## ----------------------------------------------------------- ## - -m4_define([b4_check_user_names_wrap], -[m4_ifdef([b4_percent_]$1[_user_]$2[s], - [b4_check_user_names([[%]$1 $2], - [b4_percent_]$1[_user_]$2[s], - [[b4_percent_]$1[_bison_]$2[s]])])]) - -m4_wrap_lifo([ -b4_check_user_names_wrap([[define]], [[variable]]) -b4_check_user_names_wrap([[code]], [[qualifier]]) -]) - - -## ---------------- ## -## Default values. ## -## ---------------- ## - -# m4_define_default([b4_lex_param], []) dnl breaks other skeletons -m4_define_default([b4_pre_prologue], []) -m4_define_default([b4_post_prologue], []) -m4_define_default([b4_epilogue], []) -m4_define_default([b4_parse_param], []) - -# The initial column and line. -m4_define_default([b4_location_initial_column], [1]) -m4_define_default([b4_location_initial_line], [1]) - -# Sanity checks. -b4_percent_define_ifdef([api.prefix], -[m4_ifdef([b4_prefix], -[b4_complain_at(b4_percent_define_get_loc([api.prefix]), - [['%s' and '%s' cannot be used together]], - [%name-prefix], - [%define api.prefix])])]) diff --git a/tools/data/c++-skel.m4 b/tools/data/c++-skel.m4 deleted file mode 100644 index 149e4300..00000000 --- a/tools/data/c++-skel.m4 +++ /dev/null @@ -1,26 +0,0 @@ - -*- Autoconf -*- - -# C++ skeleton dispatching for Bison. - -# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -b4_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])]) -b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])]) - -m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.cc]]) -m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) - -m4_include(b4_used_skeleton) diff --git a/tools/data/c++.m4 b/tools/data/c++.m4 deleted file mode 100644 index eac88a78..00000000 --- a/tools/data/c++.m4 +++ /dev/null @@ -1,205 +0,0 @@ - -*- Autoconf -*- - -# C++ skeleton for Bison - -# Copyright (C) 2002-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -m4_include(b4_pkgdatadir/[c.m4]) - -## ---------------- ## -## Default values. ## -## ---------------- ## - -# Default parser class name. -b4_percent_define_default([[parser_class_name]], [[parser]]) - -# Don't do that so that we remember whether we're using a user -# request, or the default value. -# -# b4_percent_define_default([[api.location.type]], [[location]]) - -b4_percent_define_default([[filename_type]], [[std::string]]) -b4_percent_define_default([[namespace]], m4_defn([b4_prefix])) -b4_percent_define_default([[global_tokens_and_yystype]], [[false]]) -b4_percent_define_default([[define_location_comparison]], - [m4_if(b4_percent_define_get([[filename_type]]), - [std::string], [[true]], [[false]])]) - - -## ----------- ## -## Namespace. ## -## ----------- ## - -m4_define([b4_namespace_ref], [b4_percent_define_get([[namespace]])]) - -# Don't permit an empty b4_namespace_ref. Any `::parser::foo' appended to it -# would compile as an absolute reference with `parser' in the global namespace. -# b4_namespace_open would open an anonymous namespace and thus establish -# internal linkage. This would compile. However, it's cryptic, and internal -# linkage for the parser would be specified in all translation units that -# include the header, which is always generated. If we ever need to permit -# internal linkage somehow, surely we can find a cleaner approach. -m4_if(m4_bregexp(b4_namespace_ref, [^[ ]*$]), [-1], [], -[b4_complain_at(b4_percent_define_get_loc([[namespace]]), - [[namespace reference is empty]])]) - -# Instead of assuming the C++ compiler will do it, Bison should reject any -# invalid b4_namepsace_ref that would be converted to a valid -# b4_namespace_open. The problem is that Bison doesn't always output -# b4_namespace_ref to uncommented code but should reserve the ability to do so -# in future releases without risking breaking any existing user grammars. -# Specifically, don't allow empty names as b4_namespace_open would just convert -# those into anonymous namespaces, and that might tempt some users. -m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*::]), [-1], [], -[b4_complain_at(b4_percent_define_get_loc([[namespace]]), - [[namespace reference has consecutive "::"]])]) -m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*$]), [-1], [], -[b4_complain_at(b4_percent_define_get_loc([[namespace]]), - [[namespace reference has a trailing "::"]])]) - -m4_define([b4_namespace_open], -[b4_user_code([b4_percent_define_get_syncline([[namespace]]) -[namespace ]m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref), - [^\(.\)[ ]*::], [\1])), - [::], [ { namespace ])[ {]])]) - -m4_define([b4_namespace_close], -[b4_user_code([b4_percent_define_get_syncline([[namespace]]) -m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]), - [^\(.\)[ ]*\(::\)?\([^][:]\|:[^:]\)*], - [\1])), - [::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])]) - - -# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) -# ----------------------------------------------------- -# Output the definition of the tokens as enums. -m4_define([b4_token_enums], -[/* Tokens. */ - enum yytokentype { -m4_map_sep([ b4_token_enum], [, -], - [$@]) - }; -]) - - - - -## ----------------- ## -## Semantic Values. ## -## ----------------- ## - - -# b4_lhs_value([TYPE]) -# -------------------- -# Expansion of $$. -m4_define([b4_lhs_value], -[(yyval[]m4_ifval([$1], [.$1]))]) - - -# b4_rhs_value(RULE-LENGTH, NUM, [TYPE]) -# -------------------------------------- -# Expansion of $NUM, where the current rule has RULE-LENGTH -# symbols on RHS. -m4_define([b4_rhs_value], -[(yysemantic_stack_@{($1) - ($2)@}m4_ifval([$3], [.$3]))]) - -# b4_lhs_location() -# ----------------- -# Expansion of @$. -m4_define([b4_lhs_location], -[(yyloc)]) - - -# b4_rhs_location(RULE-LENGTH, NUM) -# --------------------------------- -# Expansion of @NUM, where the current rule has RULE-LENGTH symbols -# on RHS. -m4_define([b4_rhs_location], -[(yylocation_stack_@{($1) - ($2)@})]) - - -# b4_parse_param_decl -# ------------------- -# Extra formal arguments of the constructor. -# Change the parameter names from "foo" into "foo_yyarg", so that -# there is no collision bw the user chosen attribute name, and the -# argument name in the constructor. -m4_define([b4_parse_param_decl], -[m4_ifset([b4_parse_param], - [m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])]) - -m4_define([b4_parse_param_decl_1], -[$1_yyarg]) - - - -# b4_parse_param_cons -# ------------------- -# Extra initialisations of the constructor. -m4_define([b4_parse_param_cons], - [m4_ifset([b4_parse_param], - [ - b4_cc_constructor_calls(b4_parse_param)])]) -m4_define([b4_cc_constructor_calls], - [m4_map_sep([b4_cc_constructor_call], [, - ], [$@])]) -m4_define([b4_cc_constructor_call], - [$2 ($2_yyarg)]) - -# b4_parse_param_vars -# ------------------- -# Extra instance variables. -m4_define([b4_parse_param_vars], - [m4_ifset([b4_parse_param], - [ - /* User arguments. */ -b4_cc_var_decls(b4_parse_param)])]) -m4_define([b4_cc_var_decls], - [m4_map_sep([b4_cc_var_decl], [ -], [$@])]) -m4_define([b4_cc_var_decl], - [ $1;]) - - -## ---------## -## Values. ## -## ---------## - -# b4_yylloc_default_define -# ------------------------ -# Define YYLLOC_DEFAULT. -m4_define([b4_yylloc_default_define], -[[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -# ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).begin = YYRHSLOC (Rhs, 1).begin; \ - (Current).end = YYRHSLOC (Rhs, N).end; \ - } \ - else \ - { \ - (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ - } \ - while (/*CONSTCOND*/ false) -# endif -]]) diff --git a/tools/data/c-like.m4 b/tools/data/c-like.m4 deleted file mode 100644 index 5b96fbaf..00000000 --- a/tools/data/c-like.m4 +++ /dev/null @@ -1,44 +0,0 @@ - -*- Autoconf -*- - -# Common code for C-like languages (C, C++, Java, etc.) - -# Copyright (C) 2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# b4_dollar_dollar_(VALUE, FIELD, DEFAULT-FIELD) -# ---------------------------------------------- -# If FIELD (or DEFAULT-FIELD) is non-null, return "VALUE.FIELD", -# otherwise just VALUE. Be sure to pass "(VALUE)" is VALUE is a -# pointer. -m4_define([b4_dollar_dollar_], -[m4_if([$2], [[]], - [m4_ifval([$3], [($1.$3)], - [$1])], - [($1.$2)])]) - -# b4_dollar_pushdef(VALUE-POINTER, DEFAULT-FIELD, LOCATION) -# b4_dollar_popdef -# --------------------------------------------------------- -# Define b4_dollar_dollar for VALUE and DEFAULT-FIELD, -# and b4_at_dollar for LOCATION. -m4_define([b4_dollar_pushdef], -[m4_pushdef([b4_dollar_dollar], - [b4_dollar_dollar_([$1], m4_dquote($][1), [$2])])dnl -m4_pushdef([b4_at_dollar], [$3])dnl -]) -m4_define([b4_dollar_popdef], -[m4_popdef([b4_at_dollar])dnl -m4_popdef([b4_dollar_dollar])dnl -]) diff --git a/tools/data/c-skel.m4 b/tools/data/c-skel.m4 deleted file mode 100644 index ccd4ae16..00000000 --- a/tools/data/c-skel.m4 +++ /dev/null @@ -1,26 +0,0 @@ - -*- Autoconf -*- - -# C skeleton dispatching for Bison. - -# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -b4_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])]) -b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])]) - -m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[yacc.c]]) -m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) - -m4_include(b4_used_skeleton) diff --git a/tools/data/c.m4 b/tools/data/c.m4 deleted file mode 100644 index b6646062..00000000 --- a/tools/data/c.m4 +++ /dev/null @@ -1,722 +0,0 @@ - -*- Autoconf -*- - -# C M4 Macros for Bison. - -# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -m4_include(b4_pkgdatadir/[c-like.m4]) - -# b4_tocpp(STRING) -# ---------------- -# Convert STRING into a valid C macro name. -m4_define([b4_tocpp], -[m4_toupper(m4_bpatsubst(m4_quote($1), [[^a-zA-Z0-9]+], [_]))]) - - -# b4_cpp_guard(FILE) -# ------------------ -# A valid C macro name to use as a CPP header guard for FILE. -m4_define([b4_cpp_guard], -[[YY_]b4_tocpp(m4_defn([b4_prefix])/[$1])[_INCLUDED]]) - - -# b4_cpp_guard_open(FILE) -# b4_cpp_guard_close(FILE) -# ------------------------ -# If FILE does not expand to nothing, open/close CPP inclusion guards for FILE. -m4_define([b4_cpp_guard_open], -[m4_ifval(m4_quote($1), -[#ifndef b4_cpp_guard([$1]) -# define b4_cpp_guard([$1])])]) - -m4_define([b4_cpp_guard_close], -[m4_ifval(m4_quote($1), -[#endif b4_comment([!b4_cpp_guard([$1])])])]) - - -## ---------------- ## -## Identification. ## -## ---------------- ## - -# b4_comment(TEXT) -# ---------------- -m4_define([b4_comment], [/* m4_bpatsubst([$1], [ -], [ - ]) */]) - -# b4_identification -# ----------------- -# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or -# b4_pull_flag if they use the values of the %define variables api.pure or -# api.push-pull. -m4_define([b4_identification], -[[/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "]b4_version[" - -/* Skeleton name. */ -#define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[ - -/* Pure parsers. */ -#define YYPURE ]b4_pure_flag])[]m4_ifdef([b4_push_flag], [[ - -/* Push parsers. */ -#define YYPUSH ]b4_push_flag])[]m4_ifdef([b4_pull_flag], [[ - -/* Pull parsers. */ -#define YYPULL ]b4_pull_flag])[ -]]) - - -## ---------------- ## -## Default values. ## -## ---------------- ## - -# b4_api_prefix, b4_api_PREFIX -# ---------------------------- -# Corresponds to %define api.prefix -b4_percent_define_default([[api.prefix]], [[yy]]) -m4_define([b4_api_prefix], -[b4_percent_define_get([[api.prefix]])]) -m4_define([b4_api_PREFIX], -[m4_toupper(b4_api_prefix)]) - - -# b4_prefix -# --------- -# If the %name-prefix is not given, it is api.prefix. -m4_define_default([b4_prefix], [b4_api_prefix]) - -# If the %union is not named, its name is YYSTYPE. -m4_define_default([b4_union_name], [b4_api_PREFIX[]STYPE]) - - -## ------------------------ ## -## Pure/impure interfaces. ## -## ------------------------ ## - -# b4_user_args -# ------------ -m4_define([b4_user_args], -[m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])]) - - -# b4_parse_param -# -------------- -# If defined, b4_parse_param arrives double quoted, but below we prefer -# it to be single quoted. -m4_define([b4_parse_param], -b4_parse_param) - - -# b4_parse_param_for(DECL, FORMAL, BODY) -# --------------------------------------- -# Iterate over the user parameters, binding the declaration to DECL, -# the formal name to FORMAL, and evaluating the BODY. -m4_define([b4_parse_param_for], -[m4_foreach([$1_$2], m4_defn([b4_parse_param]), -[m4_pushdef([$1], m4_unquote(m4_car($1_$2)))dnl -m4_pushdef([$2], m4_shift($1_$2))dnl -$3[]dnl -m4_popdef([$2])dnl -m4_popdef([$1])dnl -])]) - -# b4_parse_param_use -# ------------------ -# `YYUSE' all the parse-params. -m4_define([b4_parse_param_use], -[b4_parse_param_for([Decl], [Formal], [ YYUSE (Formal); -])dnl -]) - - -## ------------ ## -## Data Types. ## -## ------------ ## - -# b4_int_type(MIN, MAX) -# --------------------- -# Return the smallest int type able to handle numbers ranging from -# MIN to MAX (included). -m4_define([b4_int_type], -[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char], - b4_ints_in($@, [-128], [127]), [1], [signed char], - - b4_ints_in($@, [0], [65535]), [1], [unsigned short int], - b4_ints_in($@, [-32768], [32767]), [1], [short int], - - m4_eval([0 <= $1]), [1], [unsigned int], - - [int])]) - - -# b4_int_type_for(NAME) -# --------------------- -# Return the smallest int type able to handle numbers ranging from -# `NAME_min' to `NAME_max' (included). -m4_define([b4_int_type_for], -[b4_int_type($1_min, $1_max)]) - - -# b4_table_value_equals(TABLE, VALUE, LITERAL) -# -------------------------------------------- -# Without inducing a comparison warning from the compiler, check if the -# literal value LITERAL equals VALUE from table TABLE, which must have -# TABLE_min and TABLE_max defined. YYID must be defined as an identity -# function that suppresses warnings about constant conditions. -m4_define([b4_table_value_equals], -[m4_if(m4_eval($3 < m4_indir([b4_]$1[_min]) - || m4_indir([b4_]$1[_max]) < $3), [1], - [[YYID (0)]], - [(!!(($2) == ($3)))])]) - - -## ---------## -## Values. ## -## ---------## - - -# b4_null_define -# -------------- -# Portability issues: define a YY_NULL appropriate for the current -# language (C, C++98, or C++11). -m4_define([b4_null_define], -[# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif[]dnl -]) - - -# b4_null -# ------- -# Return a null pointer constant. -m4_define([b4_null], [YY_NULL]) - - - -## ------------------------- ## -## Assigning token numbers. ## -## ------------------------- ## - -# b4_token_define(TOKEN-NAME, TOKEN-NUMBER) -# ----------------------------------------- -# Output the definition of this token as #define. -m4_define([b4_token_define], -[#define $1 $2 -]) - - -# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) -# ------------------------------------------------------- -# Output the definition of the tokens (if there are) as #defines. -m4_define([b4_token_defines], -[m4_if([$#$1], [1], [], -[/* Tokens. */ -m4_map([b4_token_define], [$@])]) -]) - - -# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER) -# --------------------------------------- -# Output the definition of this token as an enum. -m4_define([b4_token_enum], -[$1 = $2]) - - -# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) -# ----------------------------------------------------- -# Output the definition of the tokens (if there are) as enums. -m4_define([b4_token_enums], -[m4_if([$#$1], [1], [], -[[/* Tokens. */ -#ifndef ]b4_api_PREFIX[TOKENTYPE -# define ]b4_api_PREFIX[TOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum ]b4_api_prefix[tokentype { -]m4_map_sep([ b4_token_enum], [, -], - [$@])[ - }; -#endif -]])]) - - -# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) -# ------------------------------------------------------------- -# Output the definition of the tokens (if there are any) as enums and, if POSIX -# Yacc is enabled, as #defines. -m4_define([b4_token_enums_defines], -[b4_token_enums($@)b4_yacc_if([b4_token_defines($@)], []) -]) - - - -## --------------------------------------------- ## -## Defining C functions in both K&R and ANSI-C. ## -## --------------------------------------------- ## - - -# b4_modern_c -# ----------- -# A predicate useful in #if to determine whether C is ancient or modern. -# -# If __STDC__ is defined, the compiler is modern. IBM xlc 7.0 when run -# as 'cc' doesn't define __STDC__ (or __STDC_VERSION__) for pedantic -# reasons, but it defines __C99__FUNC__ so check that as well. -# Microsoft C normally doesn't define these macros, but it defines _MSC_VER. -# Consider a C++ compiler to be modern if it defines __cplusplus. -# -m4_define([b4_c_modern], - [[(defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER)]]) - -# b4_c_function_def(NAME, RETURN-VALUE, [DECL1, NAME1], ...) -# ---------------------------------------------------------- -# Declare the function NAME. -m4_define([b4_c_function_def], -[#if b4_c_modern -b4_c_ansi_function_def($@) -#else -$2 -$1 (b4_c_knr_formal_names(m4_shift2($@))) -b4_c_knr_formal_decls(m4_shift2($@)) -#endif[]dnl -]) - - -# b4_c_ansi_function_def(NAME, RETURN-VALUE, [DECL1, NAME1], ...) -# --------------------------------------------------------------- -# Declare the function NAME in ANSI. -m4_define([b4_c_ansi_function_def], -[$2 -$1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl -]) - - -# b4_c_ansi_formals([DECL1, NAME1], ...) -# -------------------------------------- -# Output the arguments ANSI-C definition. -m4_define([b4_c_ansi_formals], -[m4_if([$#], [0], [void], - [$#$1], [1], [void], - [m4_map_sep([b4_c_ansi_formal], [, ], [$@])])]) - -m4_define([b4_c_ansi_formal], -[$1]) - - -# b4_c_knr_formal_names([DECL1, NAME1], ...) -# ------------------------------------------ -# Output the argument names. -m4_define([b4_c_knr_formal_names], -[m4_map_sep([b4_c_knr_formal_name], [, ], [$@])]) - -m4_define([b4_c_knr_formal_name], -[$2]) - - -# b4_c_knr_formal_decls([DECL1, NAME1], ...) -# ------------------------------------------ -# Output the K&R argument declarations. -m4_define([b4_c_knr_formal_decls], -[m4_map_sep([b4_c_knr_formal_decl], - [ -], - [$@])]) - -m4_define([b4_c_knr_formal_decl], -[ $1;]) - - - -## ------------------------------------------------------------ ## -## Declaring (prototyping) C functions in both K&R and ANSI-C. ## -## ------------------------------------------------------------ ## - - -# b4_c_ansi_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...) -# ---------------------------------------------------------------- -# Declare the function NAME ANSI C style. -m4_define([b4_c_ansi_function_decl], -[$2 $1 (b4_c_ansi_formals(m4_shift2($@)));[]dnl -]) - - - -# b4_c_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...) -# ----------------------------------------------------------- -# Declare the function NAME in both K&R and ANSI C. -m4_define([b4_c_function_decl], -[#if defined __STDC__ || defined __cplusplus -b4_c_ansi_function_decl($@) -#else -$2 $1 (); -#endif[]dnl -]) - - - -## --------------------- ## -## Calling C functions. ## -## --------------------- ## - - -# b4_c_function_call(NAME, RETURN-VALUE, [DECL1, NAME1], ...) -# ----------------------------------------------------------- -# Call the function NAME with arguments NAME1, NAME2 etc. -m4_define([b4_c_function_call], -[$1 (b4_c_args(m4_shift2($@)))[]dnl -]) - - -# b4_c_args([DECL1, NAME1], ...) -# ------------------------------ -# Output the arguments NAME1, NAME2... -m4_define([b4_c_args], -[m4_map_sep([b4_c_arg], [, ], [$@])]) - -m4_define([b4_c_arg], -[$2]) - - -## ----------- ## -## Synclines. ## -## ----------- ## - -# b4_sync_start(LINE, FILE) -# ----------------------- -m4_define([b4_sync_start], [[#]line $1 $2]) - - -## -------------- ## -## User actions. ## -## -------------- ## - -# b4_case(LABEL, STATEMENTS) -# -------------------------- -m4_define([b4_case], -[ case $1: -$2 - break;]) - -# b4_symbol_actions(FILENAME, LINENO, -# SYMBOL-TAG, SYMBOL-NUM, -# SYMBOL-ACTION, SYMBOL-TYPENAME) -# ------------------------------------------------- -# Issue the code for a symbol action (e.g., %printer). -# -# Define b4_dollar_dollar([TYPE-NAME]), and b4_at_dollar, which are -# invoked where $$ and @$ were specified by the user. -m4_define([b4_symbol_actions], -[b4_dollar_pushdef([(*yyvaluep)], [$6], [(*yylocationp)])dnl - case $4: /* $3 */ -b4_syncline([$2], [$1]) - $5; -b4_syncline([@oline@], [@ofile@]) - break; -b4_dollar_popdef[]dnl -]) - - -# b4_yydestruct_generate(FUNCTION-DECLARATOR) -# ------------------------------------------- -# Generate the "yydestruct" function, which declaration is issued using -# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C -# or "b4_c_function_def" for K&R. -m4_define_default([b4_yydestruct_generate], -[[/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -]$1([yydestruct], - [static void], - [[const char *yymsg], [yymsg]], - [[int yytype], [yytype]], - [[YYSTYPE *yyvaluep], [yyvaluep]][]dnl -b4_locations_if( [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl -m4_ifset([b4_parse_param], [, b4_parse_param]))[ -{ - YYUSE (yyvaluep); -]b4_locations_if([ YYUSE (yylocationp); -])dnl -b4_parse_param_use[]dnl -[ - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { -]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[ - default: - break; - } -}]dnl -]) - - -# b4_yy_symbol_print_generate(FUNCTION-DECLARATOR) -# ------------------------------------------------ -# Generate the "yy_symbol_print" function, which declaration is issued using -# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C -# or "b4_c_function_def" for K&R. -m4_define_default([b4_yy_symbol_print_generate], -[[ -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -]$1([yy_symbol_value_print], - [static void], - [[FILE *yyoutput], [yyoutput]], - [[int yytype], [yytype]], - [[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl -b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl -m4_ifset([b4_parse_param], [, b4_parse_param]))[ -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -]b4_locations_if([ YYUSE (yylocationp); -])dnl -b4_parse_param_use[]dnl -[# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { -]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl -[ default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -]$1([yy_symbol_print], - [static void], - [[FILE *yyoutput], [yyoutput]], - [[int yytype], [yytype]], - [[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl -b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl -m4_ifset([b4_parse_param], [, b4_parse_param]))[ -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - -]b4_locations_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); -])dnl -[ yy_symbol_value_print (yyoutput, yytype, yyvaluep]dnl -b4_locations_if([, yylocationp])[]b4_user_args[); - YYFPRINTF (yyoutput, ")"); -}]dnl -]) - -## -------------- ## -## Declarations. ## -## -------------- ## - -# b4_declare_yylstype -# ------------------- -# Declarations that might either go into the header (if --defines) or -# in the parser body. Declare YYSTYPE/YYLTYPE, and yylval/yylloc. -m4_define([b4_declare_yylstype], -[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED -]m4_ifdef([b4_stype], -[[typedef union ]b4_union_name[ -{ -]b4_user_stype[ -} ]b4_api_PREFIX[STYPE; -# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1]], -[m4_if(b4_tag_seen_flag, 0, -[[typedef int ]b4_api_PREFIX[STYPE; -# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1]])])[ -# define ]b4_api_prefix[stype ]b4_api_PREFIX[STYPE /* obsolescent; will be withdrawn */ -# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1 -#endif]b4_locations_if([[ - -#if ! defined ]b4_api_PREFIX[LTYPE && ! defined ]b4_api_PREFIX[LTYPE_IS_DECLARED -typedef struct ]b4_api_PREFIX[LTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} ]b4_api_PREFIX[LTYPE; -# define ]b4_api_prefix[ltype ]b4_api_PREFIX[LTYPE /* obsolescent; will be withdrawn */ -# define ]b4_api_PREFIX[LTYPE_IS_DECLARED 1 -# define ]b4_api_PREFIX[LTYPE_IS_TRIVIAL 1 -#endif]]) - -b4_pure_if([], [[extern ]b4_api_PREFIX[STYPE ]b4_prefix[lval; -]b4_locations_if([[extern ]b4_api_PREFIX[LTYPE ]b4_prefix[lloc;]])])[]dnl -]) - -# b4_YYDEBUG_define -# ------------------ -m4_define([b4_YYDEBUG_define], -[[/* Enabling traces. */ -]m4_if(b4_api_prefix, [yy], -[[#ifndef YYDEBUG -# define YYDEBUG ]b4_debug_flag[ -#endif]], -[[#ifndef ]b4_api_PREFIX[DEBUG -# if defined YYDEBUG -# if YYDEBUG -# define ]b4_api_PREFIX[DEBUG 1 -# else -# define ]b4_api_PREFIX[DEBUG 0 -# endif -# else /* ! defined YYDEBUG */ -# define ]b4_api_PREFIX[DEBUG ]b4_debug_flag[ -# endif /* ! defined YYDEBUG */ -#endif /* ! defined ]b4_api_PREFIX[DEBUG */]])[]dnl -]) - -# b4_declare_yydebug -# ------------------ -m4_define([b4_declare_yydebug], -[b4_YYDEBUG_define[ -#if ]b4_api_PREFIX[DEBUG -extern int ]b4_prefix[debug; -#endif][]dnl -]) - -# b4_yylloc_default_define -# ------------------------ -# Define YYLLOC_DEFAULT. -m4_define([b4_yylloc_default_define], -[[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif -]]) - -# b4_yy_location_print_define -# --------------------------- -# Define YY_LOCATION_PRINT. -m4_define([b4_yy_location_print_define], -[b4_locations_if([[ -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -#ifndef YY_LOCATION_PRINT -# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL - -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ - -__attribute__((__unused__)) -]b4_c_function_def([yy_location_print_], - [static unsigned], - [[FILE *yyo], [yyo]], - [[YYLTYPE const * const yylocp], [yylocp]])[ -{ - unsigned res = 0; - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += fprintf (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += fprintf (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); - } - return res; - } - -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) - -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif]], -[[/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif]]) -]) - -# b4_yyloc_default -# ---------------- -# Expand to a possible default value for yylloc. -m4_define([b4_yyloc_default], -[[ -# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL - = { ]m4_join([, ], - m4_defn([b4_location_initial_line]), - m4_defn([b4_location_initial_column]), - m4_defn([b4_location_initial_line]), - m4_defn([b4_location_initial_column]))[ } -# endif -]]) diff --git a/tools/data/glr.c b/tools/data/glr.c deleted file mode 100644 index 02a76c21..00000000 --- a/tools/data/glr.c +++ /dev/null @@ -1,2589 +0,0 @@ - -*- C -*- - -# GLR skeleton for Bison - -# Copyright (C) 2002-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# If we are loaded by glr.cc, do not override c++.m4 definitions by -# those of c.m4. -m4_if(b4_skeleton, ["glr.c"], - [m4_include(b4_pkgdatadir/[c.m4])]) - -## ---------------- ## -## Default values. ## -## ---------------- ## - -# Stack parameters. -m4_define_default([b4_stack_depth_max], [10000]) -m4_define_default([b4_stack_depth_init], [200]) - - - -## ------------------------ ## -## Pure/impure interfaces. ## -## ------------------------ ## - -b4_define_flag_if([pure]) -# If glr.cc is including this file and thus has already set b4_pure_flag, -# do not change the value of b4_pure_flag, and do not record a use of api.pure. -m4_ifndef([b4_pure_flag], -[b4_percent_define_default([[api.pure]], [[false]]) - m4_define([b4_pure_flag], - [b4_percent_define_flag_if([[api.pure]], [[1]], [[0]])])]) - -# b4_user_formals -# --------------- -# The possible parse-params formal arguments preceded by a comma. -# -# This is not shared with yacc.c in c.m4 because GLR relies on ISO C -# formal argument declarations. -m4_define([b4_user_formals], -[m4_ifset([b4_parse_param], [, b4_c_ansi_formals(b4_parse_param)])]) - - -# b4_lex_param -# ------------ -# Accumule in b4_lex_param all the yylex arguments. -# Yes, this is quite ugly... -m4_define([b4_lex_param], -m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl -b4_locations_if([, [[YYLTYPE *], [&yylloc]]])])dnl -m4_ifdef([b4_lex_param], [, ]b4_lex_param))) - - -# b4_yyerror_args -# --------------- -# Optional effective arguments passed to yyerror: user args plus yylloc, and -# a trailing comma. -m4_define([b4_yyerror_args], -[b4_pure_if([b4_locations_if([yylocp, ])])dnl -m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])]) - - -# b4_lyyerror_args -# ---------------- -# Same as above, but on the lookahead, hence &yylloc instead of yylocp. -m4_define([b4_lyyerror_args], -[b4_pure_if([b4_locations_if([&yylloc, ])])dnl -m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])]) - - -# b4_pure_args -# ------------ -# Same as b4_yyerror_args, but with a leading comma. -m4_define([b4_pure_args], -[b4_pure_if([b4_locations_if([, yylocp])])[]b4_user_args]) - - -# b4_lpure_args -# ------------- -# Same as above, but on the lookahead, hence &yylloc instead of yylocp. -m4_define([b4_lpure_args], -[b4_pure_if([b4_locations_if([, &yylloc])])[]b4_user_args]) - - - -# b4_pure_formals -# --------------- -# Arguments passed to yyerror: user formals plus yylocp with leading comma. -m4_define([b4_pure_formals], -[b4_pure_if([b4_locations_if([, YYLTYPE *yylocp])])[]b4_user_formals]) - - -# b4_locuser_formals(LOC = yylocp) -# -------------------------------- -m4_define([b4_locuser_formals], -[b4_locations_if([, YYLTYPE *m4_default([$1], [yylocp])])[]b4_user_formals]) - - -# b4_locuser_args(LOC = yylocp) -# ----------------------------- -m4_define([b4_locuser_args], -[b4_locations_if([, m4_default([$1], [yylocp])])[]b4_user_args]) - - - -## ----------------- ## -## Semantic Values. ## -## ----------------- ## - - -# b4_lhs_value([TYPE]) -# -------------------- -# Expansion of $$. -m4_define([b4_lhs_value], -[((*yyvalp)[]m4_ifval([$1], [.$1]))]) - - -# b4_rhs_value(RULE-LENGTH, NUM, [TYPE]) -# -------------------------------------- -# Expansion of $NUM, where the current rule has RULE-LENGTH -# symbols on RHS. -m4_define([b4_rhs_value], -[(((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - ($1))@}.yystate.yysemantics.yysval[]m4_ifval([$3], [.$3]))]) - - - -## ----------- ## -## Locations. ## -## ----------- ## - -# b4_lhs_location() -# ----------------- -# Expansion of @$. -m4_define([b4_lhs_location], -[(*yylocp)]) - - -# b4_rhs_location(RULE-LENGTH, NUM) -# --------------------------------- -# Expansion of @NUM, where the current rule has RULE-LENGTH symbols -# on RHS. -m4_define([b4_rhs_location], -[(((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - ($1))@}.yystate.yyloc)]) - - -## -------------- ## -## Declarations. ## -## -------------- ## - -# b4_shared_declarations -# ---------------------- -# Declaration that might either go into the header (if --defines) -# or open coded in the parser body. -m4_define([b4_shared_declarations], -[b4_declare_yydebug[ -]b4_percent_code_get([[requires]])[ -]b4_token_enums(b4_tokens)[ -]b4_declare_yylstype[ -]b4_c_ansi_function_decl(b4_prefix[parse], [int], b4_parse_param)[ -]b4_percent_code_get([[provides]])[]dnl -]) - - -## -------------- ## -## Output files. ## -## -------------- ## - -b4_output_begin([b4_parser_file_name]) -b4_copyright([Skeleton implementation for Bison GLR parsers in C], - [2002-2012])[ - -/* C GLR parser skeleton written by Paul Hilfinger. */ - -]b4_identification - -b4_percent_code_get([[top]])[ -]m4_if(b4_api_prefix, [yy], [], -[[/* Substitute the type names. */ -#define YYSTYPE ]b4_api_PREFIX[STYPE]b4_locations_if([[ -#define YYLTYPE ]b4_api_PREFIX[LTYPE]])])[ -]m4_if(b4_prefix, [yy], [], -[[/* Substitute the variable and function names. */ -#define yyparse ]b4_prefix[parse -#define yylex ]b4_prefix[lex -#define yyerror ]b4_prefix[error -#define yylval ]b4_prefix[lval -#define yychar ]b4_prefix[char -#define yydebug ]b4_prefix[debug -#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[ -#define yylloc ]b4_prefix[lloc]])])[ - -/* Copy the first part of user declarations. */ -]b4_user_pre_prologue[ - -]b4_null_define[ - -]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]], - [b4_shared_declarations])[ - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE ]b4_error_verbose_flag[ -#endif - -/* Default (constant) value used for initialization for null - right-hand sides. Unlike the standard yacc.c template, here we set - the default value of $$ to a zeroed-out value. Since the default - value is undefined, this behavior is technically correct. */ -static YYSTYPE yyval_default;]b4_locations_if([[ -static YYLTYPE yyloc_default][]b4_yyloc_default;])[ - -/* Copy the second part of user declarations. */ -]b4_user_post_prologue -b4_percent_code_get[]dnl - -[#include -#include -#include - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -]b4_c_function_def([YYID], [static int], [[int i], [i]])[ -{ - return i; -} -#endif - -#ifndef YYFREE -# define YYFREE free -#endif -#ifndef YYMALLOC -# define YYMALLOC malloc -#endif -#ifndef YYREALLOC -# define YYREALLOC realloc -#endif - -#define YYSIZEMAX ((size_t) -1) - -#ifdef __cplusplus - typedef bool yybool; -#else - typedef unsigned char yybool; -#endif -#define yytrue 1 -#define yyfalse 0 - -#ifndef YYSETJMP -# include -# define YYJMP_BUF jmp_buf -# define YYSETJMP(Env) setjmp (Env) -/* Pacify clang. */ -# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0)) -#endif - -/*-----------------. -| GCC extensions. | -`-----------------*/ - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -#ifndef YYASSERT -# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0))) -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL ]b4_final_state_number[ -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST ]b4_last[ - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS ]b4_tokens_number[ -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS ]b4_nterms_number[ -/* YYNRULES -- Number of rules. */ -#define YYNRULES ]b4_rules_number[ -/* YYNRULES -- Number of states. */ -#define YYNSTATES ]b4_states_number[ -/* YYMAXRHS -- Maximum number of symbols on right-hand side of rule. */ -#define YYMAXRHS ]b4_r2_max[ -/* YYMAXLEFT -- Maximum number of symbols to the left of a handle - accessed by $0, $-1, etc., in any rule. */ -#define YYMAXLEFT ]b4_max_left_semantic_context[ - -/* YYTRANSLATE(X) -- Bison symbol number corresponding to X. */ -#define YYUNDEFTOK ]b4_undef_token_number[ -#define YYMAXUTOK ]b4_user_token_number_max[ - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const ]b4_int_type_for([b4_translate])[ yytranslate[] = -{ - ]b4_translate[ -}; - -#if ]b4_api_PREFIX[DEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const ]b4_int_type_for([b4_prhs])[ yyprhs[] = -{ - ]b4_prhs[ -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const ]b4_int_type_for([b4_rhs])[ yyrhs[] = -{ - ]b4_rhs[ -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const ]b4_int_type_for([b4_rline])[ yyrline[] = -{ - ]b4_rline[ -}; -#endif - -#if ]b4_api_PREFIX[DEBUG || YYERROR_VERBOSE || ]b4_token_table_flag[ -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - ]b4_tname[ -}; -#endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const ]b4_int_type_for([b4_r1])[ yyr1[] = -{ - ]b4_r1[ -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const ]b4_int_type_for([b4_r2])[ yyr2[] = -{ - ]b4_r2[ -}; - -/* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none). */ -static const ]b4_int_type_for([b4_dprec])[ yydprec[] = -{ - ]b4_dprec[ -}; - -/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */ -static const ]b4_int_type_for([b4_merger])[ yymerger[] = -{ - ]b4_merger[ -}; - -/* YYDEFACT[S] -- default reduction number in state S. Performed when - YYTABLE doesn't specify something else to do. Zero means the default - is an error. */ -static const ]b4_int_type_for([b4_defact])[ yydefact[] = -{ - ]b4_defact[ -}; - -/* YYPDEFGOTO[NTERM-NUM]. */ -static const ]b4_int_type_for([b4_defgoto])[ yydefgoto[] = -{ - ]b4_defgoto[ -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF ]b4_pact_ninf[ -static const ]b4_int_type_for([b4_pact])[ yypact[] = -{ - ]b4_pact[ -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] = -{ - ]b4_pgoto[ -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF ]b4_table_ninf[ -static const ]b4_int_type_for([b4_table])[ yytable[] = -{ - ]b4_table[ -}; - -/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of - list of conflicting reductions corresponding to action entry for - state STATE-NUM in yytable. 0 means no conflicts. The list in - yyconfl is terminated by a rule number of 0. */ -static const ]b4_int_type_for([b4_conflict_list_heads])[ yyconflp[] = -{ - ]b4_conflict_list_heads[ -}; - -/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by - 0, pointed into by YYCONFLP. */ -]dnl Do not use b4_int_type_for here, since there are places where -dnl pointers onto yyconfl are taken, which type is "short int *". -dnl We probably ought to introduce a type for confl. -[static const short int yyconfl[] = -{ - ]b4_conflicting_rules[ -}; - -static const ]b4_int_type_for([b4_check])[ yycheck[] = -{ - ]b4_check[ -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const ]b4_int_type_for([b4_stos])[ yystos[] = -{ - ]b4_stos[ -}; - -/* Error token number */ -#define YYTERROR 1 - -]b4_locations_if([[ -]b4_yylloc_default_define[ -# define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc) -]])[ -]b4_yy_location_print_define[ - -/* YYLEX -- calling `yylex' with the right arguments. */ -#define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[ - -]b4_pure_if( -[ -#undef yynerrs -#define yynerrs (yystackp->yyerrcnt) -#undef yychar -#define yychar (yystackp->yyrawchar) -#undef yylval -#define yylval (yystackp->yyval) -#undef yylloc -#define yylloc (yystackp->yyloc) -m4_if(b4_prefix[], [yy], [], -[#define b4_prefix[]nerrs yynerrs -#define b4_prefix[]char yychar -#define b4_prefix[]lval yylval -#define b4_prefix[]lloc yylloc])], -[YYSTYPE yylval;]b4_locations_if([[ -YYLTYPE yylloc;]])[ - -int yynerrs; -int yychar;])[ - -static const int YYEOF = 0; -static const int YYEMPTY = -2; - -typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG; - -#define YYCHK(YYE) \ - do { YYRESULTTAG yyflag = YYE; if (yyflag != yyok) return yyflag; } \ - while (YYID (0)) - -#if ]b4_api_PREFIX[DEBUG - -# ifndef YYFPRINTF -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -]b4_yy_symbol_print_generate([b4_c_ansi_function_def])[ - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, Type, Value]b4_locuser_args([Location])[); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; - -#else /* !]b4_api_PREFIX[DEBUG */ - -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) - -#endif /* !]b4_api_PREFIX[DEBUG */ - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH ]b4_stack_depth_init[ -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYMAXDEPTH * sizeof (GLRStackItem) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH ]b4_stack_depth_max[ -#endif - -/* Minimum number of free items on the stack allowed after an - allocation. This is to allow allocation and initialization - to be completed by functions that call yyexpandGLRStack before the - stack is expanded, thus insuring that all necessary pointers get - properly redirected to new data. */ -#define YYHEADROOM 2 - -#ifndef YYSTACKEXPANDABLE -# if (! defined __cplusplus \ - || (]b4_locations_if([[defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL \ - && ]])[defined ]b4_api_PREFIX[STYPE_IS_TRIVIAL && ]b4_api_PREFIX[STYPE_IS_TRIVIAL)) -# define YYSTACKEXPANDABLE 1 -# else -# define YYSTACKEXPANDABLE 0 -# endif -#endif - -#if YYSTACKEXPANDABLE -# define YY_RESERVE_GLRSTACK(Yystack) \ - do { \ - if (Yystack->yyspaceLeft < YYHEADROOM) \ - yyexpandGLRStack (Yystack); \ - } while (YYID (0)) -#else -# define YY_RESERVE_GLRSTACK(Yystack) \ - do { \ - if (Yystack->yyspaceLeft < YYHEADROOM) \ - yyMemoryExhausted (Yystack); \ - } while (YYID (0)) -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static size_t -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - size_t yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return strlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -#endif /* !YYERROR_VERBOSE */ - -/** State numbers, as in LALR(1) machine */ -typedef int yyStateNum; - -/** Rule numbers, as in LALR(1) machine */ -typedef int yyRuleNum; - -/** Grammar symbol */ -typedef short int yySymbol; - -/** Item references, as in LALR(1) machine */ -typedef short int yyItemNum; - -typedef struct yyGLRState yyGLRState; -typedef struct yyGLRStateSet yyGLRStateSet; -typedef struct yySemanticOption yySemanticOption; -typedef union yyGLRStackItem yyGLRStackItem; -typedef struct yyGLRStack yyGLRStack; - -struct yyGLRState { - /** Type tag: always true. */ - yybool yyisState; - /** Type tag for yysemantics. If true, yysval applies, otherwise - * yyfirstVal applies. */ - yybool yyresolved; - /** Number of corresponding LALR(1) machine state. */ - yyStateNum yylrState; - /** Preceding state in this stack */ - yyGLRState* yypred; - /** Source position of the first token produced by my symbol */ - size_t yyposn; - union { - /** First in a chain of alternative reductions producing the - * non-terminal corresponding to this state, threaded through - * yynext. */ - yySemanticOption* yyfirstVal; - /** Semantic value for this state. */ - YYSTYPE yysval; - } yysemantics;]b4_locations_if([[ - /** Source location for this state. */ - YYLTYPE yyloc;]])[ -}; - -struct yyGLRStateSet { - yyGLRState** yystates; - /** During nondeterministic operation, yylookaheadNeeds tracks which - * stacks have actually needed the current lookahead. During deterministic - * operation, yylookaheadNeeds[0] is not maintained since it would merely - * duplicate yychar != YYEMPTY. */ - yybool* yylookaheadNeeds; - size_t yysize, yycapacity; -}; - -struct yySemanticOption { - /** Type tag: always false. */ - yybool yyisState; - /** Rule number for this reduction */ - yyRuleNum yyrule; - /** The last RHS state in the list of states to be reduced. */ - yyGLRState* yystate; - /** The lookahead for this reduction. */ - int yyrawchar; - YYSTYPE yyval;]b4_locations_if([[ - YYLTYPE yyloc;]])[ - /** Next sibling in chain of options. To facilitate merging, - * options are chained in decreasing order by address. */ - yySemanticOption* yynext; -}; - -/** Type of the items in the GLR stack. The yyisState field - * indicates which item of the union is valid. */ -union yyGLRStackItem { - yyGLRState yystate; - yySemanticOption yyoption; -}; - -struct yyGLRStack { - int yyerrState; -]b4_locations_if([[ /* To compute the location of the error token. */ - yyGLRStackItem yyerror_range[3];]])[ -]b4_pure_if( -[ - int yyerrcnt; - int yyrawchar; - YYSTYPE yyval;]b4_locations_if([[ - YYLTYPE yyloc;]])[ -])[ - YYJMP_BUF yyexception_buffer; - yyGLRStackItem* yyitems; - yyGLRStackItem* yynextFree; - size_t yyspaceLeft; - yyGLRState* yysplitPoint; - yyGLRState* yylastDeleted; - yyGLRStateSet yytops; -}; - -#if YYSTACKEXPANDABLE -static void yyexpandGLRStack (yyGLRStack* yystackp); -#endif - -static void yyFail (yyGLRStack* yystackp]b4_pure_formals[, const char* yymsg) - __attribute__ ((__noreturn__)); -static void -yyFail (yyGLRStack* yystackp]b4_pure_formals[, const char* yymsg) -{ - if (yymsg != YY_NULL) - yyerror (]b4_yyerror_args[yymsg); - YYLONGJMP (yystackp->yyexception_buffer, 1); -} - -static void yyMemoryExhausted (yyGLRStack* yystackp) - __attribute__ ((__noreturn__)); -static void -yyMemoryExhausted (yyGLRStack* yystackp) -{ - YYLONGJMP (yystackp->yyexception_buffer, 2); -} - -#if ]b4_api_PREFIX[DEBUG || YYERROR_VERBOSE -/** A printable representation of TOKEN. */ -static inline const char* -yytokenName (yySymbol yytoken) -{ - if (yytoken == YYEMPTY) - return ""; - - return yytname[yytoken]; -} -#endif - -/** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting - * at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred - * containing the pointer to the next state in the chain. */ -static void yyfillin (yyGLRStackItem *, int, int) __attribute__ ((__unused__)); -static void -yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1) -{ - int i; - yyGLRState *s = yyvsp[yylow0].yystate.yypred; - for (i = yylow0-1; i >= yylow1; i -= 1) - { - YYASSERT (s->yyresolved); - yyvsp[i].yystate.yyresolved = yytrue; - yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval;]b4_locations_if([[ - yyvsp[i].yystate.yyloc = s->yyloc;]])[ - s = yyvsp[i].yystate.yypred = s->yypred; - } -} - -/* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1. Otherwise, fill in - * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1. - * For convenience, always return YYLOW1. */ -static inline int yyfill (yyGLRStackItem *, int *, int, yybool) - __attribute__ ((__unused__)); -static inline int -yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal) -{ - if (!yynormal && yylow1 < *yylow) - { - yyfillin (yyvsp, *yylow, yylow1); - *yylow = yylow1; - } - return yylow1; -} - -/** Perform user action for rule number YYN, with RHS length YYRHSLEN, - * and top stack item YYVSP. YYLVALP points to place to put semantic - * value ($$), and yylocp points to place for location information - * (@@$). Returns yyok for normal return, yyaccept for YYACCEPT, - * yyerr for YYERROR, yyabort for YYABORT. */ -/*ARGSUSED*/ static YYRESULTTAG -yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp, - yyGLRStack* yystackp, - YYSTYPE* yyvalp]b4_locuser_formals[) -{ - yybool yynormal __attribute__ ((__unused__)) = - (yystackp->yysplitPoint == YY_NULL); - int yylow; -]b4_parse_param_use[]dnl -[# undef yyerrok -# define yyerrok (yystackp->yyerrState = 0) -# undef YYACCEPT -# define YYACCEPT return yyaccept -# undef YYABORT -# define YYABORT return yyabort -# undef YYERROR -# define YYERROR return yyerrok, yyerr -# undef YYRECOVERING -# define YYRECOVERING() (yystackp->yyerrState != 0) -# undef yyclearin -# define yyclearin (yychar = YYEMPTY) -# undef YYFILL -# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal) -# undef YYBACKUP -# define YYBACKUP(Token, Value) \ - return yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")), \ - yyerrok, yyerr - - yylow = 1; - if (yyrhslen == 0) - *yyvalp = yyval_default; - else - *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;]b4_locations_if([[ - YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen); - yystackp->yyerror_range[1].yystate.yyloc = *yylocp; -]])[ - switch (yyn) - { - ]b4_user_actions[ - default: break; - } - - return yyok; -# undef yyerrok -# undef YYABORT -# undef YYACCEPT -# undef YYERROR -# undef YYBACKUP -# undef yyclearin -# undef YYRECOVERING -} - - -/*ARGSUSED*/ static void -yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1) -{ - YYUSE (yy0); - YYUSE (yy1); - - switch (yyn) - { - ]b4_mergers[ - default: break; - } -} - - /* Bison grammar-table manipulation. */ - -]b4_yydestruct_generate([b4_c_ansi_function_def])[ - -/** Number of symbols composing the right hand side of rule #RULE. */ -static inline int -yyrhsLength (yyRuleNum yyrule) -{ - return yyr2[yyrule]; -} - -static void -yydestroyGLRState (char const *yymsg, yyGLRState *yys]b4_user_formals[) -{ - if (yys->yyresolved) - yydestruct (yymsg, yystos[yys->yylrState], - &yys->yysemantics.yysval]b4_locuser_args([&yys->yyloc])[); - else - { -#if ]b4_api_PREFIX[DEBUG - if (yydebug) - { - if (yys->yysemantics.yyfirstVal) - YYFPRINTF (stderr, "%s unresolved ", yymsg); - else - YYFPRINTF (stderr, "%s incomplete ", yymsg); - yy_symbol_print (stderr, yystos[yys->yylrState], - YY_NULL]b4_locuser_args([&yys->yyloc])[); - YYFPRINTF (stderr, "\n"); - } -#endif - - if (yys->yysemantics.yyfirstVal) - { - yySemanticOption *yyoption = yys->yysemantics.yyfirstVal; - yyGLRState *yyrh; - int yyn; - for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule); - yyn > 0; - yyrh = yyrh->yypred, yyn -= 1) - yydestroyGLRState (yymsg, yyrh]b4_user_args[); - } - } -} - -/** Left-hand-side symbol for rule #RULE. */ -static inline yySymbol -yylhsNonterm (yyRuleNum yyrule) -{ - return yyr1[yyrule]; -} - -#define yypact_value_is_default(Yystate) \ - ]b4_table_value_equals([[pact]], [[Yystate]], [b4_pact_ninf])[ - -/** True iff LR state STATE has only a default reduction (regardless - * of token). */ -static inline yybool -yyisDefaultedState (yyStateNum yystate) -{ - return yypact_value_is_default (yypact[yystate]); -} - -/** The default reduction for STATE, assuming it has one. */ -static inline yyRuleNum -yydefaultAction (yyStateNum yystate) -{ - return yydefact[yystate]; -} - -#define yytable_value_is_error(Yytable_value) \ - ]b4_table_value_equals([[table]], [[Yytable_value]], [b4_table_ninf])[ - -/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN. - * Result R means - * R < 0: Reduce on rule -R. - * R = 0: Error. - * R > 0: Shift to state R. - * Set *CONFLICTS to a pointer into yyconfl to 0-terminated list of - * conflicting reductions. - */ -static inline void -yygetLRActions (yyStateNum yystate, int yytoken, - int* yyaction, const short int** yyconflicts) -{ - int yyindex = yypact[yystate] + yytoken; - if (yypact_value_is_default (yypact[yystate]) - || yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken) - { - *yyaction = -yydefact[yystate]; - *yyconflicts = yyconfl; - } - else if (! yytable_value_is_error (yytable[yyindex])) - { - *yyaction = yytable[yyindex]; - *yyconflicts = yyconfl + yyconflp[yyindex]; - } - else - { - *yyaction = 0; - *yyconflicts = yyconfl + yyconflp[yyindex]; - } -} - -static inline yyStateNum -yyLRgotoState (yyStateNum yystate, yySymbol yylhs) -{ - int yyr; - yyr = yypgoto[yylhs - YYNTOKENS] + yystate; - if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate) - return yytable[yyr]; - else - return yydefgoto[yylhs - YYNTOKENS]; -} - -static inline yybool -yyisShiftAction (int yyaction) -{ - return 0 < yyaction; -} - -static inline yybool -yyisErrorAction (int yyaction) -{ - return yyaction == 0; -} - - /* GLRStates */ - -/** Return a fresh GLRStackItem. Callers should call - * YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient - * headroom. */ - -static inline yyGLRStackItem* -yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState) -{ - yyGLRStackItem* yynewItem = yystackp->yynextFree; - yystackp->yyspaceLeft -= 1; - yystackp->yynextFree += 1; - yynewItem->yystate.yyisState = yyisState; - return yynewItem; -} - -/** Add a new semantic action that will execute the action for rule - * RULENUM on the semantic values in RHS to the list of - * alternative actions for STATE. Assumes that RHS comes from - * stack #K of *STACKP. */ -static void -yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate, - yyGLRState* rhs, yyRuleNum yyrule) -{ - yySemanticOption* yynewOption = - &yynewGLRStackItem (yystackp, yyfalse)->yyoption; - yynewOption->yystate = rhs; - yynewOption->yyrule = yyrule; - if (yystackp->yytops.yylookaheadNeeds[yyk]) - { - yynewOption->yyrawchar = yychar; - yynewOption->yyval = yylval;]b4_locations_if([ - yynewOption->yyloc = yylloc;])[ - } - else - yynewOption->yyrawchar = YYEMPTY; - yynewOption->yynext = yystate->yysemantics.yyfirstVal; - yystate->yysemantics.yyfirstVal = yynewOption; - - YY_RESERVE_GLRSTACK (yystackp); -} - - /* GLRStacks */ - -/** Initialize SET to a singleton set containing an empty stack. */ -static yybool -yyinitStateSet (yyGLRStateSet* yyset) -{ - yyset->yysize = 1; - yyset->yycapacity = 16; - yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]); - if (! yyset->yystates) - return yyfalse; - yyset->yystates[0] = YY_NULL; - yyset->yylookaheadNeeds = - (yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]); - if (! yyset->yylookaheadNeeds) - { - YYFREE (yyset->yystates); - return yyfalse; - } - return yytrue; -} - -static void yyfreeStateSet (yyGLRStateSet* yyset) -{ - YYFREE (yyset->yystates); - YYFREE (yyset->yylookaheadNeeds); -} - -/** Initialize STACK to a single empty stack, with total maximum - * capacity for all stacks of SIZE. */ -static yybool -yyinitGLRStack (yyGLRStack* yystackp, size_t yysize) -{ - yystackp->yyerrState = 0; - yynerrs = 0; - yystackp->yyspaceLeft = yysize; - yystackp->yyitems = - (yyGLRStackItem*) YYMALLOC (yysize * sizeof yystackp->yynextFree[0]); - if (!yystackp->yyitems) - return yyfalse; - yystackp->yynextFree = yystackp->yyitems; - yystackp->yysplitPoint = YY_NULL; - yystackp->yylastDeleted = YY_NULL; - return yyinitStateSet (&yystackp->yytops); -} - - -#if YYSTACKEXPANDABLE -# define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \ - &((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE - -/** If STACK is expandable, extend it. WARNING: Pointers into the - stack from outside should be considered invalid after this call. - We always expand when there are 1 or fewer items left AFTER an - allocation, so that we can avoid having external pointers exist - across an allocation. */ -static void -yyexpandGLRStack (yyGLRStack* yystackp) -{ - yyGLRStackItem* yynewItems; - yyGLRStackItem* yyp0, *yyp1; - size_t yynewSize; - size_t yyn; - size_t yysize = yystackp->yynextFree - yystackp->yyitems; - if (YYMAXDEPTH - YYHEADROOM < yysize) - yyMemoryExhausted (yystackp); - yynewSize = 2*yysize; - if (YYMAXDEPTH < yynewSize) - yynewSize = YYMAXDEPTH; - yynewItems = (yyGLRStackItem*) YYMALLOC (yynewSize * sizeof yynewItems[0]); - if (! yynewItems) - yyMemoryExhausted (yystackp); - for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize; - 0 < yyn; - yyn -= 1, yyp0 += 1, yyp1 += 1) - { - *yyp1 = *yyp0; - if (*(yybool *) yyp0) - { - yyGLRState* yys0 = &yyp0->yystate; - yyGLRState* yys1 = &yyp1->yystate; - if (yys0->yypred != YY_NULL) - yys1->yypred = - YYRELOC (yyp0, yyp1, yys0->yypred, yystate); - if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != YY_NULL) - yys1->yysemantics.yyfirstVal = - YYRELOC (yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption); - } - else - { - yySemanticOption* yyv0 = &yyp0->yyoption; - yySemanticOption* yyv1 = &yyp1->yyoption; - if (yyv0->yystate != YY_NULL) - yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate); - if (yyv0->yynext != YY_NULL) - yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption); - } - } - if (yystackp->yysplitPoint != YY_NULL) - yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems, - yystackp->yysplitPoint, yystate); - - for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1) - if (yystackp->yytops.yystates[yyn] != YY_NULL) - yystackp->yytops.yystates[yyn] = - YYRELOC (yystackp->yyitems, yynewItems, - yystackp->yytops.yystates[yyn], yystate); - YYFREE (yystackp->yyitems); - yystackp->yyitems = yynewItems; - yystackp->yynextFree = yynewItems + yysize; - yystackp->yyspaceLeft = yynewSize - yysize; -} -#endif - -static void -yyfreeGLRStack (yyGLRStack* yystackp) -{ - YYFREE (yystackp->yyitems); - yyfreeStateSet (&yystackp->yytops); -} - -/** Assuming that S is a GLRState somewhere on STACK, update the - * splitpoint of STACK, if needed, so that it is at least as deep as - * S. */ -static inline void -yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys) -{ - if (yystackp->yysplitPoint != YY_NULL && yystackp->yysplitPoint > yys) - yystackp->yysplitPoint = yys; -} - -/** Invalidate stack #K in STACK. */ -static inline void -yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk) -{ - if (yystackp->yytops.yystates[yyk] != YY_NULL) - yystackp->yylastDeleted = yystackp->yytops.yystates[yyk]; - yystackp->yytops.yystates[yyk] = YY_NULL; -} - -/** Undelete the last stack that was marked as deleted. Can only be - done once after a deletion, and only when all other stacks have - been deleted. */ -static void -yyundeleteLastStack (yyGLRStack* yystackp) -{ - if (yystackp->yylastDeleted == YY_NULL || yystackp->yytops.yysize != 0) - return; - yystackp->yytops.yystates[0] = yystackp->yylastDeleted; - yystackp->yytops.yysize = 1; - YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n")); - yystackp->yylastDeleted = YY_NULL; -} - -static inline void -yyremoveDeletes (yyGLRStack* yystackp) -{ - size_t yyi, yyj; - yyi = yyj = 0; - while (yyj < yystackp->yytops.yysize) - { - if (yystackp->yytops.yystates[yyi] == YY_NULL) - { - if (yyi == yyj) - { - YYDPRINTF ((stderr, "Removing dead stacks.\n")); - } - yystackp->yytops.yysize -= 1; - } - else - { - yystackp->yytops.yystates[yyj] = yystackp->yytops.yystates[yyi]; - /* In the current implementation, it's unnecessary to copy - yystackp->yytops.yylookaheadNeeds[yyi] since, after - yyremoveDeletes returns, the parser immediately either enters - deterministic operation or shifts a token. However, it doesn't - hurt, and the code might evolve to need it. */ - yystackp->yytops.yylookaheadNeeds[yyj] = - yystackp->yytops.yylookaheadNeeds[yyi]; - if (yyj != yyi) - { - YYDPRINTF ((stderr, "Rename stack %lu -> %lu.\n", - (unsigned long int) yyi, (unsigned long int) yyj)); - } - yyj += 1; - } - yyi += 1; - } -} - -/** Shift to a new state on stack #K of STACK, corresponding to LR state - * LRSTATE, at input position POSN, with (resolved) semantic value SVAL. */ -static inline void -yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, - size_t yyposn, - YYSTYPE* yyvalp]b4_locations_if([, YYLTYPE* yylocp])[) -{ - yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; - - yynewState->yylrState = yylrState; - yynewState->yyposn = yyposn; - yynewState->yyresolved = yytrue; - yynewState->yypred = yystackp->yytops.yystates[yyk]; - yynewState->yysemantics.yysval = *yyvalp;]b4_locations_if([ - yynewState->yyloc = *yylocp;])[ - yystackp->yytops.yystates[yyk] = yynewState; - - YY_RESERVE_GLRSTACK (yystackp); -} - -/** Shift stack #K of YYSTACK, to a new state corresponding to LR - * state YYLRSTATE, at input position YYPOSN, with the (unresolved) - * semantic value of YYRHS under the action for YYRULE. */ -static inline void -yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, - size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule) -{ - yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; - - yynewState->yylrState = yylrState; - yynewState->yyposn = yyposn; - yynewState->yyresolved = yyfalse; - yynewState->yypred = yystackp->yytops.yystates[yyk]; - yynewState->yysemantics.yyfirstVal = YY_NULL; - yystackp->yytops.yystates[yyk] = yynewState; - - /* Invokes YY_RESERVE_GLRSTACK. */ - yyaddDeferredAction (yystackp, yyk, yynewState, rhs, yyrule); -} - -/** Pop the symbols consumed by reduction #RULE from the top of stack - * #K of STACK, and perform the appropriate semantic action on their - * semantic values. Assumes that all ambiguities in semantic values - * have been previously resolved. Set *VALP to the resulting value, - * and *LOCP to the computed location (if any). Return value is as - * for userAction. */ -static inline YYRESULTTAG -yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule, - YYSTYPE* yyvalp]b4_locuser_formals[) -{ - int yynrhs = yyrhsLength (yyrule); - - if (yystackp->yysplitPoint == YY_NULL) - { - /* Standard special case: single stack. */ - yyGLRStackItem* rhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk]; - YYASSERT (yyk == 0); - yystackp->yynextFree -= yynrhs; - yystackp->yyspaceLeft += yynrhs; - yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate; - return yyuserAction (yyrule, yynrhs, rhs, yystackp, - yyvalp]b4_locuser_args[); - } - else - { - /* At present, doAction is never called in nondeterministic - * mode, so this branch is never taken. It is here in - * anticipation of a future feature that will allow immediate - * evaluation of selected actions in nondeterministic mode. */ - int yyi; - yyGLRState* yys; - yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; - yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred - = yystackp->yytops.yystates[yyk];]b4_locations_if([[ - if (yynrhs == 0) - /* Set default location. */ - yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc;]])[ - for (yyi = 0; yyi < yynrhs; yyi += 1) - { - yys = yys->yypred; - YYASSERT (yys); - } - yyupdateSplit (yystackp, yys); - yystackp->yytops.yystates[yyk] = yys; - return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, - yystackp, yyvalp]b4_locuser_args[); - } -} - -#if !]b4_api_PREFIX[DEBUG -# define YY_REDUCE_PRINT(Args) -#else -# define YY_REDUCE_PRINT(Args) \ -do { \ - if (yydebug) \ - yy_reduce_print Args; \ -} while (YYID (0)) - -/*----------------------------------------------------------. -| Report that the RULE is going to be reduced on stack #K. | -`----------------------------------------------------------*/ - -/*ARGSUSED*/ static inline void -yy_reduce_print (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule, - YYSTYPE* yyvalp]b4_locuser_formals[) -{ - int yynrhs = yyrhsLength (yyrule); - yybool yynormal __attribute__ ((__unused__)) = - (yystackp->yysplitPoint == YY_NULL); - yyGLRStackItem* yyvsp = (yyGLRStackItem*) yystackp->yytops.yystates[yyk]; - int yylow = 1; - int yyi; - YYUSE (yyvalp);]b4_locations_if([ - YYUSE (yylocp);])[ -]b4_parse_param_use[]dnl -[ YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n", - (unsigned long int) yyk, yyrule - 1, - (unsigned long int) yyrline[yyrule]); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &]b4_rhs_value(yynrhs, yyi + 1)[ - ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl - b4_user_args[); - YYFPRINTF (stderr, "\n"); - } -} -#endif - -/** Pop items off stack #K of STACK according to grammar rule RULE, - * and push back on the resulting nonterminal symbol. Perform the - * semantic action associated with RULE and store its value with the - * newly pushed state, if FORCEEVAL or if STACK is currently - * unambiguous. Otherwise, store the deferred semantic action with - * the new state. If the new state would have an identical input - * position, LR state, and predecessor to an existing state on the stack, - * it is identified with that existing state, eliminating stack #K from - * the STACK. In this case, the (necessarily deferred) semantic value is - * added to the options for the existing state's semantic value. - */ -static inline YYRESULTTAG -yyglrReduce (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule, - yybool yyforceEval]b4_user_formals[) -{ - size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn; - - if (yyforceEval || yystackp->yysplitPoint == YY_NULL) - { - YYSTYPE yysval;]b4_locations_if([ - YYLTYPE yyloc;])[ - - YY_REDUCE_PRINT ((yystackp, yyk, yyrule, &yysval]b4_locuser_args([&yyloc])[)); - YYCHK (yydoAction (yystackp, yyk, yyrule, &yysval]b4_locuser_args([&yyloc])[)); - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc); - yyglrShift (yystackp, yyk, - yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState, - yylhsNonterm (yyrule)), - yyposn, &yysval]b4_locations_if([, &yyloc])[); - } - else - { - size_t yyi; - int yyn; - yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk]; - yyStateNum yynewLRState; - - for (yys = yystackp->yytops.yystates[yyk], yyn = yyrhsLength (yyrule); - 0 < yyn; yyn -= 1) - { - yys = yys->yypred; - YYASSERT (yys); - } - yyupdateSplit (yystackp, yys); - yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule)); - YYDPRINTF ((stderr, - "Reduced stack %lu by rule #%d; action deferred. Now in state %d.\n", - (unsigned long int) yyk, yyrule - 1, yynewLRState)); - for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1) - if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULL) - { - yyGLRState *yysplit = yystackp->yysplitPoint; - yyGLRState *yyp = yystackp->yytops.yystates[yyi]; - while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn) - { - if (yyp->yylrState == yynewLRState && yyp->yypred == yys) - { - yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule); - yymarkStackDeleted (yystackp, yyk); - YYDPRINTF ((stderr, "Merging stack %lu into stack %lu.\n", - (unsigned long int) yyk, - (unsigned long int) yyi)); - return yyok; - } - yyp = yyp->yypred; - } - } - yystackp->yytops.yystates[yyk] = yys; - yyglrShiftDefer (yystackp, yyk, yynewLRState, yyposn, yys0, yyrule); - } - return yyok; -} - -static size_t -yysplitStack (yyGLRStack* yystackp, size_t yyk) -{ - if (yystackp->yysplitPoint == YY_NULL) - { - YYASSERT (yyk == 0); - yystackp->yysplitPoint = yystackp->yytops.yystates[yyk]; - } - if (yystackp->yytops.yysize >= yystackp->yytops.yycapacity) - { - yyGLRState** yynewStates; - yybool* yynewLookaheadNeeds; - - yynewStates = YY_NULL; - - if (yystackp->yytops.yycapacity - > (YYSIZEMAX / (2 * sizeof yynewStates[0]))) - yyMemoryExhausted (yystackp); - yystackp->yytops.yycapacity *= 2; - - yynewStates = - (yyGLRState**) YYREALLOC (yystackp->yytops.yystates, - (yystackp->yytops.yycapacity - * sizeof yynewStates[0])); - if (yynewStates == YY_NULL) - yyMemoryExhausted (yystackp); - yystackp->yytops.yystates = yynewStates; - - yynewLookaheadNeeds = - (yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds, - (yystackp->yytops.yycapacity - * sizeof yynewLookaheadNeeds[0])); - if (yynewLookaheadNeeds == YY_NULL) - yyMemoryExhausted (yystackp); - yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds; - } - yystackp->yytops.yystates[yystackp->yytops.yysize] - = yystackp->yytops.yystates[yyk]; - yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize] - = yystackp->yytops.yylookaheadNeeds[yyk]; - yystackp->yytops.yysize += 1; - return yystackp->yytops.yysize-1; -} - -/** True iff Y0 and Y1 represent identical options at the top level. - * That is, they represent the same rule applied to RHS symbols - * that produce the same terminal symbols. */ -static yybool -yyidenticalOptions (yySemanticOption* yyy0, yySemanticOption* yyy1) -{ - if (yyy0->yyrule == yyy1->yyrule) - { - yyGLRState *yys0, *yys1; - int yyn; - for (yys0 = yyy0->yystate, yys1 = yyy1->yystate, - yyn = yyrhsLength (yyy0->yyrule); - yyn > 0; - yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1) - if (yys0->yyposn != yys1->yyposn) - return yyfalse; - return yytrue; - } - else - return yyfalse; -} - -/** Assuming identicalOptions (Y0,Y1), destructively merge the - * alternative semantic values for the RHS-symbols of Y1 and Y0. */ -static void -yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1) -{ - yyGLRState *yys0, *yys1; - int yyn; - for (yys0 = yyy0->yystate, yys1 = yyy1->yystate, - yyn = yyrhsLength (yyy0->yyrule); - yyn > 0; - yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1) - { - if (yys0 == yys1) - break; - else if (yys0->yyresolved) - { - yys1->yyresolved = yytrue; - yys1->yysemantics.yysval = yys0->yysemantics.yysval; - } - else if (yys1->yyresolved) - { - yys0->yyresolved = yytrue; - yys0->yysemantics.yysval = yys1->yysemantics.yysval; - } - else - { - yySemanticOption** yyz0p = &yys0->yysemantics.yyfirstVal; - yySemanticOption* yyz1 = yys1->yysemantics.yyfirstVal; - while (YYID (yytrue)) - { - if (yyz1 == *yyz0p || yyz1 == YY_NULL) - break; - else if (*yyz0p == YY_NULL) - { - *yyz0p = yyz1; - break; - } - else if (*yyz0p < yyz1) - { - yySemanticOption* yyz = *yyz0p; - *yyz0p = yyz1; - yyz1 = yyz1->yynext; - (*yyz0p)->yynext = yyz; - } - yyz0p = &(*yyz0p)->yynext; - } - yys1->yysemantics.yyfirstVal = yys0->yysemantics.yyfirstVal; - } - } -} - -/** Y0 and Y1 represent two possible actions to take in a given - * parsing state; return 0 if no combination is possible, - * 1 if user-mergeable, 2 if Y0 is preferred, 3 if Y1 is preferred. */ -static int -yypreference (yySemanticOption* y0, yySemanticOption* y1) -{ - yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule; - int p0 = yydprec[r0], p1 = yydprec[r1]; - - if (p0 == p1) - { - if (yymerger[r0] == 0 || yymerger[r0] != yymerger[r1]) - return 0; - else - return 1; - } - if (p0 == 0 || p1 == 0) - return 0; - if (p0 < p1) - return 3; - if (p1 < p0) - return 2; - return 0; -} - -static YYRESULTTAG yyresolveValue (yyGLRState* yys, - yyGLRStack* yystackp]b4_user_formals[); - - -/** Resolve the previous N states starting at and including state S. If result - * != yyok, some states may have been left unresolved possibly with empty - * semantic option chains. Regardless of whether result = yyok, each state - * has been left with consistent data so that yydestroyGLRState can be invoked - * if necessary. */ -static YYRESULTTAG -yyresolveStates (yyGLRState* yys, int yyn, - yyGLRStack* yystackp]b4_user_formals[) -{ - if (0 < yyn) - { - YYASSERT (yys->yypred); - YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp]b4_user_args[)); - if (! yys->yyresolved) - YYCHK (yyresolveValue (yys, yystackp]b4_user_args[)); - } - return yyok; -} - -/** Resolve the states for the RHS of OPT, perform its user action, and return - * the semantic value and location. Regardless of whether result = yyok, all - * RHS states have been destroyed (assuming the user action destroys all RHS - * semantic values if invoked). */ -static YYRESULTTAG -yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp, - YYSTYPE* yyvalp]b4_locuser_formals[) -{ - yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; - int yynrhs = yyrhsLength (yyopt->yyrule); - YYRESULTTAG yyflag = - yyresolveStates (yyopt->yystate, yynrhs, yystackp]b4_user_args[); - if (yyflag != yyok) - { - yyGLRState *yys; - for (yys = yyopt->yystate; yynrhs > 0; yys = yys->yypred, yynrhs -= 1) - yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[); - return yyflag; - } - - yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate;]b4_locations_if([[ - if (yynrhs == 0) - /* Set default location. */ - yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yyopt->yystate->yyloc;]])[ - { - int yychar_current = yychar; - YYSTYPE yylval_current = yylval;]b4_locations_if([ - YYLTYPE yylloc_current = yylloc;])[ - yychar = yyopt->yyrawchar; - yylval = yyopt->yyval;]b4_locations_if([ - yylloc = yyopt->yyloc;])[ - yyflag = yyuserAction (yyopt->yyrule, yynrhs, - yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, - yystackp, yyvalp]b4_locuser_args[); - yychar = yychar_current; - yylval = yylval_current;]b4_locations_if([ - yylloc = yylloc_current;])[ - } - return yyflag; -} - -#if ]b4_api_PREFIX[DEBUG -static void -yyreportTree (yySemanticOption* yyx, int yyindent) -{ - int yynrhs = yyrhsLength (yyx->yyrule); - int yyi; - yyGLRState* yys; - yyGLRState* yystates[1 + YYMAXRHS]; - yyGLRState yyleftmost_state; - - for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred) - yystates[yyi] = yys; - if (yys == YY_NULL) - { - yyleftmost_state.yyposn = 0; - yystates[0] = &yyleftmost_state; - } - else - yystates[0] = yys; - - if (yyx->yystate->yyposn < yys->yyposn + 1) - YYFPRINTF (stderr, "%*s%s -> \n", - yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)), - yyx->yyrule - 1); - else - YYFPRINTF (stderr, "%*s%s -> \n", - yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)), - yyx->yyrule - 1, (unsigned long int) (yys->yyposn + 1), - (unsigned long int) yyx->yystate->yyposn); - for (yyi = 1; yyi <= yynrhs; yyi += 1) - { - if (yystates[yyi]->yyresolved) - { - if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn) - YYFPRINTF (stderr, "%*s%s \n", yyindent+2, "", - yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1])); - else - YYFPRINTF (stderr, "%*s%s \n", yyindent+2, "", - yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]), - (unsigned long int) (yystates[yyi - 1]->yyposn + 1), - (unsigned long int) yystates[yyi]->yyposn); - } - else - yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2); - } -} -#endif - -/*ARGSUSED*/ static YYRESULTTAG -yyreportAmbiguity (yySemanticOption* yyx0, - yySemanticOption* yyx1]b4_pure_formals[) -{ - YYUSE (yyx0); - YYUSE (yyx1); - -#if ]b4_api_PREFIX[DEBUG - YYFPRINTF (stderr, "Ambiguity detected.\n"); - YYFPRINTF (stderr, "Option 1,\n"); - yyreportTree (yyx0, 2); - YYFPRINTF (stderr, "\nOption 2,\n"); - yyreportTree (yyx1, 2); - YYFPRINTF (stderr, "\n"); -#endif - - yyerror (]b4_yyerror_args[YY_("syntax is ambiguous")); - return yyabort; -}]b4_locations_if([[ - -/** Starting at and including state S1, resolve the location for each of the - * previous N1 states that is unresolved. The first semantic option of a state - * is always chosen. */ -static void -yyresolveLocations (yyGLRState* yys1, int yyn1, - yyGLRStack *yystackp]b4_user_formals[) -{ - if (0 < yyn1) - { - yyresolveLocations (yys1->yypred, yyn1 - 1, yystackp]b4_user_args[); - if (!yys1->yyresolved) - { - yyGLRStackItem yyrhsloc[1 + YYMAXRHS]; - int yynrhs; - yySemanticOption *yyoption = yys1->yysemantics.yyfirstVal; - YYASSERT (yyoption != YY_NULL); - yynrhs = yyrhsLength (yyoption->yyrule); - if (yynrhs > 0) - { - yyGLRState *yys; - int yyn; - yyresolveLocations (yyoption->yystate, yynrhs, - yystackp]b4_user_args[); - for (yys = yyoption->yystate, yyn = yynrhs; - yyn > 0; - yys = yys->yypred, yyn -= 1) - yyrhsloc[yyn].yystate.yyloc = yys->yyloc; - } - else - { - /* Both yyresolveAction and yyresolveLocations traverse the GSS - in reverse rightmost order. It is only necessary to invoke - yyresolveLocations on a subforest for which yyresolveAction - would have been invoked next had an ambiguity not been - detected. Thus the location of the previous state (but not - necessarily the previous state itself) is guaranteed to be - resolved already. */ - yyGLRState *yyprevious = yyoption->yystate; - yyrhsloc[0].yystate.yyloc = yyprevious->yyloc; - } - { - int yychar_current = yychar; - YYSTYPE yylval_current = yylval; - YYLTYPE yylloc_current = yylloc; - yychar = yyoption->yyrawchar; - yylval = yyoption->yyval; - yylloc = yyoption->yyloc; - YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs); - yychar = yychar_current; - yylval = yylval_current; - yylloc = yylloc_current; - } - } - } -}]])[ - -/** Resolve the ambiguity represented in state S, perform the indicated - * actions, and set the semantic value of S. If result != yyok, the chain of - * semantic options in S has been cleared instead or it has been left - * unmodified except that redundant options may have been removed. Regardless - * of whether result = yyok, S has been left with consistent data so that - * yydestroyGLRState can be invoked if necessary. */ -static YYRESULTTAG -yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp]b4_user_formals[) -{ - yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal; - yySemanticOption* yybest = yyoptionList; - yySemanticOption** yypp; - yybool yymerge = yyfalse; - YYSTYPE yysval; - YYRESULTTAG yyflag;]b4_locations_if([ - YYLTYPE *yylocp = &yys->yyloc;])[ - - for (yypp = &yyoptionList->yynext; *yypp != YY_NULL; ) - { - yySemanticOption* yyp = *yypp; - - if (yyidenticalOptions (yybest, yyp)) - { - yymergeOptionSets (yybest, yyp); - *yypp = yyp->yynext; - } - else - { - switch (yypreference (yybest, yyp)) - { - case 0:]b4_locations_if([[ - yyresolveLocations (yys, 1, yystackp]b4_user_args[);]])[ - return yyreportAmbiguity (yybest, yyp]b4_pure_args[); - break; - case 1: - yymerge = yytrue; - break; - case 2: - break; - case 3: - yybest = yyp; - yymerge = yyfalse; - break; - default: - /* This cannot happen so it is not worth a YYASSERT (yyfalse), - but some compilers complain if the default case is - omitted. */ - break; - } - yypp = &yyp->yynext; - } - } - - if (yymerge) - { - yySemanticOption* yyp; - int yyprec = yydprec[yybest->yyrule]; - yyflag = yyresolveAction (yybest, yystackp, &yysval]b4_locuser_args[); - if (yyflag == yyok) - for (yyp = yybest->yynext; yyp != YY_NULL; yyp = yyp->yynext) - { - if (yyprec == yydprec[yyp->yyrule]) - { - YYSTYPE yysval_other;]b4_locations_if([ - YYLTYPE yydummy;])[ - yyflag = yyresolveAction (yyp, yystackp, &yysval_other]b4_locuser_args([&yydummy])[); - if (yyflag != yyok) - { - yydestruct ("Cleanup: discarding incompletely merged value for", - yystos[yys->yylrState], - &yysval]b4_locuser_args[); - break; - } - yyuserMerge (yymerger[yyp->yyrule], &yysval, &yysval_other); - } - } - } - else - yyflag = yyresolveAction (yybest, yystackp, &yysval]b4_locuser_args([yylocp])[); - - if (yyflag == yyok) - { - yys->yyresolved = yytrue; - yys->yysemantics.yysval = yysval; - } - else - yys->yysemantics.yyfirstVal = YY_NULL; - return yyflag; -} - -static YYRESULTTAG -yyresolveStack (yyGLRStack* yystackp]b4_user_formals[) -{ - if (yystackp->yysplitPoint != YY_NULL) - { - yyGLRState* yys; - int yyn; - - for (yyn = 0, yys = yystackp->yytops.yystates[0]; - yys != yystackp->yysplitPoint; - yys = yys->yypred, yyn += 1) - continue; - YYCHK (yyresolveStates (yystackp->yytops.yystates[0], yyn, yystackp - ]b4_user_args[)); - } - return yyok; -} - -static void -yycompressStack (yyGLRStack* yystackp) -{ - yyGLRState* yyp, *yyq, *yyr; - - if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == YY_NULL) - return; - - for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = YY_NULL; - yyp != yystackp->yysplitPoint; - yyr = yyp, yyp = yyq, yyq = yyp->yypred) - yyp->yypred = yyr; - - yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems; - yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1; - yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems; - yystackp->yysplitPoint = YY_NULL; - yystackp->yylastDeleted = YY_NULL; - - while (yyr != YY_NULL) - { - yystackp->yynextFree->yystate = *yyr; - yyr = yyr->yypred; - yystackp->yynextFree->yystate.yypred = &yystackp->yynextFree[-1].yystate; - yystackp->yytops.yystates[0] = &yystackp->yynextFree->yystate; - yystackp->yynextFree += 1; - yystackp->yyspaceLeft -= 1; - } -} - -static YYRESULTTAG -yyprocessOneStack (yyGLRStack* yystackp, size_t yyk, - size_t yyposn]b4_pure_formals[) -{ - int yyaction; - const short int* yyconflicts; - yyRuleNum yyrule; - - while (yystackp->yytops.yystates[yyk] != YY_NULL) - { - yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState; - YYDPRINTF ((stderr, "Stack %lu Entering state %d\n", - (unsigned long int) yyk, yystate)); - - YYASSERT (yystate != YYFINAL); - - if (yyisDefaultedState (yystate)) - { - yyrule = yydefaultAction (yystate); - if (yyrule == 0) - { - YYDPRINTF ((stderr, "Stack %lu dies.\n", - (unsigned long int) yyk)); - yymarkStackDeleted (yystackp, yyk); - return yyok; - } - YYCHK (yyglrReduce (yystackp, yyk, yyrule, yyfalse]b4_user_args[)); - } - else - { - yySymbol yytoken; - yystackp->yytops.yylookaheadNeeds[yyk] = yytrue; - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts); - - while (*yyconflicts != 0) - { - size_t yynewStack = yysplitStack (yystackp, yyk); - YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n", - (unsigned long int) yynewStack, - (unsigned long int) yyk)); - YYCHK (yyglrReduce (yystackp, yynewStack, - *yyconflicts, yyfalse]b4_user_args[)); - YYCHK (yyprocessOneStack (yystackp, yynewStack, - yyposn]b4_pure_args[)); - yyconflicts += 1; - } - - if (yyisShiftAction (yyaction)) - break; - else if (yyisErrorAction (yyaction)) - { - YYDPRINTF ((stderr, "Stack %lu dies.\n", - (unsigned long int) yyk)); - yymarkStackDeleted (yystackp, yyk); - break; - } - else - YYCHK (yyglrReduce (yystackp, yyk, -yyaction, - yyfalse]b4_user_args[)); - } - } - return yyok; -} - -/*ARGSUSED*/ static void -yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[) -{ - if (yystackp->yyerrState != 0) - return; -#if ! YYERROR_VERBOSE - yyerror (]b4_lyyerror_args[YY_("syntax error")); -#else - { - yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken)); - size_t yysize = yysize0; - yybool yysize_overflow = yyfalse; - char* yymsg = YY_NULL; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[yystackp->yytops.yystates[0]->yylrState]; - yyarg[yycount++] = yytokenName (yytoken); - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for this - state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytokenName (yyx); - { - size_t yysz = yysize + yytnamerr (YY_NULL, yytokenName (yyx)); - yysize_overflow |= yysz < yysize; - yysize = yysz; - } - } - } - } - - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -#undef YYCASE_ - } - - { - size_t yysz = yysize + strlen (yyformat); - yysize_overflow |= yysz < yysize; - yysize = yysz; - } - - if (!yysize_overflow) - yymsg = (char *) YYMALLOC (yysize); - - if (yymsg) - { - char *yyp = yymsg; - int yyi = 0; - while ((*yyp = *yyformat)) - { - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - yyerror (]b4_lyyerror_args[yymsg); - YYFREE (yymsg); - } - else - { - yyerror (]b4_lyyerror_args[YY_("syntax error")); - yyMemoryExhausted (yystackp); - } - } -#endif /* YYERROR_VERBOSE */ - yynerrs += 1; -} - -/* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP, - yylval, and yylloc are the syntactic category, semantic value, and location - of the lookahead. */ -/*ARGSUSED*/ static void -yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[) -{ - size_t yyk; - int yyj; - - if (yystackp->yyerrState == 3) - /* We just shifted the error token and (perhaps) took some - reductions. Skip tokens until we can proceed. */ - while (YYID (yytrue)) - { - yySymbol yytoken; - if (yychar == YYEOF) - yyFail (yystackp][]b4_lpure_args[, YY_NULL); - if (yychar != YYEMPTY) - {]b4_locations_if([[ - /* We throw away the lookahead, but the error range - of the shifted error token must take it into account. */ - yyGLRState *yys = yystackp->yytops.yystates[0]; - yyGLRStackItem yyerror_range[3]; - yyerror_range[1].yystate.yyloc = yys->yyloc; - yyerror_range[2].yystate.yyloc = yylloc; - YYLLOC_DEFAULT ((yys->yyloc), yyerror_range, 2);]])[ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Error: discarding", - yytoken, &yylval]b4_locuser_args([&yylloc])[); - } - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - yyj = yypact[yystackp->yytops.yystates[0]->yylrState]; - if (yypact_value_is_default (yyj)) - return; - yyj += yytoken; - if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken) - { - if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0) - return; - } - else if (! yytable_value_is_error (yytable[yyj])) - return; - } - - /* Reduce to one stack. */ - for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1) - if (yystackp->yytops.yystates[yyk] != YY_NULL) - break; - if (yyk >= yystackp->yytops.yysize) - yyFail (yystackp][]b4_lpure_args[, YY_NULL); - for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1) - yymarkStackDeleted (yystackp, yyk); - yyremoveDeletes (yystackp); - yycompressStack (yystackp); - - /* Now pop stack until we find a state that shifts the error token. */ - yystackp->yyerrState = 3; - while (yystackp->yytops.yystates[0] != YY_NULL) - { - yyGLRState *yys = yystackp->yytops.yystates[0]; - yyj = yypact[yys->yylrState]; - if (! yypact_value_is_default (yyj)) - { - yyj += YYTERROR; - if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR - && yyisShiftAction (yytable[yyj])) - { - /* Shift the error token. */]b4_locations_if([[ - /* First adjust its location.*/ - YYLTYPE yyerrloc; - yystackp->yyerror_range[2].yystate.yyloc = yylloc; - YYLLOC_DEFAULT (yyerrloc, (yystackp->yyerror_range), 2);]])[ - YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]], - &yylval, &yyerrloc); - yyglrShift (yystackp, 0, yytable[yyj], - yys->yyposn, &yylval]b4_locations_if([, &yyerrloc])[); - yys = yystackp->yytops.yystates[0]; - break; - } - }]b4_locations_if([[ - yystackp->yyerror_range[1].yystate.yyloc = yys->yyloc;]])[ - if (yys->yypred != YY_NULL) - yydestroyGLRState ("Error: popping", yys]b4_user_args[); - yystackp->yytops.yystates[0] = yys->yypred; - yystackp->yynextFree -= 1; - yystackp->yyspaceLeft += 1; - } - if (yystackp->yytops.yystates[0] == YY_NULL) - yyFail (yystackp][]b4_lpure_args[, YY_NULL); -} - -#define YYCHK1(YYE) \ - do { \ - switch (YYE) { \ - case yyok: \ - break; \ - case yyabort: \ - goto yyabortlab; \ - case yyaccept: \ - goto yyacceptlab; \ - case yyerr: \ - goto yyuser_error; \ - default: \ - goto yybuglab; \ - } \ - } while (YYID (0)) - - -/*----------. -| yyparse. | -`----------*/ - -]b4_c_ansi_function_def([yyparse], [int], b4_parse_param)[ -{ - int yyresult; - yyGLRStack yystack; - yyGLRStack* const yystackp = &yystack; - size_t yyposn; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yychar = YYEMPTY; - yylval = yyval_default;]b4_locations_if([ - yylloc = yyloc_default;])[ -]m4_ifdef([b4_initial_action], [ -b4_dollar_pushdef([yylval], [], [yylloc])dnl -/* User initialization code. */ -b4_user_initial_action -b4_dollar_popdef])[]dnl -[ - if (! yyinitGLRStack (yystackp, YYINITDEPTH)) - goto yyexhaustedlab; - switch (YYSETJMP (yystack.yyexception_buffer)) - { - case 0: break; - case 1: goto yyabortlab; - case 2: goto yyexhaustedlab; - default: goto yybuglab; - } - yyglrShift (&yystack, 0, 0, 0, &yylval]b4_locations_if([, &yylloc])[); - yyposn = 0; - - while (YYID (yytrue)) - { - /* For efficiency, we have two loops, the first of which is - specialized to deterministic operation (single stack, no - potential ambiguity). */ - /* Standard mode */ - while (YYID (yytrue)) - { - yyRuleNum yyrule; - int yyaction; - const short int* yyconflicts; - - yyStateNum yystate = yystack.yytops.yystates[0]->yylrState; - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - goto yyacceptlab; - if (yyisDefaultedState (yystate)) - { - yyrule = yydefaultAction (yystate); - if (yyrule == 0) - { -]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[ - yyreportSyntaxError (&yystack]b4_user_args[); - goto yyuser_error; - } - YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_user_args[)); - } - else - { - yySymbol yytoken; - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts); - if (*yyconflicts != 0) - break; - if (yyisShiftAction (yyaction)) - { - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - yychar = YYEMPTY; - yyposn += 1; - yyglrShift (&yystack, 0, yyaction, yyposn, &yylval]b4_locations_if([, &yylloc])[); - if (0 < yystack.yyerrState) - yystack.yyerrState -= 1; - } - else if (yyisErrorAction (yyaction)) - { -]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[ - yyreportSyntaxError (&yystack]b4_user_args[); - goto yyuser_error; - } - else - YYCHK1 (yyglrReduce (&yystack, 0, -yyaction, yytrue]b4_user_args[)); - } - } - - while (YYID (yytrue)) - { - yySymbol yytoken_to_shift; - size_t yys; - - for (yys = 0; yys < yystack.yytops.yysize; yys += 1) - yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY; - - /* yyprocessOneStack returns one of three things: - - - An error flag. If the caller is yyprocessOneStack, it - immediately returns as well. When the caller is finally - yyparse, it jumps to an error label via YYCHK1. - - - yyok, but yyprocessOneStack has invoked yymarkStackDeleted - (&yystack, yys), which sets the top state of yys to NULL. Thus, - yyparse's following invocation of yyremoveDeletes will remove - the stack. - - - yyok, when ready to shift a token. - - Except in the first case, yyparse will invoke yyremoveDeletes and - then shift the next token onto all remaining stacks. This - synchronization of the shift (that is, after all preceding - reductions on all stacks) helps prevent double destructor calls - on yylval in the event of memory exhaustion. */ - - for (yys = 0; yys < yystack.yytops.yysize; yys += 1) - YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn]b4_lpure_args[)); - yyremoveDeletes (&yystack); - if (yystack.yytops.yysize == 0) - { - yyundeleteLastStack (&yystack); - if (yystack.yytops.yysize == 0) - yyFail (&yystack][]b4_lpure_args[, YY_("syntax error")); - YYCHK1 (yyresolveStack (&yystack]b4_user_args[)); - YYDPRINTF ((stderr, "Returning to deterministic operation.\n")); -]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[ - yyreportSyntaxError (&yystack]b4_user_args[); - goto yyuser_error; - } - - /* If any yyglrShift call fails, it will fail after shifting. Thus, - a copy of yylval will already be on stack 0 in the event of a - failure in the following loop. Thus, yychar is set to YYEMPTY - before the loop to make sure the user destructor for yylval isn't - called twice. */ - yytoken_to_shift = YYTRANSLATE (yychar); - yychar = YYEMPTY; - yyposn += 1; - for (yys = 0; yys < yystack.yytops.yysize; yys += 1) - { - int yyaction; - const short int* yyconflicts; - yyStateNum yystate = yystack.yytops.yystates[yys]->yylrState; - yygetLRActions (yystate, yytoken_to_shift, &yyaction, - &yyconflicts); - /* Note that yyconflicts were handled by yyprocessOneStack. */ - YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys)); - YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc); - yyglrShift (&yystack, yys, yyaction, yyposn, - &yylval]b4_locations_if([, &yylloc])[); - YYDPRINTF ((stderr, "Stack %lu now in state #%d\n", - (unsigned long int) yys, - yystack.yytops.yystates[yys]->yylrState)); - } - - if (yystack.yytops.yysize == 1) - { - YYCHK1 (yyresolveStack (&yystack]b4_user_args[)); - YYDPRINTF ((stderr, "Returning to deterministic operation.\n")); - yycompressStack (&yystack); - break; - } - } - continue; - yyuser_error: - yyrecoverSyntaxError (&yystack]b4_user_args[); - yyposn = yystack.yytops.yystates[0]->yyposn; - } - - yyacceptlab: - yyresult = 0; - goto yyreturn; - - yybuglab: - YYASSERT (yyfalse); - goto yyabortlab; - - yyabortlab: - yyresult = 1; - goto yyreturn; - - yyexhaustedlab: - yyerror (]b4_lyyerror_args[YY_("memory exhausted")); - yyresult = 2; - goto yyreturn; - - yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - YYTRANSLATE (yychar), &yylval]b4_locuser_args([&yylloc])[); - - /* If the stack is well-formed, pop the stack until it is empty, - destroying its entries as we go. But free the stack regardless - of whether it is well-formed. */ - if (yystack.yyitems) - { - yyGLRState** yystates = yystack.yytops.yystates; - if (yystates) - { - size_t yysize = yystack.yytops.yysize; - size_t yyk; - for (yyk = 0; yyk < yysize; yyk += 1) - if (yystates[yyk]) - { - while (yystates[yyk]) - { - yyGLRState *yys = yystates[yyk]; -]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]] -)[ if (yys->yypred != YY_NULL) - yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[); - yystates[yyk] = yys->yypred; - yystack.yynextFree -= 1; - yystack.yyspaceLeft += 1; - } - break; - } - } - yyfreeGLRStack (&yystack); - } - - /* Make sure YYID is used. */ - return YYID (yyresult); -} - -/* DEBUGGING ONLY */ -#if ]b4_api_PREFIX[DEBUG -static void yypstack (yyGLRStack* yystackp, size_t yyk) - __attribute__ ((__unused__)); -static void yypdumpstack (yyGLRStack* yystackp) __attribute__ ((__unused__)); - -static void -yy_yypstack (yyGLRState* yys) -{ - if (yys->yypred) - { - yy_yypstack (yys->yypred); - YYFPRINTF (stderr, " -> "); - } - YYFPRINTF (stderr, "%d@@%lu", yys->yylrState, - (unsigned long int) yys->yyposn); -} - -static void -yypstates (yyGLRState* yyst) -{ - if (yyst == YY_NULL) - YYFPRINTF (stderr, ""); - else - yy_yypstack (yyst); - YYFPRINTF (stderr, "\n"); -} - -static void -yypstack (yyGLRStack* yystackp, size_t yyk) -{ - yypstates (yystackp->yytops.yystates[yyk]); -} - -#define YYINDEX(YYX) \ - ((YYX) == YY_NULL ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems) - - -static void -yypdumpstack (yyGLRStack* yystackp) -{ - yyGLRStackItem* yyp; - size_t yyi; - for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1) - { - YYFPRINTF (stderr, "%3lu. ", - (unsigned long int) (yyp - yystackp->yyitems)); - if (*(yybool *) yyp) - { - YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld", - yyp->yystate.yyresolved, yyp->yystate.yylrState, - (unsigned long int) yyp->yystate.yyposn, - (long int) YYINDEX (yyp->yystate.yypred)); - if (! yyp->yystate.yyresolved) - YYFPRINTF (stderr, ", firstVal: %ld", - (long int) YYINDEX (yyp->yystate - .yysemantics.yyfirstVal)); - } - else - { - YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld", - yyp->yyoption.yyrule - 1, - (long int) YYINDEX (yyp->yyoption.yystate), - (long int) YYINDEX (yyp->yyoption.yynext)); - } - YYFPRINTF (stderr, "\n"); - } - YYFPRINTF (stderr, "Tops:"); - for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1) - YYFPRINTF (stderr, "%lu: %ld; ", (unsigned long int) yyi, - (long int) YYINDEX (yystackp->yytops.yystates[yyi])); - YYFPRINTF (stderr, "\n"); -} -#endif -]b4_epilogue[]dnl -b4_output_end() - -# glr.cc produces its own header. -m4_if(b4_skeleton, ["glr.c"], -[b4_defines_if( -[b4_output_begin([b4_spec_defines_file]) -b4_copyright([Skeleton interface for Bison GLR parsers in C], - [2002-2012])[ - -]b4_cpp_guard_open([b4_spec_defines_file])[ -]b4_shared_declarations[ -]b4_cpp_guard_close([b4_spec_defines_file])[ -]b4_output_end() -])]) diff --git a/tools/data/glr.cc b/tools/data/glr.cc deleted file mode 100644 index 378abb39..00000000 --- a/tools/data/glr.cc +++ /dev/null @@ -1,346 +0,0 @@ - -*- C -*- - -# C++ GLR skeleton for Bison - -# Copyright (C) 2002-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# This skeleton produces a C++ class that encapsulates a C glr parser. -# This is in order to reduce the maintenance burden. The glr.c -# skeleton is clean and pure enough so that there are no real -# problems. The C++ interface is the same as that of lalr1.cc. In -# fact, glr.c can replace yacc.c without the user noticing any -# difference, and similarly for glr.cc replacing lalr1.cc. -# -# The passing of parse-params -# -# The additional arguments are stored as members of the parser -# object, yyparser. The C routines need to carry yyparser -# throughout the C parser; that easy: just let yyparser become an -# additional parse-param. But because the C++ skeleton needs to -# know the "real" original parse-param, we save them -# (b4_parse_param_orig). Note that b4_parse_param is overquoted -# (and c.m4 strips one level of quotes). This is a PITA, and -# explains why there are so many levels of quotes. -# -# The locations -# -# We use location.cc just like lalr1.cc, but because glr.c stores -# the locations in a (C++) union, the position and location classes -# must not have a constructor. Therefore, contrary to lalr1.cc, we -# must not define "b4_location_constructors". As a consequence the -# user must initialize the first positions (in particular the -# filename member). - -# We require a pure interface using locations. -m4_define([b4_locations_flag], [1]) -m4_define([b4_pure_flag], [1]) - -# The header is mandatory. -b4_defines_if([], - [b4_fatal([b4_skeleton[: using %%defines is mandatory]])]) - -m4_include(b4_pkgdatadir/[c++.m4]) -b4_percent_define_ifdef([[api.location.type]], [], - [m4_include(b4_pkgdatadir/[location.cc])]) - -m4_define([b4_parser_class_name], - [b4_percent_define_get([[parser_class_name]])]) - -# Save the parse parameters. -m4_define([b4_parse_param_orig], m4_defn([b4_parse_param])) - - -# b4_yy_symbol_print_generate -# --------------------------- -# Bypass the default implementation to generate the "yy_symbol_print" -# and "yy_symbol_value_print" functions. -m4_define([b4_yy_symbol_print_generate], -[[ -/*--------------------. -| Print this symbol. | -`--------------------*/ - -]b4_c_ansi_function_def([yy_symbol_print], - [static void], - [[FILE *], []], - [[int yytype], [yytype]], - [[const ]b4_namespace_ref::b4_parser_class_name[::semantic_type *yyvaluep], - [yyvaluep]], - [[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp], - [yylocationp]], - b4_parse_param)[ -{ -]b4_parse_param_use[]dnl -[ yyparser.yy_symbol_print_ (yytype, yyvaluep]b4_locations_if([, yylocationp])[); -} -]])[ - -# Hijack the initial action to initialize the locations. -]b4_locations_if([b4_percent_define_ifdef([[api.location.type]], [], -[m4_define([b4_initial_action], -[yylloc.initialize ();]m4_ifdef([b4_initial_action], [ -m4_defn([b4_initial_action])]))])])[ - -# Hijack the post prologue to insert early definition of YYLLOC_DEFAULT -# and declaration of yyerror. -]m4_append([b4_post_prologue], -[b4_syncline([@oline@], [@ofile@])[ -]b4_yylloc_default_define[ -#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc) -]b4_c_ansi_function_decl([yyerror], - [static void], - [[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp], - [yylocationp]], - b4_parse_param, - [[const char* msg], [msg]])]) - - -# Hijack the epilogue to define implementations (yyerror, parser member -# functions etc.). -m4_append([b4_epilogue], -[b4_syncline([@oline@], [@ofile@])[ -/*------------------. -| Report an error. | -`------------------*/ - -]b4_c_ansi_function_def([yyerror], - [static void], - [[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp], - [yylocationp]], - b4_parse_param, - [[const char* msg], [msg]])[ -{ -]b4_parse_param_use[]dnl -[ yyparser.error (*yylocationp, msg); -} - - -]b4_namespace_open[ -]dnl In this section, the parse param are the original parse_params. -m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl -[ /// Build a parser object. - ]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [ - :])[ -#if ]b4_api_PREFIX[DEBUG - ]m4_ifset([b4_parse_param], [ ], [ :])[ - yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[ -#endif]b4_parse_param_cons[ - { - } - - ]b4_parser_class_name::~b4_parser_class_name[ () - { - } - - int - ]b4_parser_class_name[::parse () - { - return ::yyparse (*this]b4_user_args[); - } - -#if ]b4_api_PREFIX[DEBUG - /*--------------------. - | Print this symbol. | - `--------------------*/ - - inline void - ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype, - const semantic_type* yyvaluep, - const location_type* yylocationp) - { - YYUSE (yylocationp); - YYUSE (yyvaluep); - std::ostream& yyoutput = debug_stream (); - std::ostream& yyo = yyoutput; - YYUSE (yyo); - switch (yytype) - { - ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl -[ default: - break; - } - } - - - void - ]b4_parser_class_name[::yy_symbol_print_ (int yytype, - const semantic_type* yyvaluep, - const location_type* yylocationp) - { - *yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm") - << ' ' << yytname[yytype] << " (" - << *yylocationp << ": "; - yy_symbol_value_print_ (yytype, yyvaluep, yylocationp); - *yycdebug_ << ')'; - } - - std::ostream& - ]b4_parser_class_name[::debug_stream () const - { - return *yycdebug_; - } - - void - ]b4_parser_class_name[::set_debug_stream (std::ostream& o) - { - yycdebug_ = &o; - } - - - ]b4_parser_class_name[::debug_level_type - ]b4_parser_class_name[::debug_level () const - { - return yydebug; - } - - void - ]b4_parser_class_name[::set_debug_level (debug_level_type l) - { - // Actually, it is yydebug which is really used. - yydebug = l; - } - -#endif -]m4_popdef([b4_parse_param])dnl -b4_namespace_close]) - - -# Let glr.c believe that the user arguments include the parser itself. -m4_ifset([b4_parse_param], -[m4_pushdef([b4_parse_param], - [[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]],] -m4_defn([b4_parse_param]))], -[m4_pushdef([b4_parse_param], - [[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]]]) -]) -m4_include(b4_pkgdatadir/[glr.c]) -m4_popdef([b4_parse_param]) - -b4_output_begin([b4_spec_defines_file]) -b4_copyright([Skeleton interface for Bison GLR parsers in C++], - [2002-2006, 2009-2012])[ - -/* C++ GLR parser skeleton written by Akim Demaille. */ - -]b4_cpp_guard_open([b4_spec_defines_file])[ - -]b4_percent_code_get([[requires]])[ - -# include -# include -]b4_percent_define_ifdef([[api.location.type]], [], - [[# include "location.hh"]])[ - -]b4_YYDEBUG_define[ - -]b4_namespace_open[ - /// A Bison parser. - class ]b4_parser_class_name[ - { - public: - /// Symbol semantic values. -# ifndef ]b4_api_PREFIX[STYPE -]m4_ifdef([b4_stype], -[ union semantic_type - { -b4_user_stype - };], -[m4_if(b4_tag_seen_flag, 0, -[[ typedef int semantic_type;]], -[[ typedef ]b4_api_PREFIX[STYPE semantic_type;]])])[ -# else - typedef ]b4_api_PREFIX[STYPE semantic_type; -# endif - /// Symbol locations. - typedef ]b4_percent_define_get([[api.location.type]], - [[location]])[ location_type; - /// Tokens. - struct token - { - ]b4_token_enums(b4_tokens)[ - }; - /// Token type. - typedef token::yytokentype token_type; - - /// Build a parser object. - ]b4_parser_class_name[ (]b4_parse_param_decl[); - virtual ~]b4_parser_class_name[ (); - - /// Parse. - /// \returns 0 iff parsing succeeded. - virtual int parse (); - - /// The current debugging stream. - std::ostream& debug_stream () const; - /// Set the current debugging stream. - void set_debug_stream (std::ostream &); - - /// Type for debugging levels. - typedef int debug_level_type; - /// The current debugging level. - debug_level_type debug_level () const; - /// Set the current debugging level. - void set_debug_level (debug_level_type l); - - private: - - public: - /// Report a syntax error. - /// \param loc where the syntax error is found. - /// \param msg a description of the syntax error. - virtual void error (const location_type& loc, const std::string& msg); - private: - -# if ]b4_api_PREFIX[DEBUG - public: - /// \brief Report a symbol value on the debug stream. - /// \param yytype The token type. - /// \param yyvaluep Its semantic value. - /// \param yylocationp Its location. - virtual void yy_symbol_value_print_ (int yytype, - const semantic_type* yyvaluep, - const location_type* yylocationp); - /// \brief Report a symbol on the debug stream. - /// \param yytype The token type. - /// \param yyvaluep Its semantic value. - /// \param yylocationp Its location. - virtual void yy_symbol_print_ (int yytype, - const semantic_type* yyvaluep, - const location_type* yylocationp); - private: - /* Debugging. */ - std::ostream* yycdebug_; -# endif - -]b4_parse_param_vars[ - }; - -]dnl Redirections for glr.c. -b4_percent_define_flag_if([[global_tokens_and_yystype]], -[b4_token_defines(b4_tokens)]) -[ -#ifndef ]b4_api_PREFIX[STYPE -# define ]b4_api_PREFIX[STYPE ]b4_namespace_ref[::]b4_parser_class_name[::semantic_type -#endif -#ifndef ]b4_api_PREFIX[LTYPE -# define ]b4_api_PREFIX[LTYPE ]b4_namespace_ref[::]b4_parser_class_name[::location_type -#endif - -]b4_namespace_close[ -]b4_percent_code_get([[provides]])[ -]b4_cpp_guard_close([b4_spec_defines_file])[ -]b4_output_end() diff --git a/tools/data/java-skel.m4 b/tools/data/java-skel.m4 deleted file mode 100644 index 171a233b..00000000 --- a/tools/data/java-skel.m4 +++ /dev/null @@ -1,26 +0,0 @@ - -*- Autoconf -*- - -# Java skeleton dispatching for Bison. - -# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -b4_glr_if( [b4_complain([%%glr-parser not supported for Java])]) -b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for Java])]) - -m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.java]]) -m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) - -m4_include(b4_used_skeleton) diff --git a/tools/data/java.m4 b/tools/data/java.m4 deleted file mode 100644 index fe6dd528..00000000 --- a/tools/data/java.m4 +++ /dev/null @@ -1,304 +0,0 @@ - -*- Autoconf -*- - -# Java language support for Bison - -# Copyright (C) 2007-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -m4_include(b4_pkgdatadir/[c-like.m4]) - -# b4_comment(TEXT) -# ---------------- -m4_define([b4_comment], [/* m4_bpatsubst([$1], [ -], [ - ]) */]) - - -# b4_list2(LIST1, LIST2) -# -------------------------- -# Join two lists with a comma if necessary. -m4_define([b4_list2], - [$1[]m4_ifval(m4_quote($1), [m4_ifval(m4_quote($2), [[, ]])])[]$2]) - - -# b4_percent_define_get3(DEF, PRE, POST, NOT) -# ------------------------------------------- -# Expand to the value of DEF surrounded by PRE and POST if it's %define'ed, -# otherwise NOT. -m4_define([b4_percent_define_get3], - [m4_ifval(m4_quote(b4_percent_define_get([$1])), - [$2[]b4_percent_define_get([$1])[]$3], [$4])]) - - - -# b4_flag_value(BOOLEAN-FLAG) -# --------------------------- -m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])]) - - -# b4_public_if(TRUE, FALSE) -# ------------------------- -b4_percent_define_default([[public]], [[false]]) -m4_define([b4_public_if], -[b4_percent_define_flag_if([public], [$1], [$2])]) - - -# b4_abstract_if(TRUE, FALSE) -# --------------------------- -b4_percent_define_default([[abstract]], [[false]]) -m4_define([b4_abstract_if], -[b4_percent_define_flag_if([abstract], [$1], [$2])]) - - -# b4_final_if(TRUE, FALSE) -# --------------------------- -b4_percent_define_default([[final]], [[false]]) -m4_define([b4_final_if], -[b4_percent_define_flag_if([final], [$1], [$2])]) - - -# b4_strictfp_if(TRUE, FALSE) -# --------------------------- -b4_percent_define_default([[strictfp]], [[false]]) -m4_define([b4_strictfp_if], -[b4_percent_define_flag_if([strictfp], [$1], [$2])]) - - -# b4_lexer_if(TRUE, FALSE) -# ------------------------ -m4_define([b4_lexer_if], -[b4_percent_code_ifdef([[lexer]], [$1], [$2])]) - - -# b4_identification -# ----------------- -m4_define([b4_identification], -[ /** Version number for the Bison executable that generated this parser. */ - public static final String bisonVersion = "b4_version"; - - /** Name of the skeleton that generated this parser. */ - public static final String bisonSkeleton = b4_skeleton; -]) - - -## ------------ ## -## Data types. ## -## ------------ ## - -# b4_int_type(MIN, MAX) -# --------------------- -# Return the smallest int type able to handle numbers ranging from -# MIN to MAX (included). -m4_define([b4_int_type], -[m4_if(b4_ints_in($@, [-128], [127]), [1], [byte], - b4_ints_in($@, [-32768], [32767]), [1], [short], - [int])]) - -# b4_int_type_for(NAME) -# --------------------- -# Return the smallest int type able to handle numbers ranging from -# `NAME_min' to `NAME_max' (included). -m4_define([b4_int_type_for], -[b4_int_type($1_min, $1_max)]) - -# b4_null -# ------- -m4_define([b4_null], [null]) - - -## ------------------------- ## -## Assigning token numbers. ## -## ------------------------- ## - -# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER) -# --------------------------------------- -# Output the definition of this token as an enum. -m4_define([b4_token_enum], -[ /** Token number, to be returned by the scanner. */ - public static final int $1 = $2; -]) - - -# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) -# ----------------------------------------------------- -# Output the definition of the tokens (if there are) as enums. -m4_define([b4_token_enums], -[m4_if([$#$1], [1], [], -[/* Tokens. */ -m4_map([b4_token_enum], [$@])]) -]) - -# b4-case(ID, CODE) -# ----------------- -# We need to fool Java's stupid unreachable code detection. -m4_define([b4_case], [ case $1: - if (yyn == $1) - $2; - break; - ]) - - -## ---------------- ## -## Default values. ## -## ---------------- ## - -m4_define([b4_yystype], [b4_percent_define_get([[stype]])]) -b4_percent_define_default([[stype]], [[Object]]) - -# %name-prefix -m4_define_default([b4_prefix], [[YY]]) - -b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser]) -m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])]) - -b4_percent_define_default([[lex_throws]], [[java.io.IOException]]) -m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])]) - -b4_percent_define_default([[throws]], []) -m4_define([b4_throws], [b4_percent_define_get([[throws]])]) - -b4_percent_define_default([[api.location.type]], [Location]) -m4_define([b4_location_type], [b4_percent_define_get([[api.location.type]])]) - -b4_percent_define_default([[api.position.type]], [Position]) -m4_define([b4_position_type], [b4_percent_define_get([[api.position.type]])]) - - -## ----------------- ## -## Semantic Values. ## -## ----------------- ## - - -# b4_lhs_value([TYPE]) -# -------------------- -# Expansion of $$. -m4_define([b4_lhs_value], [yyval]) - - -# b4_rhs_value(RULE-LENGTH, NUM, [TYPE]) -# -------------------------------------- -# Expansion of $NUM, where the current rule has RULE-LENGTH -# symbols on RHS. -# -# In this simple implementation, %token and %type have class names -# between the angle brackets. -m4_define([b4_rhs_value], -[(m4_ifval($3, [($3)])[](yystack.valueAt ($1-($2))))]) - -# b4_lhs_location() -# ----------------- -# Expansion of @$. -m4_define([b4_lhs_location], -[(yyloc)]) - - -# b4_rhs_location(RULE-LENGTH, NUM) -# --------------------------------- -# Expansion of @NUM, where the current rule has RULE-LENGTH symbols -# on RHS. -m4_define([b4_rhs_location], -[yystack.locationAt ($1-($2))]) - - -# b4_lex_param -# b4_parse_param -# -------------- -# If defined, b4_lex_param arrives double quoted, but below we prefer -# it to be single quoted. Same for b4_parse_param. - -# TODO: should be in bison.m4 -m4_define_default([b4_lex_param], [[]]) -m4_define([b4_lex_param], b4_lex_param) -m4_define([b4_parse_param], b4_parse_param) - -# b4_lex_param_decl -# ------------------- -# Extra formal arguments of the constructor. -m4_define([b4_lex_param_decl], -[m4_ifset([b4_lex_param], - [b4_remove_comma([$1], - b4_param_decls(b4_lex_param))], - [$1])]) - -m4_define([b4_param_decls], - [m4_map([b4_param_decl], [$@])]) -m4_define([b4_param_decl], [, $1]) - -m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)]) - - - -# b4_parse_param_decl -# ------------------- -# Extra formal arguments of the constructor. -m4_define([b4_parse_param_decl], -[m4_ifset([b4_parse_param], - [b4_remove_comma([$1], - b4_param_decls(b4_parse_param))], - [$1])]) - - - -# b4_lex_param_call -# ------------------- -# Delegating the lexer parameters to the lexer constructor. -m4_define([b4_lex_param_call], - [m4_ifset([b4_lex_param], - [b4_remove_comma([$1], - b4_param_calls(b4_lex_param))], - [$1])]) -m4_define([b4_param_calls], - [m4_map([b4_param_call], [$@])]) -m4_define([b4_param_call], [, $2]) - - - -# b4_parse_param_cons -# ------------------- -# Extra initialisations of the constructor. -m4_define([b4_parse_param_cons], - [m4_ifset([b4_parse_param], - [b4_constructor_calls(b4_parse_param)])]) - -m4_define([b4_constructor_calls], - [m4_map([b4_constructor_call], [$@])]) -m4_define([b4_constructor_call], - [this.$2 = $2; - ]) - - - -# b4_parse_param_vars -# ------------------- -# Extra instance variables. -m4_define([b4_parse_param_vars], - [m4_ifset([b4_parse_param], - [ - /* User arguments. */ -b4_var_decls(b4_parse_param)])]) - -m4_define([b4_var_decls], - [m4_map_sep([b4_var_decl], [ -], [$@])]) -m4_define([b4_var_decl], - [ protected final $1;]) - - - -# b4_maybe_throws(THROWS) -# ----------------------- -# Expand to either an empty string or "throws THROWS". -m4_define([b4_maybe_throws], - [m4_ifval($1, [throws $1])]) diff --git a/tools/data/lalr1.cc b/tools/data/lalr1.cc deleted file mode 100644 index 13170154..00000000 --- a/tools/data/lalr1.cc +++ /dev/null @@ -1,1143 +0,0 @@ -# C++ skeleton for Bison - -# Copyright (C) 2002-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -m4_include(b4_pkgdatadir/[c++.m4]) - -m4_define([b4_parser_class_name], - [b4_percent_define_get([[parser_class_name]])]) - -# The header is mandatory. -b4_defines_if([], - [b4_fatal([b4_skeleton[: using %%defines is mandatory]])]) - -b4_percent_define_ifdef([[api.location.type]], [], - [# Backward compatibility. - m4_define([b4_location_constructors]) - m4_include(b4_pkgdatadir/[location.cc])]) -m4_include(b4_pkgdatadir/[stack.hh]) - -b4_defines_if( -[b4_output_begin([b4_spec_defines_file]) -b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++], - [2002-2012]) -[ -/** - ** \file ]b4_spec_defines_file[ - ** Define the ]b4_namespace_ref[::parser class. - */ - -/* C++ LALR(1) parser skeleton written by Akim Demaille. */ - -]b4_cpp_guard_open([b4_spec_defines_file])[ - -]b4_percent_code_get([[requires]])[ - -#include -#include -#include "stack.hh" -]b4_percent_define_ifdef([[api.location.type]], [], - [[#include "location.hh"]])[ - -]b4_YYDEBUG_define[ - -]b4_namespace_open[ - - /// A Bison parser. - class ]b4_parser_class_name[ - { - public: - /// Symbol semantic values. -#ifndef ]b4_api_PREFIX[STYPE -]m4_ifdef([b4_stype], -[ union semantic_type - { -b4_user_stype - };], -[m4_if(b4_tag_seen_flag, 0, -[[ typedef int semantic_type;]], -[[ typedef ]b4_api_PREFIX[STYPE semantic_type;]])])[ -#else - typedef ]b4_api_PREFIX[STYPE semantic_type; -#endif - /// Symbol locations. - typedef ]b4_percent_define_get([[api.location.type]], - [[location]])[ location_type; - /// Tokens. - struct token - { - ]b4_token_enums(b4_tokens)[ - }; - /// Token type. - typedef token::yytokentype token_type; - - /// Build a parser object. - ]b4_parser_class_name[ (]b4_parse_param_decl[); - virtual ~]b4_parser_class_name[ (); - - /// Parse. - /// \returns 0 iff parsing succeeded. - virtual int parse (); - -#if ]b4_api_PREFIX[DEBUG - /// The current debugging stream. - std::ostream& debug_stream () const; - /// Set the current debugging stream. - void set_debug_stream (std::ostream &); - - /// Type for debugging levels. - typedef int debug_level_type; - /// The current debugging level. - debug_level_type debug_level () const; - /// Set the current debugging level. - void set_debug_level (debug_level_type l); -#endif - - private: - /// Report a syntax error. - /// \param loc where the syntax error is found. - /// \param msg a description of the syntax error. - virtual void error (const location_type& loc, const std::string& msg); - - /// Generate an error message. - /// \param state the state where the error occurred. - /// \param tok the lookahead token. - virtual std::string yysyntax_error_ (int yystate, int tok); - -#if ]b4_api_PREFIX[DEBUG - /// \brief Report a symbol value on the debug stream. - /// \param yytype The token type. - /// \param yyvaluep Its semantic value. - /// \param yylocationp Its location. - virtual void yy_symbol_value_print_ (int yytype, - const semantic_type* yyvaluep, - const location_type* yylocationp); - /// \brief Report a symbol on the debug stream. - /// \param yytype The token type. - /// \param yyvaluep Its semantic value. - /// \param yylocationp Its location. - virtual void yy_symbol_print_ (int yytype, - const semantic_type* yyvaluep, - const location_type* yylocationp); -#endif - - - /// State numbers. - typedef int state_type; - /// State stack type. - typedef stack state_stack_type; - /// Semantic value stack type. - typedef stack semantic_stack_type; - /// location stack type. - typedef stack location_stack_type; - - /// The state stack. - state_stack_type yystate_stack_; - /// The semantic value stack. - semantic_stack_type yysemantic_stack_; - /// The location stack. - location_stack_type yylocation_stack_; - - /// Whether the given \c yypact_ value indicates a defaulted state. - /// \param yyvalue the value to check - static bool yy_pact_value_is_default_ (int yyvalue); - - /// Whether the given \c yytable_ value indicates a syntax error. - /// \param yyvalue the value to check - static bool yy_table_value_is_error_ (int yyvalue); - - /// Internal symbol numbers. - typedef ]b4_int_type_for([b4_translate])[ token_number_type; - /* Tables. */ - /// For a state, the index in \a yytable_ of its portion. - static const ]b4_int_type_for([b4_pact])[ yypact_[]; - static const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)[ yypact_ninf_; - - /// For a state, default reduction number. - /// Unless\a yytable_ specifies something else to do. - /// Zero means the default is an error. - static const ]b4_int_type_for([b4_defact])[ yydefact_[]; - - static const ]b4_int_type_for([b4_pgoto])[ yypgoto_[]; - static const ]b4_int_type_for([b4_defgoto])[ yydefgoto_[]; - - /// What to do in a state. - /// \a yytable_[yypact_[s]]: what to do in state \a s. - /// - if positive, shift that token. - /// - if negative, reduce the rule which number is the opposite. - /// - if zero, do what YYDEFACT says. - static const ]b4_int_type_for([b4_table])[ yytable_[]; - static const ]b4_int_type(b4_table_ninf, b4_table_ninf)[ yytable_ninf_; - - static const ]b4_int_type_for([b4_check])[ yycheck_[]; - - /// For a state, its accessing symbol. - static const ]b4_int_type_for([b4_stos])[ yystos_[]; - - /// For a rule, its LHS. - static const ]b4_int_type_for([b4_r1])[ yyr1_[]; - /// For a rule, its RHS length. - static const ]b4_int_type_for([b4_r2])[ yyr2_[]; ]b4_error_verbose_if([ - - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n);])[ - -]b4_token_table_if([], [[#if ]b4_api_PREFIX[DEBUG]])[ - /// For a symbol, its name in clear. - static const char* const yytname_[]; -]b4_token_table_if([[#if ]b4_api_PREFIX[DEBUG]])[ - /// A type to store symbol numbers and -1. - typedef ]b4_int_type_for([b4_rhs])[ rhs_number_type; - /// A `-1'-separated list of the rules' RHS. - static const rhs_number_type yyrhs_[]; - /// For each rule, the index of the first RHS symbol in \a yyrhs_. - static const ]b4_int_type_for([b4_prhs])[ yyprhs_[]; - /// For each rule, its source line number. - static const ]b4_int_type_for([b4_rline])[ yyrline_[]; - /// For each scanner token number, its symbol number. - static const ]b4_int_type_for([b4_toknum])[ yytoken_number_[]; - /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); - /// Print the state stack on the debug stream. - virtual void yystack_print_ (); - - /* Debugging. */ - int yydebug_; - std::ostream* yycdebug_; -#endif - - /// Convert a scanner token number \a t to a symbol number. - token_number_type yytranslate_ (int t); - - /// \brief Reclaim the memory associated to a symbol. - /// \param yymsg Why this token is reclaimed. - /// If null, do not display the symbol, just free it. - /// \param yytype The symbol type. - /// \param yyvaluep Its semantic value. - /// \param yylocationp Its location. - inline void yydestruct_ (const char* yymsg, - int yytype, - semantic_type* yyvaluep, - location_type* yylocationp); - - /// Pop \a n symbols the three stacks. - inline void yypop_ (unsigned int n = 1); - - /* Constants. */ - static const int yyeof_; - /* LAST_ -- Last index in TABLE_. */ - static const int yylast_; - static const int yynnts_; - static const int yyempty_; - static const int yyfinal_; - static const int yyterror_; - static const int yyerrcode_; - static const int yyntokens_; - static const unsigned int yyuser_token_number_max_; - static const token_number_type yyundef_token_; -]b4_parse_param_vars[ - }; -]b4_namespace_close[ - -]b4_percent_define_flag_if([[global_tokens_and_yystype]], -[b4_token_defines(b4_tokens) - -#ifndef ]b4_api_PREFIX[STYPE - /* Redirection for backward compatibility. */ -# define ]b4_api_PREFIX[STYPE b4_namespace_ref::b4_parser_class_name::semantic_type -#endif -])[ -]b4_percent_code_get([[provides]])[ -]b4_cpp_guard_close([b4_spec_defines_file]) -b4_output_end() -]) - - -b4_output_begin([b4_parser_file_name]) -b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++], - [2002-2012]) -b4_percent_code_get([[top]])[]dnl -m4_if(b4_prefix, [yy], [], -[ -// Take the name prefix into account. -#define yylex b4_prefix[]lex])[ - -/* First part of user declarations. */ -]b4_user_pre_prologue[ - -]b4_defines_if([[ -#include "@basename(]b4_spec_defines_file[@)"]])[ - -/* User implementation prologue. */ -]b4_user_post_prologue[ -]b4_percent_code_get[ - -]b4_null_define[ - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* FIXME: INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -]b4_yylloc_default_define[ - -/* Suppress unused-variable warnings by "using" E. */ -#define YYUSE(e) ((void) (e)) - -/* Enable debugging if requested. */ -#if ]b4_api_PREFIX[DEBUG - -/* A pseudo ostream that takes yydebug_ into account. */ -# define YYCDEBUG if (yydebug_) (*yycdebug_) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug_) \ - { \ - *yycdebug_ << Title << ' '; \ - yy_symbol_print_ ((Type), (Value), (Location)); \ - *yycdebug_ << std::endl; \ - } \ -} while (false) - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug_) \ - yy_reduce_print_ (Rule); \ -} while (false) - -# define YY_STACK_PRINT() \ -do { \ - if (yydebug_) \ - yystack_print_ (); \ -} while (false) - -#else /* !]b4_api_PREFIX[DEBUG */ - -# define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) YYUSE(Type) -# define YY_REDUCE_PRINT(Rule) static_cast(0) -# define YY_STACK_PRINT() static_cast(0) - -#endif /* !]b4_api_PREFIX[DEBUG */ - -#define yyerrok (yyerrstatus_ = 0) -#define yyclearin (yychar = yyempty_) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYRECOVERING() (!!yyerrstatus_) - -]b4_namespace_open[]b4_error_verbose_if([[ - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - ]b4_parser_class_name[::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr = ""; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } -]])[ - - /// Build a parser object. - ]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [ - :])[ -#if ]b4_api_PREFIX[DEBUG - ]m4_ifset([b4_parse_param], [ ], [ :])[yydebug_ (false), - yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[ -#endif]b4_parse_param_cons[ - { - } - - ]b4_parser_class_name::~b4_parser_class_name[ () - { - } - -#if ]b4_api_PREFIX[DEBUG - /*--------------------------------. - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - - inline void - ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype, - const semantic_type* yyvaluep, const location_type* yylocationp) - { - YYUSE (yylocationp); - YYUSE (yyvaluep); - std::ostream& yyo = debug_stream (); - std::ostream& yyoutput = yyo; - YYUSE (yyoutput); - switch (yytype) - { - ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl -[ default: - break; - } - } - - - void - ]b4_parser_class_name[::yy_symbol_print_ (int yytype, - const semantic_type* yyvaluep, const location_type* yylocationp) - { - *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << *yylocationp << ": "; - yy_symbol_value_print_ (yytype, yyvaluep, yylocationp); - *yycdebug_ << ')'; - } -#endif - - void - ]b4_parser_class_name[::yydestruct_ (const char* yymsg, - int yytype, semantic_type* yyvaluep, location_type* yylocationp) - { - YYUSE (yylocationp); - YYUSE (yymsg); - YYUSE (yyvaluep); - - if (yymsg) - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[ - default: - break; - } - } - - void - ]b4_parser_class_name[::yypop_ (unsigned int n) - { - yystate_stack_.pop (n); - yysemantic_stack_.pop (n); - yylocation_stack_.pop (n); - } - -#if ]b4_api_PREFIX[DEBUG - std::ostream& - ]b4_parser_class_name[::debug_stream () const - { - return *yycdebug_; - } - - void - ]b4_parser_class_name[::set_debug_stream (std::ostream& o) - { - yycdebug_ = &o; - } - - - ]b4_parser_class_name[::debug_level_type - ]b4_parser_class_name[::debug_level () const - { - return yydebug_; - } - - void - ]b4_parser_class_name[::set_debug_level (debug_level_type l) - { - yydebug_ = l; - } -#endif - - inline bool - ]b4_parser_class_name[::yy_pact_value_is_default_ (int yyvalue) - { - return yyvalue == yypact_ninf_; - } - - inline bool - ]b4_parser_class_name[::yy_table_value_is_error_ (int yyvalue) - { - return yyvalue == yytable_ninf_; - } - - int - ]b4_parser_class_name[::parse () - { - /// Lookahead and lookahead in internal form. - int yychar = yyempty_; - int yytoken = 0; - - // State. - int yyn; - int yylen = 0; - int yystate = 0; - - // Error handling. - int yynerrs_ = 0; - int yyerrstatus_ = 0; - - /// Semantic value of the lookahead. - static semantic_type yyval_default; - semantic_type yylval = yyval_default; - /// Location of the lookahead. - location_type yylloc; - /// The locations where the error started and ended. - location_type yyerror_range[3]; - - /// $$. - semantic_type yyval; - /// @@$. - location_type yyloc; - - int yyresult; - - // FIXME: This shoud be completely indented. It is not yet to - // avoid gratuitous conflicts when merging into the master branch. - try - { - YYCDEBUG << "Starting parse" << std::endl; - -]m4_ifdef([b4_initial_action], [ -b4_dollar_pushdef([yylval], [], [yylloc])dnl -/* User initialization code. */ -b4_user_initial_action -b4_dollar_popdef])[]dnl - - [ /* Initialize the stacks. The initial state will be pushed in - yynewstate, since the latter expects the semantical and the - location values to have been already stored, initialize these - stacks with a primary value. */ - yystate_stack_ = state_stack_type (0); - yysemantic_stack_ = semantic_stack_type (0); - yylocation_stack_ = location_stack_type (0); - yysemantic_stack_.push (yylval); - yylocation_stack_.push (yylloc); - - /* New state. */ - yynewstate: - yystate_stack_.push (yystate); - YYCDEBUG << "Entering state " << yystate << std::endl; - - /* Accept? */ - if (yystate == yyfinal_) - goto yyacceptlab; - - goto yybackup; - - /* Backup. */ - yybackup: - - /* Try to take a decision without lookahead. */ - yyn = yypact_[yystate]; - if (yy_pact_value_is_default_ (yyn)) - goto yydefault; - - /* Read a lookahead token. */ - if (yychar == yyempty_) - { - YYCDEBUG << "Reading a token: "; - yychar = ]b4_c_function_call([yylex], [int], - [b4_api_PREFIX[STYPE*], [&yylval]][]dnl -b4_locations_if([, [[location*], [&yylloc]]])dnl -m4_ifdef([b4_lex_param], [, ]b4_lex_param))[; - } - - /* Convert token to internal form. */ - if (yychar <= yyeof_) - { - yychar = yytoken = yyeof_; - YYCDEBUG << "Now at end of input." << std::endl; - } - else - { - yytoken = yytranslate_ (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken) - goto yydefault; - - /* Reduce or error. */ - yyn = yytable_[yyn]; - if (yyn <= 0) - { - if (yy_table_value_is_error_ (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the token being shifted. */ - yychar = yyempty_; - - yysemantic_stack_.push (yylval); - yylocation_stack_.push (yylloc); - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus_) - --yyerrstatus_; - - yystate = yyn; - goto yynewstate; - - /*-----------------------------------------------------------. - | yydefault -- do the default action for the current state. | - `-----------------------------------------------------------*/ - yydefault: - yyn = yydefact_[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - /*-----------------------------. - | yyreduce -- Do a reduction. | - `-----------------------------*/ - yyreduce: - yylen = yyr2_[yyn]; - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. Otherwise, use the top of the stack. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. */ - if (yylen) - yyval = yysemantic_stack_[yylen - 1]; - else - yyval = yysemantic_stack_[0]; - - // Compute the default @@$. - { - slice slice (yylocation_stack_, yylen); - YYLLOC_DEFAULT (yyloc, slice, yylen); - } - - // Perform the reduction. - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - ]b4_user_actions[ - default: - break; - } - - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action - invokes YYABORT, YYACCEPT, or YYERROR immediately after altering - yychar. In the case of YYABORT or YYACCEPT, an incorrect - destructor might then be invoked immediately. In the case of - YYERROR, subsequent parser actions might lead to an incorrect - destructor call or verbose syntax error message before the - lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); - - yypop_ (yylen); - yylen = 0; - YY_STACK_PRINT (); - - yysemantic_stack_.push (yyval); - yylocation_stack_.push (yyloc); - - /* Shift the result of the reduction. */ - yyn = yyr1_[yyn]; - yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0]; - if (0 <= yystate && yystate <= yylast_ - && yycheck_[yystate] == yystate_stack_[0]) - yystate = yytable_[yystate]; - else - yystate = yydefgoto_[yyn - yyntokens_]; - goto yynewstate; - - /*------------------------------------. - | yyerrlab -- here on detecting error | - `------------------------------------*/ - yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yytranslate_ (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus_) - { - ++yynerrs_; - if (yychar == yyempty_) - yytoken = yyempty_; - error (yylloc, yysyntax_error_ (yystate, yytoken)); - } - - yyerror_range[1] = yylloc; - if (yyerrstatus_ == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - if (yychar <= yyeof_) - { - /* Return failure if at end of input. */ - if (yychar == yyeof_) - YYABORT; - } - else - { - yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc); - yychar = yyempty_; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - - /*---------------------------------------------------. - | yyerrorlab -- error raised explicitly by YYERROR. | - `---------------------------------------------------*/ - yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (false) - goto yyerrorlab; - - yyerror_range[1] = yylocation_stack_[yylen - 1]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - yypop_ (yylen); - yylen = 0; - yystate = yystate_stack_[0]; - goto yyerrlab1; - - /*-------------------------------------------------------------. - | yyerrlab1 -- common code for both syntax error and YYERROR. | - `-------------------------------------------------------------*/ - yyerrlab1: - yyerrstatus_ = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact_[yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yyterror_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yystate_stack_.height () == 1) - YYABORT; - - yyerror_range[1] = yylocation_stack_[0]; - yydestruct_ ("Error: popping", - yystos_[yystate], - &yysemantic_stack_[0], &yylocation_stack_[0]); - yypop_ (); - yystate = yystate_stack_[0]; - YY_STACK_PRINT (); - } - - yyerror_range[2] = yylloc; - // Using YYLLOC is tempting, but would change the location of - // the lookahead. YYLOC is available though. - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - yysemantic_stack_.push (yylval); - yylocation_stack_.push (yyloc); - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos_[yyn], - &yysemantic_stack_[0], &yylocation_stack_[0]); - - yystate = yyn; - goto yynewstate; - - /* Accept. */ - yyacceptlab: - yyresult = 0; - goto yyreturn; - - /* Abort. */ - yyabortlab: - yyresult = 1; - goto yyreturn; - - yyreturn: - if (yychar != yyempty_) - { - /* Make sure we have latest lookahead translation. See comments - at user semantic actions for why this is necessary. */ - yytoken = yytranslate_ (yychar); - yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, - &yylloc); - } - - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - yypop_ (yylen); - while (1 < yystate_stack_.height ()) - { - yydestruct_ ("Cleanup: popping", - yystos_[yystate_stack_[0]], - &yysemantic_stack_[0], - &yylocation_stack_[0]); - yypop_ (); - } - - return yyresult; - } - catch (...) - { - YYCDEBUG << "Exception caught: cleaning lookahead and stack" - << std::endl; - // Do not try to display the values of the reclaimed symbols, - // as their printer might throw an exception. - if (yychar != yyempty_) - { - /* Make sure we have latest lookahead translation. See - comments at user semantic actions for why this is - necessary. */ - yytoken = yytranslate_ (yychar); - yydestruct_ (YY_NULL, yytoken, &yylval, &yylloc); - } - - while (1 < yystate_stack_.height ()) - { - yydestruct_ (YY_NULL, - yystos_[yystate_stack_[0]], - &yysemantic_stack_[0], - &yylocation_stack_[0]); - yypop_ (); - } - throw; - } - } - - // Generate an error message. - std::string - ]b4_parser_class_name[::yysyntax_error_ (]dnl -b4_error_verbose_if([int yystate, int yytoken], - [int, int])[) - {]b4_error_verbose_if([[ - std::string yyres; - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - size_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yytoken) is - if this state is a consistent state with a default action. - Thus, detecting the absence of a lookahead is sufficient to - determine that there is no unexpected or expected token to - report. In that case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is - a consistent state with a default action. There might have - been a previous inconsistent state, consistent state with a - non-default action, or user semantic action that manipulated - yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state - merging (from LALR or IELR) and default reductions corrupt the - expected token list. However, the list is correct for - canonical LR with one exception: it will still contain any - token that will not be accepted due to an error action in a - later state. - */ - if (yytoken != yyempty_) - { - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } - } - - char const* yyformat = YY_NULL; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -#undef YYCASE_ - } - - // Argument number. - size_t yyi = 0; - for (char const* yyp = yyformat; *yyp; ++yyp) - if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) - { - yyres += yytnamerr_ (yyarg[yyi++]); - ++yyp; - } - else - yyres += *yyp; - return yyres;]], [[ - return YY_("syntax error");]])[ - } - - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ - const ]b4_int_type(b4_pact_ninf, b4_pact_ninf) b4_parser_class_name::yypact_ninf_ = b4_pact_ninf[; - const ]b4_int_type_for([b4_pact])[ - ]b4_parser_class_name[::yypact_[] = - { - ]b4_pact[ - }; - - /* YYDEFACT[S] -- default reduction number in state S. Performed when - YYTABLE doesn't specify something else to do. Zero means the - default is an error. */ - const ]b4_int_type_for([b4_defact])[ - ]b4_parser_class_name[::yydefact_[] = - { - ]b4_defact[ - }; - - /* YYPGOTO[NTERM-NUM]. */ - const ]b4_int_type_for([b4_pgoto])[ - ]b4_parser_class_name[::yypgoto_[] = - { - ]b4_pgoto[ - }; - - /* YYDEFGOTO[NTERM-NUM]. */ - const ]b4_int_type_for([b4_defgoto])[ - ]b4_parser_class_name[::yydefgoto_[] = - { - ]b4_defgoto[ - }; - - /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF_, syntax error. */ - const ]b4_int_type(b4_table_ninf, b4_table_ninf) b4_parser_class_name::yytable_ninf_ = b4_table_ninf[; - const ]b4_int_type_for([b4_table])[ - ]b4_parser_class_name[::yytable_[] = - { - ]b4_table[ - }; - - /* YYCHECK. */ - const ]b4_int_type_for([b4_check])[ - ]b4_parser_class_name[::yycheck_[] = - { - ]b4_check[ - }; - - /* STOS_[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ - const ]b4_int_type_for([b4_stos])[ - ]b4_parser_class_name[::yystos_[] = - { - ]b4_stos[ - }; - -#if ]b4_api_PREFIX[DEBUG - /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding - to YYLEX-NUM. */ - const ]b4_int_type_for([b4_toknum])[ - ]b4_parser_class_name[::yytoken_number_[] = - { - ]b4_toknum[ - }; -#endif - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ - const ]b4_int_type_for([b4_r1])[ - ]b4_parser_class_name[::yyr1_[] = - { - ]b4_r1[ - }; - - /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ - const ]b4_int_type_for([b4_r2])[ - ]b4_parser_class_name[::yyr2_[] = - { - ]b4_r2[ - }; - -]b4_token_table_if([], [[#if ]b4_api_PREFIX[DEBUG]])[ - /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at \a yyntokens_, nonterminals. */ - const char* - const ]b4_parser_class_name[::yytname_[] = - { - ]b4_tname[ - }; - -]b4_token_table_if([[#if ]b4_api_PREFIX[DEBUG]])[ - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ - const ]b4_parser_class_name[::rhs_number_type - ]b4_parser_class_name[::yyrhs_[] = - { - ]b4_rhs[ - }; - - /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ - const ]b4_int_type_for([b4_prhs])[ - ]b4_parser_class_name[::yyprhs_[] = - { - ]b4_prhs[ - }; - - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ - const ]b4_int_type_for([b4_rline])[ - ]b4_parser_class_name[::yyrline_[] = - { - ]b4_rline[ - }; - - // Print the state stack on the debug stream. - void - ]b4_parser_class_name[::yystack_print_ () - { - *yycdebug_ << "Stack now"; - for (state_stack_type::const_iterator i = yystate_stack_.begin (); - i != yystate_stack_.end (); ++i) - *yycdebug_ << ' ' << *i; - *yycdebug_ << std::endl; - } - - // Report on the debug stream that the rule \a yyrule is going to be reduced. - void - ]b4_parser_class_name[::yy_reduce_print_ (int yyrule) - { - unsigned int yylno = yyrline_[yyrule]; - int yynrhs = yyr2_[yyrule]; - /* Print the symbols being reduced, and their result. */ - *yycdebug_ << "Reducing stack by rule " << yyrule - 1 - << " (line " << yylno << "):" << std::endl; - /* The symbols being reduced. */ - for (int yyi = 0; yyi < yynrhs; yyi++) - YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", - yyrhs_[yyprhs_[yyrule] + yyi], - &]b4_rhs_value(yynrhs, yyi + 1)[, - &]b4_rhs_location(yynrhs, yyi + 1)[); - } -#endif // ]b4_api_PREFIX[DEBUG - - /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ - ]b4_parser_class_name[::token_number_type - ]b4_parser_class_name[::yytranslate_ (int t) - { - static - const token_number_type - translate_table[] = - { - ]b4_translate[ - }; - if ((unsigned int) t <= yyuser_token_number_max_) - return translate_table[t]; - else - return yyundef_token_; - } - - const int ]b4_parser_class_name[::yyeof_ = 0; - const int ]b4_parser_class_name[::yylast_ = ]b4_last[; - const int ]b4_parser_class_name[::yynnts_ = ]b4_nterms_number[; - const int ]b4_parser_class_name[::yyempty_ = -2; - const int ]b4_parser_class_name[::yyfinal_ = ]b4_final_state_number[; - const int ]b4_parser_class_name[::yyterror_ = 1; - const int ]b4_parser_class_name[::yyerrcode_ = 256; - const int ]b4_parser_class_name[::yyntokens_ = ]b4_tokens_number[; - - const unsigned int ]b4_parser_class_name[::yyuser_token_number_max_ = ]b4_user_token_number_max[; - const ]b4_parser_class_name[::token_number_type ]b4_parser_class_name[::yyundef_token_ = ]b4_undef_token_number[; - -]b4_namespace_close[ -]b4_epilogue[]dnl -b4_output_end() diff --git a/tools/data/lalr1.java b/tools/data/lalr1.java deleted file mode 100644 index f8c5c721..00000000 --- a/tools/data/lalr1.java +++ /dev/null @@ -1,927 +0,0 @@ -# Java skeleton for Bison -*- autoconf -*- - -# Copyright (C) 2007-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -m4_include(b4_pkgdatadir/[java.m4]) - -b4_defines_if([b4_fatal([%s: %%defines does not make sense in Java], [b4_skeleton])]) -m4_ifval(m4_defn([b4_symbol_destructors]), - [b4_fatal([%s: %%destructor does not make sense in Java], [b4_skeleton])], - []) - -b4_output_begin([b4_parser_file_name]) -b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java], - [2007-2012]) - -b4_percent_define_ifdef([package], [package b4_percent_define_get([package]); -])[/* First part of user declarations. */ -]b4_pre_prologue -b4_percent_code_get([[imports]]) -[/** - * A Bison parser, automatically generated from ]m4_bpatsubst(b4_file_name, [^"\(.*\)"$], [\1])[. - * - * @@author LALR (1) parser skeleton written by Paolo Bonzini. - */ -]b4_public_if([public ])dnl -b4_abstract_if([abstract ])dnl -b4_final_if([final ])dnl -b4_strictfp_if([strictfp ])dnl -[class ]b4_parser_class_name[]dnl -b4_percent_define_get3([extends], [ extends ])dnl -b4_percent_define_get3([implements], [ implements ])[ -{ - ]b4_identification[ - - /** True if verbose error messages are enabled. */ - public boolean errorVerbose = ]b4_flag_value([error_verbose]); - -b4_locations_if([[ - /** - * A class defining a pair of positions. Positions, defined by the - * ]b4_position_type[ class, denote a point in the input. - * Locations represent a part of the input through the beginning - * and ending positions. */ - public class ]b4_location_type[ { - /** The first, inclusive, position in the range. */ - public ]b4_position_type[ begin; - - /** The first position beyond the range. */ - public ]b4_position_type[ end; - - /** - * Create a ]b4_location_type[ denoting an empty range located at - * a given point. - * @@param loc The position at which the range is anchored. */ - public ]b4_location_type[ (]b4_position_type[ loc) { - this.begin = this.end = loc; - } - - /** - * Create a ]b4_location_type[ from the endpoints of the range. - * @@param begin The first position included in the range. - * @@param end The first position beyond the range. */ - public ]b4_location_type[ (]b4_position_type[ begin, ]b4_position_type[ end) { - this.begin = begin; - this.end = end; - } - - /** - * Print a representation of the location. For this to be correct, - * ]b4_position_type[ should override the equals - * method. */ - public String toString () { - if (begin.equals (end)) - return begin.toString (); - else - return begin.toString () + "-" + end.toString (); - } - } - -]]) - -[ /** Token returned by the scanner to signal the end of its input. */ - public static final int EOF = 0;] - -b4_token_enums(b4_tokens) - - b4_locations_if([[ - private ]b4_location_type[ yylloc (YYStack rhs, int n) - { - if (n > 0) - return new ]b4_location_type[ (rhs.locationAt (n-1).begin, rhs.locationAt (0).end); - else - return new ]b4_location_type[ (rhs.locationAt (0).end); - }]])[ - - /** - * Communication interface between the scanner and the Bison-generated - * parser ]b4_parser_class_name[. - */ - public interface Lexer { - ]b4_locations_if([[/** - * Method to retrieve the beginning position of the last scanned token. - * @@return the position at which the last scanned token starts. */ - ]b4_position_type[ getStartPos (); - - /** - * Method to retrieve the ending position of the last scanned token. - * @@return the first position beyond the last scanned token. */ - ]b4_position_type[ getEndPos ();]])[ - - /** - * Method to retrieve the semantic value of the last scanned token. - * @@return the semantic value of the last scanned token. */ - ]b4_yystype[ getLVal (); - - /** - * Entry point for the scanner. Returns the token identifier corresponding - * to the next token and prepares to return the semantic value - * ]b4_locations_if([and beginning/ending positions ])[of the token. - * @@return the token identifier corresponding to the next token. */ - int yylex () ]b4_maybe_throws([b4_lex_throws])[; - - /** - * Entry point for error reporting. Emits an error - * ]b4_locations_if([referring to the given location ])[in a user-defined way. - * - * ]b4_locations_if([[@@param loc The location of the element to which the - * error message is related]])[ - * @@param s The string for the error message. */ - void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s);] - } - - b4_lexer_if([[private class YYLexer implements Lexer { -]b4_percent_code_get([[lexer]])[ - } - - ]])[/** The object doing lexical analysis for us. */ - private Lexer yylexer; - ] - b4_parse_param_vars - -b4_lexer_if([[ - /** - * Instantiates the Bison-generated parser. - */ - public ]b4_parser_class_name (b4_parse_param_decl([b4_lex_param_decl])[) { - this.yylexer = new YYLexer(]b4_lex_param_call[); - ]b4_parse_param_cons[ - } -]]) - - /** - * Instantiates the Bison-generated parser. - * @@param yylexer The scanner that will supply tokens to the parser. - */ - b4_lexer_if([[protected]], [[public]]) b4_parser_class_name[ (]b4_parse_param_decl([[Lexer yylexer]])[) { - this.yylexer = yylexer; - ]b4_parse_param_cons[ - } - - private java.io.PrintStream yyDebugStream = System.err; - - /** - * Return the PrintStream on which the debugging output is - * printed. - */ - public final java.io.PrintStream getDebugStream () { return yyDebugStream; } - - /** - * Set the PrintStream on which the debug output is printed. - * @@param s The stream that is used for debugging output. - */ - public final void setDebugStream(java.io.PrintStream s) { yyDebugStream = s; } - - private int yydebug = 0; - - /** - * Answer the verbosity of the debugging output; 0 means that all kinds of - * output from the parser are suppressed. - */ - public final int getDebugLevel() { return yydebug; } - - /** - * Set the verbosity of the debugging output; 0 means that all kinds of - * output from the parser are suppressed. - * @@param level The verbosity level for debugging output. - */ - public final void setDebugLevel(int level) { yydebug = level; } - - private final int yylex () ]b4_maybe_throws([b4_lex_throws]) [{ - return yylexer.yylex (); - } - protected final void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s) { - yylexer.yyerror (]b4_locations_if([loc, ])[s); - } - - ]b4_locations_if([ - protected final void yyerror (String s) { - yylexer.yyerror ((]b4_location_type[)null, s); - } - protected final void yyerror (]b4_position_type[ loc, String s) { - yylexer.yyerror (new ]b4_location_type[ (loc), s); - }]) - - [protected final void yycdebug (String s) { - if (yydebug > 0) - yyDebugStream.println (s); - } - - private final class YYStack { - private int[] stateStack = new int[16]; - ]b4_locations_if([[private ]b4_location_type[[] locStack = new ]b4_location_type[[16];]])[ - private ]b4_yystype[[] valueStack = new ]b4_yystype[[16]; - - public int size = 16; - public int height = -1; - - public final void push (int state, ]b4_yystype[ value]dnl - b4_locations_if([, ]b4_location_type[ loc])[) { - height++; - if (size == height) - { - int[] newStateStack = new int[size * 2]; - System.arraycopy (stateStack, 0, newStateStack, 0, height); - stateStack = newStateStack; - ]b4_locations_if([[ - ]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2]; - System.arraycopy (locStack, 0, newLocStack, 0, height); - locStack = newLocStack;]]) - - b4_yystype[[] newValueStack = new ]b4_yystype[[size * 2]; - System.arraycopy (valueStack, 0, newValueStack, 0, height); - valueStack = newValueStack; - - size *= 2; - } - - stateStack[height] = state; - ]b4_locations_if([[locStack[height] = loc;]])[ - valueStack[height] = value; - } - - public final void pop () { - pop (1); - } - - public final void pop (int num) { - // Avoid memory leaks... garbage collection is a white lie! - if (num > 0) { - java.util.Arrays.fill (valueStack, height - num + 1, height + 1, null); - ]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height + 1, null);]])[ - } - height -= num; - } - - public final int stateAt (int i) { - return stateStack[height - i]; - } - - ]b4_locations_if([[public final ]b4_location_type[ locationAt (int i) { - return locStack[height - i]; - } - - ]])[public final ]b4_yystype[ valueAt (int i) { - return valueStack[height - i]; - } - - // Print the state stack on the debug stream. - public void print (java.io.PrintStream out) - { - out.print ("Stack now"); - - for (int i = 0; i <= height; i++) - { - out.print (' '); - out.print (stateStack[i]); - } - out.println (); - } - } - - /** - * Returned by a Bison action in order to stop the parsing process and - * return success (true). */ - public static final int YYACCEPT = 0; - - /** - * Returned by a Bison action in order to stop the parsing process and - * return failure (false). */ - public static final int YYABORT = 1; - - /** - * Returned by a Bison action in order to start error recovery without - * printing an error message. */ - public static final int YYERROR = 2; - - // Internal return codes that are not supported for user semantic - // actions. - private static final int YYERRLAB = 3; - private static final int YYNEWSTATE = 4; - private static final int YYDEFAULT = 5; - private static final int YYREDUCE = 6; - private static final int YYERRLAB1 = 7; - private static final int YYRETURN = 8; - - private int yyerrstatus_ = 0; - - /** - * Return whether error recovery is being done. In this state, the parser - * reads token until it reaches a known state, and then restarts normal - * operation. */ - public final boolean recovering () - { - return yyerrstatus_ == 0; - } - - private int yyaction (int yyn, YYStack yystack, int yylen) ]b4_maybe_throws([b4_throws])[ - { - ]b4_yystype[ yyval; - ]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[ - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. Otherwise, use the top of the stack. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. */ - if (yylen > 0) - yyval = yystack.valueAt (yylen - 1); - else - yyval = yystack.valueAt (0); - - yy_reduce_print (yyn, yystack); - - switch (yyn) - { - ]b4_user_actions[ - default: break; - } - - yy_symbol_print ("-> $$ =", yyr1_[yyn], yyval]b4_locations_if([, yyloc])[); - - yystack.pop (yylen); - yylen = 0; - - /* Shift the result of the reduction. */ - yyn = yyr1_[yyn]; - int yystate = yypgoto_[yyn - yyntokens_] + yystack.stateAt (0); - if (0 <= yystate && yystate <= yylast_ - && yycheck_[yystate] == yystack.stateAt (0)) - yystate = yytable_[yystate]; - else - yystate = yydefgoto_[yyn - yyntokens_]; - - yystack.push (yystate, yyval]b4_locations_if([, yyloc])[); - return YYNEWSTATE; - } - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - private final String yytnamerr_ (String yystr) - { - if (yystr.charAt (0) == '"') - { - StringBuffer yyr = new StringBuffer (); - strip_quotes: for (int i = 1; i < yystr.length (); i++) - switch (yystr.charAt (i)) - { - case '\'': - case ',': - break strip_quotes; - - case '\\': - if (yystr.charAt(++i) != '\\') - break strip_quotes; - /* Fall through. */ - default: - yyr.append (yystr.charAt (i)); - break; - - case '"': - return yyr.toString (); - } - } - else if (yystr.equals ("$end")) - return "end of input"; - - return yystr; - } - - /*--------------------------------. - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - - private void yy_symbol_print (String s, int yytype, - ]b4_yystype[ yyvaluep]dnl - b4_locations_if([, Object yylocationp])[) - { - if (yydebug > 0) - yycdebug (s + (yytype < yyntokens_ ? " token " : " nterm ") - + yytname_[yytype] + " ("]b4_locations_if([ - + yylocationp + ": "])[ - + (yyvaluep == null ? "(null)" : yyvaluep.toString ()) + ")"); - } - - /** - * Parse input from the scanner that was specified at object construction - * time. Return whether the end of the input was reached successfully. - * - * @@return true if the parsing succeeds. Note that this does not - * imply that there were no syntax errors. - */ - public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[ - { - /// Lookahead and lookahead in internal form. - int yychar = yyempty_; - int yytoken = 0; - - /* State. */ - int yyn = 0; - int yylen = 0; - int yystate = 0; - - YYStack yystack = new YYStack (); - - /* Error handling. */ - int yynerrs_ = 0; - ]b4_locations_if([/// The location where the error started. - ]b4_location_type[ yyerrloc = null; - - /// ]b4_location_type[ of the lookahead. - ]b4_location_type[ yylloc = new ]b4_location_type[ (null, null); - - /// @@$. - ]b4_location_type[ yyloc;]) - - /// Semantic value of the lookahead. - b4_yystype[ yylval = null; - - yycdebug ("Starting parse\n"); - yyerrstatus_ = 0; - -]m4_ifdef([b4_initial_action], [ -b4_dollar_pushdef([yylval], [], [yylloc])dnl -/* User initialization code. */ -b4_user_initial_action -b4_dollar_popdef])[]dnl - - [ /* Initialize the stack. */ - yystack.push (yystate, yylval]b4_locations_if([, yylloc])[); - - int label = YYNEWSTATE; - for (;;) - switch (label) - { - /* New state. Unlike in the C/C++ skeletons, the state is already - pushed when we come here. */ - case YYNEWSTATE: - yycdebug ("Entering state " + yystate + "\n"); - if (yydebug > 0) - yystack.print (yyDebugStream); - - /* Accept? */ - if (yystate == yyfinal_) - return true; - - /* Take a decision. First try without lookahead. */ - yyn = yypact_[yystate]; - if (yy_pact_value_is_default_ (yyn)) - { - label = YYDEFAULT; - break; - } - - /* Read a lookahead token. */ - if (yychar == yyempty_) - { - yycdebug ("Reading a token: "); - yychar = yylex ();] - b4_locations_if([[ - yylloc = new ]b4_location_type[(yylexer.getStartPos (), - yylexer.getEndPos ());]]) - yylval = yylexer.getLVal ();[ - } - - /* Convert token to internal form. */ - if (yychar <= EOF) - { - yychar = yytoken = EOF; - yycdebug ("Now at end of input.\n"); - } - else - { - yytoken = yytranslate_ (yychar); - yy_symbol_print ("Next token is", yytoken, - yylval]b4_locations_if([, yylloc])[); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken) - label = YYDEFAULT; - - /* <= 0 means reduce or error. */ - else if ((yyn = yytable_[yyn]) <= 0) - { - if (yy_table_value_is_error_ (yyn)) - label = YYERRLAB; - else - { - yyn = -yyn; - label = YYREDUCE; - } - } - - else - { - /* Shift the lookahead token. */ - yy_symbol_print ("Shifting", yytoken, - yylval]b4_locations_if([, yylloc])[); - - /* Discard the token being shifted. */ - yychar = yyempty_; - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus_ > 0) - --yyerrstatus_; - - yystate = yyn; - yystack.push (yystate, yylval]b4_locations_if([, yylloc])[); - label = YYNEWSTATE; - } - break; - - /*-----------------------------------------------------------. - | yydefault -- do the default action for the current state. | - `-----------------------------------------------------------*/ - case YYDEFAULT: - yyn = yydefact_[yystate]; - if (yyn == 0) - label = YYERRLAB; - else - label = YYREDUCE; - break; - - /*-----------------------------. - | yyreduce -- Do a reduction. | - `-----------------------------*/ - case YYREDUCE: - yylen = yyr2_[yyn]; - label = yyaction (yyn, yystack, yylen); - yystate = yystack.stateAt (0); - break; - - /*------------------------------------. - | yyerrlab -- here on detecting error | - `------------------------------------*/ - case YYERRLAB: - /* If not already recovering from an error, report this error. */ - if (yyerrstatus_ == 0) - { - ++yynerrs_; - if (yychar == yyempty_) - yytoken = yyempty_; - yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken)); - } - - ]b4_locations_if([yyerrloc = yylloc;])[ - if (yyerrstatus_ == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= EOF) - { - /* Return failure if at end of input. */ - if (yychar == EOF) - return false; - } - else - yychar = yyempty_; - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - label = YYERRLAB1; - break; - - /*---------------------------------------------------. - | errorlab -- error raised explicitly by YYERROR. | - `---------------------------------------------------*/ - case YYERROR: - - ]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[ - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - yystack.pop (yylen); - yylen = 0; - yystate = yystack.stateAt (0); - label = YYERRLAB1; - break; - - /*-------------------------------------------------------------. - | yyerrlab1 -- common code for both syntax error and YYERROR. | - `-------------------------------------------------------------*/ - case YYERRLAB1: - yyerrstatus_ = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact_[yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yyterror_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yystack.height == 0) - return false; - - ]b4_locations_if([yyerrloc = yystack.locationAt (0);])[ - yystack.pop (); - yystate = yystack.stateAt (0); - if (yydebug > 0) - yystack.print (yyDebugStream); - } - - ]b4_locations_if([ - /* Muck with the stack to setup for yylloc. */ - yystack.push (0, null, yylloc); - yystack.push (0, null, yyerrloc); - yyloc = yylloc (yystack, 2); - yystack.pop (2);])[ - - /* Shift the error token. */ - yy_symbol_print ("Shifting", yystos_[yyn], - yylval]b4_locations_if([, yyloc])[); - - yystate = yyn; - yystack.push (yyn, yylval]b4_locations_if([, yyloc])[); - label = YYNEWSTATE; - break; - - /* Accept. */ - case YYACCEPT: - return true; - - /* Abort. */ - case YYABORT: - return false; - } - } - - // Generate an error message. - private String yysyntax_error (int yystate, int tok) - { - if (errorVerbose) - { - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. - See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, - then the only way this function was invoked is if the - default action is an error action. In that case, don't - check for expected tokens because there are none. - - The only way there can be no lookahead present (in tok) is - if this state is a consistent state with a default action. - Thus, detecting the absence of a lookahead is sufficient to - determine that there is no unexpected or expected token to - report. In that case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this - state is a consistent state with a default action. There - might have been a previous inconsistent state, consistent - state with a non-default action, or user semantic action - that manipulated yychar. (However, yychar is currently out - of scope during semantic actions.) - - Of course, the expected token list depends on states to - have correct lookahead information, and it depends on the - parser not to perform extra reductions after fetching a - lookahead from the scanner and before detecting a syntax - error. Thus, state merging (from LALR or IELR) and default - reductions corrupt the expected token list. However, the - list is correct for canonical LR with one exception: it - will still contain any token that will not be accepted due - to an error action in a later state. - */ - if (tok != yyempty_) - { - // FIXME: This method of building the message is not compatible - // with internationalization. - StringBuffer res = - new StringBuffer ("syntax error, unexpected "); - res.append (yytnamerr_ (yytname_[tok])); - int yyn = yypact_[yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative - indexes in YYCHECK. In other words, skip the first - -YYN actions for this state because they are default - actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - int count = 0; - for (int x = yyxbegin; x < yyxend; ++x) - if (yycheck_[x + yyn] == x && x != yyterror_ - && !yy_table_value_is_error_ (yytable_[x + yyn])) - ++count; - if (count < 5) - { - count = 0; - for (int x = yyxbegin; x < yyxend; ++x) - if (yycheck_[x + yyn] == x && x != yyterror_ - && !yy_table_value_is_error_ (yytable_[x + yyn])) - { - res.append (count++ == 0 ? ", expecting " : " or "); - res.append (yytnamerr_ (yytname_[x])); - } - } - } - return res.toString (); - } - } - - return "syntax error"; - } - - /** - * Whether the given yypact_ value indicates a defaulted state. - * @@param yyvalue the value to check - */ - private static boolean yy_pact_value_is_default_ (int yyvalue) - { - return yyvalue == yypact_ninf_; - } - - /** - * Whether the given yytable_ value indicates a syntax error. - * @@param yyvalue the value to check - */ - private static boolean yy_table_value_is_error_ (int yyvalue) - { - return yyvalue == yytable_ninf_; - } - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ - private static final ]b4_int_type_for([b4_pact])[ yypact_ninf_ = ]b4_pact_ninf[; - private static final ]b4_int_type_for([b4_pact])[ yypact_[] = - { - ]b4_pact[ - }; - - /* YYDEFACT[S] -- default reduction number in state S. Performed when - YYTABLE doesn't specify something else to do. Zero means the - default is an error. */ - private static final ]b4_int_type_for([b4_defact])[ yydefact_[] = - { - ]b4_defact[ - }; - - /* YYPGOTO[NTERM-NUM]. */ - private static final ]b4_int_type_for([b4_pgoto])[ yypgoto_[] = - { - ]b4_pgoto[ - }; - - /* YYDEFGOTO[NTERM-NUM]. */ - private static final ]b4_int_type_for([b4_defgoto])[ - yydefgoto_[] = - { - ]b4_defgoto[ - }; - - /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF_, syntax error. */ - private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[; - private static final ]b4_int_type_for([b4_table])[ - yytable_[] = - { - ]b4_table[ - }; - - /* YYCHECK. */ - private static final ]b4_int_type_for([b4_check])[ - yycheck_[] = - { - ]b4_check[ - }; - - /* STOS_[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ - private static final ]b4_int_type_for([b4_stos])[ - yystos_[] = - { - ]b4_stos[ - }; - - /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding - to YYLEX-NUM. */ - private static final ]b4_int_type_for([b4_toknum])[ - yytoken_number_[] = - { - ]b4_toknum[ - }; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ - private static final ]b4_int_type_for([b4_r1])[ - yyr1_[] = - { - ]b4_r1[ - }; - - /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ - private static final ]b4_int_type_for([b4_r2])[ - yyr2_[] = - { - ]b4_r2[ - }; - - /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at \a yyntokens_, nonterminals. */ - private static final String yytname_[] = - { - ]b4_tname[ - }; - - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ - private static final ]b4_int_type_for([b4_rhs])[ yyrhs_[] = - { - ]b4_rhs[ - }; - - /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ - private static final ]b4_int_type_for([b4_prhs])[ yyprhs_[] = - { - ]b4_prhs[ - }; - - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ - private static final ]b4_int_type_for([b4_rline])[ yyrline_[] = - { - ]b4_rline[ - }; - - // Report on the debug stream that the rule yyrule is going to be reduced. - private void yy_reduce_print (int yyrule, YYStack yystack) - { - if (yydebug == 0) - return; - - int yylno = yyrline_[yyrule]; - int yynrhs = yyr2_[yyrule]; - /* Print the symbols being reduced, and their result. */ - yycdebug ("Reducing stack by rule " + (yyrule - 1) - + " (line " + yylno + "), "); - - /* The symbols being reduced. */ - for (int yyi = 0; yyi < yynrhs; yyi++) - yy_symbol_print (" $" + (yyi + 1) + " =", - yyrhs_[yyprhs_[yyrule] + yyi], - ]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([, - b4_rhs_location(yynrhs, yyi + 1)])[); - } - - /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ - private static final ]b4_int_type_for([b4_translate])[ yytranslate_table_[] = - { - ]b4_translate[ - }; - - private static final ]b4_int_type_for([b4_translate])[ yytranslate_ (int t) - { - if (t >= 0 && t <= yyuser_token_number_max_) - return yytranslate_table_[t]; - else - return yyundef_token_; - } - - private static final int yylast_ = ]b4_last[; - private static final int yynnts_ = ]b4_nterms_number[; - private static final int yyempty_ = -2; - private static final int yyfinal_ = ]b4_final_state_number[; - private static final int yyterror_ = 1; - private static final int yyerrcode_ = 256; - private static final int yyntokens_ = ]b4_tokens_number[; - - private static final int yyuser_token_number_max_ = ]b4_user_token_number_max[; - private static final int yyundef_token_ = ]b4_undef_token_number[; - -]/* User implementation code. */ -b4_percent_code_get[]dnl - -} - -b4_epilogue -b4_output_end() diff --git a/tools/data/location.cc b/tools/data/location.cc deleted file mode 100644 index 8e831241..00000000 --- a/tools/data/location.cc +++ /dev/null @@ -1,299 +0,0 @@ -# C++ skeleton for Bison - -# Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -b4_output_begin([b4_dir_prefix[]position.hh]) -b4_copyright([Positions for Bison parsers in C++], - [2002-2007, 2009-2012])[ - -/** - ** \file ]b4_dir_prefix[position.hh - ** Define the ]b4_namespace_ref[::position class. - */ - -]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[ - -# include // std::max -# include -# include - -]b4_null_define[ - -]b4_namespace_open[ - /// Abstract a position. - class position - { - public: -]m4_ifdef([b4_location_constructors], [[ - /// Construct a position. - explicit position (]b4_percent_define_get([[filename_type]])[* f = YY_NULL, - unsigned int l = ]b4_location_initial_line[u, - unsigned int c = ]b4_location_initial_column[u) - : filename (f) - , line (l) - , column (c) - { - } - -]])[ - /// Initialization. - void initialize (]b4_percent_define_get([[filename_type]])[* fn = YY_NULL, - unsigned int l = ]b4_location_initial_line[u, - unsigned int c = ]b4_location_initial_column[u) - { - filename = fn; - line = l; - column = c; - } - - /** \name Line and Column related manipulators - ** \{ */ - /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) - { - column = ]b4_location_initial_column[u; - line += count; - } - - /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) - { - column = std::max (]b4_location_initial_column[u, column + count); - } - /** \} */ - - /// File name to which this position refers. - ]b4_percent_define_get([[filename_type]])[* filename; - /// Current line number. - unsigned int line; - /// Current column number. - unsigned int column; - }; - - /// Add and assign a position. - inline position& - operator+= (position& res, const int width) - { - res.columns (width); - return res; - } - - /// Add two position objects. - inline const position - operator+ (const position& begin, const int width) - { - position res = begin; - return res += width; - } - - /// Add and assign a position. - inline position& - operator-= (position& res, const int width) - { - return res += -width; - } - - /// Add two position objects. - inline const position - operator- (const position& begin, const int width) - { - return begin + -width; - } -]b4_percent_define_flag_if([[define_location_comparison]], [[ - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } -]])[ - /** \brief Intercept output stream redirection. - ** \param ostr the destination output stream - ** \param pos a reference to the position to redirect - */ - template - inline std::basic_ostream& - operator<< (std::basic_ostream& ostr, const position& pos) - { - if (pos.filename) - ostr << *pos.filename << ':'; - return ostr << pos.line << '.' << pos.column; - } - -]b4_namespace_close[ -]b4_cpp_guard_close([b4_dir_prefix[]position.hh]) -b4_output_end() - - -b4_output_begin([b4_dir_prefix[]location.hh]) -b4_copyright([Locations for Bison parsers in C++], - [2002-2007, 2009-2012])[ - -/** - ** \file ]b4_dir_prefix[location.hh - ** Define the ]b4_namespace_ref[::location class. - */ - -]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[ - -# include "position.hh" - -]b4_namespace_open[ - - /// Abstract a location. - class location - { - public: -]m4_ifdef([b4_location_constructors], [ - /// Construct a location from \a b to \a e. - location (const position& b, const position& e) - : begin (b) - , end (e) - { - } - - /// Construct a 0-width location in \a p. - explicit location (const position& p = position ()) - : begin (p) - , end (p) - { - } - - /// Construct a 0-width location in \a f, \a l, \a c. - explicit location (]b4_percent_define_get([[filename_type]])[* f, - unsigned int l = ]b4_location_initial_line[u, - unsigned int c = ]b4_location_initial_column[u) - : begin (f, l, c) - , end (f, l, c) - { - } - -])[ - /// Initialization. - void initialize (]b4_percent_define_get([[filename_type]])[* f = YY_NULL, - unsigned int l = ]b4_location_initial_line[u, - unsigned int c = ]b4_location_initial_column[u) - { - begin.initialize (f, l, c); - end = begin; - } - - /** \name Line and Column related manipulators - ** \{ */ - public: - /// Reset initial location to final location. - void step () - { - begin = end; - } - - /// Extend the current location to the COUNT next columns. - void columns (unsigned int count = 1) - { - end += count; - } - - /// Extend the current location to the COUNT next lines. - void lines (unsigned int count = 1) - { - end.lines (count); - } - /** \} */ - - - public: - /// Beginning of the located region. - position begin; - /// End of the located region. - position end; - }; - - /// Join two location objects to create a location. - inline const location operator+ (const location& begin, const location& end) - { - location res = begin; - res.end = end.end; - return res; - } - - /// Add two location objects. - inline const location operator+ (const location& begin, unsigned int width) - { - location res = begin; - res.columns (width); - return res; - } - - /// Add and assign a location. - inline location& operator+= (location& res, unsigned int width) - { - res.columns (width); - return res; - } -]b4_percent_define_flag_if([[define_location_comparison]], [[ - /// Compare two location objects. - inline bool - operator== (const location& loc1, const location& loc2) - { - return loc1.begin == loc2.begin && loc1.end == loc2.end; - } - - /// Compare two location objects. - inline bool - operator!= (const location& loc1, const location& loc2) - { - return !(loc1 == loc2); - } -]])[ - /** \brief Intercept output stream redirection. - ** \param ostr the destination output stream - ** \param loc a reference to the location to redirect - ** - ** Avoid duplicate information. - */ - template - inline std::basic_ostream& - operator<< (std::basic_ostream& ostr, const location& loc) - { - position last = loc.end - 1; - ostr << loc.begin; - if (last.filename - && (!loc.begin.filename - || *loc.begin.filename != *last.filename)) - ostr << '-' << last; - else if (loc.begin.line != last.line) - ostr << '-' << last.line << '.' << last.column; - else if (loc.begin.column != last.column) - ostr << '-' << last.column; - return ostr; - } - -]b4_namespace_close[ - -]b4_cpp_guard_close([b4_dir_prefix[]location.hh]) -b4_output_end() diff --git a/tools/data/m4sugar/foreach.m4 b/tools/data/m4sugar/foreach.m4 deleted file mode 100644 index c20c00ae..00000000 --- a/tools/data/m4sugar/foreach.m4 +++ /dev/null @@ -1,362 +0,0 @@ -# -*- Autoconf -*- -# This file is part of Autoconf. -# foreach-based replacements for recursive functions. -# Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes -# GNU M4 1.6 by requiring more memory and macro expansions. -# -# Copyright (C) 2008-2012 Free Software Foundation, Inc. - -# This file is part of Autoconf. This program is free -# software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the Autoconf Configure Script Exception, -# version 3.0, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License -# and a copy of the Autoconf Configure Script Exception along with -# this program; see the files COPYINGv3 and COPYING.EXCEPTION -# respectively. If not, see . - -# Written by Eric Blake. - -# In M4 1.4.x, every byte of $@ is rescanned. This means that an -# algorithm on n arguments that recurses with one less argument each -# iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In -# M4 1.6, this was fixed so that $@ is only scanned once, then -# back-references are made to information stored about the scan. -# Thus, n iterations need only scan n arguments, for O(n) time. -# Additionally, in M4 1.4.x, recursive algorithms did not clean up -# memory very well, requiring O(n^2) memory rather than O(n) for n -# iterations. -# -# This file is designed to overcome the quadratic nature of $@ -# recursion by writing a variant of m4_foreach that uses m4_for rather -# than $@ recursion to operate on the list. This involves more macro -# expansions, but avoids the need to rescan a quadratic number of -# arguments, making these replacements very attractive for M4 1.4.x. -# On the other hand, in any version of M4, expanding additional macros -# costs additional time; therefore, in M4 1.6, where $@ recursion uses -# fewer macros, these replacements actually pessimize performance. -# Additionally, the use of $10 to mean the tenth argument violates -# POSIX; although all versions of m4 1.4.x support this meaning, a -# future m4 version may switch to take it as the first argument -# concatenated with a literal 0, so the implementations in this file -# are not future-proof. Thus, this file is conditionally included as -# part of m4_init(), only when it is detected that M4 probably has -# quadratic behavior (ie. it lacks the macro __m4_version__). -# -# Please keep this file in sync with m4sugar.m4. - -# _m4_foreach(PRE, POST, IGNORED, ARG...) -# --------------------------------------- -# Form the common basis of the m4_foreach and m4_map macros. For each -# ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion -# easier, and must be supplied rather than implicit. -# -# This version minimizes the number of times that $@ is evaluated by -# using m4_for to generate a boilerplate into _m4_f then passing $@ to -# that temporary macro. Thus, the recursion is done in m4_for without -# reparsing any user input, and is not quadratic. For an idea of how -# this works, note that m4_foreach(i,[1,2],[i]) calls -# _m4_foreach([m4_define([i],],[)i],[],[1],[2]) -# which defines _m4_f: -# $1[$4]$2[]$1[$5]$2[]_m4_popdef([_m4_f]) -# then calls _m4_f([m4_define([i],],[)i],[],[1],[2]) for a net result: -# m4_define([i],[1])i[]m4_define([i],[2])i[]_m4_popdef([_m4_f]). -m4_define([_m4_foreach], -[m4_if([$#], [3], [], - [m4_pushdef([_m4_f], _m4_for([4], [$#], [1], - [$0_([1], [2],], [)])[_m4_popdef([_m4_f])])_m4_f($@)])]) - -m4_define([_m4_foreach_], -[[$$1[$$3]$$2[]]]) - -# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT) -# ----------------------------------------------------------- -# Find the first VAL that SWITCH matches, and expand the corresponding -# IF-VAL. If there are no matches, expand DEFAULT. -# -# Use m4_for to create a temporary macro in terms of a boilerplate -# m4_if with final cleanup. If $# is even, we have DEFAULT; if it is -# odd, then rounding the last $# up in the temporary macro is -# harmless. For example, both m4_case(1,2,3,4,5) and -# m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being -# m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6]) -m4_define([m4_case], -[m4_if(m4_eval([$# <= 2]), [1], [$2], -[m4_pushdef([_$0], [m4_if(]_m4_for([2], m4_eval([($# - 1) / 2 * 2]), [2], - [_$0_(], [)])[_m4_popdef( - [_$0])]m4_dquote($m4_eval([($# + 1) & ~1]))[)])_$0($@)])]) - -m4_define([_m4_case_], -[$0_([1], [$1], m4_incr([$1]))]) - -m4_define([_m4_case__], -[[[$$1],[$$2],[$$3],]]) - -# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT) -# ----------------------------------------------------- -# m4 equivalent of -# -# if (SWITCH =~ RE1) -# VAL1; -# elif (SWITCH =~ RE2) -# VAL2; -# elif ... -# ... -# else -# DEFAULT -# -# We build the temporary macro _m4_b: -# m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])... -# _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b])) -# then invoke m4_unquote(_m4_b($@)), for concatenation with later text. -m4_define([m4_bmatch], -[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], - [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], - [$#], 2, [$2], - [m4_pushdef([_m4_b], [m4_define([_m4_b], - _m4_defn([_$0]))]_m4_for([3], m4_eval([($# + 1) / 2 * 2 - 1]), - [2], [_$0_(], [)])[_m4_b([], [],]m4_dquote([$]m4_eval( - [($# + 1) / 2 * 2]))[_m4_popdef([_m4_b]))])m4_unquote(_m4_b($@))])]) - -m4_define([_m4_bmatch], -[m4_if(m4_bregexp([$1], [$2]), [-1], [], [[$3]m4_define([$0])])]) - -m4_define([_m4_bmatch_], -[$0_([1], m4_decr([$1]), [$1])]) - -m4_define([_m4_bmatch__], -[[_m4_b([$$1], [$$2], [$$3])]]) - - -# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT]) -# ------------------------------------------------------------------- -# Similar to m4_if, except that each TEST is expanded when encountered. -# If the expansion of TESTn matches the string VALn, the result is IF-VALn. -# The result is DEFAULT if no tests passed. This macro allows -# short-circuiting of expensive tests, where it pays to arrange quick -# filter tests to run first. -# -# m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n. -# We only have to speed up _m4_cond, by building the temporary _m4_c: -# m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)], -# [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)], -# [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)], -# [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c])) -# We invoke m4_unquote(_m4_c($@)), for concatenation with later text. -m4_define([_m4_cond], -[m4_pushdef([_m4_c], [m4_define([_m4_c], - _m4_defn([m4_unquote]))]_m4_for([2], m4_eval([$# / 3 * 3 - 1]), [3], - [$0_(], [)])[_m4_c(]m4_dquote(m4_dquote( - [$]m4_eval([$# / 3 * 3 + 1])))[_m4_popdef([_m4_c]))])m4_unquote(_m4_c($@))]) - -m4_define([_m4_cond_], -[$0_(m4_decr([$1]), [$1], m4_incr([$1]))]) - -m4_define([_m4_cond__], -[[_m4_c([m4_if(($$1), [($$2)], [[$$3]m4_define([_m4_c])])])]]) - -# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...) -# ---------------------------------------------------- -# m4 equivalent of -# -# $_ = STRING; -# s/RE1/SUBST1/g; -# s/RE2/SUBST2/g; -# ... -# -# m4_bpatsubsts already validated an odd number of arguments; we only -# need to speed up _m4_bpatsubsts. To avoid nesting, we build the -# temporary _m4_p: -# m4_define([_m4_p], [$1])m4_define([_m4_p], -# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p], -# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],... -# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote( -# _m4_defn([_m4_p])_m4_popdef([_m4_p])) -m4_define([_m4_bpatsubsts], -[m4_pushdef([_m4_p], [m4_define([_m4_p], - ]m4_dquote([$]1)[)]_m4_for([3], [$#], [2], [$0_(], - [)])[m4_unquote(_m4_defn([_m4_p])_m4_popdef([_m4_p]))])_m4_p($@)]) - -m4_define([_m4_bpatsubsts_], -[$0_(m4_decr([$1]), [$1])]) - -m4_define([_m4_bpatsubsts__], -[[m4_define([_m4_p], -m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$$1], [$$2]))]]) - -# m4_shiftn(N, ...) -# ----------------- -# Returns ... shifted N times. Useful for recursive "varargs" constructs. -# -# m4_shiftn already validated arguments; we only need to speed up -# _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as -# ,[$5],[$6],...,[$m]_m4_popdef([_m4_s]) -# before calling m4_shift(_m4_s($@)). -m4_define([_m4_shiftn], -[m4_if(m4_incr([$1]), [$#], [], [m4_pushdef([_m4_s], - _m4_for(m4_eval([$1 + 2]), [$#], [1], - [[,]m4_dquote($], [)])[_m4_popdef([_m4_s])])m4_shift(_m4_s($@))])]) - -# m4_do(STRING, ...) -# ------------------ -# This macro invokes all its arguments (in sequence, of course). It is -# useful for making your macros more structured and readable by dropping -# unnecessary dnl's and have the macros indented properly. -# -# Here, we use the temporary macro _m4_do, defined as -# $1[]$2[]...[]$n[]_m4_popdef([_m4_do]) -m4_define([m4_do], -[m4_if([$#], [0], [], - [m4_pushdef([_$0], _m4_for([1], [$#], [1], - [$], [[[]]])[_m4_popdef([_$0])])_$0($@)])]) - -# m4_dquote_elt(ARGS) -# ------------------- -# Return ARGS as an unquoted list of double-quoted arguments. -# -# _m4_foreach to the rescue. -m4_define([m4_dquote_elt], -[m4_if([$#], [0], [], [[[$1]]_m4_foreach([,m4_dquote(], [)], $@)])]) - -# m4_reverse(ARGS) -# ---------------- -# Output ARGS in reverse order. -# -# Invoke _m4_r($@) with the temporary _m4_r built as -# [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r]) -m4_define([m4_reverse], -[m4_if([$#], [0], [], [$#], [1], [[$1]], -[m4_pushdef([_m4_r], [[$$#]]_m4_for(m4_decr([$#]), [1], [-1], - [[, ]m4_dquote($], [)])[_m4_popdef([_m4_r])])_m4_r($@)])]) - - -# m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...) -# ------------------------------------------------------------- -# Perform a pairwise grouping of consecutive ARGs, by expanding -# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the -# final argument is expanded with END-EXPR([ARGn]). -# -# Build the temporary macro _m4_map_args_pair, with the $2([$m+1]) -# only output if $# is odd: -# $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1], -# [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_map_args_pair]) -m4_define([m4_map_args_pair], -[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], - [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])], - [$#], [2], [], - [$#], [3], [m4_default([$2], [$1])([$3])[]], - [m4_pushdef([_$0], _m4_for([3], - m4_eval([$# / 2 * 2 - 1]), [2], [_$0_(], [)])_$0_end( - [1], [2], [$#])[_m4_popdef([_$0])])_$0($@)])]) - -m4_define([_m4_map_args_pair_], -[$0_([1], [$1], m4_incr([$1]))]) - -m4_define([_m4_map_args_pair__], -[[$$1([$$2], [$$3])[]]]) - -m4_define([_m4_map_args_pair_end], -[m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])]) - -# m4_join(SEP, ARG1, ARG2...) -# --------------------------- -# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG -# is the empty string. No expansion is performed on SEP or ARGs. -# -# Use a self-modifying separator, since we don't know how many -# arguments might be skipped before a separator is first printed, but -# be careful if the separator contains $. _m4_foreach to the rescue. -m4_define([m4_join], -[m4_pushdef([_m4_sep], [m4_define([_m4_sep], _m4_defn([m4_echo]))])]dnl -[_m4_foreach([_$0([$1],], [)], $@)_m4_popdef([_m4_sep])]) - -m4_define([_m4_join], -[m4_if([$2], [], [], [_m4_sep([$1])[$2]])]) - -# m4_joinall(SEP, ARG1, ARG2...) -# ------------------------------ -# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP. -# No expansion is performed on SEP or ARGs. -# -# A bit easier than m4_join. _m4_foreach to the rescue. -m4_define([m4_joinall], -[[$2]m4_if(m4_eval([$# <= 2]), [1], [], - [_m4_foreach([$1], [], m4_shift($@))])]) - -# m4_list_cmp(A, B) -# ----------------- -# Compare the two lists of integer expressions A and B. -# -# m4_list_cmp takes care of any side effects; we only override -# _m4_list_cmp_raw, where we can safely expand lists multiple times. -# First, insert padding so that both lists are the same length; the -# trailing +0 is necessary to handle a missing list. Next, create a -# temporary macro to perform pairwise comparisons until an inequality -# is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as -# m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])], -# m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])], -# [0]_m4_popdef([_m4_cmp])) -# then calls _m4_cmp([1+0], [0*2], [1], [2+0]) -m4_define([_m4_list_cmp_raw], -[m4_if([$1], [$2], 0, - [_m4_list_cmp($1+0_m4_list_pad(m4_count($1), m4_count($2)), - $2+0_m4_list_pad(m4_count($2), m4_count($1)))])]) - -m4_define([_m4_list_pad], -[m4_if(m4_eval($1 < $2), [1], - [_m4_for(m4_incr([$1]), [$2], [1], [,0*])])]) - -m4_define([_m4_list_cmp], -[m4_pushdef([_m4_cmp], [m4_if(]_m4_for( - [1], m4_eval([$# >> 1]), [1], [$0_(], [,]m4_eval([$# >> 1])[)])[ - [0]_m4_popdef([_m4_cmp]))])_m4_cmp($@)]) - -m4_define([_m4_list_cmp_], -[$0_([$1], m4_eval([$1 + $2]))]) - -m4_define([_m4_list_cmp__], -[[m4_eval([($$1) != ($$2)]), [1], [m4_cmp([$$1], [$$2])], -]]) - -# m4_max(EXPR, ...) -# m4_min(EXPR, ...) -# ----------------- -# Return the decimal value of the maximum (or minimum) in a series of -# integer expressions. -# -# _m4_foreach to the rescue; we only need to replace _m4_minmax. Here, -# we need a temporary macro to track the best answer so far, so that -# the foreach expression is tractable. -m4_define([_m4_minmax], -[m4_pushdef([_m4_best], m4_eval([$2]))_m4_foreach( - [m4_define([_m4_best], $1(_m4_best,], [))], m4_shift($@))]dnl -[_m4_best[]_m4_popdef([_m4_best])]) - -# m4_set_add_all(SET, VALUE...) -# ----------------------------- -# Add each VALUE into SET. This is O(n) in the number of VALUEs, and -# can be faster than calling m4_set_add for each VALUE. -# -# _m4_foreach to the rescue. If no deletions have occurred, then -# avoid the speed penalty of m4_set_add. -m4_define([m4_set_add_all], -[m4_if([$#], [0], [], [$#], [1], [], - [m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1]) - + m4_len(_m4_foreach(m4_ifdef([_m4_set_cleanup($1)], - [[m4_set_add]], [[_$0]])[([$1],], [)], $@))))])]) - -m4_define([_m4_set_add_all], -[m4_ifdef([_m4_set([$1],$2)], [], - [m4_define([_m4_set([$1],$2)], - [1])m4_pushdef([_m4_set([$1])], [$2])-])]) diff --git a/tools/data/m4sugar/m4sugar.m4 b/tools/data/m4sugar/m4sugar.m4 deleted file mode 100644 index 3573537d..00000000 --- a/tools/data/m4sugar/m4sugar.m4 +++ /dev/null @@ -1,3301 +0,0 @@ -divert(-1)# -*- Autoconf -*- -# This file is part of Autoconf. -# Base M4 layer. -# Requires GNU M4. -# -# Copyright (C) 1999-2012 Free Software Foundation, Inc. - -# This file is part of Autoconf. This program is free -# software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the Autoconf Configure Script Exception, -# version 3.0, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License -# and a copy of the Autoconf Configure Script Exception along with -# this program; see the files COPYINGv3 and COPYING.EXCEPTION -# respectively. If not, see . - -# Written by Akim Demaille. - -# Set the quotes, whatever the current quoting system. -changequote() -changequote([, ]) - -# Some old m4's don't support m4exit. But they provide -# equivalent functionality by core dumping because of the -# long macros we define. -ifdef([__gnu__], , -[errprint(M4sugar requires GNU M4. Install it before installing M4sugar or -set the M4 environment variable to its absolute file name.) -m4exit(2)]) - - -## ------------------------------- ## -## 1. Simulate --prefix-builtins. ## -## ------------------------------- ## - -# m4_define -# m4_defn -# m4_undefine -define([m4_define], defn([define])) -define([m4_defn], defn([defn])) -define([m4_undefine], defn([undefine])) - -m4_undefine([define]) -m4_undefine([defn]) -m4_undefine([undefine]) - - -# m4_copy(SRC, DST) -# ----------------- -# Define DST as the definition of SRC. -# What's the difference between: -# 1. m4_copy([from], [to]) -# 2. m4_define([to], [from($@)]) -# Well, obviously 1 is more expensive in space. Maybe 2 is more expensive -# in time, but because of the space cost of 1, it's not that obvious. -# Nevertheless, one huge difference is the handling of `$0'. If `from' -# uses `$0', then with 1, `to''s `$0' is `to', while it is `from' in 2. -# The user would certainly prefer to see `to'. -# -# This definition is in effect during m4sugar initialization, when -# there are no pushdef stacks; later on, we redefine it to something -# more powerful for all other clients to use. -m4_define([m4_copy], -[m4_define([$2], m4_defn([$1]))]) - - -# m4_rename(SRC, DST) -# ------------------- -# Rename the macro SRC to DST. -m4_define([m4_rename], -[m4_copy([$1], [$2])m4_undefine([$1])]) - - -# m4_rename_m4(MACRO-NAME) -# ------------------------ -# Rename MACRO-NAME to m4_MACRO-NAME. -m4_define([m4_rename_m4], -[m4_rename([$1], [m4_$1])]) - - -# m4_copy_unm4(m4_MACRO-NAME) -# --------------------------- -# Copy m4_MACRO-NAME to MACRO-NAME. -m4_define([m4_copy_unm4], -[m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))]) - - -# Some m4 internals have names colliding with tokens we might use. -# Rename them a` la `m4 --prefix-builtins'. Conditionals first, since -# some subsequent renames are conditional. -m4_rename_m4([ifdef]) -m4_rename([ifelse], [m4_if]) - -m4_rename_m4([builtin]) -m4_rename_m4([changecom]) -m4_rename_m4([changequote]) -m4_ifdef([changeword],dnl conditionally available in 1.4.x -[m4_undefine([changeword])]) -m4_rename_m4([debugfile]) -m4_rename_m4([debugmode]) -m4_rename_m4([decr]) -m4_rename_m4([divnum]) -m4_rename_m4([dumpdef]) -m4_rename_m4([errprint]) -m4_rename_m4([esyscmd]) -m4_rename_m4([eval]) -m4_rename_m4([format]) -m4_undefine([include]) -m4_rename_m4([incr]) -m4_rename_m4([index]) -m4_rename_m4([indir]) -m4_rename_m4([len]) -m4_rename([m4exit], [m4_exit]) -m4_undefine([m4wrap]) -m4_ifdef([mkstemp],dnl added in M4 1.4.8 -[m4_rename_m4([mkstemp]) -m4_copy([m4_mkstemp], [m4_maketemp]) -m4_undefine([maketemp])], -[m4_rename_m4([maketemp]) -m4_copy([m4_maketemp], [m4_mkstemp])]) -m4_rename([patsubst], [m4_bpatsubst]) -m4_rename_m4([popdef]) -m4_rename_m4([pushdef]) -m4_rename([regexp], [m4_bregexp]) -m4_rename_m4([shift]) -m4_undefine([sinclude]) -m4_rename_m4([substr]) -m4_ifdef([symbols],dnl present only in alpha-quality 1.4o -[m4_rename_m4([symbols])]) -m4_rename_m4([syscmd]) -m4_rename_m4([sysval]) -m4_rename_m4([traceoff]) -m4_rename_m4([traceon]) -m4_rename_m4([translit]) - -# _m4_defn(ARG) -# ------------- -# _m4_defn is for internal use only - it bypasses the wrapper, so it -# must only be used on one argument at a time, and only on macros -# known to be defined. Make sure this still works if the user renames -# m4_defn but not _m4_defn. -m4_copy([m4_defn], [_m4_defn]) - -# _m4_divert_raw(NUM) -# ------------------- -# _m4_divert_raw is for internal use only. Use this instead of -# m4_builtin([divert], NUM), so that tracing diversion flow is easier. -m4_rename([divert], [_m4_divert_raw]) - -# _m4_popdef(ARG...) -# ------------------ -# _m4_popdef is for internal use only - it bypasses the wrapper, so it -# must only be used on macros known to be defined. Make sure this -# still works if the user renames m4_popdef but not _m4_popdef. -m4_copy([m4_popdef], [_m4_popdef]) - -# _m4_undefine(ARG...) -# -------------------- -# _m4_undefine is for internal use only - it bypasses the wrapper, so -# it must only be used on macros known to be defined. Make sure this -# still works if the user renames m4_undefine but not _m4_undefine. -m4_copy([m4_undefine], [_m4_undefine]) - -# _m4_undivert(NUM...) -# -------------------- -# _m4_undivert is for internal use only, and should always be given -# arguments. Use this instead of m4_builtin([undivert], NUM...), so -# that tracing diversion flow is easier. -m4_rename([undivert], [_m4_undivert]) - - -## ------------------- ## -## 2. Error messages. ## -## ------------------- ## - - -# m4_location -# ----------- -# Output the current file, colon, and the current line number. -m4_define([m4_location], -[__file__:__line__]) - - -# m4_errprintn(MSG) -# ----------------- -# Same as `errprint', but with the missing end of line. -m4_define([m4_errprintn], -[m4_errprint([$1 -])]) - - -# m4_warning(MSG) -# --------------- -# Warn the user. -m4_define([m4_warning], -[m4_errprintn(m4_location[: warning: $1])]) - - -# m4_fatal(MSG, [EXIT-STATUS]) -# ---------------------------- -# Fatal the user. :) -m4_define([m4_fatal], -[m4_errprintn(m4_location[: error: $1] -m4_expansion_stack)m4_exit(m4_if([$2],, 1, [$2]))]) - - -# m4_assert(EXPRESSION, [EXIT-STATUS = 1]) -# ---------------------------------------- -# This macro ensures that EXPRESSION evaluates to true, and exits if -# EXPRESSION evaluates to false. -m4_define([m4_assert], -[m4_if(m4_eval([$1]), 0, - [m4_fatal([assert failed: $1], [$2])])]) - - - -## ------------- ## -## 3. Warnings. ## -## ------------- ## - - -# _m4_warn(CATEGORY, MESSAGE, [STACK-TRACE]) -# ------------------------------------------ -# Report a MESSAGE to the user if the CATEGORY of warnings is enabled. -# This is for traces only. -# If present, STACK-TRACE is a \n-separated list of "LOCATION: MESSAGE", -# where the last line (and no other) ends with "the top level". -# -# Within m4, the macro is a no-op. This macro really matters -# when autom4te post-processes the trace output. -m4_define([_m4_warn], []) - - -# m4_warn(CATEGORY, MESSAGE) -# -------------------------- -# Report a MESSAGE to the user if the CATEGORY of warnings is enabled. -m4_define([m4_warn], -[_m4_warn([$1], [$2], -m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]))]) - - - -## ------------------- ## -## 4. File inclusion. ## -## ------------------- ## - - -# We also want to neutralize include (and sinclude for symmetry), -# but we want to extend them slightly: warn when a file is included -# several times. This is, in general, a dangerous operation, because -# too many people forget to quote the first argument of m4_define. -# -# For instance in the following case: -# m4_define(foo, [bar]) -# then a second reading will turn into -# m4_define(bar, [bar]) -# which is certainly not what was meant. - -# m4_include_unique(FILE) -# ----------------------- -# Declare that the FILE was loading; and warn if it has already -# been included. -m4_define([m4_include_unique], -[m4_ifdef([m4_include($1)], - [m4_warn([syntax], [file `$1' included several times])])dnl -m4_define([m4_include($1)])]) - - -# m4_include(FILE) -# ---------------- -# Like the builtin include, but warns against multiple inclusions. -m4_define([m4_include], -[m4_include_unique([$1])dnl -m4_builtin([include], [$1])]) - - -# m4_sinclude(FILE) -# ----------------- -# Like the builtin sinclude, but warns against multiple inclusions. -m4_define([m4_sinclude], -[m4_include_unique([$1])dnl -m4_builtin([sinclude], [$1])]) - - - -## ------------------------------------ ## -## 5. Additional branching constructs. ## -## ------------------------------------ ## - -# Both `m4_ifval' and `m4_ifset' tests against the empty string. The -# difference is that `m4_ifset' is specialized on macros. -# -# In case of arguments of macros, eg. $1, it makes little difference. -# In the case of a macro `FOO', you don't want to check `m4_ifval(FOO, -# TRUE)', because if `FOO' expands with commas, there is a shifting of -# the arguments. So you want to run `m4_ifval([FOO])', but then you just -# compare the *string* `FOO' against `', which, of course fails. -# -# So you want the variation `m4_ifset' that expects a macro name as $1. -# If this macro is both defined and defined to a non empty value, then -# it runs TRUE, etc. - - -# m4_ifblank(COND, [IF-BLANK], [IF-TEXT]) -# m4_ifnblank(COND, [IF-TEXT], [IF-BLANK]) -# ---------------------------------------- -# If COND is empty, or consists only of blanks (space, tab, newline), -# then expand IF-BLANK, otherwise expand IF-TEXT. This differs from -# m4_ifval only if COND has just whitespace, but it helps optimize in -# spite of users who mistakenly leave trailing space after what they -# thought was an empty argument: -# macro( -# [] -# ) -# -# Writing one macro in terms of the other causes extra overhead, so -# we inline both definitions. -m4_define([m4_ifblank], -[m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$2], [$3])]) - -m4_define([m4_ifnblank], -[m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$3], [$2])]) - - -# m4_ifval(COND, [IF-TRUE], [IF-FALSE]) -# ------------------------------------- -# If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE. -# Comparable to m4_ifdef. -m4_define([m4_ifval], -[m4_if([$1], [], [$3], [$2])]) - - -# m4_n(TEXT) -# ---------- -# If TEXT is not empty, return TEXT and a new line, otherwise nothing. -m4_define([m4_n], -[m4_if([$1], - [], [], - [$1 -])]) - - -# m4_ifvaln(COND, [IF-TRUE], [IF-FALSE]) -# -------------------------------------- -# Same as `m4_ifval', but add an extra newline to IF-TRUE or IF-FALSE -# unless that argument is empty. -m4_define([m4_ifvaln], -[m4_if([$1], - [], [m4_n([$3])], - [m4_n([$2])])]) - - -# m4_ifset(MACRO, [IF-TRUE], [IF-FALSE]) -# -------------------------------------- -# If MACRO has no definition, or of its definition is the empty string, -# expand IF-FALSE, otherwise IF-TRUE. -m4_define([m4_ifset], -[m4_ifdef([$1], - [m4_ifval(_m4_defn([$1]), [$2], [$3])], - [$3])]) - - -# m4_ifndef(NAME, [IF-NOT-DEFINED], [IF-DEFINED]) -# ----------------------------------------------- -m4_define([m4_ifndef], -[m4_ifdef([$1], [$3], [$2])]) - - -# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT) -# ----------------------------------------------------------- -# m4 equivalent of -# switch (SWITCH) -# { -# case VAL1: -# IF-VAL1; -# break; -# case VAL2: -# IF-VAL2; -# break; -# ... -# default: -# DEFAULT; -# break; -# }. -# All the values are optional, and the macro is robust to active -# symbols properly quoted. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_case], -[m4_if([$#], 0, [], - [$#], 1, [], - [$#], 2, [$2], - [$1], [$2], [$3], - [$0([$1], m4_shift3($@))])]) - - -# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT) -# ----------------------------------------------------- -# m4 equivalent of -# -# if (SWITCH =~ RE1) -# VAL1; -# elif (SWITCH =~ RE2) -# VAL2; -# elif ... -# ... -# else -# DEFAULT -# -# All the values are optional, and the macro is robust to active symbols -# properly quoted. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_bmatch], -[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], - [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], - [$#], 2, [$2], - [m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))], - [$3])])]) - -# m4_argn(N, ARGS...) -# ------------------- -# Extract argument N (greater than 0) from ARGS. Example: -# m4_define([b], [B]) -# m4_argn([2], [a], [b], [c]) => b -# -# Rather than using m4_car(m4_shiftn([$1], $@)), we exploit the fact that -# GNU m4 can directly reference any argument, through an indirect macro. -m4_define([m4_argn], -[m4_assert([0 < $1])]dnl -[m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)]) - - -# m4_car(ARGS...) -# m4_cdr(ARGS...) -# --------------- -# Manipulate m4 lists. m4_car returns the first argument. m4_cdr -# bundles all but the first argument into a quoted list. These two -# macros are generally used with list arguments, with quoting removed -# to break the list into multiple m4 ARGS. -m4_define([m4_car], [[$1]]) -m4_define([m4_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) - -# _m4_cdr(ARGS...) -# ---------------- -# Like m4_cdr, except include a leading comma unless only one argument -# remains. Why? Because comparing a large list against [] is more -# expensive in expansion time than comparing the number of arguments; so -# _m4_cdr can be used to reduce the number of arguments when it is time -# to end recursion. -m4_define([_m4_cdr], -[m4_if([$#], 1, [], - [, m4_dquote(m4_shift($@))])]) - - - -# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT]) -# ------------------------------------------------------------------- -# Similar to m4_if, except that each TEST is expanded when encountered. -# If the expansion of TESTn matches the string VALn, the result is IF-VALn. -# The result is DEFAULT if no tests passed. This macro allows -# short-circuiting of expensive tests, where it pays to arrange quick -# filter tests to run first. -# -# For an example, consider a previous implementation of _AS_QUOTE_IFELSE: -# -# m4_if(m4_index([$1], [\]), [-1], [$2], -# m4_eval(m4_index([$1], [\\]) >= 0), [1], [$2], -# m4_eval(m4_index([$1], [\$]) >= 0), [1], [$2], -# m4_eval(m4_index([$1], [\`]) >= 0), [1], [$3], -# m4_eval(m4_index([$1], [\"]) >= 0), [1], [$3], -# [$2]) -# -# Here, m4_index is computed 5 times, and m4_eval 4, even if $1 contains -# no backslash. It is more efficient to do: -# -# m4_cond([m4_index([$1], [\])], [-1], [$2], -# [m4_eval(m4_index([$1], [\\]) >= 0)], [1], [$2], -# [m4_eval(m4_index([$1], [\$]) >= 0)], [1], [$2], -# [m4_eval(m4_index([$1], [\`]) >= 0)], [1], [$3], -# [m4_eval(m4_index([$1], [\"]) >= 0)], [1], [$3], -# [$2]) -# -# In the common case of $1 with no backslash, only one m4_index expansion -# occurs, and m4_eval is avoided altogether. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_cond], -[m4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])], - [$#], [1], [$1], - m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])], - [_$0($@)])]) - -m4_define([_m4_cond], -[m4_if(($1), [($2)], [$3], - [$#], [3], [], - [$#], [4], [$4], - [$0(m4_shift3($@))])]) - - -## ---------------------------------------- ## -## 6. Enhanced version of some primitives. ## -## ---------------------------------------- ## - -# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...) -# ---------------------------------------------------- -# m4 equivalent of -# -# $_ = STRING; -# s/RE1/SUBST1/g; -# s/RE2/SUBST2/g; -# ... -# -# All the values are optional, and the macro is robust to active symbols -# properly quoted. -# -# I would have liked to name this macro `m4_bpatsubst', unfortunately, -# due to quotation problems, I need to double quote $1 below, therefore -# the anchors are broken :( I can't let users be trapped by that. -# -# Recall that m4_shift3 always results in an argument. Hence, we need -# to distinguish between a final deletion vs. ending recursion. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_bpatsubsts], -[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], - [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], - [$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))], - [$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))], - [_$0($@m4_if(m4_eval($# & 1), 0, [,]))])]) -m4_define([_m4_bpatsubsts], -[m4_if([$#], 2, [$1], - [$0(m4_builtin([patsubst], [[$1]], [$2], [$3]), - m4_shift3($@))])]) - - -# m4_copy(SRC, DST) -# ----------------- -# Define the pushdef stack DST as a copy of the pushdef stack SRC; -# give an error if DST is already defined. This is particularly nice -# for copying self-modifying pushdef stacks, where the top definition -# includes one-shot initialization that is later popped to the normal -# definition. This version intentionally does nothing if SRC is -# undefined. -# -# Some macros simply can't be renamed with this method: namely, anything -# involved in the implementation of m4_stack_foreach_sep. -m4_define([m4_copy], -[m4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])], - [m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])]dnl -[m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])]) - - -# m4_copy_force(SRC, DST) -# m4_rename_force(SRC, DST) -# ------------------------- -# Like m4_copy/m4_rename, except blindly overwrite any existing DST. -# Note that m4_copy_force tolerates undefined SRC, while m4_rename_force -# does not. -m4_define([m4_copy_force], -[m4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)]) - -m4_define([m4_rename_force], -[m4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)]) - - -# m4_define_default(MACRO, VALUE) -# ------------------------------- -# If MACRO is undefined, set it to VALUE. -m4_define([m4_define_default], -[m4_ifndef([$1], [m4_define($@)])]) - - -# m4_default(EXP1, EXP2) -# m4_default_nblank(EXP1, EXP2) -# ----------------------------- -# Returns EXP1 if not empty/blank, otherwise EXP2. Expand the result. -# -# m4_default is called on hot paths, so inline the contents of m4_ifval, -# for one less round of expansion. -m4_define([m4_default], -[m4_if([$1], [], [$2], [$1])]) - -m4_define([m4_default_nblank], -[m4_ifblank([$1], [$2], [$1])]) - - -# m4_default_quoted(EXP1, EXP2) -# m4_default_nblank_quoted(EXP1, EXP2) -# ------------------------------------ -# Returns EXP1 if non empty/blank, otherwise EXP2. Leave the result quoted. -# -# For comparison: -# m4_define([active], [ACTIVE]) -# m4_default([active], [default]) => ACTIVE -# m4_default([], [active]) => ACTIVE -# -m4_default([ ], [active])- => - - -# -m4_default_nblank([ ], [active])- => -ACTIVE- -# m4_default_quoted([active], [default]) => active -# m4_default_quoted([], [active]) => active -# -m4_default_quoted([ ], [active])- => - - -# -m4_default_nblank_quoted([ ], [active])- => -active- -# -# m4_default macro is called on hot paths, so inline the contents of m4_ifval, -# for one less round of expansion. -m4_define([m4_default_quoted], -[m4_if([$1], [], [[$2]], [[$1]])]) - -m4_define([m4_default_nblank_quoted], -[m4_ifblank([$1], [[$2]], [[$1]])]) - - -# m4_defn(NAME) -# ------------- -# Like the original, except guarantee a warning when using something which is -# undefined (unlike M4 1.4.x). This replacement is not a full-featured -# replacement: if any of the defined macros contain unbalanced quoting, but -# when pasted together result in a well-quoted string, then only native m4 -# support is able to get it correct. But that's where quadrigraphs come in -# handy, if you really need unbalanced quotes inside your macros. -# -# This macro is called frequently, so minimize the amount of additional -# expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists, -# (added in M4 1.6), then let m4 do the job for us (see m4_init). -m4_define([m4_defn], -[m4_if([$#], [0], [[$0]], - [$#], [1], [m4_ifdef([$1], [_m4_defn([$1])], - [m4_fatal([$0: undefined macro: $1])])], - [m4_map_args([$0], $@)])]) - - -# m4_dumpdef(NAME...) -# ------------------- -# In m4 1.4.x, dumpdef writes to the current debugfile, rather than -# stderr. This in turn royally confuses autom4te; so we follow the -# lead of newer m4 and always dump to stderr. Unlike the original, -# this version requires an argument, since there is no convenient way -# in m4 1.4.x to grab the names of all defined macros. Newer m4 -# always dumps to stderr, regardless of the current debugfile; it also -# provides m4symbols as a way to grab all current macro names. But -# dumpdefs is not frequently called, so we don't need to worry about -# conditionally using these newer features. Also, this version -# doesn't sort multiple arguments. -# -# If we detect m4 1.6 or newer, then provide an alternate definition, -# installed during m4_init, that allows builtins through. -# Unfortunately, there is no nice way in m4 1.4.x to dump builtins. -m4_define([m4_dumpdef], -[m4_if([$#], [0], [m4_fatal([$0: missing argument])], - [$#], [1], [m4_ifdef([$1], [m4_errprintn( - [$1: ]m4_dquote(_m4_defn([$1])))], [m4_fatal([$0: undefined macro: $1])])], - [m4_map_args([$0], $@)])]) - -m4_define([_m4_dumpdef], -[m4_if([$#], [0], [m4_fatal([$0: missing argument])], - [$#], [1], [m4_builtin([dumpdef], [$1])], - [m4_map_args_sep([m4_builtin([dumpdef],], [)], [], $@)])]) - - -# m4_dumpdefs(NAME...) -# -------------------- -# Similar to `m4_dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its -# value stack (most recent displayed first). Also, this version silently -# ignores undefined macros, rather than erroring out. -# -# This macro cheats, because it relies on the current definition of NAME -# while the second argument of m4_stack_foreach_lifo is evaluated (which -# would be undefined according to the API). -m4_define([m4_dumpdefs], -[m4_if([$#], [0], [m4_fatal([$0: missing argument])], - [$#], [1], [m4_stack_foreach_lifo([$1], [m4_dumpdef([$1])m4_ignore])], - [m4_map_args([$0], $@)])]) - -# m4_esyscmd_s(COMMAND) -# --------------------- -# Like m4_esyscmd, except strip any trailing newlines, thus behaving -# more like shell command substitution. -m4_define([m4_esyscmd_s], -[m4_chomp_all(m4_esyscmd([$1]))]) - - -# m4_popdef(NAME) -# --------------- -# Like the original, except guarantee a warning when using something which is -# undefined (unlike M4 1.4.x). -# -# This macro is called frequently, so minimize the amount of additional -# expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists, -# (added in M4 1.6), then let m4 do the job for us (see m4_init). -m4_define([m4_popdef], -[m4_if([$#], [0], [[$0]], - [$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])], - [m4_fatal([$0: undefined macro: $1])])], - [m4_map_args([$0], $@)])]) - - -# m4_shiftn(N, ...) -# ----------------- -# Returns ... shifted N times. Useful for recursive "varargs" constructs. -# -# Autoconf does not use this macro, because it is inherently slower than -# calling the common cases of m4_shift2 or m4_shift3 directly. But it -# might as well be fast for other clients, such as Libtool. One way to -# do this is to expand $@ only once in _m4_shiftn (otherwise, for long -# lists, the expansion of m4_if takes twice as much memory as what the -# list itself occupies, only to throw away the unused branch). The end -# result is strictly equivalent to -# m4_if([$1], 1, [m4_shift(,m4_shift(m4_shift($@)))], -# [_m4_shiftn(m4_decr([$1]), m4_shift(m4_shift($@)))]) -# but with the final `m4_shift(m4_shift($@)))' shared between the two -# paths. The first leg uses a no-op m4_shift(,$@) to balance out the (). -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_shiftn], -[m4_assert(0 < $1 && $1 < $#)_$0($@)]) - -m4_define([_m4_shiftn], -[m4_if([$1], 1, [m4_shift(], - [$0(m4_decr([$1])]), m4_shift(m4_shift($@)))]) - -# m4_shift2(...) -# m4_shift3(...) -# -------------- -# Returns ... shifted twice, and three times. Faster than m4_shiftn. -m4_define([m4_shift2], [m4_shift(m4_shift($@))]) -m4_define([m4_shift3], [m4_shift(m4_shift(m4_shift($@)))]) - -# _m4_shift2(...) -# _m4_shift3(...) -# --------------- -# Like m4_shift2 or m4_shift3, except include a leading comma unless shifting -# consumes all arguments. Why? Because in recursion, it is nice to -# distinguish between 1 element left and 0 elements left, based on how many -# arguments this shift expands to. -m4_define([_m4_shift2], -[m4_if([$#], [2], [], - [, m4_shift(m4_shift($@))])]) -m4_define([_m4_shift3], -[m4_if([$#], [3], [], - [, m4_shift(m4_shift(m4_shift($@)))])]) - - -# m4_undefine(NAME) -# ----------------- -# Like the original, except guarantee a warning when using something which is -# undefined (unlike M4 1.4.x). -# -# This macro is called frequently, so minimize the amount of additional -# expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists, -# (added in M4 1.6), then let m4 do the job for us (see m4_init). -m4_define([m4_undefine], -[m4_if([$#], [0], [[$0]], - [$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])], - [m4_fatal([$0: undefined macro: $1])])], - [m4_map_args([$0], $@)])]) - -# _m4_wrap(PRE, POST) -# ------------------- -# Helper macro for m4_wrap and m4_wrap_lifo. Allows nested calls to -# m4_wrap within wrapped text. Use _m4_defn and _m4_popdef for speed. -m4_define([_m4_wrap], -[m4_ifdef([$0_text], - [m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])], - [m4_builtin([m4wrap], [m4_unquote( - _m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])]) - -# m4_wrap(TEXT) -# ------------- -# Append TEXT to the list of hooks to be executed at the end of input. -# Whereas the order of the original may be LIFO in the underlying m4, -# this version is always FIFO. -m4_define([m4_wrap], -[_m4_wrap([], [$1[]])]) - -# m4_wrap_lifo(TEXT) -# ------------------ -# Prepend TEXT to the list of hooks to be executed at the end of input. -# Whereas the order of m4_wrap may be FIFO in the underlying m4, this -# version is always LIFO. -m4_define([m4_wrap_lifo], -[_m4_wrap([$1[]])]) - -## ------------------------- ## -## 7. Quoting manipulation. ## -## ------------------------- ## - - -# m4_apply(MACRO, LIST) -# --------------------- -# Invoke MACRO, with arguments provided from the quoted list of -# comma-separated quoted arguments. If LIST is empty, invoke MACRO -# without arguments. The expansion will not be concatenated with -# subsequent text. -m4_define([m4_apply], -[m4_if([$2], [], [$1], [$1($2)])[]]) - -# _m4_apply(MACRO, LIST) -# ---------------------- -# Like m4_apply, except do nothing if LIST is empty. -m4_define([_m4_apply], -[m4_if([$2], [], [], [$1($2)[]])]) - - -# m4_count(ARGS) -# -------------- -# Return a count of how many ARGS are present. -m4_define([m4_count], [$#]) - - -# m4_curry(MACRO, ARG...) -# ----------------------- -# Perform argument currying. The expansion of this macro is another -# macro that takes exactly one argument, appends it to the end of the -# original ARG list, then invokes MACRO. For example: -# m4_curry([m4_curry], [m4_reverse], [1])([2])([3]) => 3, 2, 1 -# Not quite as practical as m4_incr, but you could also do: -# m4_define([add], [m4_eval(([$1]) + ([$2]))]) -# m4_define([add_one], [m4_curry([add], [1])]) -# add_one()([2]) => 3 -m4_define([m4_curry], [$1(m4_shift($@,)_$0]) -m4_define([_m4_curry], [[$1])]) - - -# m4_do(STRING, ...) -# ------------------ -# This macro invokes all its arguments (in sequence, of course). It is -# useful for making your macros more structured and readable by dropping -# unnecessary dnl's and have the macros indented properly. No concatenation -# occurs after a STRING; use m4_unquote(m4_join(,STRING)) for that. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_do], -[m4_if([$#], 0, [], - [$#], 1, [$1[]], - [$1[]$0(m4_shift($@))])]) - - -# m4_dquote(ARGS) -# --------------- -# Return ARGS as a quoted list of quoted arguments. -m4_define([m4_dquote], [[$@]]) - - -# m4_dquote_elt(ARGS) -# ------------------- -# Return ARGS as an unquoted list of double-quoted arguments. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_dquote_elt], -[m4_if([$#], [0], [], - [$#], [1], [[[$1]]], - [[[$1]],$0(m4_shift($@))])]) - - -# m4_echo(ARGS) -# ------------- -# Return the ARGS, with the same level of quoting. Whitespace after -# unquoted commas are consumed. -m4_define([m4_echo], [$@]) - - -# m4_expand(ARG) -# _m4_expand(ARG) -# --------------- -# Return the expansion of ARG as a single string. Unlike -# m4_quote($1), this preserves whitespace following single-quoted -# commas that appear within ARG. It also deals with shell case -# statements. -# -# m4_define([active], [ACT, IVE]) -# m4_define([active2], [[ACT, IVE]]) -# m4_quote(active, active2) -# => ACT,IVE,ACT, IVE -# m4_expand([active, active2]) -# => ACT, IVE, ACT, IVE -# -# Unfortunately, due to limitations in m4, ARG must expand to -# something with balanced quotes (use quadrigraphs to get around -# this), and should not contain the unlikely delimiters -=<{( or -# )}>=-. It is possible to have unbalanced quoted `(' or `)', as well -# as unbalanced unquoted `)'. m4_expand can handle unterminated -# comments or dnl on the final line, at the expense of speed; it also -# aids in detecting attempts to incorrectly change the current -# diversion inside ARG. Meanwhile, _m4_expand is faster but must be -# given a terminated expansion, and has no safety checks for -# mis-diverted text. -# -# Exploit that extra unquoted () will group unquoted commas and the -# following whitespace. m4_bpatsubst can't handle newlines inside $1, -# and m4_substr strips quoting. So we (ab)use m4_changequote, using -# temporary quotes to remove the delimiters that conveniently included -# the unquoted () that were added prior to the changequote. -# -# Thanks to shell case statements, too many people are prone to pass -# underquoted `)', so we try to detect that by passing a marker as a -# fourth argument; if the marker is not present, then we assume that -# we encountered an early `)', and re-expand the first argument, but -# this time with one more `(' in the second argument and in the -# open-quote delimiter. We must also ignore the slop from the -# previous try. The final macro is thus half line-noise, half art. -m4_define([m4_expand], -[m4_pushdef([m4_divert], _m4_defn([_m4_divert_unsafe]))]dnl -[m4_pushdef([m4_divert_push], _m4_defn([_m4_divert_unsafe]))]dnl -[m4_chomp(_$0([$1 -]))_m4_popdef([m4_divert], [m4_divert_push])]) - -m4_define([_m4_expand], [$0_([$1], [(], -=<{($1)}>=-, [}>=-])]) - -m4_define([_m4_expand_], -[m4_if([$4], [}>=-], - [m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])], - [$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])m4_ignore$2])]) - - -# m4_ignore(ARGS) -# --------------- -# Expands to nothing. Useful for conditionally ignoring an arbitrary -# number of arguments (see _m4_list_cmp for an example). -m4_define([m4_ignore]) - - -# m4_make_list(ARGS) -# ------------------ -# Similar to m4_dquote, this creates a quoted list of quoted ARGS. This -# version is less efficient than m4_dquote, but separates each argument -# with a comma and newline, rather than just comma, for readability. -# When developing an m4sugar algorithm, you could temporarily use -# m4_pushdef([m4_dquote],m4_defn([m4_make_list])) -# around your code to make debugging easier. -m4_define([m4_make_list], [m4_join([, -], m4_dquote_elt($@))]) - - -# m4_noquote(STRING) -# ------------------ -# Return the result of ignoring all quotes in STRING and invoking the -# macros it contains. Among other things, this is useful for enabling -# macro invocations inside strings with [] blocks (for instance regexps -# and help-strings). On the other hand, since all quotes are disabled, -# any macro expanded during this time that relies on nested [] quoting -# will likely crash and burn. This macro is seldom useful; consider -# m4_unquote or m4_expand instead. -m4_define([m4_noquote], -[m4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])]) - - -# m4_quote(ARGS) -# -------------- -# Return ARGS as a single argument. Any whitespace after unquoted commas -# is stripped. There is always output, even when there were no arguments. -# -# It is important to realize the difference between `m4_quote(exp)' and -# `[exp]': in the first case you obtain the quoted *result* of the -# expansion of EXP, while in the latter you just obtain the string -# `exp'. -m4_define([m4_quote], [[$*]]) - - -# _m4_quote(ARGS) -# --------------- -# Like m4_quote, except that when there are no arguments, there is no -# output. For conditional scenarios (such as passing _m4_quote as the -# macro name in m4_mapall), this feature can be used to distinguish between -# one argument of the empty string vs. no arguments. However, in the -# normal case with arguments present, this is less efficient than m4_quote. -m4_define([_m4_quote], -[m4_if([$#], [0], [], [[$*]])]) - - -# m4_reverse(ARGS) -# ---------------- -# Output ARGS in reverse order. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_reverse], -[m4_if([$#], [0], [], [$#], [1], [[$1]], - [$0(m4_shift($@)), [$1]])]) - - -# m4_unquote(ARGS) -# ---------------- -# Remove one layer of quotes from each ARG, performing one level of -# expansion. For one argument, m4_unquote([arg]) is more efficient than -# m4_do([arg]), but for multiple arguments, the difference is that -# m4_unquote separates arguments with commas while m4_do concatenates. -# Follow this macro with [] if concatenation with subsequent text is -# undesired. -m4_define([m4_unquote], [$*]) - - -## -------------------------- ## -## 8. Implementing m4 loops. ## -## -------------------------- ## - - -# m4_for(VARIABLE, FIRST, LAST, [STEP = +/-1], EXPRESSION) -# -------------------------------------------------------- -# Expand EXPRESSION defining VARIABLE to FROM, FROM + 1, ..., TO with -# increments of STEP. Both limits are included, and bounds are -# checked for consistency. The algorithm is robust to indirect -# VARIABLE names. Changing VARIABLE inside EXPRESSION will not impact -# the number of iterations. -# -# Uses _m4_defn for speed, and avoid dnl in the macro body. Factor -# the _m4_for call so that EXPRESSION is only parsed once. -m4_define([m4_for], -[m4_pushdef([$1], m4_eval([$2]))]dnl -[m4_cond([m4_eval(([$3]) > ([$2]))], 1, - [m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4], - 1)))m4_assert(_m4_step > 0)_$0(_m4_defn([$1]), - m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])), _m4_step,], - [m4_eval(([$3]) < ([$2]))], 1, - [m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4], - -1)))m4_assert(_m4_step < 0)_$0(_m4_defn([$1]), - m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])), _m4_step,], - [m4_pushdef([_m4_step])_$0(_m4_defn([$1]), _m4_defn([$1]), 0,])]dnl -[[m4_define([$1],], [)$5])m4_popdef([_m4_step], [$1])]) - -# _m4_for(COUNT, LAST, STEP, PRE, POST) -# ------------------------------------- -# Core of the loop, no consistency checks, all arguments are plain -# numbers. Expand PRE[COUNT]POST, then alter COUNT by STEP and -# iterate if COUNT is not LAST. -m4_define([_m4_for], -[$4[$1]$5[]m4_if([$1], [$2], [], - [$0(m4_eval([$1 + $3]), [$2], [$3], [$4], [$5])])]) - - -# Implementing `foreach' loops in m4 is much more tricky than it may -# seem. For example, the old M4 1.4.4 manual had an incorrect example, -# which looked like this (when translated to m4sugar): -# -# | # foreach(VAR, (LIST), STMT) -# | m4_define([foreach], -# | [m4_pushdef([$1])_foreach([$1], [$2], [$3])m4_popdef([$1])]) -# | m4_define([_arg1], [$1]) -# | m4_define([_foreach], -# | [m4_if([$2], [()], , -# | [m4_define([$1], _arg1$2)$3[]_foreach([$1], (m4_shift$2), [$3])])]) -# -# But then if you run -# -# | m4_define(a, 1) -# | m4_define(b, 2) -# | m4_define(c, 3) -# | foreach([f], [([a], [(b], [c)])], [echo f -# | ]) -# -# it gives -# -# => echo 1 -# => echo (2,3) -# -# which is not what is expected. -# -# Of course the problem is that many quotes are missing. So you add -# plenty of quotes at random places, until you reach the expected -# result. Alternatively, if you are a quoting wizard, you directly -# reach the following implementation (but if you really did, then -# apply to the maintenance of m4sugar!). -# -# | # foreach(VAR, (LIST), STMT) -# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])]) -# | m4_define([_arg1], [[$1]]) -# | m4_define([_foreach], -# | [m4_if($2, [()], , -# | [m4_define([$1], [_arg1$2])$3[]_foreach([$1], [(m4_shift$2)], [$3])])]) -# -# which this time answers -# -# => echo a -# => echo (b -# => echo c) -# -# Bingo! -# -# Well, not quite. -# -# With a better look, you realize that the parens are more a pain than -# a help: since anyway you need to quote properly the list, you end up -# with always using an outermost pair of parens and an outermost pair -# of quotes. Rejecting the parens both eases the implementation, and -# simplifies the use: -# -# | # foreach(VAR, (LIST), STMT) -# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])]) -# | m4_define([_arg1], [$1]) -# | m4_define([_foreach], -# | [m4_if($2, [], , -# | [m4_define([$1], [_arg1($2)])$3[]_foreach([$1], [m4_shift($2)], [$3])])]) -# -# -# Now, just replace the `$2' with `m4_quote($2)' in the outer `m4_if' -# to improve robustness, and you come up with a nice implementation -# that doesn't require extra parentheses in the user's LIST. -# -# But wait - now the algorithm is quadratic, because every recursion of -# the algorithm keeps the entire LIST and merely adds another m4_shift to -# the quoted text. If the user has a lot of elements in LIST, you can -# bring the system to its knees with the memory m4 then requires, or trip -# the m4 --nesting-limit recursion factor. The only way to avoid -# quadratic growth is ensure m4_shift is expanded prior to the recursion. -# Hence the design below. -# -# The M4 manual now includes a chapter devoted to this issue, with -# the lessons learned from m4sugar. And still, this design is only -# optimal for M4 1.6; see foreach.m4 for yet more comments on why -# M4 1.4.x uses yet another implementation. - - -# m4_foreach(VARIABLE, LIST, EXPRESSION) -# -------------------------------------- -# -# Expand EXPRESSION assigning each value of the LIST to VARIABLE. -# LIST should have the form `item_1, item_2, ..., item_n', i.e. the -# whole list must *quoted*. Quote members too if you don't want them -# to be expanded. -# -# This macro is robust to active symbols: -# | m4_define(active, [ACT, IVE]) -# | m4_foreach(Var, [active, active], [-Var-]) -# => -ACT--IVE--ACT--IVE- -# -# | m4_foreach(Var, [[active], [active]], [-Var-]) -# => -ACT, IVE--ACT, IVE- -# -# | m4_foreach(Var, [[[active]], [[active]]], [-Var-]) -# => -active--active- -# -# This macro is called frequently, so avoid extra expansions such as -# m4_ifval and dnl. Also, since $2 might be quite large, try to use it -# as little as possible in _m4_foreach; each extra use requires that much -# more memory for expansion. So, rather than directly compare $2 against -# [] and use m4_car/m4_cdr for recursion, we instead unbox the list (which -# requires swapping the argument order in the helper), insert an ignored -# third argument, and use m4_shift3 to detect when recursion is complete, -# at which point this looks very much like m4_map_args. -m4_define([m4_foreach], -[m4_if([$2], [], [], - [m4_pushdef([$1])_$0([m4_define([$1],], [)$3], [], - $2)m4_popdef([$1])])]) - -# _m4_foreach(PRE, POST, IGNORED, ARG...) -# --------------------------------------- -# Form the common basis of the m4_foreach and m4_map macros. For each -# ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion -# easier, and must be supplied rather than implicit. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([_m4_foreach], -[m4_if([$#], [3], [], - [$1[$4]$2[]$0([$1], [$2], m4_shift3($@))])]) - - -# m4_foreach_w(VARIABLE, LIST, EXPRESSION) -# ---------------------------------------- -# Like m4_foreach, but the list is whitespace separated. Depending on -# EXPRESSION, it may be more efficient to use m4_map_args_w. -# -# This macro is robust to active symbols: -# m4_foreach_w([Var], [ active -# b act\ -# ive ], [-Var-])end -# => -active--b--active-end -# -# This used to use a slower implementation based on m4_foreach: -# m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3]) -m4_define([m4_foreach_w], -[m4_pushdef([$1])m4_map_args_w([$2], - [m4_define([$1],], [)$3])m4_popdef([$1])]) - - -# m4_map(MACRO, LIST) -# m4_mapall(MACRO, LIST) -# ---------------------- -# Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements of -# LIST. $1, $2... must in turn be lists, appropriate for m4_apply. -# If LIST contains an empty sublist, m4_map skips the expansion of -# MACRO, while m4_mapall expands MACRO with no arguments. -# -# Since LIST may be quite large, we want to minimize how often it -# appears in the expansion. Rather than use m4_car/m4_cdr iteration, -# we unbox the list, and use _m4_foreach for iteration. For m4_map, -# an empty list behaves like an empty sublist and gets ignored; for -# m4_mapall, we must special-case the empty list. -m4_define([m4_map], -[_m4_foreach([_m4_apply([$1],], [)], [], $2)]) - -m4_define([m4_mapall], -[m4_if([$2], [], [], - [_m4_foreach([m4_apply([$1],], [)], [], $2)])]) - - -# m4_map_sep(MACRO, [SEPARATOR], LIST) -# m4_mapall_sep(MACRO, [SEPARATOR], LIST) -# --------------------------------------- -# Invoke MACRO($1), SEPARATOR, MACRO($2), ..., MACRO($N) where $1, -# $2... $N are the elements of LIST, and are in turn lists appropriate -# for m4_apply. SEPARATOR is expanded, in order to allow the creation -# of a list of arguments by using a single-quoted comma as the -# separator. For each empty sublist, m4_map_sep skips the expansion -# of MACRO and SEPARATOR, while m4_mapall_sep expands MACRO with no -# arguments. -# -# For m4_mapall_sep, merely expand the first iteration without the -# separator, then include separator as part of subsequent recursion; -# but avoid extra expansion of LIST's side-effects via a helper macro. -# For m4_map_sep, things are trickier - we don't know if the first -# list element is an empty sublist, so we must define a self-modifying -# helper macro and use that as the separator instead. -m4_define([m4_map_sep], -[m4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])]dnl -[_m4_foreach([_m4_apply([m4_Sep([$2])[]$1],], [)], [], $3)m4_popdef([m4_Sep])]) - -m4_define([m4_mapall_sep], -[m4_if([$3], [], [], [_$0([$1], [$2], $3)])]) - -m4_define([_m4_mapall_sep], -[m4_apply([$1], [$3])_m4_foreach([m4_apply([$2[]$1],], [)], m4_shift2($@))]) - -# m4_map_args(EXPRESSION, ARG...) -# ------------------------------- -# Expand EXPRESSION([ARG]) for each argument. More efficient than -# m4_foreach([var], [ARG...], [EXPRESSION(m4_defn([var]))]) -# Shorthand for m4_map_args_sep([EXPRESSION(], [)], [], ARG...). -m4_define([m4_map_args], -[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], - [$#], [1], [], - [$#], [2], [$1([$2])[]], - [_m4_foreach([$1(], [)], $@)])]) - - -# m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...) -# ------------------------------------------------------------- -# Perform a pairwise grouping of consecutive ARGs, by expanding -# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the -# final argument is expanded with END-EXPR([ARGn]). -# -# For example: -# m4_define([show], [($*)m4_newline])dnl -# m4_map_args_pair([show], [], [a], [b], [c], [d], [e])dnl -# => (a,b) -# => (c,d) -# => (e) -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_map_args_pair], -[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], - [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])], - [$#], [2], [], - [$#], [3], [m4_default([$2], [$1])([$3])[]], - [$#], [4], [$1([$3], [$4])[]], - [$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])]) - - -# m4_map_args_sep([PRE], [POST], [SEP], ARG...) -# --------------------------------------------- -# Expand PRE[ARG]POST for each argument, with SEP between arguments. -m4_define([m4_map_args_sep], -[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], - [$#], [1], [], - [$#], [2], [], - [$#], [3], [], - [$#], [4], [$1[$4]$2[]], - [$1[$4]$2[]_m4_foreach([$3[]$1], [$2], m4_shift3($@))])]) - - -# m4_map_args_w(STRING, [PRE], [POST], [SEP]) -# ------------------------------------------- -# Perform the expansion of PRE[word]POST[] for each word in STRING -# separated by whitespace. More efficient than: -# m4_foreach_w([var], [STRING], [PRE[]m4_defn([var])POST]) -# Additionally, expand SEP between words. -# -# As long as we have to use m4_bpatsubst to split the string, we might -# as well make it also apply PRE and POST; this avoids iteration -# altogether. But we must be careful of any \ in PRE or POST. -# _m4_strip returns a quoted string, but that's okay, since it also -# supplies an empty leading and trailing argument due to our -# intentional whitespace around STRING. We use m4_substr to strip the -# empty elements and remove the extra layer of quoting. -m4_define([m4_map_args_w], -[_$0(_m4_split([ ]m4_flatten([$1])[ ], [[ ]+], - m4_if(m4_index([$2$3$4], [\]), [-1], [[$3[]$4[]$2]], - [m4_bpatsubst([[$3[]$4[]$2]], [\\], [\\\\])])), - m4_len([[]$3[]$4]), m4_len([$4[]$2[]]))]) - -m4_define([_m4_map_args_w], -[m4_substr([$1], [$2], m4_eval(m4_len([$1]) - [$2] - [$3]))]) - - -# m4_stack_foreach(MACRO, FUNC) -# m4_stack_foreach_lifo(MACRO, FUNC) -# ---------------------------------- -# Pass each stacked definition of MACRO to the one-argument macro FUNC. -# m4_stack_foreach proceeds in FIFO order, while m4_stack_foreach_lifo -# processes the topmost definitions first. In addition, FUNC should -# not push or pop definitions of MACRO, and should not expect anything about -# the active definition of MACRO (it will not be the topmost, and may not -# be the one passed to FUNC either). -# -# Some macros simply can't be examined with this method: namely, -# anything involved in the implementation of _m4_stack_reverse. -m4_define([m4_stack_foreach], -[_m4_stack_reverse([$1], [m4_tmp-$1])]dnl -[_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])]) - -m4_define([m4_stack_foreach_lifo], -[_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])]dnl -[_m4_stack_reverse([m4_tmp-$1], [$1])]) - -# m4_stack_foreach_sep(MACRO, [PRE], [POST], [SEP]) -# m4_stack_foreach_sep_lifo(MACRO, [PRE], [POST], [SEP]) -# ------------------------------------------------------ -# Similar to m4_stack_foreach and m4_stack_foreach_lifo, in that every -# definition of a pushdef stack will be visited. But rather than -# passing the definition as a single argument to a macro, this variant -# expands the concatenation of PRE[]definition[]POST, and expands SEP -# between consecutive expansions. Note that m4_stack_foreach([a], [b]) -# is equivalent to m4_stack_foreach_sep([a], [b(], [)]). -m4_define([m4_stack_foreach_sep], -[_m4_stack_reverse([$1], [m4_tmp-$1])]dnl -[_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])]) - -m4_define([m4_stack_foreach_sep_lifo], -[_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])]dnl -[_m4_stack_reverse([m4_tmp-$1], [$1])]) - - -# _m4_stack_reverse(OLD, NEW, [ACTION], [SEP]) -# -------------------------------------------- -# A recursive worker for pushdef stack manipulation. Destructively -# copy the OLD stack into the NEW, and expanding ACTION for each -# iteration. After the first iteration, SEP is promoted to the front -# of ACTION (note that SEP should include a trailing [] if it is to -# avoid interfering with ACTION). The current definition is examined -# after the NEW has been pushed but before OLD has been popped; this -# order is important, as ACTION is permitted to operate on either -# _m4_defn([OLD]) or _m4_defn([NEW]). Since the operation is -# destructive, this macro is generally used twice, with a temporary -# macro name holding the swapped copy. -m4_define([_m4_stack_reverse], -[m4_ifdef([$1], [m4_pushdef([$2], - _m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])]) - - - -## --------------------------- ## -## 9. More diversion support. ## -## --------------------------- ## - - -# m4_cleardivert(DIVERSION-NAME...) -# --------------------------------- -# Discard any text in DIVERSION-NAME. -# -# This works even inside m4_expand. -m4_define([m4_cleardivert], -[m4_if([$#], [0], [m4_fatal([$0: missing argument])], - [_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw( - _m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])]) - - -# _m4_divert(DIVERSION-NAME or NUMBER, [NOWARN]) -# ---------------------------------------------- -# If DIVERSION-NAME is the name of a diversion, return its number, -# otherwise if it is a NUMBER return it. Issue a warning about -# the use of a number instead of a name, unless NOWARN is provided. -m4_define([_m4_divert], -[m4_ifdef([_m4_divert($1)], - [m4_indir([_m4_divert($1)])], - [m4_if([$2], [], [m4_warn([syntax], - [prefer named diversions])])$1])]) - -# KILL is only used to suppress output. -m4_define([_m4_divert(KILL)], -1) - -# The empty diversion name is a synonym for 0. -m4_define([_m4_divert()], 0) - - -# m4_divert_stack -# --------------- -# Print the diversion stack, if it's nonempty. The caller is -# responsible for any leading or trailing newline. -m4_define([m4_divert_stack], -[m4_stack_foreach_sep_lifo([_m4_divert_stack], [], [], [ -])]) - - -# m4_divert_stack_push(MACRO-NAME, DIVERSION-NAME) -# ------------------------------------------------ -# Form an entry of the diversion stack from caller MACRO-NAME and -# entering DIVERSION-NAME and push it. -m4_define([m4_divert_stack_push], -[m4_pushdef([_m4_divert_stack], m4_location[: $1: $2])]) - - -# m4_divert(DIVERSION-NAME) -# ------------------------- -# Change the diversion stream to DIVERSION-NAME. -m4_define([m4_divert], -[m4_popdef([_m4_divert_stack])]dnl -[m4_define([_m4_divert_diversion], [$1])]dnl -[m4_divert_stack_push([$0], [$1])]dnl -[_m4_divert_raw(_m4_divert([$1]))]) - - -# m4_divert_push(DIVERSION-NAME, [NOWARN]) -# ---------------------------------------- -# Change the diversion stream to DIVERSION-NAME, while stacking old values. -# For internal use only: if NOWARN is not empty, DIVERSION-NAME can be a -# number instead of a name. -m4_define([m4_divert_push], -[m4_divert_stack_push([$0], [$1])]dnl -[m4_pushdef([_m4_divert_diversion], [$1])]dnl -[_m4_divert_raw(_m4_divert([$1], [$2]))]) - - -# m4_divert_pop([DIVERSION-NAME]) -# ------------------------------- -# Change the diversion stream to its previous value, unstacking it. -# If specified, verify we left DIVERSION-NAME. -# When we pop the last value from the stack, we divert to -1. -m4_define([m4_divert_pop], -[m4_if([$1], [], [], - [$1], _m4_defn([_m4_divert_diversion]), [], - [m4_fatal([$0($1): diversion mismatch: -]m4_divert_stack)])]dnl -[_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])]dnl -[m4_ifdef([_m4_divert_diversion], [], - [m4_fatal([too many m4_divert_pop])])]dnl -[_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))]) - - -# m4_divert_text(DIVERSION-NAME, CONTENT) -# --------------------------------------- -# Output CONTENT into DIVERSION-NAME (which may be a number actually). -# An end of line is appended for free to CONTENT. -m4_define([m4_divert_text], -[m4_divert_push([$1])$2 -m4_divert_pop([$1])]) - - -# m4_divert_once(DIVERSION-NAME, CONTENT) -# --------------------------------------- -# Output CONTENT into DIVERSION-NAME once, if not already there. -# An end of line is appended for free to CONTENT. -m4_define([m4_divert_once], -[m4_expand_once([m4_divert_text([$1], [$2])])]) - - -# _m4_divert_unsafe(DIVERSION-NAME) -# --------------------------------- -# Issue a warning that the attempt to change the current diversion to -# DIVERSION-NAME is unsafe, because this macro is being expanded -# during argument collection of m4_expand. -m4_define([_m4_divert_unsafe], -[m4_fatal([$0: cannot change diversion to `$1' inside m4_expand])]) - - -# m4_undivert(DIVERSION-NAME...) -# ------------------------------ -# Undivert DIVERSION-NAME. Unlike the M4 version, this requires at -# least one DIVERSION-NAME; also, due to support for named diversions, -# this should not be used to undivert files. -m4_define([m4_undivert], -[m4_if([$#], [0], [m4_fatal([$0: missing argument])], - [$#], [1], [_m4_undivert(_m4_divert([$1]))], - [m4_map_args([$0], $@)])]) - - -## --------------------------------------------- ## -## 10. Defining macros with bells and whistles. ## -## --------------------------------------------- ## - -# `m4_defun' is basically `m4_define' but it equips the macro with the -# needed machinery for `m4_require'. A macro must be m4_defun'd if -# either it is m4_require'd, or it m4_require's. -# -# Two things deserve attention and are detailed below: -# 1. Implementation of m4_require -# 2. Keeping track of the expansion stack -# -# 1. Implementation of m4_require -# =============================== -# -# Of course m4_defun calls m4_provide, so that a macro which has -# been expanded is not expanded again when m4_require'd, but the -# difficult part is the proper expansion of macros when they are -# m4_require'd. -# -# The implementation is based on three ideas, (i) using diversions to -# prepare the expansion of the macro and its dependencies (by Franc,ois -# Pinard), (ii) expand the most recently m4_require'd macros _after_ -# the previous macros (by Axel Thimm), and (iii) track instances of -# provide before require (by Eric Blake). -# -# -# The first idea: why use diversions? -# ----------------------------------- -# -# When a macro requires another, the other macro is expanded in new -# diversion, GROW. When the outer macro is fully expanded, we first -# undivert the most nested diversions (GROW - 1...), and finally -# undivert GROW. To understand why we need several diversions, -# consider the following example: -# -# | m4_defun([TEST1], [Test...m4_require([TEST2])1]) -# | m4_defun([TEST2], [Test...m4_require([TEST3])2]) -# | m4_defun([TEST3], [Test...3]) -# -# Because m4_require is not required to be first in the outer macros, we -# must keep the expansions of the various levels of m4_require separated. -# Right before executing the epilogue of TEST1, we have: -# -# GROW - 2: Test...3 -# GROW - 1: Test...2 -# GROW: Test...1 -# BODY: -# -# Finally the epilogue of TEST1 undiverts GROW - 2, GROW - 1, and -# GROW into the regular flow, BODY. -# -# GROW - 2: -# GROW - 1: -# GROW: -# BODY: Test...3; Test...2; Test...1 -# -# (The semicolons are here for clarification, but of course are not -# emitted.) This is what Autoconf 2.0 (I think) to 2.13 (I'm sure) -# implement. -# -# -# The second idea: first required first out -# ----------------------------------------- -# -# The natural implementation of the idea above is buggy and produces -# very surprising results in some situations. Let's consider the -# following example to explain the bug: -# -# | m4_defun([TEST1], [m4_require([TEST2a])m4_require([TEST2b])]) -# | m4_defun([TEST2a], []) -# | m4_defun([TEST2b], [m4_require([TEST3])]) -# | m4_defun([TEST3], [m4_require([TEST2a])]) -# | -# | AC_INIT -# | TEST1 -# -# The dependencies between the macros are: -# -# 3 --- 2b -# / \ is m4_require'd by -# / \ left -------------------- right -# 2a ------------ 1 -# -# If you strictly apply the rules given in the previous section you get: -# -# GROW - 2: TEST3 -# GROW - 1: TEST2a; TEST2b -# GROW: TEST1 -# BODY: -# -# (TEST2a, although required by TEST3 is not expanded in GROW - 3 -# because is has already been expanded before in GROW - 1, so it has -# been AC_PROVIDE'd, so it is not expanded again) so when you undivert -# the stack of diversions, you get: -# -# GROW - 2: -# GROW - 1: -# GROW: -# BODY: TEST3; TEST2a; TEST2b; TEST1 -# -# i.e., TEST2a is expanded after TEST3 although the latter required the -# former. -# -# Starting from 2.50, we use an implementation provided by Axel Thimm. -# The idea is simple: the order in which macros are emitted must be the -# same as the one in which macros are expanded. (The bug above can -# indeed be described as: a macro has been m4_provide'd before its -# dependent, but it is emitted after: the lack of correlation between -# emission and expansion order is guilty). -# -# How to do that? You keep the stack of diversions to elaborate the -# macros, but each time a macro is fully expanded, emit it immediately. -# -# In the example above, when TEST2a is expanded, but it's epilogue is -# not run yet, you have: -# -# GROW - 2: -# GROW - 1: TEST2a -# GROW: Elaboration of TEST1 -# BODY: -# -# The epilogue of TEST2a emits it immediately: -# -# GROW - 2: -# GROW - 1: -# GROW: Elaboration of TEST1 -# BODY: TEST2a -# -# TEST2b then requires TEST3, so right before the epilogue of TEST3, you -# have: -# -# GROW - 2: TEST3 -# GROW - 1: Elaboration of TEST2b -# GROW: Elaboration of TEST1 -# BODY: TEST2a -# -# The epilogue of TEST3 emits it: -# -# GROW - 2: -# GROW - 1: Elaboration of TEST2b -# GROW: Elaboration of TEST1 -# BODY: TEST2a; TEST3 -# -# TEST2b is now completely expanded, and emitted: -# -# GROW - 2: -# GROW - 1: -# GROW: Elaboration of TEST1 -# BODY: TEST2a; TEST3; TEST2b -# -# and finally, TEST1 is finished and emitted: -# -# GROW - 2: -# GROW - 1: -# GROW: -# BODY: TEST2a; TEST3; TEST2b: TEST1 -# -# The idea is simple, but the implementation is a bit involved. If -# you are like me, you will want to see the actual functioning of this -# implementation to be convinced. The next section gives the full -# details. -# -# -# The Axel Thimm implementation at work -# ------------------------------------- -# -# We consider the macros above, and this configure.ac: -# -# AC_INIT -# TEST1 -# -# You should keep the definitions of _m4_defun_pro, _m4_defun_epi, and -# m4_require at hand to follow the steps. -# -# This implementation tries not to assume that the current diversion is -# BODY, so as soon as a macro (m4_defun'd) is expanded, we first -# record the current diversion under the name _m4_divert_dump (denoted -# DUMP below for short). This introduces an important difference with -# the previous versions of Autoconf: you cannot use m4_require if you -# are not inside an m4_defun'd macro, and especially, you cannot -# m4_require directly from the top level. -# -# We have not tried to simulate the old behavior (better yet, we -# diagnose it), because it is too dangerous: a macro m4_require'd from -# the top level is expanded before the body of `configure', i.e., before -# any other test was run. I let you imagine the result of requiring -# AC_STDC_HEADERS for instance, before AC_PROG_CC was actually run.... -# -# After AC_INIT was run, the current diversion is BODY. -# * AC_INIT was run -# DUMP: undefined -# diversion stack: BODY |- -# -# * TEST1 is expanded -# The prologue of TEST1 sets _m4_divert_dump, which is the diversion -# where the current elaboration will be dumped, to the current -# diversion. It also m4_divert_push to GROW, where the full -# expansion of TEST1 and its dependencies will be elaborated. -# DUMP: BODY -# BODY: empty -# diversions: GROW, BODY |- -# -# * TEST1 requires TEST2a -# _m4_require_call m4_divert_pushes another temporary diversion, -# GROW - 1, and expands TEST2a in there. -# DUMP: BODY -# BODY: empty -# GROW - 1: TEST2a -# diversions: GROW - 1, GROW, BODY |- -# Then the content of the temporary diversion is moved to DUMP and the -# temporary diversion is popped. -# DUMP: BODY -# BODY: TEST2a -# diversions: GROW, BODY |- -# -# * TEST1 requires TEST2b -# Again, _m4_require_call pushes GROW - 1 and heads to expand TEST2b. -# DUMP: BODY -# BODY: TEST2a -# diversions: GROW - 1, GROW, BODY |- -# -# * TEST2b requires TEST3 -# _m4_require_call pushes GROW - 2 and expands TEST3 here. -# (TEST3 requires TEST2a, but TEST2a has already been m4_provide'd, so -# nothing happens.) -# DUMP: BODY -# BODY: TEST2a -# GROW - 2: TEST3 -# diversions: GROW - 2, GROW - 1, GROW, BODY |- -# Then the diversion is appended to DUMP, and popped. -# DUMP: BODY -# BODY: TEST2a; TEST3 -# diversions: GROW - 1, GROW, BODY |- -# -# * TEST1 requires TEST2b (contd.) -# The content of TEST2b is expanded... -# DUMP: BODY -# BODY: TEST2a; TEST3 -# GROW - 1: TEST2b, -# diversions: GROW - 1, GROW, BODY |- -# ... and moved to DUMP. -# DUMP: BODY -# BODY: TEST2a; TEST3; TEST2b -# diversions: GROW, BODY |- -# -# * TEST1 is expanded: epilogue -# TEST1's own content is in GROW... -# DUMP: BODY -# BODY: TEST2a; TEST3; TEST2b -# GROW: TEST1 -# diversions: BODY |- -# ... and it's epilogue moves it to DUMP and then undefines DUMP. -# DUMP: undefined -# BODY: TEST2a; TEST3; TEST2b; TEST1 -# diversions: BODY |- -# -# -# The third idea: track macros provided before they were required -# --------------------------------------------------------------- -# -# Using just the first two ideas, Autoconf 2.50 through 2.63 still had -# a subtle bug for more than seven years. Let's consider the -# following example to explain the bug: -# -# | m4_defun([TEST1], [1]) -# | m4_defun([TEST2], [2[]m4_require([TEST1])]) -# | m4_defun([TEST3], [3 TEST1 m4_require([TEST2])]) -# | TEST3 -# -# After the prologue of TEST3, we are collecting text in GROW with the -# intent of dumping it in BODY during the epilogue. Next, we -# encounter the direct invocation of TEST1, which provides the macro -# in place in GROW. From there, we encounter a requirement for TEST2, -# which must be collected in a new diversion. While expanding TEST2, -# we encounter a requirement for TEST1, but since it has already been -# expanded, the Axel Thimm algorithm states that we can treat it as a -# no-op. But that would lead to an end result of `2 3 1', meaning -# that we have once again output a macro (TEST2) prior to its -# requirements (TEST1). -# -# The problem can only occur if a single defun'd macro first provides, -# then later indirectly requires, the same macro. Note that directly -# expanding then requiring a macro is okay: because the dependency was -# met, the require phase can be a no-op. For that matter, the outer -# macro can even require two helpers, where the first helper expands -# the macro, and the second helper indirectly requires the macro. -# Out-of-order expansion is only present if the inner macro is -# required by something that will be hoisted in front of where the -# direct expansion occurred. In other words, we must be careful not -# to warn on: -# -# | m4_defun([TEST4], [4]) -# | m4_defun([TEST5], [5 TEST4 m4_require([TEST4])]) -# | TEST5 => 5 4 -# -# or even the more complex: -# -# | m4_defun([TEST6], [6]) -# | m4_defun([TEST7], [7 TEST6]) -# | m4_defun([TEST8], [8 m4_require([TEST6])]) -# | m4_defun([TEST9], [9 m4_require([TEST8])]) -# | m4_defun([TEST10], [10 m4_require([TEST7]) m4_require([TEST9])]) -# | TEST10 => 7 6 8 9 10 -# -# So, to detect whether a require was direct or indirect, m4_defun and -# m4_require track the name of the macro that caused a diversion to be -# created (using the stack _m4_diverting, coupled with an O(1) lookup -# _m4_diverting([NAME])), and m4_provide stores the name associated -# with the diversion at which a macro was provided. A require call is -# direct if it occurs within the same diversion where the macro was -# provided, or if the diversion associated with the providing context -# has been collected. -# -# The implementation of the warning involves tracking the set of -# macros which have been provided since the start of the outermost -# defun'd macro (the set is named _m4_provide). When starting an -# outermost macro, the set is emptied; when a macro is provided, it is -# added to the set; when require expands the body of a macro, it is -# removed from the set; and when a macro is indirectly required, the -# set is checked. If a macro is in the set, then it has been provided -# before it was required, and we satisfy dependencies by expanding the -# macro as if it had never been provided; in the example given above, -# this means we now output `1 2 3 1'. Meanwhile, a warning is issued -# to inform the user that her macros trigger the bug in older autoconf -# versions, and that her output file now contains redundant contents -# (and possibly new problems, if the repeated macro was not -# idempotent). Meanwhile, macros defined by m4_defun_once instead of -# m4_defun are idempotent, avoiding any warning or duplicate output. -# -# -# 2. Keeping track of the expansion stack -# ======================================= -# -# When M4 expansion goes wrong it is often extremely hard to find the -# path amongst macros that drove to the failure. What is needed is -# the stack of macro `calls'. One could imagine that GNU M4 would -# maintain a stack of macro expansions, unfortunately it doesn't, so -# we do it by hand. This is of course extremely costly, but the help -# this stack provides is worth it. Nevertheless to limit the -# performance penalty this is implemented only for m4_defun'd macros, -# not for define'd macros. -# -# Each time we enter an m4_defun'd macros, we add a definition in -# _m4_expansion_stack, and when we exit the macro, we remove it (thanks -# to pushdef/popdef). m4_stack_foreach is used to print the expansion -# stack in the rare cases when it's needed. -# -# In addition, we want to detect circular m4_require dependencies. -# Each time we expand a macro FOO we define _m4_expanding(FOO); and -# m4_require(BAR) simply checks whether _m4_expanding(BAR) is defined. - - -# m4_expansion_stack -# ------------------ -# Expands to the entire contents of the expansion stack. The caller -# must supply a trailing newline. This macro always prints a -# location; check whether _m4_expansion_stack is defined to filter out -# the case when no defun'd macro is in force. -m4_define([m4_expansion_stack], -[m4_stack_foreach_sep_lifo([_$0], [_$0_entry(], [) -])m4_location[: the top level]]) - -# _m4_expansion_stack_entry(MACRO) -# -------------------------------- -# Format an entry for MACRO found on the expansion stack. -m4_define([_m4_expansion_stack_entry], -[_m4_defn([m4_location($1)])[: $1 is expanded from...]]) - -# m4_expansion_stack_push(MACRO) -# ------------------------------ -# Form an entry of the expansion stack on entry to MACRO and push it. -m4_define([m4_expansion_stack_push], -[m4_pushdef([_m4_expansion_stack], [$1])]) - - -# _m4_divert(GROW) -# ---------------- -# This diversion is used by the m4_defun/m4_require machinery. It is -# important to keep room before GROW because for each nested -# AC_REQUIRE we use an additional diversion (i.e., two m4_require's -# will use GROW - 2. More than 3 levels has never seemed to be -# needed.) -# -# ... -# - GROW - 2 -# m4_require'd code, 2 level deep -# - GROW - 1 -# m4_require'd code, 1 level deep -# - GROW -# m4_defun'd macros are elaborated here. - -m4_define([_m4_divert(GROW)], 10000) - - -# _m4_defun_pro(MACRO-NAME) -# ------------------------- -# The prologue for Autoconf macros. -# -# This is called frequently, so minimize the number of macro invocations -# by avoiding dnl and m4_defn overhead. -m4_define([_m4_defun_pro], -[m4_ifdef([_m4_expansion_stack], [], [_m4_defun_pro_outer([$1])])]dnl -[m4_expansion_stack_push([$1])m4_pushdef([_m4_expanding($1)])]) - -m4_define([_m4_defun_pro_outer], -[m4_set_delete([_m4_provide])]dnl -[m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl -[m4_pushdef([_m4_divert_dump], m4_divnum)m4_divert_push([GROW])]) - -# _m4_defun_epi(MACRO-NAME) -# ------------------------- -# The Epilogue for Autoconf macros. MACRO-NAME only helps tracing -# the PRO/EPI pairs. -# -# This is called frequently, so minimize the number of macro invocations -# by avoiding dnl and m4_popdef overhead. -m4_define([_m4_defun_epi], -[_m4_popdef([_m4_expanding($1)], [_m4_expansion_stack])]dnl -[m4_ifdef([_m4_expansion_stack], [], [_m4_defun_epi_outer([$1])])]dnl -[m4_provide([$1])]) - -m4_define([_m4_defun_epi_outer], -[_m4_popdef([_m4_divert_dump], [_m4_diverting([$1])], [_m4_diverting])]dnl -[m4_divert_pop([GROW])m4_undivert([GROW])]) - - -# _m4_divert_dump -# --------------- -# If blank, we are outside of any defun'd macro. Otherwise, expands -# to the diversion number (not name) where require'd macros should be -# moved once completed. -m4_define([_m4_divert_dump]) - - -# m4_divert_require(DIVERSION, NAME-TO-CHECK, [BODY-TO-EXPAND]) -# ------------------------------------------------------------- -# Same as m4_require, but BODY-TO-EXPAND goes into the named DIVERSION; -# requirements still go in the current diversion though. -# -m4_define([m4_divert_require], -[m4_ifdef([_m4_expanding($2)], - [m4_fatal([$0: circular dependency of $2])])]dnl -[m4_if(_m4_divert_dump, [], - [m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])]dnl -[m4_provide_if([$2], [], - [_m4_require_call([$2], [$3], _m4_divert([$1], [-]))])]) - - -# m4_defun(NAME, EXPANSION, [MACRO = m4_define]) -# ---------------------------------------------- -# Define a macro NAME which automatically provides itself. Add -# machinery so the macro automatically switches expansion to the -# diversion stack if it is not already using it, prior to EXPANSION. -# In this case, once finished, it will bring back all the code -# accumulated in the diversion stack. This, combined with m4_require, -# achieves the topological ordering of macros. We don't use this -# macro to define some frequently called macros that are not involved -# in ordering constraints, to save m4 processing. -# -# MACRO is an undocumented argument; when set to m4_pushdef, and NAME -# is already defined, the new definition is added to the pushdef -# stack, rather than overwriting the current definition. It can thus -# be used to write self-modifying macros, which pop themselves to a -# previously m4_define'd definition so that subsequent use of the -# macro is faster. -m4_define([m4_defun], -[m4_define([m4_location($1)], m4_location)]dnl -[m4_default([$3], [m4_define])([$1], - [_m4_defun_pro(]m4_dquote($[0])[)$2[]_m4_defun_epi(]m4_dquote($[0])[)])]) - - -# m4_defun_init(NAME, INIT, COMMON) -# --------------------------------- -# Like m4_defun, but split EXPANSION into two portions: INIT which is -# done only the first time NAME is invoked, and COMMON which is -# expanded every time. -# -# For now, the COMMON definition is always m4_define'd, giving an even -# lighter-weight definition. m4_defun allows self-providing, but once -# a macro is provided, m4_require no longer cares if it is m4_define'd -# or m4_defun'd. m4_defun also provides location tracking to identify -# dependency bugs, but once the INIT has been expanded, we know there -# are no dependency bugs. However, if a future use needs COMMON to be -# m4_defun'd, we can add a parameter, similar to the third parameter -# to m4_defun. -m4_define([m4_defun_init], -[m4_define([$1], [$3[]])m4_defun([$1], - [$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl -[m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])]) - - -# m4_defun_once(NAME, EXPANSION) -# ------------------------------ -# Like m4_defun, but guarantee that EXPANSION only happens once -# (thereafter, using NAME is a no-op). -# -# If _m4_divert_dump is empty, we are called at the top level; -# otherwise, we must ensure that we are required in front of the -# current defun'd macro. Use a helper macro so that EXPANSION need -# only occur once in the definition of NAME, since it might be large. -m4_define([m4_defun_once], -[m4_define([m4_location($1)], m4_location)]dnl -[m4_define([$1], [_m4_defun_once([$1], [$2], m4_if(_m4_divert_dump, [], - [[_m4_defun_pro([$1])m4_unquote(], [)_m4_defun_epi([$1])]], -m4_ifdef([_m4_diverting([$1])], [-]), [-], [[m4_unquote(], [)]], - [[_m4_require_call([$1],], [, _m4_divert_dump)]]))])]) - -m4_define([_m4_defun_once], -[m4_pushdef([$1])$3[$2[]m4_provide([$1])]$4]) - - -# m4_pattern_forbid(ERE, [WHY]) -# ----------------------------- -# Declare that no token matching the forbidden extended regular -# expression ERE should be seen in the output unless... -m4_define([m4_pattern_forbid], []) - - -# m4_pattern_allow(ERE) -# --------------------- -# ... that token also matches the allowed extended regular expression ERE. -# Both used via traces. -m4_define([m4_pattern_allow], []) - - -## --------------------------------- ## -## 11. Dependencies between macros. ## -## --------------------------------- ## - - -# m4_before(THIS-MACRO-NAME, CALLED-MACRO-NAME) -# --------------------------------------------- -# Issue a warning if CALLED-MACRO-NAME was called before THIS-MACRO-NAME. -m4_define([m4_before], -[m4_provide_if([$2], - [m4_warn([syntax], [$2 was called before $1])])]) - - -# m4_require(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK]) -# ----------------------------------------------------------- -# If NAME-TO-CHECK has never been expanded (actually, if it is not -# m4_provide'd), expand BODY-TO-EXPAND *before* the current macro -# expansion; follow the expansion with a newline. Once expanded, emit -# it in _m4_divert_dump. Keep track of the m4_require chain in -# _m4_expansion_stack. -# -# The normal cases are: -# -# - NAME-TO-CHECK == BODY-TO-EXPAND -# Which you can use for regular macros with or without arguments, e.g., -# m4_require([AC_PROG_CC], [AC_PROG_CC]) -# m4_require([AC_CHECK_HEADERS(threads.h)], [AC_CHECK_HEADERS(threads.h)]) -# which is just the same as -# m4_require([AC_PROG_CC]) -# m4_require([AC_CHECK_HEADERS(threads.h)]) -# -# - BODY-TO-EXPAND == m4_indir([NAME-TO-CHECK]) -# In the case of macros with irregular names. For instance: -# m4_require([AC_LANG_COMPILER(C)], [indir([AC_LANG_COMPILER(C)])]) -# which means `if the macro named `AC_LANG_COMPILER(C)' (the parens are -# part of the name, it is not an argument) has not been run, then -# call it.' -# Had you used -# m4_require([AC_LANG_COMPILER(C)], [AC_LANG_COMPILER(C)]) -# then m4_require would have tried to expand `AC_LANG_COMPILER(C)', i.e., -# call the macro `AC_LANG_COMPILER' with `C' as argument. -# -# You could argue that `AC_LANG_COMPILER', when it receives an argument -# such as `C' should dispatch the call to `AC_LANG_COMPILER(C)'. But this -# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that -# it passes to `AC_LANG_COMPILER(C)'. -# -# This is called frequently, so minimize the number of macro invocations -# by avoiding dnl and other overhead on the common path. -m4_define([m4_require], -[m4_ifdef([_m4_expanding($1)], - [m4_fatal([$0: circular dependency of $1])])]dnl -[m4_if(_m4_divert_dump, [], - [m4_fatal([$0($1): cannot be used outside of an ]dnl -m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d macro])])]dnl -[m4_provide_if([$1], [m4_set_contains([_m4_provide], [$1], - [_m4_require_check([$1], _m4_defn([m4_provide($1)]), [$0])], [m4_ignore])], - [_m4_require_call])([$1], [$2], _m4_divert_dump)]) - - -# _m4_require_call(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK], -# DIVERSION-NUMBER) -# ----------------------------------------------------------------- -# If m4_require decides to expand the body, it calls this macro. The -# expansion is placed in DIVERSION-NUMBER. -# -# This is called frequently, so minimize the number of macro invocations -# by avoiding dnl and other overhead on the common path. -m4_define([_m4_require_call], -[m4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))]dnl -[m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl -[m4_divert_push(_m4_divert_grow, [-])]dnl -[m4_if([$2], [], [$1], [$2]) -m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])], - [m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])]dnl -[_m4_divert_raw($3)_m4_undivert(_m4_divert_grow)]dnl -[m4_divert_pop(_m4_divert_grow)_m4_popdef([_m4_divert_grow], -[_m4_diverting([$1])], [_m4_diverting])]) - - -# _m4_require_check(NAME-TO-CHECK, OWNER, CALLER) -# ----------------------------------------------- -# NAME-TO-CHECK has been identified as previously expanded in the -# diversion owned by OWNER. If this is a problem, warn on behalf of -# CALLER and return _m4_require_call; otherwise return m4_ignore. -m4_define([_m4_require_check], -[m4_if(_m4_defn([_m4_diverting]), [$2], [m4_ignore], - m4_ifdef([_m4_diverting([$2])], [-]), [-], [m4_warn([syntax], - [$3: `$1' was expanded before it was required -http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required])_m4_require_call], - [m4_ignore])]) - - -# _m4_divert_grow -# --------------- -# The counter for _m4_require_call. -m4_define([_m4_divert_grow], _m4_divert([GROW])) - - -# m4_expand_once(TEXT, [WITNESS = TEXT]) -# -------------------------------------- -# If TEXT has never been expanded, expand it *here*. Use WITNESS as -# as a memory that TEXT has already been expanded. -m4_define([m4_expand_once], -[m4_provide_if(m4_default_quoted([$2], [$1]), - [], - [m4_provide(m4_default_quoted([$2], [$1]))[]$1])]) - - -# m4_provide(MACRO-NAME) -# ---------------------- -m4_define([m4_provide], -[m4_ifdef([m4_provide($1)], [], -[m4_set_add([_m4_provide], [$1], [m4_define([m4_provide($1)], - m4_ifdef([_m4_diverting], [_m4_defn([_m4_diverting])]))])])]) - - -# m4_provide_if(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ------------------------------------------------------- -# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. -# The purpose of this macro is to provide the user with a means to -# check macros which are provided without letting her know how the -# information is coded. -m4_define([m4_provide_if], -[m4_ifdef([m4_provide($1)], - [$2], [$3])]) - - -## --------------------- ## -## 12. Text processing. ## -## --------------------- ## - - -# m4_cr_letters -# m4_cr_LETTERS -# m4_cr_Letters -# ------------- -m4_define([m4_cr_letters], [abcdefghijklmnopqrstuvwxyz]) -m4_define([m4_cr_LETTERS], [ABCDEFGHIJKLMNOPQRSTUVWXYZ]) -m4_define([m4_cr_Letters], -m4_defn([m4_cr_letters])dnl -m4_defn([m4_cr_LETTERS])dnl -) - - -# m4_cr_digits -# ------------ -m4_define([m4_cr_digits], [0123456789]) - - -# m4_cr_alnum -# ----------- -m4_define([m4_cr_alnum], -m4_defn([m4_cr_Letters])dnl -m4_defn([m4_cr_digits])dnl -) - - -# m4_cr_symbols1 -# m4_cr_symbols2 -# -------------- -m4_define([m4_cr_symbols1], -m4_defn([m4_cr_Letters])dnl -_) - -m4_define([m4_cr_symbols2], -m4_defn([m4_cr_symbols1])dnl -m4_defn([m4_cr_digits])dnl -) - -# m4_cr_all -# --------- -# The character range representing everything, with `-' as the last -# character, since it is special to m4_translit. Use with care, because -# it contains characters special to M4 (fortunately, both ASCII and EBCDIC -# have [] in order, so m4_defn([m4_cr_all]) remains a valid string). It -# also contains characters special to terminals, so it should never be -# displayed in an error message. Also, attempts to map [ and ] to other -# characters via m4_translit must deal with the fact that m4_translit does -# not add quotes to the output. -# -# In EBCDIC, $ is immediately followed by *, which leads to problems -# if m4_cr_all is inlined into a macro definition; so swap them. -# -# It is mainly useful in generating inverted character range maps, for use -# in places where m4_translit is faster than an equivalent m4_bpatsubst; -# the regex `[^a-z]' is equivalent to: -# m4_translit(m4_dquote(m4_defn([m4_cr_all])), [a-z]) -m4_define([m4_cr_all], -m4_translit(m4_dquote(m4_format(m4_dquote(m4_for( - ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [$*-], [*$])-) - - -# _m4_define_cr_not(CATEGORY) -# --------------------------- -# Define m4_cr_not_CATEGORY as the inverse of m4_cr_CATEGORY. -m4_define([_m4_define_cr_not], -[m4_define([m4_cr_not_$1], - m4_translit(m4_dquote(m4_defn([m4_cr_all])), - m4_defn([m4_cr_$1])))]) - - -# m4_cr_not_letters -# m4_cr_not_LETTERS -# m4_cr_not_Letters -# m4_cr_not_digits -# m4_cr_not_alnum -# m4_cr_not_symbols1 -# m4_cr_not_symbols2 -# ------------------ -# Inverse character sets -_m4_define_cr_not([letters]) -_m4_define_cr_not([LETTERS]) -_m4_define_cr_not([Letters]) -_m4_define_cr_not([digits]) -_m4_define_cr_not([alnum]) -_m4_define_cr_not([symbols1]) -_m4_define_cr_not([symbols2]) - - -# m4_newline([STRING]) -# -------------------- -# Expands to a newline, possibly followed by STRING. Exists mostly for -# formatting reasons. -m4_define([m4_newline], [ -$1]) - - -# m4_re_escape(STRING) -# -------------------- -# Escape RE active characters in STRING. -m4_define([m4_re_escape], -[m4_bpatsubst([$1], - [[][*+.?\^$]], [\\\&])]) - - -# m4_re_string -# ------------ -# Regexp for `[a-zA-Z_0-9]*' -# m4_dquote provides literal [] for the character class. -m4_define([m4_re_string], -m4_dquote(m4_defn([m4_cr_symbols2]))dnl -[*]dnl -) - - -# m4_re_word -# ---------- -# Regexp for `[a-zA-Z_][a-zA-Z_0-9]*' -m4_define([m4_re_word], -m4_dquote(m4_defn([m4_cr_symbols1]))dnl -m4_defn([m4_re_string])dnl -) - - -# m4_tolower(STRING) -# m4_toupper(STRING) -# ------------------ -# These macros convert STRING to lowercase or uppercase. -# -# Rather than expand the m4_defn each time, we inline them up front. -m4_define([m4_tolower], -[m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_LETTERS]))[, - ]m4_dquote(m4_defn([m4_cr_letters]))[)]) -m4_define([m4_toupper], -[m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_letters]))[, - ]m4_dquote(m4_defn([m4_cr_LETTERS]))[)]) - - -# m4_split(STRING, [REGEXP]) -# -------------------------- -# Split STRING into an m4 list of quoted elements. The elements are -# quoted with [ and ]. Beginning spaces and end spaces *are kept*. -# Use m4_strip to remove them. -# -# REGEXP specifies where to split. Default is [\t ]+. -# -# If STRING is empty, the result is an empty list. -# -# Pay attention to the m4_changequotes. When m4 reads the definition of -# m4_split, it still has quotes set to [ and ]. Luckily, these are matched -# in the macro body, so the definition is stored correctly. Use the same -# alternate quotes as m4_noquote; it must be unlikely to appear in $1. -# -# Also, notice that $1 is quoted twice, since we want the result to -# be quoted. Then you should understand that the argument of -# patsubst is -=<{(STRING)}>=- (i.e., with additional -=<{( and )}>=-). -# -# This macro is safe on active symbols, i.e.: -# m4_define(active, ACTIVE) -# m4_split([active active ])end -# => [active], [active], []end -# -# Optimize on regex of ` ' (space), since m4_foreach_w already guarantees -# that the list contains single space separators, and a common case is -# splitting a single-element list. This macro is called frequently, -# so avoid unnecessary dnl inside the definition. -m4_define([m4_split], -[m4_if([$1], [], [], - [$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]], - [_$0([$1], [$2], [, ])])], - [$2], [], [_$0([$1], [[ ]+], [, ])], - [_$0([$1], [$2], [, ])])]) - -m4_define([_m4_split], -[m4_changequote([-=<{(],[)}>=-])]dnl -[[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-, - -=<{(]$3[)}>=-)]m4_changequote([, ])]) - - -# m4_chomp(STRING) -# m4_chomp_all(STRING) -# -------------------- -# Return STRING quoted, but without a trailing newline. m4_chomp -# removes at most one newline, while m4_chomp_all removes all -# consecutive trailing newlines. Embedded newlines are not touched, -# and a trailing backslash-newline leaves just a trailing backslash. -# -# m4_bregexp is slower than m4_index, and we don't always want to -# remove all newlines; hence the two variants. We massage characters -# to give a nicer pattern to match, particularly since m4_bregexp is -# line-oriented. Both versions must guarantee a match, to avoid bugs -# with precision -1 in m4_format in older m4. -m4_define([m4_chomp], -[m4_format([[%.*s]], m4_index(m4_translit([[$1]], [ -/.], [/ ])[./.], [/.]), [$1])]) - -m4_define([m4_chomp_all], -[m4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [ -/], [/ ]), [/*$]), [$1])]) - - -# m4_flatten(STRING) -# ------------------ -# If STRING contains end of lines, replace them with spaces. If there -# are backslashed end of lines, remove them. This macro is safe with -# active symbols. -# m4_define(active, ACTIVE) -# m4_flatten([active -# act\ -# ive])end -# => active activeend -# -# In m4, m4_bpatsubst is expensive, so first check for a newline. -m4_define([m4_flatten], -[m4_if(m4_index([$1], [ -]), [-1], [[$1]], - [m4_translit(m4_bpatsubst([[[$1]]], [\\ -]), [ -], [ ])])]) - - -# m4_strip(STRING) -# ---------------- -# Expands into STRING with tabs and spaces singled out into a single -# space, and removing leading and trailing spaces. -# -# This macro is robust to active symbols. -# m4_define(active, ACTIVE) -# m4_strip([ active active ])end -# => active activeend -# -# First, notice that we guarantee trailing space. Why? Because regular -# expressions are greedy, and `.* ?' would always group the space into the -# .* portion. The algorithm is simpler by avoiding `?' at the end. The -# algorithm correctly strips everything if STRING is just ` '. -# -# Then notice the second pattern: it is in charge of removing the -# leading/trailing spaces. Why not just `[^ ]'? Because they are -# applied to over-quoted strings, i.e. more or less [STRING], due -# to the limitations of m4_bpatsubsts. So the leading space in STRING -# is the *second* character; equally for the trailing space. -m4_define([m4_strip], -[m4_bpatsubsts([$1 ], - [[ ]+], [ ], - [^. ?\(.*\) .$], [[[\1]]])]) - - -# m4_normalize(STRING) -# -------------------- -# Apply m4_flatten and m4_strip to STRING. -# -# The argument is quoted, so that the macro is robust to active symbols: -# -# m4_define(active, ACTIVE) -# m4_normalize([ act\ -# ive -# active ])end -# => active activeend - -m4_define([m4_normalize], -[m4_strip(m4_flatten([$1]))]) - - - -# m4_join(SEP, ARG1, ARG2...) -# --------------------------- -# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG -# is the empty string. No expansion is performed on SEP or ARGs. -# -# Since the number of arguments to join can be arbitrarily long, we -# want to avoid having more than one $@ in the macro definition; -# otherwise, the expansion would require twice the memory of the already -# long list. Hence, m4_join merely looks for the first non-empty element, -# and outputs just that element; while _m4_join looks for all non-empty -# elements, and outputs them following a separator. The final trick to -# note is that we decide between recursing with $0 or _$0 based on the -# nested m4_if ending with `_'. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])]) -m4_define([_m4_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])]) - -# m4_joinall(SEP, ARG1, ARG2...) -# ------------------------------ -# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP. -# No expansion is performed on SEP or ARGs. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_joinall], [[$2]_$0([$1], m4_shift($@))]) -m4_define([_m4_joinall], -[m4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])]) - -# m4_combine([SEPARATOR], PREFIX-LIST, [INFIX], SUFFIX...) -# -------------------------------------------------------- -# Produce the pairwise combination of every element in the quoted, -# comma-separated PREFIX-LIST with every element from the SUFFIX arguments. -# Each pair is joined with INFIX, and pairs are separated by SEPARATOR. -# No expansion occurs on SEPARATOR, INFIX, or elements of either list. -# -# For example: -# m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3]) -# => a-1, a-2, a-3, b-1, b-2, b-3, c-1, c-2, c-3 -# -# This definition is a bit hairy; the thing to realize is that we want -# to construct m4_map_args_sep([[prefix$3]], [], [[$1]], m4_shift3($@)) -# as the inner loop, using each prefix generated by the outer loop, -# and without recalculating m4_shift3 every outer iteration. -m4_define([m4_combine], -[m4_if([$2], [], [], m4_eval([$# > 3]), [1], -[m4_map_args_sep([m4_map_args_sep(m4_dquote(], [)[[$3]], [], [[$1]],]]]dnl -[m4_dquote(m4_dquote(m4_shift3($@)))[[)], [[$1]], $2)])]) - - -# m4_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR`'STRING' -# at the end. It is valid to use this macro with MACRO-NAME undefined, -# in which case no SEPARATOR is added. Be aware that the criterion is -# `not being defined', and not `not being empty'. -# -# Note that neither STRING nor SEPARATOR are expanded here; rather, when -# you expand MACRO-NAME, they will be expanded at that point in time. -# -# This macro is robust to active symbols. It can be used to grow -# strings. -# -# | m4_define(active, ACTIVE)dnl -# | m4_append([sentence], [This is an])dnl -# | m4_append([sentence], [ active ])dnl -# | m4_append([sentence], [symbol.])dnl -# | sentence -# | m4_undefine([active])dnl -# | sentence -# => This is an ACTIVE symbol. -# => This is an active symbol. -# -# It can be used to define hooks. -# -# | m4_define(active, ACTIVE)dnl -# | m4_append([hooks], [m4_define([act1], [act2])])dnl -# | m4_append([hooks], [m4_define([act2], [active])])dnl -# | m4_undefine([active])dnl -# | act1 -# | hooks -# | act1 -# => act1 -# => -# => active -# -# It can also be used to create lists, although this particular usage was -# broken prior to autoconf 2.62. -# | m4_append([list], [one], [, ])dnl -# | m4_append([list], [two], [, ])dnl -# | m4_append([list], [three], [, ])dnl -# | list -# | m4_dquote(list) -# => one, two, three -# => [one],[two],[three] -# -# Note that m4_append can benefit from amortized O(n) m4 behavior, if -# the underlying m4 implementation is smart enough to avoid copying existing -# contents when enlarging a macro's definition into any pre-allocated storage -# (m4 1.4.x unfortunately does not implement this optimization). We do -# not implement m4_prepend, since it is inherently O(n^2) (pre-allocated -# storage only occurs at the end of a macro, so the existing contents must -# always be moved). -# -# Use _m4_defn for speed. -m4_define([m4_append], -[m4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])]) - - -# m4_append_uniq(MACRO-NAME, STRING, [SEPARATOR], [IF-UNIQ], [IF-DUP]) -# -------------------------------------------------------------------- -# Like `m4_append', but append only if not yet present. Additionally, -# expand IF-UNIQ if STRING was appended, or IF-DUP if STRING was already -# present. Also, warn if SEPARATOR is not empty and occurs within STRING, -# as the algorithm no longer guarantees uniqueness. -# -# Note that while m4_append can be O(n) (depending on the quality of the -# underlying M4 implementation), m4_append_uniq is inherently O(n^2) -# because each append operation searches the entire string. -m4_define([m4_append_uniq], -[m4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [], - [m4_warn([syntax], - [$0: `$2' contains `$3'])])])_$0($@)]) -m4_define([_m4_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1], - [m4_append([$1], [$2], [$3])$4], [$5])], - [m4_define([$1], [$2])$4])]) - -# m4_append_uniq_w(MACRO-NAME, STRINGS) -# ------------------------------------- -# For each of the words in the whitespace separated list STRINGS, append -# only the unique strings to the definition of MACRO-NAME. -# -# Use _m4_defn for speed. -m4_define([m4_append_uniq_w], -[m4_map_args_w([$2], [_m4_append_uniq([$1],], [, [ ])])]) - - -# m4_escape(STRING) -# ----------------- -# Output quoted STRING, but with embedded #, $, [ and ] turned into -# quadrigraphs. -# -# It is faster to check if STRING is already good using m4_translit -# than to blindly perform four m4_bpatsubst. -# -# Because the translit is stripping quotes, it must also neutralize -# anything that might be in a macro name, as well as comments, commas, -# and parentheses. All the problem characters are unified so that a -# single m4_index can scan the result. -# -# Rather than expand m4_defn every time m4_escape is expanded, we -# inline its expansion up front. -m4_define([m4_escape], -[m4_if(m4_index(m4_translit([$1], - [[]#,()]]m4_dquote(m4_defn([m4_cr_symbols2]))[, [$$$]), [$]), - [-1], [m4_echo], [_$0])([$1])]) - -m4_define([_m4_escape], -[m4_changequote([-=<{(],[)}>=-])]dnl -[m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(m4_bpatsubst( - -=<{(-=<{(-=<{(-=<{(-=<{($1)}>=-)}>=-)}>=-)}>=-)}>=-, - -=<{(#)}>=-, -=<{(@%:@)}>=-), - -=<{(\[)}>=-, -=<{(@<:@)}>=-), - -=<{(\])}>=-, -=<{(@:>@)}>=-), - -=<{(\$)}>=-, -=<{(@S|@)}>=-)m4_changequote([,])]) - - -# m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH]) -# ------------------------------------------------------- -# Expands into STRING wrapped to hold in WIDTH columns (default = 79). -# If PREFIX is given, each line is prefixed with it. If FIRST-PREFIX is -# specified, then the first line is prefixed with it. As a special case, -# if the length of FIRST-PREFIX is greater than that of PREFIX, then -# FIRST-PREFIX will be left alone on the first line. -# -# No expansion occurs on the contents STRING, PREFIX, or FIRST-PREFIX, -# although quadrigraphs are correctly recognized. More precisely, -# you may redefine m4_qlen to recognize whatever escape sequences that -# you will post-process. -# -# Typical outputs are: -# -# m4_text_wrap([Short string */], [ ], [/* ], 20) -# => /* Short string */ -# -# m4_text_wrap([Much longer string */], [ ], [/* ], 20) -# => /* Much longer -# => string */ -# -# m4_text_wrap([Short doc.], [ ], [ --short ], 30) -# => --short Short doc. -# -# m4_text_wrap([Short doc.], [ ], [ --too-wide ], 30) -# => --too-wide -# => Short doc. -# -# m4_text_wrap([Super long documentation.], [ ], [ --too-wide ], 30) -# => --too-wide -# => Super long -# => documentation. -# -# FIXME: there is no checking of a longer PREFIX than WIDTH, but do -# we really want to bother with people trying each single corner -# of a software? -# -# This macro does not leave a trailing space behind the last word of a line, -# which complicates it a bit. The algorithm is otherwise stupid and simple: -# all the words are preceded by m4_Separator which is defined to empty for -# the first word, and then ` ' (single space) for all the others. -# -# The algorithm uses a helper that uses $2 through $4 directly, rather than -# using local variables, to avoid m4_defn overhead, or expansion swallowing -# any $. It also bypasses m4_popdef overhead with _m4_popdef since no user -# macro expansion occurs in the meantime. Also, the definition is written -# with m4_do, to avoid time wasted on dnl during expansion (since this is -# already a time-consuming macro). -m4_define([m4_text_wrap], -[_$0(m4_escape([$1]), [$2], m4_default_quoted([$3], [$2]), - m4_default_quoted([$4], [79]))]) - -m4_define([_m4_text_wrap], -m4_do(dnl set up local variables, to avoid repeated calculations -[[m4_pushdef([m4_Indent], m4_qlen([$2]))]], -[[m4_pushdef([m4_Cursor], m4_qlen([$3]))]], -[[m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])]], -dnl expand the first prefix, then check its length vs. regular prefix -dnl same length: nothing special -dnl prefix1 longer: output on line by itself, and reset cursor -dnl prefix1 shorter: pad to length of prefix, and reset cursor -[[[$3]m4_cond([m4_Cursor], m4_Indent, [], - [m4_eval(m4_Cursor > m4_Indent)], [1], [ -[$2]m4_define([m4_Cursor], m4_Indent)], - [m4_format([%*s], m4_max([0], - m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])]], -dnl now, for each word, compute the cursor after the word is output, then -dnl check if the cursor would exceed the wrap column -dnl if so, reset cursor, and insert newline and prefix -dnl if not, insert the separator (usually a space) -dnl either way, insert the word -[[m4_map_args_w([$1], [$0_word(], [, [$2], [$4])])]], -dnl finally, clean up the local variables -[[_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])]])) - -m4_define([_m4_text_wrap_word], -[m4_define([m4_Cursor], m4_eval(m4_Cursor + m4_qlen([$1]) + 1))]dnl -[m4_if(m4_eval(m4_Cursor > ([$3])), - [1], [m4_define([m4_Cursor], m4_eval(m4_Indent + m4_qlen([$1]) + 1)) -[$2]], - [m4_Separator[]])[$1]]) - -# m4_text_box(MESSAGE, [FRAME-CHARACTER = `-']) -# --------------------------------------------- -# Turn MESSAGE into: -# ## ------- ## -# ## MESSAGE ## -# ## ------- ## -# using FRAME-CHARACTER in the border. -# -# Quadrigraphs are correctly recognized. More precisely, you may -# redefine m4_qlen to recognize whatever escape sequences that you -# will post-process. -m4_define([m4_text_box], -[m4_pushdef([m4_Border], - m4_translit(m4_format([[[%*s]]], m4_decr(m4_qlen(_m4_expand([$1 -]))), []), [ ], m4_default_quoted([$2], [-])))]dnl -[[##] _m4_defn([m4_Border]) [##] -[##] $1 [##] -[##] _m4_defn([m4_Border]) [##]_m4_popdef([m4_Border])]) - - -# m4_qlen(STRING) -# --------------- -# Expands to the length of STRING after autom4te converts all quadrigraphs. -# -# If you use some other means of post-processing m4 output rather than -# autom4te, then you may redefine this macro to recognize whatever -# escape sequences your post-processor will handle. For that matter, -# m4_define([m4_qlen], m4_defn([m4_len])) is sufficient if you don't -# do any post-processing. -# -# Avoid bpatsubsts for the common case of no quadrigraphs. Cache -# results, as configure scripts tend to ask about lengths of common -# strings like `/*' and `*/' rather frequently. Minimize the number -# of times that $1 occurs in m4_qlen, so there is less text to parse -# on a cache hit. -m4_define([m4_qlen], -[m4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])]) -m4_define([_m4_qlen], -[m4_define([m4_qlen-$1], -m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])], - [m4_len(m4_bpatsubst([[$1]], - [@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)], - [\3]))]))_m4_defn([m4_qlen-$1])]) - -# m4_copyright_condense(TEXT) -# --------------------------- -# Condense the copyright notice in TEXT to only display the final -# year, wrapping the results to fit in 80 columns. -m4_define([m4_copyright_condense], -[m4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]), -[(C)[- ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))]) - -## ----------------------- ## -## 13. Number processing. ## -## ----------------------- ## - -# m4_cmp(A, B) -# ------------ -# Compare two integer expressions. -# A < B -> -1 -# A = B -> 0 -# A > B -> 1 -m4_define([m4_cmp], -[m4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))]) - - -# m4_list_cmp(A, B) -# ----------------- -# -# Compare the two lists of integer expressions A and B. For instance: -# m4_list_cmp([1, 0], [1]) -> 0 -# m4_list_cmp([1, 0], [1, 0]) -> 0 -# m4_list_cmp([1, 2], [1, 0]) -> 1 -# m4_list_cmp([1, 2, 3], [1, 2]) -> 1 -# m4_list_cmp([1, 2, -3], [1, 2]) -> -1 -# m4_list_cmp([1, 0], [1, 2]) -> -1 -# m4_list_cmp([1], [1, 2]) -> -1 -# m4_define([xa], [oops])dnl -# m4_list_cmp([[0xa]], [5+5]) -> 0 -# -# Rather than face the overhead of m4_case, we use a helper function whose -# expansion includes the name of the macro to invoke on the tail, either -# m4_ignore or m4_unquote. This is particularly useful when comparing -# long lists, since less text is being expanded for deciding when to end -# recursion. The recursion is between a pair of macros that alternate -# which list is trimmed by one element; this is more efficient than -# calling m4_cdr on both lists from a single macro. Guarantee exactly -# one expansion of both lists' side effects. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_list_cmp], -[_$0_raw(m4_dquote($1), m4_dquote($2))]) - -m4_define([_m4_list_cmp_raw], -[m4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])]) - -m4_define([_m4_list_cmp], -[m4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])]) - -m4_define([_m4_list_cmp_1], -[_m4_list_cmp_2([$2], [m4_shift2($@)], $1)]) - -m4_define([_m4_list_cmp_2], -[_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))( - [_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])]) - -# m4_max(EXPR, ...) -# m4_min(EXPR, ...) -# ----------------- -# Return the decimal value of the maximum (or minimum) in a series of -# integer expressions. -# -# M4 1.4.x doesn't provide ?:. Hence this huge m4_eval. Avoid m4_eval -# if both arguments are identical, but be aware of m4_max(0xa, 10) (hence -# the use of <=, not just <, in the second multiply). -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_max], -[m4_if([$#], [0], [m4_fatal([too few arguments to $0])], - [$#], [1], [m4_eval([$1])], - [$#$1], [2$2], [m4_eval([$1])], - [$#], [2], [_$0($@)], - [_m4_minmax([_$0], $@)])]) - -m4_define([_m4_max], -[m4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))]) - -m4_define([m4_min], -[m4_if([$#], [0], [m4_fatal([too few arguments to $0])], - [$#], [1], [m4_eval([$1])], - [$#$1], [2$2], [m4_eval([$1])], - [$#], [2], [_$0($@)], - [_m4_minmax([_$0], $@)])]) - -m4_define([_m4_min], -[m4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))]) - -# _m4_minmax(METHOD, ARG1, ARG2...) -# --------------------------------- -# Common recursion code for m4_max and m4_min. METHOD must be _m4_max -# or _m4_min, and there must be at least two arguments to combine. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([_m4_minmax], -[m4_if([$#], [3], [$1([$2], [$3])], - [$0([$1], $1([$2], [$3]), m4_shift3($@))])]) - - -# m4_sign(A) -# ---------- -# The sign of the integer expression A. -m4_define([m4_sign], -[m4_eval((([$1]) > 0) - (([$1]) < 0))]) - - - -## ------------------------ ## -## 14. Version processing. ## -## ------------------------ ## - - -# m4_version_unletter(VERSION) -# ---------------------------- -# Normalize beta version numbers with letters to numeric expressions, which -# can then be handed to m4_eval for the purpose of comparison. -# -# Nl -> (N+1).-1.(l#) -# -# for example: -# [2.14a] -> [0,2,14+1,-1,[0r36:a]] -> 2.15.-1.10 -# [2.14b] -> [0,2,15+1,-1,[0r36:b]] -> 2.15.-1.11 -# [2.61aa.b] -> [0,2.61,1,-1,[0r36:aa],+1,-1,[0r36:b]] -> 2.62.-1.370.1.-1.11 -# [08] -> [0,[0r10:0]8] -> 8 -# -# This macro expects reasonable version numbers, but can handle double -# letters and does not expand any macros. Original version strings can -# use both `.' and `-' separators. -# -# Inline constant expansions, to avoid m4_defn overhead. -# _m4_version_unletter is the real workhorse used by m4_version_compare, -# but since [0r36:a] and commas are less readable than 10 and dots, we -# provide a wrapper for human use. -m4_define([m4_version_unletter], -[m4_substr(m4_map_args([.m4_eval], m4_unquote(_$0([$1]))), [3])]) -m4_define([_m4_version_unletter], -[m4_bpatsubst(m4_bpatsubst(m4_translit([[[[0,$1]]]], [.-], [,,]),]dnl -m4_dquote(m4_dquote(m4_defn([m4_cr_Letters])))[[+], - [+1,-1,[0r36:\&]]), [,0], [,[0r10:0]])]) - - -# m4_version_compare(VERSION-1, VERSION-2) -# ---------------------------------------- -# Compare the two version numbers and expand into -# -1 if VERSION-1 < VERSION-2 -# 0 if = -# 1 if > -# -# Since _m4_version_unletter does not output side effects, we can -# safely bypass the overhead of m4_version_cmp. -m4_define([m4_version_compare], -[_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))]) - - -# m4_PACKAGE_NAME -# m4_PACKAGE_TARNAME -# m4_PACKAGE_VERSION -# m4_PACKAGE_STRING -# m4_PACKAGE_BUGREPORT -# -------------------- -# If m4sugar/version.m4 is present, then define version strings. This -# file is optional, provided by Autoconf but absent in Bison. -m4_sinclude([m4sugar/version.m4]) - - -# m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL]) -# ---------------------------------------------------- -# Check this Autoconf version against VERSION. -m4_define([m4_version_prereq], -m4_ifdef([m4_PACKAGE_VERSION], -[[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]), - [-1], - [m4_default([$3], - [m4_fatal([Autoconf version $1 or higher is required], - [63])])], - [$2])]], -[[m4_fatal([m4sugar/version.m4 not found])]])) - - -## ------------------ ## -## 15. Set handling. ## -## ------------------ ## - -# Autoconf likes to create arbitrarily large sets; for example, as of -# this writing, the configure.ac for coreutils tracks a set of more -# than 400 AC_SUBST. How do we track all of these set members, -# without introducing duplicates? We could use m4_append_uniq, with -# the set NAME residing in the contents of the macro NAME. -# Unfortunately, m4_append_uniq is quadratic for set creation, because -# it costs O(n) to search the string for each of O(n) insertions; not -# to mention that with m4 1.4.x, even using m4_append is slow, costing -# O(n) rather than O(1) per insertion. Other set operations, not used -# by Autoconf but still possible by manipulation of the definition -# tracked in macro NAME, include O(n) deletion of one element and O(n) -# computation of set size. Because the set is exposed to the user via -# the definition of a single macro, we cannot cache any data about the -# set without risking the cache being invalidated by the user -# redefining NAME. -# -# Can we do better? Yes, because m4 gives us an O(1) search function -# for free: ifdef. Additionally, even m4 1.4.x gives us an O(1) -# insert operation for free: pushdef. But to use these, we must -# represent the set via a group of macros; to keep the set consistent, -# we must hide the set so that the user can only manipulate it through -# accessor macros. The contents of the set are maintained through two -# access points; _m4_set([name]) is a pushdef stack of values in the -# set, useful for O(n) traversal of the set contents; while the -# existence of _m4_set([name],value) with no particular value is -# useful for O(1) querying of set membership. And since the user -# cannot externally manipulate the set, we are free to add additional -# caching macros for other performance improvements. Deletion can be -# O(1) per element rather than O(n), by reworking the definition of -# _m4_set([name],value) to be 0 or 1 based on current membership, and -# adding _m4_set_cleanup(name) to defer the O(n) cleanup of -# _m4_set([name]) until we have another reason to do an O(n) -# traversal. The existence of _m4_set_cleanup(name) can then be used -# elsewhere to determine if we must dereference _m4_set([name],value), -# or assume that definition implies set membership. Finally, size can -# be tracked in an O(1) fashion with _m4_set_size(name). -# -# The quoting in _m4_set([name],value) is chosen so that there is no -# ambiguity with a set whose name contains a comma, and so that we can -# supply the value via _m4_defn([_m4_set([name])]) without needing any -# quote manipulation. - -# m4_set_add(SET, VALUE, [IF-UNIQ], [IF-DUP]) -# ------------------------------------------- -# Add VALUE as an element of SET. Expand IF-UNIQ on the first -# addition, and IF-DUP if it is already in the set. Addition of one -# element is O(1), such that overall set creation is O(n). -# -# We do not want to add a duplicate for a previously deleted but -# unpruned element, but it is just as easy to check existence directly -# as it is to query _m4_set_cleanup($1). -m4_define([m4_set_add], -[m4_ifdef([_m4_set([$1],$2)], - [m4_if(m4_indir([_m4_set([$1],$2)]), [0], - [m4_define([_m4_set([$1],$2)], - [1])_m4_set_size([$1], [m4_incr])$3], [$4])], - [m4_define([_m4_set([$1],$2)], - [1])m4_pushdef([_m4_set([$1])], - [$2])_m4_set_size([$1], [m4_incr])$3])]) - -# m4_set_add_all(SET, VALUE...) -# ----------------------------- -# Add each VALUE into SET. This is O(n) in the number of VALUEs, and -# can be faster than calling m4_set_add for each VALUE. -# -# Implement two recursion helpers; the check variant is slower but -# handles the case where an element has previously been removed but -# not pruned. The recursion helpers ignore their second argument, so -# that we can use the faster m4_shift2 and 2 arguments, rather than -# _m4_shift2 and one argument, as the signal to end recursion. -# -# Please keep foreach.m4 in sync with any adjustments made here. -m4_define([m4_set_add_all], -[m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1]) - + m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))]) - -m4_define([_m4_set_add_all], -[m4_if([$#], [2], [], - [m4_ifdef([_m4_set([$1],$3)], [], - [m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])], - [$3])-])$0([$1], m4_shift2($@))])]) - -m4_define([_m4_set_add_all_check], -[m4_if([$#], [2], [], - [m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])]) - -# m4_set_contains(SET, VALUE, [IF-PRESENT], [IF-ABSENT]) -# ------------------------------------------------------ -# Expand IF-PRESENT if SET contains VALUE, otherwise expand IF-ABSENT. -# This is always O(1). -m4_define([m4_set_contains], -[m4_ifdef([_m4_set_cleanup($1)], - [m4_if(m4_ifdef([_m4_set([$1],$2)], - [m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])], - [m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])]) - -# m4_set_contents(SET, [SEP]) -# --------------------------- -# Expand to a single string containing all the elements in SET, -# separated by SEP, without modifying SET. No provision is made for -# disambiguating set elements that contain non-empty SEP as a -# sub-string, or for recognizing a set that contains only the empty -# string. Order of the output is not guaranteed. If any elements -# have been previously removed from the set, this action will prune -# the unused memory. This is O(n) in the size of the set before -# pruning. -# -# Use _m4_popdef for speed. The existence of _m4_set_cleanup($1) -# determines which version of _1 helper we use. -m4_define([m4_set_contents], -[m4_set_map_sep([$1], [], [], [[$2]])]) - -# _m4_set_contents_1(SET) -# _m4_set_contents_1c(SET) -# _m4_set_contents_2(SET, [PRE], [POST], [SEP]) -# --------------------------------------------- -# Expand to a list of quoted elements currently in the set, each -# surrounded by PRE and POST, and moving SEP in front of PRE on -# recursion. To avoid nesting limit restrictions, the algorithm must -# be broken into two parts; _1 destructively copies the stack in -# reverse into _m4_set_($1), producing no output; then _2 -# destructively copies _m4_set_($1) back into the stack in reverse. -# If no elements were deleted, then this visits the set in the order -# that elements were inserted. Behavior is undefined if PRE/POST/SEP -# tries to recursively list or modify SET in any way other than -# calling m4_set_remove on the current element. Use _1 if all entries -# in the stack are guaranteed to be in the set, and _1c to prune -# removed entries. Uses _m4_defn and _m4_popdef for speed. -m4_define([_m4_set_contents_1], -[_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])]) - -m4_define([_m4_set_contents_1c], -[m4_ifdef([_m4_set([$1])], - [m4_set_contains([$1], _m4_defn([_m4_set([$1])]), - [m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))], - [_m4_popdef([_m4_set([$1],]_m4_defn( - [_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])], - [_m4_popdef([_m4_set_cleanup($1)])])]) - -m4_define([_m4_set_contents_2], -[_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])], - [$2[]_m4_defn([_m4_set_($1)])$3], [$4[]])]) - -# m4_set_delete(SET) -# ------------------ -# Delete all elements in SET, and reclaim any memory occupied by the -# set. This is O(n) in the set size. -# -# Use _m4_defn and _m4_popdef for speed. -m4_define([m4_set_delete], -[m4_ifdef([_m4_set([$1])], - [_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)], - [_m4_set([$1])])$0([$1])], - [m4_ifdef([_m4_set_cleanup($1)], - [_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef( - [_m4_set_size($1)], - [_m4_popdef([_m4_set_size($1)])])])]) - -# m4_set_difference(SET1, SET2) -# ----------------------------- -# Produce a LIST of quoted elements that occur in SET1 but not SET2. -# Output a comma prior to any elements, to distinguish the empty -# string from no elements. This can be directly used as a series of -# arguments, such as for m4_join, or wrapped inside quotes for use in -# m4_foreach. Order of the output is not guaranteed. -# -# Short-circuit the idempotence relation. -m4_define([m4_set_difference], -[m4_if([$1], [$2], [], [m4_set_map_sep([$1], [_$0([$2],], [)])])]) - -m4_define([_m4_set_difference], -[m4_set_contains([$1], [$2], [], [,[$2]])]) - -# m4_set_dump(SET, [SEP]) -# ----------------------- -# Expand to a single string containing all the elements in SET, -# separated by SEP, then delete SET. In general, if you only need to -# list the contents once, this is faster than m4_set_contents. No -# provision is made for disambiguating set elements that contain -# non-empty SEP as a sub-string. Order of the output is not -# guaranteed. This is O(n) in the size of the set before pruning. -# -# Use _m4_popdef for speed. Use existence of _m4_set_cleanup($1) to -# decide if more expensive recursion is needed. -m4_define([m4_set_dump], -[m4_ifdef([_m4_set_size($1)], - [_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)], - [_$0_check], [_$0])([$1], [], [$2])]) - -# _m4_set_dump(SET, [SEP], [PREP]) -# _m4_set_dump_check(SET, [SEP], [PREP]) -# -------------------------------------- -# Print SEP and the current element, then delete the element and -# recurse with empty SEP changed to PREP. The check variant checks -# whether the element has been previously removed. Use _m4_defn and -# _m4_popdef for speed. -m4_define([_m4_set_dump], -[m4_ifdef([_m4_set([$1])], - [[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn( - [_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])]) - -m4_define([_m4_set_dump_check], -[m4_ifdef([_m4_set([$1])], - [m4_set_contains([$1], _m4_defn([_m4_set([$1])]), - [[$2]_m4_defn([_m4_set([$1])])])_m4_popdef( - [_m4_set([$1],]_m4_defn([_m4_set([$1])])[)], - [_m4_set([$1])])$0([$1], [$2$3])], - [_m4_popdef([_m4_set_cleanup($1)])])]) - -# m4_set_empty(SET, [IF-EMPTY], [IF-ELEMENTS]) -# -------------------------------------------- -# Expand IF-EMPTY if SET has no elements, otherwise IF-ELEMENTS. -m4_define([m4_set_empty], -[m4_ifdef([_m4_set_size($1)], - [m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])]) - -# m4_set_foreach(SET, VAR, ACTION) -# -------------------------------- -# For each element of SET, define VAR to the element and expand -# ACTION. ACTION should not recursively list SET's contents, add -# elements to SET, nor delete any element from SET except the one -# currently in VAR. The order that the elements are visited in is not -# guaranteed. This is faster than the corresponding m4_foreach([VAR], -# m4_indir([m4_dquote]m4_set_listc([SET])), [ACTION]) -m4_define([m4_set_foreach], -[m4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])]) - -# m4_set_intersection(SET1, SET2) -# ------------------------------- -# Produce a LIST of quoted elements that occur in both SET1 or SET2. -# Output a comma prior to any elements, to distinguish the empty -# string from no elements. This can be directly used as a series of -# arguments, such as for m4_join, or wrapped inside quotes for use in -# m4_foreach. Order of the output is not guaranteed. -# -# Iterate over the smaller set, and short-circuit the idempotence -# relation. -m4_define([m4_set_intersection], -[m4_if([$1], [$2], [m4_set_listc([$1])], - m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])], - [m4_set_map_sep([$1], [_$0([$2],], [)])])]) - -m4_define([_m4_set_intersection], -[m4_set_contains([$1], [$2], [,[$2]])]) - -# m4_set_list(SET) -# m4_set_listc(SET) -# ----------------- -# Produce a LIST of quoted elements of SET. This can be directly used -# as a series of arguments, such as for m4_join or m4_set_add_all, or -# wrapped inside quotes for use in m4_foreach or m4_map. With -# m4_set_list, there is no way to distinguish an empty set from a set -# containing only the empty string; with m4_set_listc, a leading comma -# is output if there are any elements. -m4_define([m4_set_list], -[m4_set_map_sep([$1], [], [], [,])]) - -m4_define([m4_set_listc], -[m4_set_map_sep([$1], [,])]) - -# m4_set_map(SET, ACTION) -# ----------------------- -# For each element of SET, expand ACTION with a single argument of the -# current element. ACTION should not recursively list SET's contents, -# add elements to SET, nor delete any element from SET except the one -# passed as an argument. The order that the elements are visited in -# is not guaranteed. This is faster than either of the corresponding -# m4_map_args([ACTION]m4_set_listc([SET])) -# m4_set_foreach([SET], [VAR], [ACTION(m4_defn([VAR]))]) -m4_define([m4_set_map], -[m4_set_map_sep([$1], [$2(], [)])]) - -# m4_set_map_sep(SET, [PRE], [POST], [SEP]) -# ----------------------------------------- -# For each element of SET, expand PRE[value]POST[], and expand SEP -# between elements. -m4_define([m4_set_map_sep], -[m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c], - [_m4_set_contents_1])([$1])_m4_set_contents_2($@)]) - -# m4_set_remove(SET, VALUE, [IF-PRESENT], [IF-ABSENT]) -# ---------------------------------------------------- -# If VALUE is an element of SET, delete it and expand IF-PRESENT. -# Otherwise expand IF-ABSENT. Deleting a single value is O(1), -# although it leaves memory occupied until the next O(n) traversal of -# the set which will compact the set. -# -# Optimize if the element being removed is the most recently added, -# since defining _m4_set_cleanup($1) slows down so many other macros. -# In particular, this plays well with m4_set_foreach and m4_set_map. -m4_define([m4_set_remove], -[m4_set_contains([$1], [$2], [_m4_set_size([$1], - [m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2], - [_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])], - [m4_define([_m4_set_cleanup($1)])m4_define( - [_m4_set([$1],$2)], [0])])$3], [$4])]) - -# m4_set_size(SET) -# ---------------- -# Expand to the number of elements currently in SET. This operation -# is O(1), and thus more efficient than m4_count(m4_set_list([SET])). -m4_define([m4_set_size], -[m4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])]) - -# _m4_set_size(SET, ACTION) -# ------------------------- -# ACTION must be either m4_incr or m4_decr, and the size of SET is -# changed accordingly. If the set is empty, ACTION must not be -# m4_decr. -m4_define([_m4_set_size], -[m4_define([_m4_set_size($1)], - m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))], - [1]))]) - -# m4_set_union(SET1, SET2) -# ------------------------ -# Produce a LIST of double quoted elements that occur in either SET1 -# or SET2, without duplicates. Output a comma prior to any elements, -# to distinguish the empty string from no elements. This can be -# directly used as a series of arguments, such as for m4_join, or -# wrapped inside quotes for use in m4_foreach. Order of the output is -# not guaranteed. -# -# We can rely on the fact that m4_set_listc prunes SET1, so we don't -# need to check _m4_set([$1],element) for 0. Short-circuit the -# idempotence relation. -m4_define([m4_set_union], -[m4_set_listc([$1])m4_if([$1], [$2], [], - [m4_set_map_sep([$2], [_$0([$1],], [)])])]) - -m4_define([_m4_set_union], -[m4_ifdef([_m4_set([$1],$2)], [], [,[$2]])]) - - -## ------------------- ## -## 16. File handling. ## -## ------------------- ## - - -# It is a real pity that M4 comes with no macros to bind a diversion -# to a file. So we have to deal without, which makes us a lot more -# fragile than we should. - - -# m4_file_append(FILE-NAME, CONTENT) -# ---------------------------------- -m4_define([m4_file_append], -[m4_syscmd([cat >>$1 <<_m4eof -$2 -_m4eof -]) -m4_if(m4_sysval, [0], [], - [m4_fatal([$0: cannot write: $1])])]) - - - -## ------------------------ ## -## 17. Setting M4sugar up. ## -## ------------------------ ## - -# _m4_divert_diversion should be defined. -m4_divert_push([KILL]) - -# m4_init -# ------- -# Initialize the m4sugar language. -m4_define([m4_init], -[# All the M4sugar macros start with `m4_', except `dnl' kept as is -# for sake of simplicity. -m4_pattern_forbid([^_?m4_]) -m4_pattern_forbid([^dnl$]) - -# If __m4_version__ is defined, we assume that we are being run by M4 -# 1.6 or newer, thus $@ recursion is linear, and debugmode(+do) -# is available for faster checks of dereferencing undefined macros -# and forcing dumpdef to print to stderr regardless of debugfile. -# But if it is missing, we assume we are being run by M4 1.4.x, that -# $@ recursion is quadratic, and that we need foreach-based -# replacement macros. Also, m4 prior to 1.4.8 loses track of location -# during m4wrap text; __line__ should never be 0. -# -# Use the raw builtin to avoid tripping up include tracing. -# Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn. -m4_ifdef([__m4_version__], -[m4_debugmode([+do]) -m4_define([m4_defn], _m4_defn([_m4_defn])) -m4_define([m4_dumpdef], _m4_defn([_m4_dumpdef])) -m4_define([m4_popdef], _m4_defn([_m4_popdef])) -m4_define([m4_undefine], _m4_defn([_m4_undefine]))], -[m4_builtin([include], [m4sugar/foreach.m4]) -m4_wrap_lifo([m4_if(__line__, [0], [m4_pushdef([m4_location], -]]m4_dquote(m4_dquote(m4_dquote(__file__:__line__)))[[)])])]) - -# Rewrite the first entry of the diversion stack. -m4_divert([KILL]) - -# Check the divert push/pop perfect balance. -# Some users are prone to also use m4_wrap to register last-minute -# m4_divert_text; so after our diversion cleanups, we restore -# KILL as the bottom of the diversion stack. -m4_wrap([m4_popdef([_m4_divert_diversion])m4_ifdef( - [_m4_divert_diversion], [m4_fatal([$0: unbalanced m4_divert_push: -]m4_divert_stack)])_m4_popdef([_m4_divert_stack])m4_divert_push([KILL])]) -]) diff --git a/tools/data/stack.hh b/tools/data/stack.hh deleted file mode 100644 index e4e8df0a..00000000 --- a/tools/data/stack.hh +++ /dev/null @@ -1,121 +0,0 @@ -# C++ skeleton for Bison - -# Copyright (C) 2002-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -m4_pushdef([b4_copyright_years], - [2002-2012]) - -b4_output_begin([b4_dir_prefix[]stack.hh]) -b4_copyright([Stack handling for Bison parsers in C++], - [2002-2012])[ - -/** - ** \file ]b4_dir_prefix[stack.hh - ** Define the ]b4_namespace_ref[::stack class. - */ - -]b4_cpp_guard_open([b4_dir_prefix[]stack.hh])[ - -# include - -]b4_namespace_open[ - template > - class stack - { - public: - // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; - - stack () : seq_ () - { - } - - stack (unsigned int n) : seq_ (n) - { - } - - inline - T& - operator [] (unsigned int i) - { - return seq_[i]; - } - - inline - const T& - operator [] (unsigned int i) const - { - return seq_[i]; - } - - inline - void - push (const T& t) - { - seq_.push_front (t); - } - - inline - void - pop (unsigned int n = 1) - { - for (; n; --n) - seq_.pop_front (); - } - - inline - unsigned int - height () const - { - return seq_.size (); - } - - inline const_iterator begin () const { return seq_.rbegin (); } - inline const_iterator end () const { return seq_.rend (); } - - private: - S seq_; - }; - - /// Present a slice of the top of a stack. - template > - class slice - { - public: - slice (const S& stack, unsigned int range) - : stack_ (stack) - , range_ (range) - { - } - - inline - const T& - operator [] (unsigned int i) const - { - return stack_[range_ - i]; - } - - private: - const S& stack_; - unsigned int range_; - }; -]b4_namespace_close[ - -]b4_cpp_guard_close([b4_dir_prefix[]stack.hh]) -b4_output_end() - -m4_popdef([b4_copyright_years]) diff --git a/tools/data/xslt/bison.xsl b/tools/data/xslt/bison.xsl deleted file mode 100644 index e661b3f5..00000000 --- a/tools/data/xslt/bison.xsl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - s - - - r - - - - - - , - - - - - 0 - - - - - - - - - - - diff --git a/tools/data/xslt/xml2dot.xsl b/tools/data/xslt/xml2dot.xsl deleted file mode 100644 index 87d4e07c..00000000 --- a/tools/data/xslt/xml2dot.xsl +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - - - - - - - - - // Generated by GNU Bison - - . - // Report bugs to < - - >. - // Home page: < - - >. - - - - - - - - digraph " - - - - " { - node [fontname = courier, shape = box, colorscheme = paired6] - edge [fontname = courier] - - - - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - label="[ - - - - - - , - - - ]", - - - - style=solid] - - - - - - - - - 3 - - - 5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - - - . - - - - - . - - - - - - - - - - - - - [ - - ] - - - - - - , - - - - - - - - - - - -> " - - R - - - d - - " [ - - - - - - - - " - - R - - - d - - " [label=" - - - Acc", fillcolor=1 - - - R - - ", fillcolor= - - - - , shape=diamond, style=filled] - - - - - - - - - - dotted - - - solid - - - dashed - - - - - - - - - - - - - - - - - [label=" - State - - \n - - - - \l"] - - - - - - - - - - -> - - [style= - - - label=" - - - - " - - ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/data/xslt/xml2text.xsl b/tools/data/xslt/xml2text.xsl deleted file mode 100644 index 5af94613..00000000 --- a/tools/data/xslt/xml2text.xsl +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nonterminals useless in grammar - - - - - - - - - - - - Terminals unused in grammar - - - - - - - - - - - - - - Rules useless in grammar - - - - - - - - - - - Rules useless in parser due to conflicts - - - - - - - - - Grammar - - - - - - - - - - - - - - - - - - - - - - - - - Terminals, with rules where they appear - - - - - - Nonterminals, with rules where they appear - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - on@left: - - - - - - - , - - on@right: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - State - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - - - - - - . - - - - - - - - - . - - - - - - - - - - - - - - - - /* empty */ - - - - [ - - ] - - - - - - , - - - - - - - - - - - - - shift, and go to state - - - - go to state - - - - - - - - - - - - - - error - ( - - ) - - - - - - - - - - - - [ - - - - accept - - - reduce using rule - - ( - - ) - - - - ] - - - - - - - - - - - - - Conflict between rule - - and token - - resolved as - - an - - - ( - - ). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/data/xslt/xml2xhtml.xsl b/tools/data/xslt/xml2xhtml.xsl deleted file mode 100644 index 22033c61..00000000 --- a/tools/data/xslt/xml2xhtml.xsl +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - - - - - - - - - - <xsl:value-of select="bison-xml-report/filename"/> - <xsl:text> - GNU Bison XML Automaton Report</xsl:text> - - - - - - -

- - - - - -

GNU Bison XML Automaton Report

-

- input grammar: -

- - -

Table of Contents

- - - - - - -
- - -

- - Reductions -

- - - -
- - -

- - Nonterminals useless in grammar -

- - -

- - - - - - -

-
- - - -

- - Terminals unused in grammar -

- - -

- - - - - - - -

-
- - - -

- - Rules useless in grammar -

- - - -

- - - - -

-
- - - - - -

- - Rules useless in parser due to conflicts -

- -

- - - -

- - - - - -

- - Grammar -

- -

- - - -

- - - - - - - - - - - - - - - - - - - - - -

- - Conflicts -

- - - - - -

- - -

-
- - - - - - - - - -
- - - - - - conflicts: - - - - - - - - - - - - - - -

- - Terminals, with rules where they appear -

- -

- -

- -
- - -

- - Nonterminals, with rules where they appear -

- -

- -

- - - - - - - - - - - - - - - - - on left: - - - - - - - - - on right: - - - - - - - - - -
- - - - - - - - -

- - Automaton -

- - - -
- - - - -

- - - - - - state - -

- -

- - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - . - - - - - - - - - - - - - - - - - - - - - - - ε - - - - [ - - ] - - - - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - error - ( - - ) - - - - - - - - - - - - [ - - - - accept - - - - - - - - - ( - - ) - - - - ] - - - - - - - - - - - - - Conflict between - - - - - - - and token - - resolved as - - an - - - ( - - ). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - diff --git a/tools/data/yacc.c b/tools/data/yacc.c deleted file mode 100644 index b34549f1..00000000 --- a/tools/data/yacc.c +++ /dev/null @@ -1,2065 +0,0 @@ - -*- C -*- - -# Yacc compatible skeleton for Bison - -# Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, -# Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Check the value of %define api.push-pull. -b4_percent_define_default([[api.push-pull]], [[pull]]) -b4_percent_define_check_values([[[[api.push-pull]], - [[pull]], [[push]], [[both]]]]) -b4_define_flag_if([pull]) m4_define([b4_pull_flag], [[1]]) -b4_define_flag_if([push]) m4_define([b4_push_flag], [[1]]) -m4_case(b4_percent_define_get([[api.push-pull]]), - [pull], [m4_define([b4_push_flag], [[0]])], - [push], [m4_define([b4_pull_flag], [[0]])]) - -# Handle BISON_USE_PUSH_FOR_PULL for the test suite. So that push parsing -# tests function as written, do not let BISON_USE_PUSH_FOR_PULL modify the -# behavior of Bison at all when push parsing is already requested. -b4_define_flag_if([use_push_for_pull]) -b4_use_push_for_pull_if([ - b4_push_if([m4_define([b4_use_push_for_pull_flag], [[0]])], - [m4_define([b4_push_flag], [[1]])])]) - -# Check the value of %define parse.lac and friends, where LAC stands for -# lookahead correction. -b4_percent_define_default([[parse.lac]], [[none]]) -b4_percent_define_default([[parse.lac.es-capacity-initial]], [[20]]) -b4_percent_define_default([[parse.lac.memory-trace]], [[failures]]) -b4_percent_define_check_values([[[[parse.lac]], [[full]], [[none]]]], - [[[[parse.lac.memory-trace]], - [[failures]], [[full]]]]) -b4_define_flag_if([lac]) -m4_define([b4_lac_flag], - [m4_if(b4_percent_define_get([[parse.lac]]), - [none], [[0]], [[1]])]) - -m4_include(b4_pkgdatadir/[c.m4]) - -## ---------------- ## -## Default values. ## -## ---------------- ## - -# Stack parameters. -m4_define_default([b4_stack_depth_max], [10000]) -m4_define_default([b4_stack_depth_init], [200]) - - -## ------------------------ ## -## Pure/impure interfaces. ## -## ------------------------ ## - -b4_percent_define_default([[api.pure]], [[false]]) -b4_percent_define_check_values([[[[api.pure]], - [[false]], [[true]], [[]], [[full]]]]) - -m4_define([b4_pure_flag], [[0]]) -m4_case(b4_percent_define_get([[api.pure]]), - [false], [m4_define([b4_pure_flag], [[0]])], - [true], [m4_define([b4_pure_flag], [[1]])], - [], [m4_define([b4_pure_flag], [[1]])], - [full], [m4_define([b4_pure_flag], [[2]])]) - -m4_define([b4_pure_if], -[m4_case(b4_pure_flag, - [0], [$2], - [1], [$1], - [2], [$1])]) - [m4_fatal([invalid api.pure value: ]$1)])]) - -# b4_yyerror_arg_loc_if(ARG) -# -------------------------- -# Expand ARG iff yyerror is to be given a location as argument. -m4_define([b4_yyerror_arg_loc_if], -[b4_locations_if([m4_case(b4_pure_flag, - [1], [m4_ifset([b4_parse_param], [$1])], - [2], [$1])])]) - -# b4_yyerror_args -# --------------- -# Arguments passed to yyerror: user args plus yylloc. -m4_define([b4_yyerror_args], -[b4_yyerror_arg_loc_if([&yylloc, ])dnl -m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])]) - - -# b4_lex_param -# ------------ -# Accumulate in b4_lex_param all the yylex arguments. -# b4_lex_param arrives quoted twice, but we want to keep only one level. -m4_define([b4_lex_param], -m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl -b4_locations_if([, [[YYLTYPE *], [&yylloc]]])m4_ifdef([b4_lex_param], [, ])])dnl -m4_ifdef([b4_lex_param], b4_lex_param))) - - -## ------------ ## -## Data Types. ## -## ------------ ## - -# b4_int_type(MIN, MAX) -# --------------------- -# Return the smallest int type able to handle numbers ranging from -# MIN to MAX (included). Overwrite the version from c.m4, which -# uses only C89 types, so that the user can override the shorter -# types, and so that pre-C89 compilers are handled correctly. -m4_define([b4_int_type], -[m4_if(b4_ints_in($@, [0], [255]), [1], [yytype_uint8], - b4_ints_in($@, [-128], [127]), [1], [yytype_int8], - - b4_ints_in($@, [0], [65535]), [1], [yytype_uint16], - b4_ints_in($@, [-32768], [32767]), [1], [yytype_int16], - - m4_eval([0 <= $1]), [1], [unsigned int], - - [int])]) - - -## ----------------- ## -## Semantic Values. ## -## ----------------- ## - - -# b4_lhs_value([TYPE]) -# -------------------- -# Expansion of $$. -m4_define([b4_lhs_value], -[(yyval[]m4_ifval([$1], [.$1]))]) - - -# b4_rhs_value(RULE-LENGTH, NUM, [TYPE]) -# -------------------------------------- -# Expansion of $NUM, where the current rule has RULE-LENGTH -# symbols on RHS. -m4_define([b4_rhs_value], -[(yyvsp@{($2) - ($1)@}m4_ifval([$3], [.$3]))]) - - - -## ----------- ## -## Locations. ## -## ----------- ## - -# b4_lhs_location() -# ----------------- -# Expansion of @$. -m4_define([b4_lhs_location], -[(yyloc)]) - - -# b4_rhs_location(RULE-LENGTH, NUM) -# --------------------------------- -# Expansion of @NUM, where the current rule has RULE-LENGTH symbols -# on RHS. -m4_define([b4_rhs_location], -[(yylsp@{($2) - ($1)@})]) - - -## -------------- ## -## Declarations. ## -## -------------- ## - -# b4_declare_scanner_communication_variables -# ------------------------------------------ -# Declare the variables that are global, or local to YYPARSE if -# pure-parser. -m4_define([b4_declare_scanner_communication_variables], [[ -/* The lookahead symbol. */ -int yychar; - -]b4_pure_if([[ -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif]b4_locations_if([[ -static YYLTYPE yyloc_default][]b4_yyloc_default[;]])])[ -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);]b4_locations_if([[ - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc]b4_pure_if([ = yyloc_default], [b4_yyloc_default])[; -]])b4_pure_if([], [[ - -/* Number of syntax errors so far. */ -int yynerrs;]])]) - - -# b4_declare_parser_state_variables -# --------------------------------- -# Declare all the variables that are needed to maintain the parser state -# between calls to yypush_parse. -m4_define([b4_declare_parser_state_variables], [b4_pure_if([[ - /* Number of syntax errors so far. */ - int yynerrs; -]])[ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values.]b4_locations_if([[ - `yyls': related to locations.]])[ - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp;]b4_locations_if([[ - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3];]])[ - - YYSIZE_T yystacksize;]b4_lac_if([[ - - yytype_int16 yyesa@{]b4_percent_define_get([[parse.lac.es-capacity-initial]])[@}; - yytype_int16 *yyes; - YYSIZE_T yyes_capacity;]])]) - - -# b4_declare_yyparse_push_ -# ------------------------ -# Declaration of yyparse (and dependencies) when using the push parser -# (including in pull mode). -m4_define([b4_declare_yyparse_push_], -[[#ifndef YYPUSH_MORE_DEFINED -# define YYPUSH_MORE_DEFINED -enum { YYPUSH_MORE = 4 }; -#endif - -typedef struct ]b4_prefix[pstate ]b4_prefix[pstate; - -]b4_pull_if([b4_c_function_decl([b4_prefix[parse]], [[int]], b4_parse_param) -])b4_c_function_decl([b4_prefix[push_parse]], [[int]], - [[b4_prefix[pstate *ps]], [[ps]]]b4_pure_if([, - [[[int pushed_char]], [[pushed_char]]], - [[b4_api_PREFIX[STYPE const *pushed_val]], [[pushed_val]]]b4_locations_if([, - [[b4_api_PREFIX[LTYPE *pushed_loc]], [[pushed_loc]]]])])m4_ifset([b4_parse_param], [, - b4_parse_param])) -b4_pull_if([b4_c_function_decl([b4_prefix[pull_parse]], [[int]], - [[b4_prefix[pstate *ps]], [[ps]]]m4_ifset([b4_parse_param], [, - b4_parse_param]))]) -b4_c_function_decl([b4_prefix[pstate_new]], [b4_prefix[pstate *]], - [[[void]], []]) -b4_c_function_decl([b4_prefix[pstate_delete]], [[void]], - [[b4_prefix[pstate *ps]], [[ps]]])dnl -]) - -# b4_declare_yyparse_ -# ------------------- -# When not the push parser. -m4_define([b4_declare_yyparse_], -[[#ifdef YYPARSE_PARAM -]b4_c_function_decl(b4_prefix[parse], [int], - [[void *YYPARSE_PARAM], [YYPARSE_PARAM]])[ -#else /* ! YYPARSE_PARAM */ -]b4_c_function_decl(b4_prefix[parse], [int], b4_parse_param)[ -#endif /* ! YYPARSE_PARAM */]dnl -]) - - -# b4_declare_yyparse -# ------------------ -m4_define([b4_declare_yyparse], -[b4_push_if([b4_declare_yyparse_push_], - [b4_declare_yyparse_])[]dnl -]) - - -# b4_shared_declarations -# ---------------------- -# Declaration that might either go into the header (if --defines) -# or open coded in the parser body. -m4_define([b4_shared_declarations], -[b4_cpp_guard_open([b4_spec_defines_file])[ -]b4_declare_yydebug[ -]b4_percent_code_get([[requires]])[ -]b4_token_enums_defines(b4_tokens)[ -]b4_declare_yylstype[ -]b4_declare_yyparse[ -]b4_percent_code_get([[provides]])[ -]b4_cpp_guard_close([b4_spec_defines_file])[]dnl -]) - - -## -------------- ## -## Output files. ## -## -------------- ## - -b4_output_begin([b4_parser_file_name]) -b4_copyright([Bison implementation for Yacc-like parsers in C], - [1984, 1989-1990, 2000-2012])[ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -]b4_identification -b4_percent_code_get([[top]])[]dnl -m4_if(b4_api_prefix, [yy], [], -[[/* Substitute the type names. */ -#define YYSTYPE ]b4_api_PREFIX[STYPE]b4_locations_if([[ -#define YYLTYPE ]b4_api_PREFIX[LTYPE]])])[ -]m4_if(b4_prefix, [yy], [], -[[/* Substitute the variable and function names. */]b4_pull_if([[ -#define yyparse ]b4_prefix[parse]])b4_push_if([[ -#define yypush_parse ]b4_prefix[push_parse]b4_pull_if([[ -#define yypull_parse ]b4_prefix[pull_parse]])[ -#define yypstate_new ]b4_prefix[pstate_new -#define yypstate_delete ]b4_prefix[pstate_delete -#define yypstate ]b4_prefix[pstate]])[ -#define yylex ]b4_prefix[lex -#define yyerror ]b4_prefix[error -#define yylval ]b4_prefix[lval -#define yychar ]b4_prefix[char -#define yydebug ]b4_prefix[debug -#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[ -#define yylloc ]b4_prefix[lloc]])])[ - -/* Copy the first part of user declarations. */ -]b4_user_pre_prologue[ - -]b4_null_define[ - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE ]b4_error_verbose_flag[ -#endif - -]m4_ifval(m4_quote(b4_spec_defines_file), -[[/* In a future release of Bison, this section will be replaced - by #include "@basename(]b4_spec_defines_file[@)". */ -]])dnl -b4_shared_declarations[ - -/* Copy the second part of user declarations. */ -]b4_user_post_prologue -b4_percent_code_get[]dnl - -[#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif ]b4_c_modern[ -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && ]b4_c_modern[ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -]b4_c_function_def([YYID], [static int], [[int yyi], [yyi]])[ -{ - return yyi; -} -#endif - -#if ]b4_lac_if([[1]], [[! defined yyoverflow || YYERROR_VERBOSE]])[ - -/* The parser invokes alloca or malloc; define the necessary symbols. */]dnl -b4_push_if([], [b4_lac_if([], [[ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && ]b4_c_modern[ -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif]])])[ - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && ]b4_c_modern[ -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && ]b4_c_modern[ -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif]b4_lac_if([[ -# define YYCOPY_NEEDED 1]])[ -#endif]b4_lac_if([], [[ /* ! defined yyoverflow || YYERROR_VERBOSE */]])[ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (]b4_locations_if([[defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL \ - && ]])[defined ]b4_api_PREFIX[STYPE_IS_TRIVIAL && ]b4_api_PREFIX[STYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc;]b4_locations_if([ - YYLTYPE yyls_alloc;])[ -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -]b4_locations_if( -[# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM)], -[# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM)])[ - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL ]b4_final_state_number[ -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST ]b4_last[ - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS ]b4_tokens_number[ -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS ]b4_nterms_number[ -/* YYNRULES -- Number of rules. */ -#define YYNRULES ]b4_rules_number[ -/* YYNRULES -- Number of states. */ -#define YYNSTATES ]b4_states_number[ - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK ]b4_undef_token_number[ -#define YYMAXUTOK ]b4_user_token_number_max[ - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const ]b4_int_type_for([b4_translate])[ yytranslate[] = -{ - ]b4_translate[ -}; - -#if ]b4_api_PREFIX[DEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const ]b4_int_type_for([b4_prhs])[ yyprhs[] = -{ - ]b4_prhs[ -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const ]b4_int_type_for([b4_rhs])[ yyrhs[] = -{ - ]b4_rhs[ -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const ]b4_int_type_for([b4_rline])[ yyrline[] = -{ - ]b4_rline[ -}; -#endif - -#if ]b4_api_PREFIX[DEBUG || YYERROR_VERBOSE || ]b4_token_table_flag[ -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - ]b4_tname[ -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const ]b4_int_type_for([b4_toknum])[ yytoknum[] = -{ - ]b4_toknum[ -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const ]b4_int_type_for([b4_r1])[ yyr1[] = -{ - ]b4_r1[ -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const ]b4_int_type_for([b4_r2])[ yyr2[] = -{ - ]b4_r2[ -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const ]b4_int_type_for([b4_defact])[ yydefact[] = -{ - ]b4_defact[ -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const ]b4_int_type_for([b4_defgoto])[ yydefgoto[] = -{ - ]b4_defgoto[ -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF ]b4_pact_ninf[ -static const ]b4_int_type_for([b4_pact])[ yypact[] = -{ - ]b4_pact[ -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] = -{ - ]b4_pgoto[ -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF ]b4_table_ninf[ -static const ]b4_int_type_for([b4_table])[ yytable[] = -{ - ]b4_table[ -}; - -#define yypact_value_is_default(Yystate) \ - ]b4_table_value_equals([[pact]], [[Yystate]], [b4_pact_ninf])[ - -#define yytable_value_is_error(Yytable_value) \ - ]b4_table_value_equals([[table]], [[Yytable_value]], [b4_table_ninf])[ - -static const ]b4_int_type_for([b4_check])[ yycheck[] = -{ - ]b4_check[ -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const ]b4_int_type_for([b4_stos])[ yystos[] = -{ - ]b4_stos[ -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \]b4_lac_if([[ - YY_LAC_DISCARD ("YYBACKUP"); \]])[ - goto yybackup; \ - } \ - else \ - { \ - yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - -]b4_locations_if([[ -]b4_yylloc_default_define[ -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -]])[ -]b4_yy_location_print_define[ - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (]b4_pure_if([&yylval[]b4_locations_if([, &yylloc]), ])[YYLEX_PARAM) -#else -# define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[ -#endif - -/* Enable debugging if requested. */ -#if ]b4_api_PREFIX[DEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value]b4_locations_if([, Location])[]b4_user_args[); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - -]b4_yy_symbol_print_generate([b4_c_function_def])[ - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -]b4_c_function_def([yy_stack_print], [static void], - [[yytype_int16 *yybottom], [yybottom]], - [[yytype_int16 *yytop], [yytop]])[ -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -]b4_c_function_def([yy_reduce_print], [static void], - [[YYSTYPE *yyvsp], [yyvsp]], - b4_locations_if([[[YYLTYPE *yylsp], [yylsp]], - ])[[int yyrule], [yyrule]]m4_ifset([b4_parse_param], [, - b4_parse_param]))[ -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &]b4_rhs_value(yynrhs, yyi + 1)[ - ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl - b4_user_args[); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, ]b4_locations_if([yylsp, ])[Rule]b4_user_args[); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !]b4_api_PREFIX[DEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !]b4_api_PREFIX[DEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH ]b4_stack_depth_init[ -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH ]b4_stack_depth_max[ -#endif]b4_lac_if([[ - -/* Given a state stack such that *YYBOTTOM is its bottom, such that - *YYTOP is either its top or is YYTOP_EMPTY to indicate an empty - stack, and such that *YYCAPACITY is the maximum number of elements it - can hold without a reallocation, make sure there is enough room to - store YYADD more elements. If not, allocate a new stack using - YYSTACK_ALLOC, copy the existing elements, and adjust *YYBOTTOM, - *YYTOP, and *YYCAPACITY to reflect the new capacity and memory - location. If *YYBOTTOM != YYBOTTOM_NO_FREE, then free the old stack - using YYSTACK_FREE. Return 0 if successful or if no reallocation is - required. Return 1 if memory is exhausted. */ -static int -yy_lac_stack_realloc (YYSIZE_T *yycapacity, YYSIZE_T yyadd, -#if ]b4_api_PREFIX[DEBUG - char const *yydebug_prefix, - char const *yydebug_suffix, -#endif - yytype_int16 **yybottom, - yytype_int16 *yybottom_no_free, - yytype_int16 **yytop, yytype_int16 *yytop_empty) -{ - YYSIZE_T yysize_old = - *yytop == yytop_empty ? 0 : *yytop - *yybottom + 1; - YYSIZE_T yysize_new = yysize_old + yyadd; - if (*yycapacity < yysize_new) - { - YYSIZE_T yyalloc = 2 * yysize_new; - yytype_int16 *yybottom_new; - /* Use YYMAXDEPTH for maximum stack size given that the stack - should never need to grow larger than the main state stack - needs to grow without LAC. */ - if (YYMAXDEPTH < yysize_new) - { - YYDPRINTF ((stderr, "%smax size exceeded%s", yydebug_prefix, - yydebug_suffix)); - return 1; - } - if (YYMAXDEPTH < yyalloc) - yyalloc = YYMAXDEPTH; - yybottom_new = - (yytype_int16*) YYSTACK_ALLOC (yyalloc * sizeof *yybottom_new); - if (!yybottom_new) - { - YYDPRINTF ((stderr, "%srealloc failed%s", yydebug_prefix, - yydebug_suffix)); - return 1; - } - if (*yytop != yytop_empty) - { - YYCOPY (yybottom_new, *yybottom, yysize_old); - *yytop = yybottom_new + (yysize_old - 1); - } - if (*yybottom != yybottom_no_free) - YYSTACK_FREE (*yybottom); - *yybottom = yybottom_new; - *yycapacity = yyalloc;]m4_if(b4_percent_define_get([[parse.lac.memory-trace]]), - [full], [[ - YYDPRINTF ((stderr, "%srealloc to %lu%s", yydebug_prefix, - (unsigned long int) yyalloc, yydebug_suffix));]])[ - } - return 0; -} - -/* Establish the initial context for the current lookahead if no initial - context is currently established. - - We define a context as a snapshot of the parser stacks. We define - the initial context for a lookahead as the context in which the - parser initially examines that lookahead in order to select a - syntactic action. Thus, if the lookahead eventually proves - syntactically unacceptable (possibly in a later context reached via a - series of reductions), the initial context can be used to determine - the exact set of tokens that would be syntactically acceptable in the - lookahead's place. Moreover, it is the context after which any - further semantic actions would be erroneous because they would be - determined by a syntactically unacceptable token. - - YY_LAC_ESTABLISH should be invoked when a reduction is about to be - performed in an inconsistent state (which, for the purposes of LAC, - includes consistent states that don't know they're consistent because - their default reductions have been disabled). Iff there is a - lookahead token, it should also be invoked before reporting a syntax - error. This latter case is for the sake of the debugging output. - - For parse.lac=full, the implementation of YY_LAC_ESTABLISH is as - follows. If no initial context is currently established for the - current lookahead, then check if that lookahead can eventually be - shifted if syntactic actions continue from the current context. - Report a syntax error if it cannot. */ -#define YY_LAC_ESTABLISH \ -do { \ - if (!yy_lac_established) \ - { \ - YYDPRINTF ((stderr, \ - "LAC: initial context established for %s\n", \ - yytname[yytoken])); \ - yy_lac_established = 1; \ - { \ - int yy_lac_status = \ - yy_lac (yyesa, &yyes, &yyes_capacity, yyssp, yytoken); \ - if (yy_lac_status == 2) \ - goto yyexhaustedlab; \ - if (yy_lac_status == 1) \ - goto yyerrlab; \ - } \ - } \ -} while (YYID (0)) - -/* Discard any previous initial lookahead context because of Event, - which may be a lookahead change or an invalidation of the currently - established initial context for the current lookahead. - - The most common example of a lookahead change is a shift. An example - of both cases is syntax error recovery. That is, a syntax error - occurs when the lookahead is syntactically erroneous for the - currently established initial context, so error recovery manipulates - the parser stacks to try to find a new initial context in which the - current lookahead is syntactically acceptable. If it fails to find - such a context, it discards the lookahead. */ -#if ]b4_api_PREFIX[DEBUG -# define YY_LAC_DISCARD(Event) \ -do { \ - if (yy_lac_established) \ - { \ - if (yydebug) \ - YYFPRINTF (stderr, "LAC: initial context discarded due to " \ - Event "\n"); \ - yy_lac_established = 0; \ - } \ -} while (YYID (0)) -#else -# define YY_LAC_DISCARD(Event) yy_lac_established = 0 -#endif - -/* Given the stack whose top is *YYSSP, return 0 iff YYTOKEN can - eventually (after perhaps some reductions) be shifted, return 1 if - not, or return 2 if memory is exhausted. As preconditions and - postconditions: *YYES_CAPACITY is the allocated size of the array to - which *YYES points, and either *YYES = YYESA or *YYES points to an - array allocated with YYSTACK_ALLOC. yy_lac may overwrite the - contents of either array, alter *YYES and *YYES_CAPACITY, and free - any old *YYES other than YYESA. */ -static int -yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes, - YYSIZE_T *yyes_capacity, yytype_int16 *yyssp, int yytoken) -{ - yytype_int16 *yyes_prev = yyssp; - yytype_int16 *yyesp = yyes_prev; - YYDPRINTF ((stderr, "LAC: checking lookahead %s:", yytname[yytoken])); - if (yytoken == YYUNDEFTOK) - { - YYDPRINTF ((stderr, " Always Err\n")); - return 1; - } - while (1) - { - int yyrule = yypact[*yyesp]; - if (yypact_value_is_default (yyrule) - || (yyrule += yytoken) < 0 || YYLAST < yyrule - || yycheck[yyrule] != yytoken) - { - yyrule = yydefact[*yyesp]; - if (yyrule == 0) - { - YYDPRINTF ((stderr, " Err\n")); - return 1; - } - } - else - { - yyrule = yytable[yyrule]; - if (yytable_value_is_error (yyrule)) - { - YYDPRINTF ((stderr, " Err\n")); - return 1; - } - if (0 < yyrule) - { - YYDPRINTF ((stderr, " S%d\n", yyrule)); - return 0; - } - yyrule = -yyrule; - } - { - YYSIZE_T yylen = yyr2[yyrule]; - YYDPRINTF ((stderr, " R%d", yyrule - 1)); - if (yyesp != yyes_prev) - { - YYSIZE_T yysize = yyesp - *yyes + 1; - if (yylen < yysize) - { - yyesp -= yylen; - yylen = 0; - } - else - { - yylen -= yysize; - yyesp = yyes_prev; - } - } - if (yylen) - yyesp = yyes_prev -= yylen; - } - { - int yystate; - { - int yylhs = yyr1[yyrule] - YYNTOKENS; - yystate = yypgoto[yylhs] + *yyesp; - if (yystate < 0 || YYLAST < yystate - || yycheck[yystate] != *yyesp) - yystate = yydefgoto[yylhs]; - else - yystate = yytable[yystate]; - } - if (yyesp == yyes_prev) - { - yyesp = *yyes; - *yyesp = yystate; - } - else - { - if (yy_lac_stack_realloc (yyes_capacity, 1, -#if ]b4_api_PREFIX[DEBUG - " (", ")", -#endif - yyes, yyesa, &yyesp, yyes_prev)) - { - YYDPRINTF ((stderr, "\n")); - return 2; - } - *++yyesp = yystate; - } - YYDPRINTF ((stderr, " G%d", yystate)); - } - } -}]])[ - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -]b4_c_function_def([yystrlen], [static YYSIZE_T], - [[const char *yystr], [yystr]])[ -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -]b4_c_function_def([yystpcpy], [static char *], - [[char *yydest], [yydest]], [[const char *yysrc], [yysrc]])[ -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP.]b4_lac_if([[ In order to see if a particular token T is a - valid looakhead, invoke yy_lac (YYESA, YYES, YYES_CAPACITY, YYSSP, T).]])[ - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store]b4_lac_if([[ or if - yy_lac returned 2]])[. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - ]b4_lac_if([[yytype_int16 *yyesa, yytype_int16 **yyes, - YYSIZE_T *yyes_capacity, ]])[yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar.]b4_lac_if([[ - In the first two cases, it might appear that the current syntax - error should have been detected in the previous state when yy_lac - was invoked. However, at that time, there might have been a - different syntax error that discarded a different initial context - during error recovery, leaving behind the current lookahead.]], [[ - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state.]])[ - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp];]b4_lac_if([[ - YYDPRINTF ((stderr, "Constructing syntax error message\n"));]])[ - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - {]b4_lac_if([], [[ - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;]])[ - int yyx;]b4_lac_if([[ - - for (yyx = 0; yyx < YYNTOKENS; ++yyx) - if (yyx != YYTERROR && yyx != YYUNDEFTOK) - { - { - int yy_lac_status = yy_lac (yyesa, yyes, yyes_capacity, - yyssp, yyx); - if (yy_lac_status == 2) - return 2; - if (yy_lac_status == 1) - continue; - }]], [[ - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - {]])[ - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - }]b4_lac_if([[ -# if ]b4_api_PREFIX[DEBUG - else if (yydebug) - YYFPRINTF (stderr, "No expected tokens.\n"); -# endif]])[ - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -]b4_yydestruct_generate([b4_c_function_def])[ - -]b4_pure_if([], [ - -b4_declare_scanner_communication_variables])[]b4_push_if([[ - -struct yypstate - {]b4_declare_parser_state_variables[ - /* Used to determine if this is the first time this instance has - been used. */ - int yynew; - };]b4_pure_if([], [[ - -static char yypstate_allocated = 0;]])b4_pull_if([ - -b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[ -{ - return yypull_parse (YY_NULL]m4_ifset([b4_parse_param], - [[, ]b4_c_args(b4_parse_param)])[); -} - -]b4_c_function_def([[yypull_parse]], [[int]], - [[[yypstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [, - b4_parse_param]))[ -{ - int yystatus; - yypstate *yyps_local;]b4_pure_if([[ - int yychar; - YYSTYPE yylval;]b4_locations_if([[ - static YYLTYPE yyloc_default][]b4_yyloc_default[; - YYLTYPE yylloc = yyloc_default;]])])[ - if (yyps) - yyps_local = yyps; - else - { - yyps_local = yypstate_new (); - if (!yyps_local) - {]b4_pure_if([[ - yyerror (]b4_yyerror_args[YY_("memory exhausted"));]], [[ - if (!yypstate_allocated) - yyerror (]b4_yyerror_args[YY_("memory exhausted"));]])[ - return 2; - } - } - do { - yychar = YYLEX; - yystatus = - yypush_parse (yyps_local]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])[); - } while (yystatus == YYPUSH_MORE); - if (!yyps) - yypstate_delete (yyps_local); - return yystatus; -}]])[ - -/* Initialize the parser data structure. */ -]b4_c_function_def([[yypstate_new]], [[yypstate *]])[ -{ - yypstate *yyps;]b4_pure_if([], [[ - if (yypstate_allocated) - return YY_NULL;]])[ - yyps = (yypstate *) malloc (sizeof *yyps); - if (!yyps) - return YY_NULL; - yyps->yynew = 1;]b4_pure_if([], [[ - yypstate_allocated = 1;]])[ - return yyps; -} - -]b4_c_function_def([[yypstate_delete]], [[void]], - [[[yypstate *yyps]], [[yyps]]])[ -{ -#ifndef yyoverflow - /* If the stack was reallocated but the parse did not complete, then the - stack still needs to be freed. */ - if (!yyps->yynew && yyps->yyss != yyps->yyssa) - YYSTACK_FREE (yyps->yyss); -#endif]b4_lac_if([[ - if (!yyps->yynew && yyps->yyes != yyps->yyesa) - YYSTACK_FREE (yyps->yyes);]])[ - free (yyps);]b4_pure_if([], [[ - yypstate_allocated = 0;]])[ -} -]b4_pure_if([[ -#define ]b4_prefix[nerrs yyps->]b4_prefix[nerrs]])[ -#define yystate yyps->yystate -#define yyerrstatus yyps->yyerrstatus -#define yyssa yyps->yyssa -#define yyss yyps->yyss -#define yyssp yyps->yyssp -#define yyvsa yyps->yyvsa -#define yyvs yyps->yyvs -#define yyvsp yyps->yyvsp]b4_locations_if([[ -#define yylsa yyps->yylsa -#define yyls yyps->yyls -#define yylsp yyps->yylsp -#define yyerror_range yyps->yyerror_range]])[ -#define yystacksize yyps->yystacksize]b4_lac_if([[ -#define yyesa yyps->yyesa -#define yyes yyps->yyes -#define yyes_capacity yyps->yyes_capacity]])[ - - -/*---------------. -| yypush_parse. | -`---------------*/ - -]b4_c_function_def([[yypush_parse]], [[int]], - [[[yypstate *yyps]], [[yyps]]]b4_pure_if([, - [[[int yypushed_char]], [[yypushed_char]]], - [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([, - [[[YYLTYPE *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [, - b4_parse_param]))], [[ - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -]b4_c_function_def([yyparse], [int], - [[void *YYPARSE_PARAM], [YYPARSE_PARAM]])[ -#else /* ! YYPARSE_PARAM */ -]b4_c_function_def([yyparse], [int], b4_parse_param)[ -#endif]])[ -{]b4_pure_if([b4_declare_scanner_communication_variables -])b4_push_if([b4_pure_if([], [[ - int yypushed_char = yychar; - YYSTYPE yypushed_val = yylval;]b4_locations_if([[ - YYLTYPE yypushed_loc = yylloc;]]) -])], - [b4_declare_parser_state_variables -])b4_lac_if([[ - int yy_lac_established = 0;]])[ - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval;]b4_locations_if([[ - YYLTYPE yyloc;]])[ - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)]b4_locations_if([, yylsp -= (N)])[) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0;]b4_push_if([[ - - if (!yyps->yynew) - { - yyn = yypact[yystate]; - goto yyread_pushed_token; - }]])[ - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa;]b4_locations_if([[ - yylsp = yyls = yylsa;]])[ - yystacksize = YYINITDEPTH;]b4_lac_if([[ - - yyes = yyesa; - yyes_capacity = sizeof yyesa / sizeof *yyes; - if (YYMAXDEPTH < yyes_capacity) - yyes_capacity = YYMAXDEPTH;]])[ - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ -]m4_ifdef([b4_initial_action], [ -b4_dollar_pushdef([m4_define([b4_dollar_dollar_used])yylval], [], - [b4_push_if([b4_pure_if([*])yypushed_loc], [yylloc])])dnl -/* User initialization code. */ -b4_user_initial_action -b4_dollar_popdef[]dnl -m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval; -]])])dnl -b4_locations_if([[ yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yylloc])[; -]])dnl -[ goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss;]b4_locations_if([ - YYLTYPE *yyls1 = yyls;])[ - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([ - &yyls1, yysize * sizeof (*yylsp),])[ - &yystacksize); -]b4_locations_if([ - yyls = yyls1;])[ - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([ - YYSTACK_RELOCATE (yyls_alloc, yyls);])[ -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1;]b4_locations_if([ - yylsp = yyls + yysize - 1;])[ - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - {]b4_push_if([[ - if (!yyps->yynew) - {]b4_use_push_for_pull_if([], [[ - YYDPRINTF ((stderr, "Return for a new token:\n"));]])[ - yyresult = YYPUSH_MORE; - goto yypushreturn; - } - yyps->yynew = 0;]b4_pure_if([], [[ - /* Restoring the pushed token is only necessary for the first - yypush_parse invocation since subsequent invocations don't overwrite - it before jumping to yyread_pushed_token. */ - yychar = yypushed_char; - yylval = yypushed_val;]b4_locations_if([[ - yylloc = yypushed_loc;]])])[ -yyread_pushed_token:]])[ - YYDPRINTF ((stderr, "Reading a token: "));]b4_push_if([b4_pure_if([[ - yychar = yypushed_char; - if (yypushed_val) - yylval = *yypushed_val;]b4_locations_if([[ - if (yypushed_loc) - yylloc = *yypushed_loc;]])])], [[ - yychar = YYLEX;]])[ - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)]b4_lac_if([[ - { - YY_LAC_ESTABLISH; - goto yydefault; - }]], [[ - goto yydefault;]])[ - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab;]b4_lac_if([[ - YY_LAC_ESTABLISH;]])[ - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY;]b4_lac_if([[ - YY_LAC_DISCARD ("shift");]])[ - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END -]b4_locations_if([ *++yylsp = yylloc;])[ - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - -]b4_locations_if( -[[ /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);]])[ - YY_REDUCE_PRINT (yyn);]b4_lac_if([[ - { - int yychar_backup = yychar; - switch (yyn) - { - ]b4_user_actions[ - default: break; - } - if (yychar_backup != yychar) - YY_LAC_DISCARD ("yychar change"); - }]], [[ - switch (yyn) - { - ]b4_user_actions[ - default: break; - }]])[ - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval;]b4_locations_if([ - *++yylsp = yyloc;])[ - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (]b4_yyerror_args[YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \]b4_lac_if([[ - yyesa, &yyes, &yyes_capacity, \]])[ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status;]b4_lac_if([[ - if (yychar != YYEMPTY) - YY_LAC_ESTABLISH;]])[ - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (]b4_yyerror_args[yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - -]b4_locations_if([[ yyerror_range[1] = yylloc;]])[ - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - -]b4_locations_if([[ yyerror_range[1] = yylsp[1-yylen]; -]])[ /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - -]b4_locations_if([[ yyerror_range[1] = *yylsp;]])[ - yydestruct ("Error: popping", - yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - }]b4_lac_if([[ - - /* If the stack popping above didn't lose the initial context for the - current lookahead token, the shift below will for sure. */ - YY_LAC_DISCARD ("error recovery");]])[ - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END -]b4_locations_if([[ - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc;]])[ - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if ]b4_lac_if([[1]], [[!defined yyoverflow || YYERROR_VERBOSE]])[ -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (]b4_yyerror_args[YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif]b4_lac_if([[ - if (yyes != yyesa) - YYSTACK_FREE (yyes);]])b4_push_if([[ - yyps->yynew = 1; - -yypushreturn:]])[ -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -]b4_epilogue[]dnl -b4_output_end() - -b4_defines_if( -[b4_output_begin([b4_spec_defines_file])[ -]b4_copyright([Bison interface for Yacc-like parsers in C], - [1984, 1989-1990, 2000-2012])[ - -]b4_shared_declarations[ -]b4_output_end() -]) From ac1324032855ce082e387b8495dfa4a082d4acf5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 1 Jan 2016 00:31:43 +0100 Subject: [PATCH 74/84] Add a note to README.md about how to build the bison grammar --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index f56817c7..7a60e280 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,20 @@ CMake: The currently maintained and preferred way of building is through CMake. In MSVC, after running CMake, you may need to use the Configuration Manager to check the INSTALL project. +The grammar in glslang/MachineIndependent/glslang.y has to be recompiled with +bison if it changes, the output files are committed to the repo to avoid every +developer needing to have bison configured to compile the project when grammar +changes are quite infrequent. For windows you can get binaries from +[GnuWin32](http://gnuwin32.sourceforge.net/packages/bison.htm). + +The command to rebuild is: + +``` +bison --defines=MachineIndependent/glslang_tab.cpp.h + -t MachineIndependent/glslang.y + -o MachineIndependent/glslang_tab.cpp +``` + Programmatic Interfaces ----------------------- From 530690e44250e0fa7278c3af637120b0b1483a9d Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 1 Jan 2016 00:54:05 +0100 Subject: [PATCH 75/84] Commit bison-generated files from Windows GNU Bison 2.7 --- .gitignore | 2 - glslang/MachineIndependent/glslang_tab.cpp | 7790 ++++++++++++++++++ glslang/MachineIndependent/glslang_tab.cpp.h | 370 + 3 files changed, 8160 insertions(+), 2 deletions(-) create mode 100644 glslang/MachineIndependent/glslang_tab.cpp create mode 100644 glslang/MachineIndependent/glslang_tab.cpp.h diff --git a/.gitignore b/.gitignore index 153aa048..d93c2022 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,6 @@ *.so *.exe tags -glslang/MachineIndependent/glslang_tab.cpp -glslang/MachineIndependent/glslang_tab.cpp.h build/ Test/localResults/ Test/multiThread.out diff --git a/glslang/MachineIndependent/glslang_tab.cpp b/glslang/MachineIndependent/glslang_tab.cpp new file mode 100644 index 00000000..d435aa80 --- /dev/null +++ b/glslang/MachineIndependent/glslang_tab.cpp @@ -0,0 +1,7790 @@ +/* A Bison parser, made by GNU Bison 2.7. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.7" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* Copy the first part of user declarations. */ +/* Line 371 of yacc.c */ +#line 41 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + + +/* Based on: +ANSI C Yacc grammar + +In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a +matching Lex specification) for the April 30, 1985 draft version of the +ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that +original, as mentioned in the answer to question 17.25 of the comp.lang.c +FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. + +I intend to keep this version as close to the current C Standard grammar as +possible; please let me know if you discover discrepancies. + +Jutta Degener, 1995 +*/ + +#include "SymbolTable.h" +#include "ParseHelper.h" +#include "../Public/ShaderLang.h" + +using namespace glslang; + + +/* Line 371 of yacc.c */ +#line 93 "C:/Projects/glslang/glslang/MachineIndependent/glslang_tab.cpp" + +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "glslang_tab.cpp.h". */ +#ifndef YY_YY_C_PROJECTS_GLSLANG_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +# define YY_YY_C_PROJECTS_GLSLANG_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + ATTRIBUTE = 258, + VARYING = 259, + CONST = 260, + BOOL = 261, + FLOAT = 262, + DOUBLE = 263, + INT = 264, + UINT = 265, + BREAK = 266, + CONTINUE = 267, + DO = 268, + ELSE = 269, + FOR = 270, + IF = 271, + DISCARD = 272, + RETURN = 273, + SWITCH = 274, + CASE = 275, + DEFAULT = 276, + SUBROUTINE = 277, + BVEC2 = 278, + BVEC3 = 279, + BVEC4 = 280, + IVEC2 = 281, + IVEC3 = 282, + IVEC4 = 283, + UVEC2 = 284, + UVEC3 = 285, + UVEC4 = 286, + VEC2 = 287, + VEC3 = 288, + VEC4 = 289, + MAT2 = 290, + MAT3 = 291, + MAT4 = 292, + CENTROID = 293, + IN = 294, + OUT = 295, + INOUT = 296, + UNIFORM = 297, + PATCH = 298, + SAMPLE = 299, + BUFFER = 300, + SHARED = 301, + COHERENT = 302, + VOLATILE = 303, + RESTRICT = 304, + READONLY = 305, + WRITEONLY = 306, + DVEC2 = 307, + DVEC3 = 308, + DVEC4 = 309, + DMAT2 = 310, + DMAT3 = 311, + DMAT4 = 312, + NOPERSPECTIVE = 313, + FLAT = 314, + SMOOTH = 315, + LAYOUT = 316, + MAT2X2 = 317, + MAT2X3 = 318, + MAT2X4 = 319, + MAT3X2 = 320, + MAT3X3 = 321, + MAT3X4 = 322, + MAT4X2 = 323, + MAT4X3 = 324, + MAT4X4 = 325, + DMAT2X2 = 326, + DMAT2X3 = 327, + DMAT2X4 = 328, + DMAT3X2 = 329, + DMAT3X3 = 330, + DMAT3X4 = 331, + DMAT4X2 = 332, + DMAT4X3 = 333, + DMAT4X4 = 334, + ATOMIC_UINT = 335, + SAMPLER1D = 336, + SAMPLER2D = 337, + SAMPLER3D = 338, + SAMPLERCUBE = 339, + SAMPLER1DSHADOW = 340, + SAMPLER2DSHADOW = 341, + SAMPLERCUBESHADOW = 342, + SAMPLER1DARRAY = 343, + SAMPLER2DARRAY = 344, + SAMPLER1DARRAYSHADOW = 345, + SAMPLER2DARRAYSHADOW = 346, + ISAMPLER1D = 347, + ISAMPLER2D = 348, + ISAMPLER3D = 349, + ISAMPLERCUBE = 350, + ISAMPLER1DARRAY = 351, + ISAMPLER2DARRAY = 352, + USAMPLER1D = 353, + USAMPLER2D = 354, + USAMPLER3D = 355, + USAMPLERCUBE = 356, + USAMPLER1DARRAY = 357, + USAMPLER2DARRAY = 358, + SAMPLER2DRECT = 359, + SAMPLER2DRECTSHADOW = 360, + ISAMPLER2DRECT = 361, + USAMPLER2DRECT = 362, + SAMPLERBUFFER = 363, + ISAMPLERBUFFER = 364, + USAMPLERBUFFER = 365, + SAMPLERCUBEARRAY = 366, + SAMPLERCUBEARRAYSHADOW = 367, + ISAMPLERCUBEARRAY = 368, + USAMPLERCUBEARRAY = 369, + SAMPLER2DMS = 370, + ISAMPLER2DMS = 371, + USAMPLER2DMS = 372, + SAMPLER2DMSARRAY = 373, + ISAMPLER2DMSARRAY = 374, + USAMPLER2DMSARRAY = 375, + SAMPLEREXTERNALOES = 376, + SAMPLER = 377, + SAMPLERSHADOW = 378, + TEXTURE1D = 379, + TEXTURE2D = 380, + TEXTURE3D = 381, + TEXTURECUBE = 382, + TEXTURE1DARRAY = 383, + TEXTURE2DARRAY = 384, + ITEXTURE1D = 385, + ITEXTURE2D = 386, + ITEXTURE3D = 387, + ITEXTURECUBE = 388, + ITEXTURE1DARRAY = 389, + ITEXTURE2DARRAY = 390, + UTEXTURE1D = 391, + UTEXTURE2D = 392, + UTEXTURE3D = 393, + UTEXTURECUBE = 394, + UTEXTURE1DARRAY = 395, + UTEXTURE2DARRAY = 396, + TEXTURE2DRECT = 397, + ITEXTURE2DRECT = 398, + UTEXTURE2DRECT = 399, + TEXTUREBUFFER = 400, + ITEXTUREBUFFER = 401, + UTEXTUREBUFFER = 402, + TEXTURECUBEARRAY = 403, + ITEXTURECUBEARRAY = 404, + UTEXTURECUBEARRAY = 405, + TEXTURE2DMS = 406, + ITEXTURE2DMS = 407, + UTEXTURE2DMS = 408, + TEXTURE2DMSARRAY = 409, + ITEXTURE2DMSARRAY = 410, + UTEXTURE2DMSARRAY = 411, + SUBPASSINPUT = 412, + SUBPASSINPUTMS = 413, + ISUBPASSINPUT = 414, + ISUBPASSINPUTMS = 415, + USUBPASSINPUT = 416, + USUBPASSINPUTMS = 417, + IMAGE1D = 418, + IIMAGE1D = 419, + UIMAGE1D = 420, + IMAGE2D = 421, + IIMAGE2D = 422, + UIMAGE2D = 423, + IMAGE3D = 424, + IIMAGE3D = 425, + UIMAGE3D = 426, + IMAGE2DRECT = 427, + IIMAGE2DRECT = 428, + UIMAGE2DRECT = 429, + IMAGECUBE = 430, + IIMAGECUBE = 431, + UIMAGECUBE = 432, + IMAGEBUFFER = 433, + IIMAGEBUFFER = 434, + UIMAGEBUFFER = 435, + IMAGE1DARRAY = 436, + IIMAGE1DARRAY = 437, + UIMAGE1DARRAY = 438, + IMAGE2DARRAY = 439, + IIMAGE2DARRAY = 440, + UIMAGE2DARRAY = 441, + IMAGECUBEARRAY = 442, + IIMAGECUBEARRAY = 443, + UIMAGECUBEARRAY = 444, + IMAGE2DMS = 445, + IIMAGE2DMS = 446, + UIMAGE2DMS = 447, + IMAGE2DMSARRAY = 448, + IIMAGE2DMSARRAY = 449, + UIMAGE2DMSARRAY = 450, + STRUCT = 451, + VOID = 452, + WHILE = 453, + IDENTIFIER = 454, + TYPE_NAME = 455, + FLOATCONSTANT = 456, + DOUBLECONSTANT = 457, + INTCONSTANT = 458, + UINTCONSTANT = 459, + BOOLCONSTANT = 460, + LEFT_OP = 461, + RIGHT_OP = 462, + INC_OP = 463, + DEC_OP = 464, + LE_OP = 465, + GE_OP = 466, + EQ_OP = 467, + NE_OP = 468, + AND_OP = 469, + OR_OP = 470, + XOR_OP = 471, + MUL_ASSIGN = 472, + DIV_ASSIGN = 473, + ADD_ASSIGN = 474, + MOD_ASSIGN = 475, + LEFT_ASSIGN = 476, + RIGHT_ASSIGN = 477, + AND_ASSIGN = 478, + XOR_ASSIGN = 479, + OR_ASSIGN = 480, + SUB_ASSIGN = 481, + LEFT_PAREN = 482, + RIGHT_PAREN = 483, + LEFT_BRACKET = 484, + RIGHT_BRACKET = 485, + LEFT_BRACE = 486, + RIGHT_BRACE = 487, + DOT = 488, + COMMA = 489, + COLON = 490, + EQUAL = 491, + SEMICOLON = 492, + BANG = 493, + DASH = 494, + TILDE = 495, + PLUS = 496, + STAR = 497, + SLASH = 498, + PERCENT = 499, + LEFT_ANGLE = 500, + RIGHT_ANGLE = 501, + VERTICAL_BAR = 502, + CARET = 503, + AMPERSAND = 504, + QUESTION = 505, + INVARIANT = 506, + PRECISE = 507, + HIGH_PRECISION = 508, + MEDIUM_PRECISION = 509, + LOW_PRECISION = 510, + PRECISION = 511, + PACKED = 512, + RESOURCE = 513, + SUPERP = 514 + }; +#endif + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ +/* Line 387 of yacc.c */ +#line 66 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + + struct { + glslang::TSourceLoc loc; + union { + glslang::TString *string; + int i; + unsigned int u; + bool b; + double d; + }; + glslang::TSymbol* symbol; + } lex; + struct { + glslang::TSourceLoc loc; + glslang::TOperator op; + union { + TIntermNode* intermNode; + glslang::TIntermNodePair nodePair; + glslang::TIntermTyped* intermTypedNode; + }; + union { + glslang::TPublicType type; + glslang::TFunction* function; + glslang::TParameter param; + glslang::TTypeLoc typeLine; + glslang::TTypeList* typeList; + glslang::TArraySizes* arraySizes; + glslang::TIdentifierList* identifierList; + }; + } interm; + + +/* Line 387 of yacc.c */ +#line 428 "C:/Projects/glslang/glslang/MachineIndependent/glslang_tab.cpp" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (glslang::TParseContext* pParseContext); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_YY_C_PROJECTS_GLSLANG_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ + +/* Copy the second part of user declarations. */ +/* Line 390 of yacc.c */ +#line 98 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + + +/* windows only pragma */ +#ifdef _MSC_VER + #pragma warning(disable : 4065) + #pragma warning(disable : 4127) + #pragma warning(disable : 4244) +#endif + +#define parseContext (*pParseContext) +#define yyerror(context, msg) context->parserError(msg) + +extern int yylex(YYSTYPE*, TParseContext&); + + +/* Line 390 of yacc.c */ +#line 471 "C:/Projects/glslang/glslang/MachineIndependent/glslang_tab.cpp" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(N) (N) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 240 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 5659 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 260 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 100 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 411 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 543 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 514 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint16 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, + 21, 23, 28, 30, 34, 37, 40, 42, 44, 46, + 49, 52, 55, 57, 60, 64, 67, 69, 71, 73, + 76, 79, 82, 84, 86, 88, 90, 92, 96, 100, + 104, 106, 110, 114, 116, 120, 124, 126, 130, 134, + 138, 142, 144, 148, 152, 154, 158, 160, 164, 166, + 170, 172, 176, 178, 182, 184, 188, 190, 191, 198, + 200, 204, 206, 208, 210, 212, 214, 216, 218, 220, + 222, 224, 226, 228, 232, 234, 237, 240, 245, 248, + 252, 257, 260, 264, 269, 270, 277, 280, 284, 287, + 289, 291, 294, 298, 302, 305, 309, 312, 314, 317, + 319, 321, 323, 327, 332, 339, 345, 347, 350, 354, + 360, 365, 367, 370, 372, 374, 376, 378, 383, 385, + 389, 391, 395, 397, 399, 401, 404, 406, 408, 410, + 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, + 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, + 452, 457, 459, 463, 465, 468, 471, 475, 479, 484, + 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, + 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, + 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, + 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, + 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, + 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, + 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, + 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, + 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, + 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, + 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, + 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, + 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, + 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, + 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, + 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, + 806, 808, 810, 812, 814, 816, 817, 824, 825, 831, + 833, 836, 840, 845, 847, 851, 853, 856, 858, 862, + 867, 869, 873, 875, 877, 879, 881, 883, 885, 887, + 889, 891, 893, 896, 897, 898, 904, 906, 908, 909, + 912, 913, 916, 919, 923, 925, 928, 930, 933, 939, + 943, 945, 947, 952, 953, 962, 963, 965, 969, 972, + 973, 980, 981, 990, 991, 999, 1001, 1003, 1005, 1006, + 1009, 1013, 1016, 1019, 1022, 1026, 1029, 1031, 1034, 1036, + 1038, 1039 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 356, 0, -1, 199, -1, 261, -1, 203, -1, 204, + -1, 201, -1, 202, -1, 205, -1, 227, 289, 228, + -1, 262, -1, 263, 229, 264, 230, -1, 265, -1, + 263, 233, 199, -1, 263, 208, -1, 263, 209, -1, + 289, -1, 266, -1, 267, -1, 269, 228, -1, 268, + 228, -1, 270, 197, -1, 270, -1, 270, 287, -1, + 269, 234, 287, -1, 271, 227, -1, 315, -1, 263, + -1, 263, -1, 208, 272, -1, 209, 272, -1, 273, + 272, -1, 241, -1, 239, -1, 238, -1, 240, -1, + 272, -1, 274, 242, 272, -1, 274, 243, 272, -1, + 274, 244, 272, -1, 274, -1, 275, 241, 274, -1, + 275, 239, 274, -1, 275, -1, 276, 206, 275, -1, + 276, 207, 275, -1, 276, -1, 277, 245, 276, -1, + 277, 246, 276, -1, 277, 210, 276, -1, 277, 211, + 276, -1, 277, -1, 278, 212, 277, -1, 278, 213, + 277, -1, 278, -1, 279, 249, 278, -1, 279, -1, + 280, 248, 279, -1, 280, -1, 281, 247, 280, -1, + 281, -1, 282, 214, 281, -1, 282, -1, 283, 216, + 282, -1, 283, -1, 284, 215, 283, -1, 284, -1, + -1, 284, 250, 286, 289, 235, 287, -1, 285, -1, + 272, 288, 287, -1, 236, -1, 217, -1, 218, -1, + 220, -1, 219, -1, 226, -1, 221, -1, 222, -1, + 223, -1, 224, -1, 225, -1, 287, -1, 289, 234, + 287, -1, 285, -1, 295, 237, -1, 302, 237, -1, + 256, 318, 315, 237, -1, 292, 237, -1, 292, 199, + 237, -1, 292, 199, 316, 237, -1, 311, 237, -1, + 311, 199, 237, -1, 311, 199, 294, 237, -1, -1, + 311, 199, 231, 293, 322, 232, -1, 234, 199, -1, + 294, 234, 199, -1, 296, 228, -1, 298, -1, 297, + -1, 298, 300, -1, 297, 234, 300, -1, 304, 199, + 227, -1, 315, 199, -1, 315, 199, 316, -1, 311, + 299, -1, 299, -1, 311, 301, -1, 301, -1, 315, + -1, 303, -1, 302, 234, 199, -1, 302, 234, 199, + 316, -1, 302, 234, 199, 316, 236, 326, -1, 302, + 234, 199, 236, 326, -1, 304, -1, 304, 199, -1, + 304, 199, 316, -1, 304, 199, 316, 236, 326, -1, + 304, 199, 236, 326, -1, 315, -1, 311, 315, -1, + 251, -1, 60, -1, 59, -1, 58, -1, 61, 227, + 308, 228, -1, 309, -1, 308, 234, 309, -1, 199, + -1, 199, 236, 290, -1, 46, -1, 252, -1, 312, + -1, 311, 312, -1, 313, -1, 307, -1, 318, -1, + 306, -1, 305, -1, 310, -1, 5, -1, 3, -1, + 4, -1, 41, -1, 39, -1, 40, -1, 38, -1, + 43, -1, 44, -1, 42, -1, 45, -1, 46, -1, + 47, -1, 48, -1, 49, -1, 50, -1, 51, -1, + 22, -1, 22, 227, 314, 228, -1, 200, -1, 314, + 234, 200, -1, 317, -1, 317, 316, -1, 229, 230, + -1, 229, 285, 230, -1, 316, 229, 230, -1, 316, + 229, 285, 230, -1, 197, -1, 7, -1, 8, -1, + 9, -1, 10, -1, 6, -1, 32, -1, 33, -1, + 34, -1, 52, -1, 53, -1, 54, -1, 23, -1, + 24, -1, 25, -1, 26, -1, 27, -1, 28, -1, + 29, -1, 30, -1, 31, -1, 35, -1, 36, -1, + 37, -1, 62, -1, 63, -1, 64, -1, 65, -1, + 66, -1, 67, -1, 68, -1, 69, -1, 70, -1, + 55, -1, 56, -1, 57, -1, 71, -1, 72, -1, + 73, -1, 74, -1, 75, -1, 76, -1, 77, -1, + 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, + 83, -1, 84, -1, 85, -1, 86, -1, 87, -1, + 88, -1, 89, -1, 90, -1, 91, -1, 111, -1, + 112, -1, 92, -1, 93, -1, 94, -1, 95, -1, + 96, -1, 97, -1, 113, -1, 98, -1, 99, -1, + 100, -1, 101, -1, 102, -1, 103, -1, 114, -1, + 104, -1, 105, -1, 106, -1, 107, -1, 108, -1, + 109, -1, 110, -1, 115, -1, 116, -1, 117, -1, + 118, -1, 119, -1, 120, -1, 122, -1, 123, -1, + 124, -1, 125, -1, 126, -1, 127, -1, 128, -1, + 129, -1, 148, -1, 130, -1, 131, -1, 132, -1, + 133, -1, 134, -1, 135, -1, 149, -1, 136, -1, + 137, -1, 138, -1, 139, -1, 140, -1, 141, -1, + 150, -1, 142, -1, 143, -1, 144, -1, 145, -1, + 146, -1, 147, -1, 151, -1, 152, -1, 153, -1, + 154, -1, 155, -1, 156, -1, 163, -1, 164, -1, + 165, -1, 166, -1, 167, -1, 168, -1, 169, -1, + 170, -1, 171, -1, 172, -1, 173, -1, 174, -1, + 175, -1, 176, -1, 177, -1, 178, -1, 179, -1, + 180, -1, 181, -1, 182, -1, 183, -1, 184, -1, + 185, -1, 186, -1, 187, -1, 188, -1, 189, -1, + 190, -1, 191, -1, 192, -1, 193, -1, 194, -1, + 195, -1, 121, -1, 157, -1, 158, -1, 159, -1, + 160, -1, 161, -1, 162, -1, 319, -1, 200, -1, + 253, -1, 254, -1, 255, -1, -1, 196, 199, 231, + 320, 322, 232, -1, -1, 196, 231, 321, 322, 232, + -1, 323, -1, 322, 323, -1, 315, 324, 237, -1, + 311, 315, 324, 237, -1, 325, -1, 324, 234, 325, + -1, 199, -1, 199, 316, -1, 287, -1, 231, 327, + 232, -1, 231, 327, 234, 232, -1, 326, -1, 327, + 234, 326, -1, 291, -1, 331, -1, 330, -1, 328, + -1, 340, -1, 341, -1, 344, -1, 347, -1, 348, + -1, 355, -1, 231, 232, -1, -1, -1, 231, 332, + 339, 333, 232, -1, 338, -1, 330, -1, -1, 336, + 331, -1, -1, 337, 330, -1, 231, 232, -1, 231, + 339, 232, -1, 329, -1, 339, 329, -1, 237, -1, + 289, 237, -1, 16, 227, 289, 228, 342, -1, 335, + 14, 335, -1, 335, -1, 289, -1, 304, 199, 236, + 326, -1, -1, 19, 227, 289, 228, 345, 231, 346, + 232, -1, -1, 339, -1, 20, 289, 235, -1, 21, + 235, -1, -1, 198, 227, 349, 343, 228, 334, -1, + -1, 13, 350, 329, 198, 227, 289, 228, 237, -1, + -1, 15, 227, 351, 352, 354, 228, 334, -1, 340, + -1, 328, -1, 343, -1, -1, 353, 237, -1, 353, + 237, 289, -1, 12, 237, -1, 11, 237, -1, 18, + 237, -1, 18, 289, 237, -1, 17, 237, -1, 357, + -1, 356, 357, -1, 358, -1, 291, -1, -1, 295, + 359, 338, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 244, 244, 250, 253, 256, 260, 263, 267, 270, + 278, 281, 284, 287, 290, 295, 303, 310, 317, 323, + 327, 334, 337, 343, 350, 360, 368, 373, 403, 409, + 413, 417, 437, 438, 439, 440, 446, 447, 452, 457, + 466, 467, 472, 480, 481, 487, 496, 497, 502, 507, + 512, 520, 521, 529, 540, 541, 550, 551, 560, 561, + 570, 571, 579, 580, 588, 589, 597, 598, 598, 616, + 617, 632, 636, 640, 644, 649, 653, 657, 661, 665, + 669, 673, 680, 683, 693, 700, 705, 710, 718, 722, + 726, 730, 735, 740, 749, 749, 760, 764, 771, 778, + 781, 788, 796, 816, 834, 849, 872, 883, 893, 903, + 913, 922, 925, 929, 933, 938, 946, 951, 956, 961, + 966, 975, 986, 1013, 1022, 1029, 1036, 1046, 1052, 1055, + 1062, 1066, 1070, 1078, 1084, 1087, 1098, 1101, 1104, 1107, + 1111, 1115, 1122, 1126, 1138, 1152, 1157, 1163, 1169, 1176, + 1182, 1187, 1192, 1197, 1204, 1208, 1212, 1216, 1220, 1224, + 1230, 1242, 1245, 1250, 1254, 1263, 1268, 1276, 1280, 1290, + 1294, 1298, 1303, 1307, 1312, 1316, 1321, 1326, 1331, 1337, + 1343, 1349, 1354, 1359, 1364, 1369, 1374, 1379, 1385, 1391, + 1397, 1402, 1407, 1412, 1417, 1422, 1427, 1432, 1437, 1442, + 1447, 1452, 1457, 1463, 1469, 1475, 1481, 1487, 1493, 1499, + 1505, 1511, 1517, 1523, 1529, 1534, 1539, 1544, 1549, 1554, + 1559, 1564, 1569, 1574, 1579, 1584, 1589, 1594, 1599, 1604, + 1609, 1614, 1619, 1624, 1629, 1634, 1639, 1644, 1649, 1654, + 1659, 1664, 1669, 1674, 1679, 1684, 1689, 1694, 1699, 1704, + 1709, 1714, 1719, 1724, 1729, 1734, 1739, 1744, 1749, 1754, + 1759, 1764, 1769, 1774, 1779, 1784, 1789, 1794, 1799, 1804, + 1809, 1814, 1819, 1824, 1829, 1834, 1839, 1844, 1849, 1854, + 1859, 1864, 1869, 1874, 1879, 1884, 1889, 1894, 1899, 1904, + 1909, 1914, 1919, 1924, 1929, 1934, 1939, 1944, 1949, 1954, + 1959, 1964, 1969, 1974, 1979, 1984, 1989, 1994, 1999, 2004, + 2009, 2014, 2019, 2024, 2029, 2034, 2039, 2044, 2049, 2054, + 2059, 2064, 2069, 2074, 2080, 2086, 2092, 2098, 2104, 2110, + 2116, 2121, 2137, 2143, 2149, 2158, 2158, 2169, 2169, 2179, + 2182, 2195, 2213, 2237, 2241, 2247, 2252, 2263, 2266, 2272, + 2281, 2284, 2290, 2294, 2295, 2301, 2302, 2303, 2304, 2305, + 2306, 2307, 2311, 2312, 2316, 2312, 2328, 2329, 2333, 2333, + 2340, 2340, 2354, 2357, 2365, 2373, 2384, 2385, 2389, 2396, + 2400, 2408, 2412, 2425, 2425, 2445, 2448, 2454, 2466, 2478, + 2478, 2493, 2493, 2509, 2509, 2530, 2533, 2539, 2542, 2548, + 2552, 2559, 2564, 2569, 2576, 2594, 2603, 2607, 2614, 2617, + 2623, 2623 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 0 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "CONST", "BOOL", + "FLOAT", "DOUBLE", "INT", "UINT", "BREAK", "CONTINUE", "DO", "ELSE", + "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", + "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", + "UVEC2", "UVEC3", "UVEC4", "VEC2", "VEC3", "VEC4", "MAT2", "MAT3", + "MAT4", "CENTROID", "IN", "OUT", "INOUT", "UNIFORM", "PATCH", "SAMPLE", + "BUFFER", "SHARED", "COHERENT", "VOLATILE", "RESTRICT", "READONLY", + "WRITEONLY", "DVEC2", "DVEC3", "DVEC4", "DMAT2", "DMAT3", "DMAT4", + "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", "MAT2X2", "MAT2X3", + "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", + "DMAT2X2", "DMAT2X3", "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4", + "DMAT4X2", "DMAT4X3", "DMAT4X4", "ATOMIC_UINT", "SAMPLER1D", "SAMPLER2D", + "SAMPLER3D", "SAMPLERCUBE", "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", + "SAMPLERCUBESHADOW", "SAMPLER1DARRAY", "SAMPLER2DARRAY", + "SAMPLER1DARRAYSHADOW", "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", + "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", "ISAMPLER1DARRAY", + "ISAMPLER2DARRAY", "USAMPLER1D", "USAMPLER2D", "USAMPLER3D", + "USAMPLERCUBE", "USAMPLER1DARRAY", "USAMPLER2DARRAY", "SAMPLER2DRECT", + "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT", + "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLERCUBEARRAY", + "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", + "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", + "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", + "SAMPLER", "SAMPLERSHADOW", "TEXTURE1D", "TEXTURE2D", "TEXTURE3D", + "TEXTURECUBE", "TEXTURE1DARRAY", "TEXTURE2DARRAY", "ITEXTURE1D", + "ITEXTURE2D", "ITEXTURE3D", "ITEXTURECUBE", "ITEXTURE1DARRAY", + "ITEXTURE2DARRAY", "UTEXTURE1D", "UTEXTURE2D", "UTEXTURE3D", + "UTEXTURECUBE", "UTEXTURE1DARRAY", "UTEXTURE2DARRAY", "TEXTURE2DRECT", + "ITEXTURE2DRECT", "UTEXTURE2DRECT", "TEXTUREBUFFER", "ITEXTUREBUFFER", + "UTEXTUREBUFFER", "TEXTURECUBEARRAY", "ITEXTURECUBEARRAY", + "UTEXTURECUBEARRAY", "TEXTURE2DMS", "ITEXTURE2DMS", "UTEXTURE2DMS", + "TEXTURE2DMSARRAY", "ITEXTURE2DMSARRAY", "UTEXTURE2DMSARRAY", + "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT", "ISUBPASSINPUTMS", + "USUBPASSINPUT", "USUBPASSINPUTMS", "IMAGE1D", "IIMAGE1D", "UIMAGE1D", + "IMAGE2D", "IIMAGE2D", "UIMAGE2D", "IMAGE3D", "IIMAGE3D", "UIMAGE3D", + "IMAGE2DRECT", "IIMAGE2DRECT", "UIMAGE2DRECT", "IMAGECUBE", "IIMAGECUBE", + "UIMAGECUBE", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER", + "IMAGE1DARRAY", "IIMAGE1DARRAY", "UIMAGE1DARRAY", "IMAGE2DARRAY", + "IIMAGE2DARRAY", "UIMAGE2DARRAY", "IMAGECUBEARRAY", "IIMAGECUBEARRAY", + "UIMAGECUBEARRAY", "IMAGE2DMS", "IIMAGE2DMS", "UIMAGE2DMS", + "IMAGE2DMSARRAY", "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", "STRUCT", "VOID", + "WHILE", "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "DOUBLECONSTANT", + "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "LEFT_OP", "RIGHT_OP", + "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", + "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", + "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", + "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", + "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", + "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", + "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", + "AMPERSAND", "QUESTION", "INVARIANT", "PRECISE", "HIGH_PRECISION", + "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", + "SUPERP", "$accept", "variable_identifier", "primary_expression", + "postfix_expression", "integer_expression", "function_call", + "function_call_or_method", "function_call_generic", + "function_call_header_no_parameters", + "function_call_header_with_parameters", "function_call_header", + "function_identifier", "unary_expression", "unary_operator", + "multiplicative_expression", "additive_expression", "shift_expression", + "relational_expression", "equality_expression", "and_expression", + "exclusive_or_expression", "inclusive_or_expression", + "logical_and_expression", "logical_xor_expression", + "logical_or_expression", "conditional_expression", "$@1", + "assignment_expression", "assignment_operator", "expression", + "constant_expression", "declaration", "block_structure", "$@2", + "identifier_list", "function_prototype", "function_declarator", + "function_header_with_parameters", "function_header", + "parameter_declarator", "parameter_declaration", + "parameter_type_specifier", "init_declarator_list", "single_declaration", + "fully_specified_type", "invariant_qualifier", "interpolation_qualifier", + "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id", + "precise_qualifier", "type_qualifier", "single_type_qualifier", + "storage_qualifier", "type_name_list", "type_specifier", + "array_specifier", "type_specifier_nonarray", "precision_qualifier", + "struct_specifier", "$@3", "$@4", "struct_declaration_list", + "struct_declaration", "struct_declarator_list", "struct_declarator", + "initializer", "initializer_list", "declaration_statement", "statement", + "simple_statement", "compound_statement", "$@5", "$@6", + "statement_no_new_scope", "statement_scoped", "$@7", "$@8", + "compound_statement_no_new_scope", "statement_list", + "expression_statement", "selection_statement", + "selection_rest_statement", "condition", "switch_statement", "$@9", + "switch_statement_list", "case_label", "iteration_statement", "$@10", + "$@11", "$@12", "for_init_statement", "conditionopt", + "for_rest_statement", "jump_statement", "translation_unit", + "external_declaration", "function_definition", "$@13", YY_NULL +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 260, 261, 262, 262, 262, 262, 262, 262, 262, + 263, 263, 263, 263, 263, 263, 264, 265, 266, 267, + 267, 268, 268, 269, 269, 270, 271, 271, 272, 272, + 272, 272, 273, 273, 273, 273, 274, 274, 274, 274, + 275, 275, 275, 276, 276, 276, 277, 277, 277, 277, + 277, 278, 278, 278, 279, 279, 280, 280, 281, 281, + 282, 282, 283, 283, 284, 284, 285, 286, 285, 287, + 287, 288, 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 289, 289, 290, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 293, 292, 294, 294, 295, 296, + 296, 297, 297, 298, 299, 299, 300, 300, 300, 300, + 301, 302, 302, 302, 302, 302, 303, 303, 303, 303, + 303, 304, 304, 305, 306, 306, 306, 307, 308, 308, + 309, 309, 309, 310, 311, 311, 312, 312, 312, 312, + 312, 312, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 314, 314, 315, 315, 316, 316, 316, 316, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 318, 318, 318, 320, 319, 321, 319, 322, + 322, 323, 323, 324, 324, 325, 325, 326, 326, 326, + 327, 327, 328, 329, 329, 330, 330, 330, 330, 330, + 330, 330, 331, 332, 333, 331, 334, 334, 336, 335, + 337, 335, 338, 338, 339, 339, 340, 340, 341, 342, + 342, 343, 343, 345, 344, 346, 346, 347, 347, 349, + 348, 350, 348, 351, 348, 352, 352, 353, 353, 354, + 354, 355, 355, 355, 355, 355, 356, 356, 357, 357, + 359, 358 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 4, 1, 3, 2,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1, 2, 1, 3, 4, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 0, 0, 5, 1, 1, 0, 2, + 0, 2, 2, 3, 1, 2, 1, 2, 5, 3, + 1, 1, 4, 0, 8, 0, 1, 3, 2, 0, + 6, 0, 8, 0, 7, 1, 1, 1, 0, 2, + 3, 2, 2, 2, 3, 2, 1, 2, 1, 1, + 0, 3 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 0, 143, 144, 142, 174, 170, 171, 172, 173, 159, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 175, + 176, 177, 190, 191, 192, 148, 146, 147, 145, 151, + 149, 150, 152, 153, 154, 155, 156, 157, 158, 178, + 179, 180, 202, 203, 204, 126, 125, 124, 0, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 228, + 229, 230, 231, 232, 233, 235, 236, 237, 238, 239, + 240, 242, 243, 244, 245, 246, 247, 248, 226, 227, + 234, 241, 249, 250, 251, 252, 253, 254, 323, 255, + 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, + 267, 268, 269, 271, 272, 273, 274, 275, 276, 278, + 279, 280, 281, 282, 283, 263, 270, 277, 284, 285, + 286, 287, 288, 289, 324, 325, 326, 327, 328, 329, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 0, 169, 331, 123, 133, 332, 333, + 334, 0, 409, 0, 410, 0, 100, 99, 0, 111, + 116, 140, 139, 137, 141, 0, 134, 136, 121, 163, + 138, 330, 0, 406, 408, 0, 0, 0, 337, 0, + 0, 88, 85, 0, 98, 0, 107, 101, 109, 0, + 110, 0, 86, 117, 0, 91, 135, 122, 0, 164, + 1, 407, 161, 0, 132, 130, 0, 128, 335, 0, + 0, 89, 0, 0, 411, 102, 106, 108, 104, 112, + 103, 0, 118, 94, 0, 92, 0, 2, 6, 7, + 4, 5, 8, 0, 0, 0, 165, 34, 33, 35, + 32, 3, 10, 28, 12, 17, 18, 0, 0, 22, + 0, 36, 0, 40, 43, 46, 51, 54, 56, 58, + 60, 62, 64, 66, 0, 26, 0, 160, 0, 0, + 127, 0, 0, 0, 0, 0, 339, 87, 90, 0, + 0, 391, 0, 0, 0, 0, 0, 0, 0, 0, + 363, 372, 376, 36, 69, 82, 0, 352, 0, 121, + 355, 374, 354, 353, 0, 356, 357, 358, 359, 360, + 361, 105, 0, 113, 0, 347, 120, 0, 0, 96, + 0, 93, 29, 30, 0, 14, 15, 0, 0, 20, + 19, 0, 169, 23, 25, 31, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 67, 166, 167, 0, 162, + 84, 131, 129, 0, 0, 345, 0, 343, 338, 340, + 402, 401, 0, 393, 0, 405, 403, 0, 0, 0, + 388, 389, 362, 0, 72, 73, 75, 74, 77, 78, + 79, 80, 81, 76, 71, 0, 0, 377, 373, 375, + 115, 0, 350, 0, 119, 0, 97, 9, 0, 16, + 13, 24, 37, 38, 39, 42, 41, 44, 45, 49, + 50, 47, 48, 52, 53, 55, 57, 59, 61, 63, + 65, 0, 168, 336, 0, 346, 0, 341, 0, 0, + 0, 404, 0, 387, 0, 364, 70, 83, 114, 348, + 0, 95, 11, 0, 342, 344, 0, 396, 395, 398, + 370, 383, 381, 0, 0, 0, 0, 349, 351, 0, + 0, 397, 0, 0, 380, 0, 0, 378, 0, 0, + 0, 365, 68, 0, 399, 0, 370, 369, 371, 385, + 0, 367, 390, 366, 0, 400, 394, 379, 386, 0, + 382, 392, 384 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 281, 282, 283, 448, 284, 285, 286, 287, 288, + 289, 290, 333, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 334, 471, 335, 435, 336, + 401, 337, 193, 358, 266, 338, 195, 196, 197, 226, + 227, 228, 198, 199, 200, 201, 202, 203, 246, 247, + 204, 205, 206, 207, 243, 305, 239, 209, 210, 211, + 312, 249, 315, 316, 406, 407, 356, 443, 340, 341, + 342, 343, 423, 506, 532, 514, 515, 516, 533, 344, + 345, 346, 517, 505, 347, 518, 539, 348, 349, 484, + 412, 479, 499, 512, 513, 350, 212, 213, 214, 223 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -466 +static const yytype_int16 yypact[] = +{ + 2275, -466, -466, -466, -466, -466, -466, -466, -466, -205, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -192, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -179, -466, -466, -466, -466, -466, -466, + -466, -122, -466, -186, -198, -173, -175, 3686, -194, -466, + -121, -466, -466, -466, -466, 2749, -466, -466, -466, -141, + -466, -466, 527, -466, -466, -97, -37, -117, -466, 5459, + -200, -466, -466, -112, -466, 3686, -466, -466, -466, 3686, + -71, -44, -466, -191, -142, -466, -466, -466, 4117, -82, + -466, -466, -466, -202, -466, -76, -137, -466, -466, 3686, + -73, -466, -196, 781, -466, -466, -466, -466, -141, -155, + -466, 4342, -152, -466, -38, -466, -177, -466, -466, -466, + -466, -466, -466, 5015, 5015, 5015, -466, -466, -466, -466, + -466, -466, -466, -185, -466, -466, -466, -63, -128, 5237, + -61, -466, 5015, -106, -100, -157, -183, -78, -81, -79, + -80, -43, -46, -197, -58, -466, 4568, -466, -27, 5015, + -466, -37, 3686, 3686, -25, 2984, -466, -466, -466, -62, + -57, -466, -51, -48, -56, 4793, -45, 5015, -50, -40, + -41, -466, -466, -153, -466, -466, -147, -466, -198, -39, + -466, -466, -466, -466, 1035, -466, -466, -466, -466, -466, + -466, -82, 4342, -143, 4342, -466, -466, 4342, 3686, -466, + -15, -466, -466, -466, -126, -466, -466, 5015, -10, -466, + -466, 5015, -36, -466, -466, -466, 5015, 5015, 5015, 5015, + 5015, 5015, 5015, 5015, 5015, 5015, 5015, 5015, 5015, 5015, + 5015, 5015, 5015, 5015, 5015, -466, -466, -466, -35, -466, + -466, -466, -466, 3218, -25, -141, -127, -466, -466, -466, + -466, -466, 1289, -466, 5015, -466, -466, -108, 5015, -91, + -466, -466, -466, 1289, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, 5015, 5015, -466, -466, -466, + -466, 4342, -466, -92, -466, 3452, -466, -466, -34, -31, + -466, -466, -466, -466, -466, -106, -106, -100, -100, -157, + -157, -157, -157, -183, -183, -78, -81, -79, -80, -43, + -46, 5015, -466, -466, -107, -82, -25, -466, -4, 2036, + -123, -466, -116, -466, 2510, 1289, -466, -466, -466, -466, + 3890, -466, -466, -83, -466, -466, -29, -466, -466, 2510, + -32, -466, -31, 1, 3686, -24, -26, -466, -466, 5015, + 5015, -466, -30, -19, 196, -20, 1797, -466, -18, -22, + 1543, -466, -466, -113, 5015, 1543, -32, -466, -466, 1289, + 4342, -466, -466, -466, -17, -31, -466, -466, 1289, -14, + -466, -466, -466 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, + -466, -466, -52, -466, -226, -225, -261, -229, -166, -164, + -167, -165, -162, -161, -466, -227, -466, -258, -466, -269, + -466, 4, -466, -466, -466, 5, -466, -466, -466, -1, + 9, 6, -466, -466, -465, -466, -466, -466, -466, -75, + -466, -195, -204, -466, -466, 0, -212, -466, 46, -466, + -466, -466, -297, -299, -160, -238, -340, -466, -240, -337, + -440, -273, -466, -466, -282, -281, -466, -466, 23, -413, + -232, -466, -466, -251, -466, -466, -466, -466, -466, -466, + -466, -466, -466, -466, -466, -466, -466, 40, -466, -466 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -369 +static const yytype_int16 yytable[] = +{ + 208, 236, 229, 355, 192, 194, 364, 439, 252, 244, + 485, 304, 440, 220, 442, 403, 409, 444, 394, 503, + 217, 262, 215, 365, 366, 236, 307, 383, 384, 238, + 229, 373, 308, 306, 503, 216, 260, 251, 238, 222, + 231, 318, -27, 232, 367, 261, 351, 353, 368, 381, + 382, 221, 218, 395, 313, 224, 417, 360, 419, 225, + 361, 445, 385, 386, 424, 425, 426, 427, 428, 429, + 430, 431, 432, 433, 238, 478, 528, 306, 233, 398, + 531, 352, 400, 434, 357, 531, 306, 436, 238, 263, + 437, 310, 264, 441, 355, 265, 355, 311, 449, 355, + 370, 488, 447, 242, 409, 500, 371, 476, 436, 236, + 477, 436, 501, 451, 248, 534, 538, 313, 436, 253, + 313, 436, 459, 460, 461, 462, 436, 476, 258, 481, + 494, 188, 189, 190, 387, 388, 376, 377, 378, 379, + 489, 380, 490, 436, 483, 480, 409, 306, 439, 482, + 508, 436, 509, 455, 456, 259, 457, 458, 463, 464, + 309, 359, 245, 313, 317, 369, 374, 391, 389, 390, + 393, 392, 396, 399, 405, 410, 413, 486, 487, 414, + 411, 415, 418, 355, 446, 420, 291, 421, -26, 450, + 540, 422, -21, 475, 496, 472, 492, 230, 510, -368, + 519, 439, 493, 436, 520, 237, 521, 524, 313, 525, + 526, 330, 208, 529, 530, 502, 192, 194, 542, 250, + 541, 362, 363, 465, 467, 230, 466, 468, 256, 230, + 502, 469, 355, 470, 255, 257, 402, 219, 495, 497, + 375, 523, 527, 536, 474, 537, 254, 498, 511, 314, + 313, 522, 241, 339, 291, 535, 0, 291, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 355, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 504, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 236, 0, 0, 0, 504, 0, 0, 0, 0, 0, + 0, 0, 314, 404, 0, 314, 0, 0, 0, 0, + 0, 0, 0, 0, 452, 453, 454, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 0, 339, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 314, 0, 0, 0, 0, 0, 0, + 0, 0, 339, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 339, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, + 0, 0, 0, 0, 339, 339, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, + 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, + 339, 0, 0, 0, 0, 339, 0, 240, 0, 339, + 1, 2, 3, 4, 5, 6, 7, 8, 339, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 0, 0, 185, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 186, 187, + 188, 189, 190, 191, 1, 2, 3, 4, 5, 6, + 7, 8, 319, 320, 321, 0, 322, 323, 324, 325, + 326, 327, 328, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 329, + 267, 185, 268, 269, 270, 271, 272, 0, 0, 273, + 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, + 0, 0, 330, 331, 0, 0, 0, 0, 332, 277, + 278, 279, 280, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 186, 187, 188, 189, 190, 191, 1, 2, + 3, 4, 5, 6, 7, 8, 319, 320, 321, 0, + 322, 323, 324, 325, 326, 327, 328, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 329, 267, 185, 268, 269, 270, 271, + 272, 0, 0, 273, 274, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 275, 0, 0, 0, 330, 438, 0, 0, + 0, 0, 332, 277, 278, 279, 280, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 186, 187, 188, 189, + 190, 191, 1, 2, 3, 4, 5, 6, 7, 8, + 319, 320, 321, 0, 322, 323, 324, 325, 326, 327, + 328, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 329, 267, 185, + 268, 269, 270, 271, 272, 0, 0, 273, 274, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, + 330, 0, 0, 0, 0, 0, 332, 277, 278, 279, + 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 186, 187, 188, 189, 190, 191, 1, 2, 3, 4, + 5, 6, 7, 8, 319, 320, 321, 0, 322, 323, + 324, 325, 326, 327, 328, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 329, 267, 185, 268, 269, 270, 271, 272, 0, + 0, 273, 274, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 275, 0, 0, 0, 253, 0, 0, 0, 0, 0, + 332, 277, 278, 279, 280, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 186, 187, 188, 189, 190, 191, + 1, 2, 3, 4, 5, 6, 7, 8, 319, 320, + 321, 0, 322, 323, 324, 325, 326, 327, 328, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 329, 267, 185, 268, 269, + 270, 271, 272, 0, 0, 273, 274, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 332, 277, 278, 279, 280, 1, + 2, 3, 4, 5, 6, 7, 8, 0, 186, 187, + 188, 189, 190, 191, 0, 0, 0, 0, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 0, 267, 185, 268, 269, 270, + 271, 272, 0, 0, 273, 274, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 332, 277, 278, 279, 280, 1, 2, + 3, 4, 5, 6, 7, 8, 0, 186, 187, 188, + 189, 190, 191, 0, 0, 0, 0, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 0, 0, 185, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 0, 0, 0, 0, 0, 186, 187, 188, 189, + 190, 191, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 0, 267, + 185, 268, 269, 270, 271, 272, 0, 0, 273, 274, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 277, 278, + 279, 280, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 186, 187, 188, 189, 190, 0, 0, 0, 0, + 0, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 0, 234, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 235, 1, 2, 3, + 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, + 186, 187, 188, 189, 190, 0, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 0, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 408, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, + 0, 0, 0, 0, 0, 186, 187, 188, 189, 190, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 0, 0, 185, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 473, 0, 0, 0, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 0, 0, 0, 0, 0, 0, 186, + 187, 188, 189, 190, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 491, 0, 0, 0, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, + 0, 0, 0, 186, 187, 188, 189, 190, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 0, 0, 185, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 5, 6, 7, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 186, 187, 188, + 189, 190, 39, 40, 41, 42, 43, 44, 0, 0, + 0, 0, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 0, 267, + 185, 268, 269, 270, 271, 272, 0, 0, 273, 274, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, + 0, 354, 507, 4, 5, 6, 7, 8, 277, 278, + 279, 280, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, + 40, 41, 42, 43, 44, 0, 0, 0, 0, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 0, 267, 185, 268, 269, + 270, 271, 272, 0, 0, 273, 274, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 275, 0, 0, 276, 4, 5, + 6, 7, 8, 0, 0, 277, 278, 279, 280, 0, + 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 39, 40, 41, 42, 43, 44, + 0, 0, 0, 0, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 0, 267, 185, 268, 269, 270, 271, 272, 0, 0, + 273, 274, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, + 0, 0, 0, 354, 4, 5, 6, 7, 8, 0, + 277, 278, 279, 280, 0, 0, 0, 0, 0, 0, + 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 39, 40, 41, 42, 43, 44, 0, 0, 0, 0, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 0, 267, 185, 268, + 269, 270, 271, 272, 0, 0, 273, 274, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 275, 0, 0, 397, 4, + 5, 6, 7, 8, 0, 0, 277, 278, 279, 280, + 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 39, 40, 41, 42, 43, + 44, 0, 0, 0, 0, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 0, 267, 185, 268, 269, 270, 271, 272, 0, + 0, 273, 274, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 275, 4, 5, 6, 7, 8, 0, 0, 0, 0, + 416, 277, 278, 279, 280, 0, 0, 0, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 0, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 0, 267, 185, 268, 269, 270, 271, + 272, 0, 0, 273, 274, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 275, 4, 5, 6, 7, 8, 0, 0, + 0, 0, 0, 277, 278, 279, 280, 0, 0, 0, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, + 40, 41, 42, 43, 44, 0, 0, 0, 0, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 372, 0, 267, 185, 268, 269, + 270, 271, 272, 0, 0, 273, 274, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 275, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 277, 278, 279, 280, 0, + 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 39, 40, 41, 42, 43, 44, 0, 0, 0, + 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 0, 0, 185 +}; + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-466))) + +#define yytable_value_is_error(Yytable_value) \ + YYID (0) + +static const yytype_int16 yycheck[] = +{ + 0, 205, 197, 261, 0, 0, 275, 344, 220, 46, + 423, 238, 352, 199, 354, 312, 315, 357, 215, 484, + 199, 233, 227, 208, 209, 229, 228, 210, 211, 229, + 225, 289, 234, 229, 499, 227, 227, 237, 229, 237, + 234, 237, 227, 237, 229, 236, 258, 259, 233, 206, + 207, 237, 231, 250, 249, 228, 325, 234, 327, 234, + 237, 358, 245, 246, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 229, 412, 516, 229, 199, 306, + 520, 236, 309, 236, 236, 525, 229, 234, 229, 231, + 237, 228, 234, 236, 352, 237, 354, 234, 367, 357, + 228, 441, 228, 200, 403, 228, 234, 234, 234, 313, + 237, 234, 228, 371, 231, 228, 529, 312, 234, 231, + 315, 234, 383, 384, 385, 386, 234, 234, 199, 237, + 237, 253, 254, 255, 212, 213, 242, 243, 244, 239, + 232, 241, 234, 234, 235, 414, 445, 229, 485, 418, + 490, 234, 235, 379, 380, 199, 381, 382, 387, 388, + 236, 199, 199, 358, 237, 228, 227, 247, 249, 248, + 216, 214, 230, 200, 199, 237, 227, 435, 436, 227, + 237, 237, 227, 441, 199, 235, 238, 227, 227, 199, + 530, 232, 228, 405, 198, 230, 230, 197, 227, 231, + 199, 538, 471, 234, 228, 205, 232, 237, 403, 228, + 14, 231, 212, 231, 236, 484, 212, 212, 232, 219, + 237, 273, 274, 389, 391, 225, 390, 392, 229, 229, + 499, 393, 490, 394, 225, 229, 311, 191, 476, 479, + 292, 510, 515, 525, 404, 526, 223, 479, 499, 249, + 445, 509, 212, 253, 306, 524, -1, 309, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 530, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 484, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 504, -1, -1, -1, 499, -1, -1, -1, -1, -1, + -1, -1, 312, 313, -1, 315, -1, -1, -1, -1, + -1, -1, -1, -1, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, + 392, 393, 394, -1, 344, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 358, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 403, -1, -1, -1, -1, -1, -1, + -1, -1, 412, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 423, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 445, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 479, + -1, -1, -1, -1, 484, 485, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 499, + -1, -1, -1, -1, 504, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 516, -1, -1, -1, + 520, -1, -1, -1, -1, 525, -1, 0, -1, 529, + 3, 4, 5, 6, 7, 8, 9, 10, 538, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, -1, -1, 200, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 251, 252, + 253, 254, 255, 256, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, -1, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, -1, -1, 208, + 209, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 227, -1, + -1, -1, 231, 232, -1, -1, -1, -1, 237, 238, + 239, 240, 241, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 251, 252, 253, 254, 255, 256, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, -1, -1, 208, 209, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 227, -1, -1, -1, 231, 232, -1, -1, + -1, -1, 237, 238, 239, 240, 241, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 251, 252, 253, 254, + 255, 256, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, -1, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, -1, -1, 208, 209, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 227, -1, -1, -1, + 231, -1, -1, -1, -1, -1, 237, 238, 239, 240, + 241, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 251, 252, 253, 254, 255, 256, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, -1, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, -1, + -1, 208, 209, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 227, -1, -1, -1, 231, -1, -1, -1, -1, -1, + 237, 238, 239, 240, 241, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 251, 252, 253, 254, 255, 256, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, -1, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, -1, -1, 208, 209, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 227, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 237, 238, 239, 240, 241, 3, + 4, 5, 6, 7, 8, 9, 10, -1, 251, 252, + 253, 254, 255, 256, -1, -1, -1, -1, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, -1, 199, 200, 201, 202, 203, + 204, 205, -1, -1, 208, 209, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 227, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 237, 238, 239, 240, 241, 3, 4, + 5, 6, 7, 8, 9, 10, -1, 251, 252, 253, + 254, 255, 256, -1, -1, -1, -1, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, -1, -1, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, + 10, -1, -1, -1, -1, -1, 251, 252, 253, 254, + 255, 256, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, -1, 199, + 200, 201, 202, 203, 204, 205, -1, -1, 208, 209, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 227, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 238, 239, + 240, 241, 3, 4, 5, 6, 7, 8, 9, 10, + -1, 251, 252, 253, 254, 255, -1, -1, -1, -1, + -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, -1, 199, 200, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 237, 3, 4, 5, + 6, 7, 8, 9, 10, -1, -1, -1, -1, -1, + 251, 252, 253, 254, 255, -1, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, -1, -1, 200, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 232, -1, -1, -1, + -1, 3, 4, 5, 6, 7, 8, 9, 10, -1, + -1, -1, -1, -1, -1, 251, 252, 253, 254, 255, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, -1, -1, 200, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 232, -1, -1, -1, -1, 3, 4, 5, 6, 7, + 8, 9, 10, -1, -1, -1, -1, -1, -1, 251, + 252, 253, 254, 255, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + -1, -1, 200, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 232, -1, -1, -1, -1, 3, + 4, 5, 6, 7, 8, 9, 10, -1, -1, -1, + -1, -1, -1, 251, 252, 253, 254, 255, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, -1, -1, 200, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 6, 7, 8, 9, + 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 251, 252, 253, + 254, 255, 52, 53, 54, 55, 56, 57, -1, -1, + -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, -1, 199, + 200, 201, 202, 203, 204, 205, -1, -1, 208, 209, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 227, -1, -1, + -1, 231, 232, 6, 7, 8, 9, 10, 238, 239, + 240, 241, -1, -1, -1, -1, -1, -1, -1, -1, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + 53, 54, 55, 56, 57, -1, -1, -1, -1, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, -1, 199, 200, 201, 202, + 203, 204, 205, -1, -1, 208, 209, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 227, -1, -1, 230, 6, 7, + 8, 9, 10, -1, -1, 238, 239, 240, 241, -1, + -1, -1, -1, -1, -1, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 52, 53, 54, 55, 56, 57, + -1, -1, -1, -1, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + -1, 199, 200, 201, 202, 203, 204, 205, -1, -1, + 208, 209, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 227, + -1, -1, -1, 231, 6, 7, 8, 9, 10, -1, + 238, 239, 240, 241, -1, -1, -1, -1, -1, -1, + -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, -1, 199, 200, 201, + 202, 203, 204, 205, -1, -1, 208, 209, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 227, -1, -1, 230, 6, + 7, 8, 9, 10, -1, -1, 238, 239, 240, 241, + -1, -1, -1, -1, -1, -1, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, 53, 54, 55, 56, + 57, -1, -1, -1, -1, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, -1, 199, 200, 201, 202, 203, 204, 205, -1, + -1, 208, 209, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 227, 6, 7, 8, 9, 10, -1, -1, -1, -1, + 237, 238, 239, 240, 241, -1, -1, -1, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 52, 53, 54, + 55, 56, 57, -1, -1, -1, -1, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, -1, 199, 200, 201, 202, 203, 204, + 205, -1, -1, 208, 209, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 227, 6, 7, 8, 9, 10, -1, -1, + -1, -1, -1, 238, 239, 240, 241, -1, -1, -1, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + 53, 54, 55, 56, 57, -1, -1, -1, -1, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, -1, 199, 200, 201, 202, + 203, 204, 205, -1, -1, 208, 209, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 227, 6, 7, 8, 9, 10, + -1, -1, -1, -1, -1, 238, 239, 240, 241, -1, + -1, -1, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, 53, 54, 55, 56, 57, -1, -1, -1, + -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, -1, -1, 200 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 200, 251, 252, 253, 254, + 255, 256, 291, 292, 295, 296, 297, 298, 302, 303, + 304, 305, 306, 307, 310, 311, 312, 313, 315, 317, + 318, 319, 356, 357, 358, 227, 227, 199, 231, 318, + 199, 237, 237, 359, 228, 234, 299, 300, 301, 311, + 315, 234, 237, 199, 199, 237, 312, 315, 229, 316, + 0, 357, 200, 314, 46, 199, 308, 309, 231, 321, + 315, 237, 316, 231, 338, 300, 299, 301, 199, 199, + 227, 236, 316, 231, 234, 237, 294, 199, 201, 202, + 203, 204, 205, 208, 209, 227, 230, 238, 239, 240, + 241, 261, 262, 263, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 315, 229, 228, 234, 236, + 228, 234, 320, 311, 315, 322, 323, 237, 237, 11, + 12, 13, 15, 16, 17, 18, 19, 20, 21, 198, + 231, 232, 237, 272, 285, 287, 289, 291, 295, 315, + 328, 329, 330, 331, 339, 340, 341, 344, 347, 348, + 355, 316, 236, 316, 231, 287, 326, 236, 293, 199, + 234, 237, 272, 272, 289, 208, 209, 229, 233, 228, + 228, 234, 197, 287, 227, 272, 242, 243, 244, 239, + 241, 206, 207, 210, 211, 245, 246, 212, 213, 249, + 248, 247, 214, 216, 215, 250, 230, 230, 285, 200, + 285, 290, 309, 322, 315, 199, 324, 325, 232, 323, + 237, 237, 350, 227, 227, 237, 237, 289, 227, 289, + 235, 227, 232, 332, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 236, 288, 234, 237, 232, 329, + 326, 236, 326, 327, 326, 322, 199, 228, 264, 289, + 199, 287, 272, 272, 272, 274, 274, 275, 275, 276, + 276, 276, 276, 277, 277, 278, 279, 280, 281, 282, + 283, 286, 230, 232, 324, 316, 234, 237, 329, 351, + 289, 237, 289, 235, 349, 339, 287, 287, 326, 232, + 234, 232, 230, 289, 237, 325, 198, 328, 340, 352, + 228, 228, 289, 304, 311, 343, 333, 232, 326, 235, + 227, 343, 353, 354, 335, 336, 337, 342, 345, 199, + 228, 232, 287, 289, 237, 228, 14, 331, 330, 231, + 236, 330, 334, 338, 228, 289, 334, 335, 339, 346, + 326, 237, 232 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (pParseContext, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval, parseContext) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pParseContext); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + glslang::TParseContext* pParseContext; +#endif +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; + YYUSE (pParseContext); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, pParseContext) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + glslang::TParseContext* pParseContext; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) +#else +static void +yy_reduce_print (yyvsp, yyrule, pParseContext) + YYSTYPE *yyvsp; + int yyrule; + glslang::TParseContext* pParseContext; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pParseContext); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, pParseContext); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, pParseContext) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + glslang::TParseContext* pParseContext; +#endif +{ + YYUSE (yyvaluep); + YYUSE (pParseContext); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (glslang::TParseContext* pParseContext) +#else +int +yyparse (pParseContext) + glslang::TParseContext* pParseContext; +#endif +#endif +{ +/* The lookahead symbol. */ +int yychar; + + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +/* Line 1792 of yacc.c */ +#line 244 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[(1) - (1)].lex).loc, (yyvsp[(1) - (1)].lex).symbol, (yyvsp[(1) - (1)].lex).string); + } + break; + + case 3: +/* Line 1792 of yacc.c */ +#line 250 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 4: +/* Line 1792 of yacc.c */ +#line 253 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).i, (yyvsp[(1) - (1)].lex).loc, true); + } + break; + + case 5: +/* Line 1792 of yacc.c */ +#line 256 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).u, (yyvsp[(1) - (1)].lex).loc, true); + } + break; + + case 6: +/* Line 1792 of yacc.c */ +#line 260 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtFloat, (yyvsp[(1) - (1)].lex).loc, true); + } + break; + + case 7: +/* Line 1792 of yacc.c */ +#line 263 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtDouble, (yyvsp[(1) - (1)].lex).loc, true); + } + break; + + case 8: +/* Line 1792 of yacc.c */ +#line 267 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).b, (yyvsp[(1) - (1)].lex).loc, true); + } + break; + + case 9: +/* Line 1792 of yacc.c */ +#line 270 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); + if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) + (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); + } + break; + + case 10: +/* Line 1792 of yacc.c */ +#line 278 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 11: +/* Line 1792 of yacc.c */ +#line 281 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[(2) - (4)].lex).loc, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode)); + } + break; + + case 12: +/* Line 1792 of yacc.c */ +#line 284 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 13: +/* Line 1792 of yacc.c */ +#line 287 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[(3) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode), *(yyvsp[(3) - (3)].lex).string); + } + break; + + case 14: +/* Line 1792 of yacc.c */ +#line 290 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.variableCheck((yyvsp[(1) - (2)].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[(2) - (2)].lex).loc, "++", (yyvsp[(1) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(2) - (2)].lex).loc, "++", EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode)); + } + break; + + case 15: +/* Line 1792 of yacc.c */ +#line 295 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.variableCheck((yyvsp[(1) - (2)].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[(2) - (2)].lex).loc, "--", (yyvsp[(1) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(2) - (2)].lex).loc, "--", EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode)); + } + break; + + case 16: +/* Line 1792 of yacc.c */ +#line 303 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.integerCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 17: +/* Line 1792 of yacc.c */ +#line 310 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[(1) - (1)].interm).loc, (yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode); + delete (yyvsp[(1) - (1)].interm).function; + } + break; + + case 18: +/* Line 1792 of yacc.c */ +#line 317 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (1)].interm); + } + break; + + case 19: +/* Line 1792 of yacc.c */ +#line 323 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (2)].interm); + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + } + break; + + case 20: +/* Line 1792 of yacc.c */ +#line 327 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (2)].interm); + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + } + break; + + case 21: +/* Line 1792 of yacc.c */ +#line 334 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (2)].interm); + } + break; + + case 22: +/* Line 1792 of yacc.c */ +#line 337 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (1)].interm); + } + break; + + case 23: +/* Line 1792 of yacc.c */ +#line 343 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()); + (yyvsp[(1) - (2)].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[(1) - (2)].interm).function; + (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); + } + break; + + case 24: +/* Line 1792 of yacc.c */ +#line 350 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()); + (yyvsp[(1) - (3)].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[(1) - (3)].interm).function; + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 25: +/* Line 1792 of yacc.c */ +#line 360 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (2)].interm); + } + break; + + case 26: +/* Line 1792 of yacc.c */ +#line 368 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // Constructor + (yyval.interm).intermNode = 0; + (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type)); + } + break; + + case 27: +/* Line 1792 of yacc.c */ +#line 373 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // + // Should be a method or subroutine call, but we haven't recognized the arguments yet. + // + (yyval.interm).function = 0; + (yyval.interm).intermNode = 0; + + TIntermMethod* method = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsMethodNode(); + if (method) { + (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); + (yyval.interm).intermNode = method->getObject(); + } else { + TIntermSymbol* symbol = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsSymbolNode(); + if (symbol) { + parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); + TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); + (yyval.interm).function = function; + } else + parseContext.error((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); + } + + if ((yyval.interm).function == 0) { + // error recover + TString empty(""); + (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull); + } + } + break; + + case 28: +/* Line 1792 of yacc.c */ +#line 403 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.variableCheck((yyvsp[(1) - (1)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + if (TIntermMethod* method = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsMethodNode()) + parseContext.error((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); + } + break; + + case 29: +/* Line 1792 of yacc.c */ +#line 409 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.lValueErrorCheck((yyvsp[(1) - (2)].lex).loc, "++", (yyvsp[(2) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].lex).loc, "++", EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode)); + } + break; + + case 30: +/* Line 1792 of yacc.c */ +#line 413 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.lValueErrorCheck((yyvsp[(1) - (2)].lex).loc, "--", (yyvsp[(2) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].lex).loc, "--", EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode)); + } + break; + + case 31: +/* Line 1792 of yacc.c */ +#line 417 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(1) - (2)].interm).op != EOpNull) { + char errorOp[2] = {0, 0}; + switch((yyvsp[(1) - (2)].interm).op) { + case EOpNegative: errorOp[0] = '-'; break; + case EOpLogicalNot: errorOp[0] = '!'; break; + case EOpBitwiseNot: errorOp[0] = '~'; break; + default: break; // some compilers want this + } + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].interm).loc, errorOp, (yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode)); + } else { + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); + if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) + (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); + } + } + break; + + case 32: +/* Line 1792 of yacc.c */ +#line 437 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpNull; } + break; + + case 33: +/* Line 1792 of yacc.c */ +#line 438 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpNegative; } + break; + + case 34: +/* Line 1792 of yacc.c */ +#line 439 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpLogicalNot; } + break; + + case 35: +/* Line 1792 of yacc.c */ +#line 440 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpBitwiseNot; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise not"); } + break; + + case 36: +/* Line 1792 of yacc.c */ +#line 446 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 37: +/* Line 1792 of yacc.c */ +#line 447 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "*", EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 38: +/* Line 1792 of yacc.c */ +#line 452 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "/", EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 39: +/* Line 1792 of yacc.c */ +#line 457 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "%"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "%", EOpMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 40: +/* Line 1792 of yacc.c */ +#line 466 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 41: +/* Line 1792 of yacc.c */ +#line 467 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "+", EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 42: +/* Line 1792 of yacc.c */ +#line 472 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "-", EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 43: +/* Line 1792 of yacc.c */ +#line 480 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 44: +/* Line 1792 of yacc.c */ +#line 481 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bit shift left"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<<", EOpLeftShift, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 45: +/* Line 1792 of yacc.c */ +#line 487 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bit shift right"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">>", EOpRightShift, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 46: +/* Line 1792 of yacc.c */ +#line 496 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 47: +/* Line 1792 of yacc.c */ +#line 497 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<", EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 48: +/* Line 1792 of yacc.c */ +#line 502 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">", EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 49: +/* Line 1792 of yacc.c */ +#line 507 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<=", EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 50: +/* Line 1792 of yacc.c */ +#line 512 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 51: +/* Line 1792 of yacc.c */ +#line 520 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 52: +/* Line 1792 of yacc.c */ +#line 521 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.arrayObjectCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "=="); + parseContext.specializationCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "=="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "==", EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 53: +/* Line 1792 of yacc.c */ +#line 529 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.arrayObjectCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "!="); + parseContext.specializationCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "!="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "!=", EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 54: +/* Line 1792 of yacc.c */ +#line 540 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 55: +/* Line 1792 of yacc.c */ +#line 541 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise and"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "&", EOpAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 56: +/* Line 1792 of yacc.c */ +#line 550 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 57: +/* Line 1792 of yacc.c */ +#line 551 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise exclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "^", EOpExclusiveOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 58: +/* Line 1792 of yacc.c */ +#line 560 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 59: +/* Line 1792 of yacc.c */ +#line 561 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise inclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "|", EOpInclusiveOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + break; + + case 60: +/* Line 1792 of yacc.c */ +#line 570 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 61: +/* Line 1792 of yacc.c */ +#line 571 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "&&", EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 62: +/* Line 1792 of yacc.c */ +#line 579 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 63: +/* Line 1792 of yacc.c */ +#line 580 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "^^", EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 64: +/* Line 1792 of yacc.c */ +#line 588 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 65: +/* Line 1792 of yacc.c */ +#line 589 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "||", EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } + break; + + case 66: +/* Line 1792 of yacc.c */ +#line 597 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 67: +/* Line 1792 of yacc.c */ +#line 598 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + ++parseContext.controlFlowNestingLevel; + } + break; + + case 68: +/* Line 1792 of yacc.c */ +#line 601 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + --parseContext.controlFlowNestingLevel; + parseContext.boolCheck((yyvsp[(2) - (6)].lex).loc, (yyvsp[(1) - (6)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(2) - (6)].lex).loc, "?", (yyvsp[(1) - (6)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(5) - (6)].lex).loc, ":", (yyvsp[(4) - (6)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(5) - (6)].lex).loc, ":", (yyvsp[(6) - (6)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[(1) - (6)].interm.intermTypedNode), (yyvsp[(4) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermTypedNode), (yyvsp[(2) - (6)].lex).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.binaryOpError((yyvsp[(2) - (6)].lex).loc, ":", (yyvsp[(4) - (6)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(6) - (6)].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[(6) - (6)].interm.intermTypedNode); + } + } + break; + + case 69: +/* Line 1792 of yacc.c */ +#line 616 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 70: +/* Line 1792 of yacc.c */ +#line 617 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.arrayObjectCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array assignment"); + parseContext.opaqueCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "="); + parseContext.specializationCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "="); + parseContext.lValueErrorCheck((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].interm).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.assignError((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } + } + break; + + case 71: +/* Line 1792 of yacc.c */ +#line 632 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpAssign; + } + break; + + case 72: +/* Line 1792 of yacc.c */ +#line 636 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpMulAssign; + } + break; + + case 73: +/* Line 1792 of yacc.c */ +#line 640 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpDivAssign; + } + break; + + case 74: +/* Line 1792 of yacc.c */ +#line 644 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "%="); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpModAssign; + } + break; + + case 75: +/* Line 1792 of yacc.c */ +#line 649 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpAddAssign; + } + break; + + case 76: +/* Line 1792 of yacc.c */ +#line 653 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpSubAssign; + } + break; + + case 77: +/* Line 1792 of yacc.c */ +#line 657 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bit-shift left assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; + } + break; + + case 78: +/* Line 1792 of yacc.c */ +#line 661 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bit-shift right assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpRightShiftAssign; + } + break; + + case 79: +/* Line 1792 of yacc.c */ +#line 665 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-and assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpAndAssign; + } + break; + + case 80: +/* Line 1792 of yacc.c */ +#line 669 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-xor assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; + } + break; + + case 81: +/* Line 1792 of yacc.c */ +#line 673 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-or assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; + } + break; + + case 82: +/* Line 1792 of yacc.c */ +#line 680 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 83: +/* Line 1792 of yacc.c */ +#line 683 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.binaryOpError((yyvsp[(2) - (3)].lex).loc, ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); + } + } + break; + + case 84: +/* Line 1792 of yacc.c */ +#line 693 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.constantValueCheck((yyvsp[(1) - (1)].interm.intermTypedNode), ""); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 85: +/* Line 1792 of yacc.c */ +#line 700 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.handleFunctionDeclarator((yyvsp[(1) - (2)].interm).loc, *(yyvsp[(1) - (2)].interm).function, true /* prototype */); + (yyval.interm.intermNode) = 0; + // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + } + break; + + case 86: +/* Line 1792 of yacc.c */ +#line 705 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(1) - (2)].interm).intermNode && (yyvsp[(1) - (2)].interm).intermNode->getAsAggregate()) + (yyvsp[(1) - (2)].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermNode; + } + break; + + case 87: +/* Line 1792 of yacc.c */ +#line 710 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.profileRequires((yyvsp[(1) - (4)].lex).loc, ENoProfile, 130, 0, "precision statement"); + + // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope + parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); + parseContext.setDefaultPrecision((yyvsp[(1) - (4)].lex).loc, (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.type).qualifier.precision); + (yyval.interm.intermNode) = 0; + } + break; + + case 88: +/* Line 1792 of yacc.c */ +#line 718 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.declareBlock((yyvsp[(1) - (2)].interm).loc, *(yyvsp[(1) - (2)].interm).typeList); + (yyval.interm.intermNode) = 0; + } + break; + + case 89: +/* Line 1792 of yacc.c */ +#line 722 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.declareBlock((yyvsp[(1) - (3)].interm).loc, *(yyvsp[(1) - (3)].interm).typeList, (yyvsp[(2) - (3)].lex).string); + (yyval.interm.intermNode) = 0; + } + break; + + case 90: +/* Line 1792 of yacc.c */ +#line 726 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.declareBlock((yyvsp[(1) - (4)].interm).loc, *(yyvsp[(1) - (4)].interm).typeList, (yyvsp[(2) - (4)].lex).string, (yyvsp[(3) - (4)].interm).arraySizes); + (yyval.interm.intermNode) = 0; + } + break; + + case 91: +/* Line 1792 of yacc.c */ +#line 730 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalQualifierFixCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier); + parseContext.updateStandaloneQualifierDefaults((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type)); + (yyval.interm.intermNode) = 0; + } + break; + + case 92: +/* Line 1792 of yacc.c */ +#line 735 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.checkNoShaderLayouts((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).shaderQualifiers); + parseContext.addQualifierToExisting((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).qualifier, *(yyvsp[(2) - (3)].lex).string); + (yyval.interm.intermNode) = 0; + } + break; + + case 93: +/* Line 1792 of yacc.c */ +#line 740 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.checkNoShaderLayouts((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).shaderQualifiers); + (yyvsp[(3) - (4)].interm.identifierList)->push_back((yyvsp[(2) - (4)].lex).string); + parseContext.addQualifierToExisting((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).qualifier, *(yyvsp[(3) - (4)].interm.identifierList)); + (yyval.interm.intermNode) = 0; + } + break; + + case 94: +/* Line 1792 of yacc.c */ +#line 749 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { parseContext.nestedBlockCheck((yyvsp[(1) - (3)].interm.type).loc); } + break; + + case 95: +/* Line 1792 of yacc.c */ +#line 749 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + --parseContext.structNestingLevel; + parseContext.blockName = (yyvsp[(2) - (6)].lex).string; + parseContext.globalQualifierFixCheck((yyvsp[(1) - (6)].interm.type).loc, (yyvsp[(1) - (6)].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[(1) - (6)].interm.type).loc, (yyvsp[(1) - (6)].interm.type).shaderQualifiers); + parseContext.currentBlockQualifier = (yyvsp[(1) - (6)].interm.type).qualifier; + (yyval.interm).loc = (yyvsp[(1) - (6)].interm.type).loc; + (yyval.interm).typeList = (yyvsp[(5) - (6)].interm.typeList); + } + break; + + case 96: +/* Line 1792 of yacc.c */ +#line 760 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.identifierList) = new TIdentifierList; + (yyval.interm.identifierList)->push_back((yyvsp[(2) - (2)].lex).string); + } + break; + + case 97: +/* Line 1792 of yacc.c */ +#line 764 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.identifierList) = (yyvsp[(1) - (3)].interm.identifierList); + (yyval.interm.identifierList)->push_back((yyvsp[(3) - (3)].lex).string); + } + break; + + case 98: +/* Line 1792 of yacc.c */ +#line 771 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + } + break; + + case 99: +/* Line 1792 of yacc.c */ +#line 778 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); + } + break; + + case 100: +/* Line 1792 of yacc.c */ +#line 781 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); + } + break; + + case 101: +/* Line 1792 of yacc.c */ +#line 788 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // Add the parameter + (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); + if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid) + (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); + else + delete (yyvsp[(2) - (2)].interm).param.type; + } + break; + + case 102: +/* Line 1792 of yacc.c */ +#line 796 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // + // Only first parameter of one-parameter functions can be void + // The check for named parameters not being void is done in parameter_declarator + // + if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) { + // + // This parameter > first is void + // + parseContext.error((yyvsp[(2) - (3)].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); + delete (yyvsp[(3) - (3)].interm).param.type; + } else { + // Add the parameter + (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); + (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); + } + } + break; + + case 103: +/* Line 1792 of yacc.c */ +#line 816 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(1) - (3)].interm.type).qualifier.storage != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier.storage != EvqTemporary) { + parseContext.error((yyvsp[(2) - (3)].lex).loc, "no qualifiers allowed for function return", + GetStorageQualifierString((yyvsp[(1) - (3)].interm.type).qualifier.storage), ""); + } + if ((yyvsp[(1) - (3)].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); + + // Add the function as a prototype after parsing it (we do not support recursion) + TFunction *function; + TType type((yyvsp[(1) - (3)].interm.type)); + function = new TFunction((yyvsp[(2) - (3)].lex).string, type); + (yyval.interm.function) = function; + } + break; + + case 104: +/* Line 1792 of yacc.c */ +#line 834 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(1) - (2)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (2)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (2)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (2)].interm.type).loc, *(yyvsp[(1) - (2)].interm.type).arraySizes); + } + if ((yyvsp[(1) - (2)].interm.type).basicType == EbtVoid) { + parseContext.error((yyvsp[(2) - (2)].lex).loc, "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str(), ""); + } + parseContext.reservedErrorCheck((yyvsp[(2) - (2)].lex).loc, *(yyvsp[(2) - (2)].lex).string); + + TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))}; + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + (yyval.interm).param = param; + } + break; + + case 105: +/* Line 1792 of yacc.c */ +#line 849 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(1) - (3)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); + } + parseContext.arrayDimCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.type).arraySizes, (yyvsp[(3) - (3)].interm).arraySizes); + + parseContext.arraySizeRequiredCheck((yyvsp[(3) - (3)].interm).loc, *(yyvsp[(3) - (3)].interm).arraySizes); + parseContext.reservedErrorCheck((yyvsp[(2) - (3)].lex).loc, *(yyvsp[(2) - (3)].lex).string); + + (yyvsp[(1) - (3)].interm.type).arraySizes = (yyvsp[(3) - (3)].interm).arraySizes; + + TParameter param = { (yyvsp[(2) - (3)].lex).string, new TType((yyvsp[(1) - (3)].interm.type))}; + (yyval.interm).loc = (yyvsp[(2) - (3)].lex).loc; + (yyval.interm).param = param; + } + break; + + case 106: +/* Line 1792 of yacc.c */ +#line 872 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(2) - (2)].interm); + if ((yyvsp[(1) - (2)].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[(1) - (2)].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + + parseContext.checkNoShaderLayouts((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(1) - (2)].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, *(yyval.interm).param.type); + + } + break; + + case 107: +/* Line 1792 of yacc.c */ +#line 883 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (1)].interm); + + parseContext.parameterTypeCheck((yyvsp[(1) - (1)].interm).loc, EvqIn, *(yyvsp[(1) - (1)].interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (1)].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + } + break; + + case 108: +/* Line 1792 of yacc.c */ +#line 893 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(2) - (2)].interm); + if ((yyvsp[(1) - (2)].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[(1) - (2)].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyvsp[(1) - (2)].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + + parseContext.checkNoShaderLayouts((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(1) - (2)].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, *(yyval.interm).param.type); + } + break; + + case 109: +/* Line 1792 of yacc.c */ +#line 903 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (1)].interm); + + parseContext.parameterTypeCheck((yyvsp[(1) - (1)].interm).loc, EvqIn, *(yyvsp[(1) - (1)].interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (1)].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + } + break; + + case 110: +/* Line 1792 of yacc.c */ +#line 913 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; + (yyval.interm).param = param; + if ((yyvsp[(1) - (1)].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (1)].interm.type).loc, *(yyvsp[(1) - (1)].interm.type).arraySizes); + } + break; + + case 111: +/* Line 1792 of yacc.c */ +#line 922 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (1)].interm); + } + break; + + case 112: +/* Line 1792 of yacc.c */ +#line 925 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (3)].interm); + parseContext.declareVariable((yyvsp[(3) - (3)].lex).loc, *(yyvsp[(3) - (3)].lex).string, (yyvsp[(1) - (3)].interm).type); + } + break; + + case 113: +/* Line 1792 of yacc.c */ +#line 929 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (4)].interm); + parseContext.declareVariable((yyvsp[(3) - (4)].lex).loc, *(yyvsp[(3) - (4)].lex).string, (yyvsp[(1) - (4)].interm).type, (yyvsp[(4) - (4)].interm).arraySizes); + } + break; + + case 114: +/* Line 1792 of yacc.c */ +#line 933 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (6)].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(3) - (6)].lex).loc, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, (yyvsp[(4) - (6)].interm).arraySizes, (yyvsp[(6) - (6)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, initNode, (yyvsp[(5) - (6)].lex).loc); + } + break; + + case 115: +/* Line 1792 of yacc.c */ +#line 938 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (5)].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(3) - (5)].lex).loc, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, 0, (yyvsp[(5) - (5)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (5)].interm).intermNode, initNode, (yyvsp[(4) - (5)].lex).loc); + } + break; + + case 116: +/* Line 1792 of yacc.c */ +#line 946 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (1)].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); + } + break; + + case 117: +/* Line 1792 of yacc.c */ +#line 951 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (2)].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[(2) - (2)].lex).loc, *(yyvsp[(2) - (2)].lex).string, (yyvsp[(1) - (2)].interm.type)); + } + break; + + case 118: +/* Line 1792 of yacc.c */ +#line 956 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (3)].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[(2) - (3)].lex).loc, *(yyvsp[(2) - (3)].lex).string, (yyvsp[(1) - (3)].interm.type), (yyvsp[(3) - (3)].interm).arraySizes); + } + break; + + case 119: +/* Line 1792 of yacc.c */ +#line 961 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (5)].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (5)].lex).loc, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), (yyvsp[(3) - (5)].interm).arraySizes, (yyvsp[(5) - (5)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[(4) - (5)].lex).loc); + } + break; + + case 120: +/* Line 1792 of yacc.c */ +#line 966 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (4)].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (4)].lex).loc, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), 0, (yyvsp[(4) - (4)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[(3) - (4)].lex).loc); + } + break; + + case 121: +/* Line 1792 of yacc.c */ +#line 975 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + + parseContext.globalQualifierTypeCheck((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type).qualifier, (yyval.interm.type)); + if ((yyvsp[(1) - (1)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (1)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (1)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + } + + parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); + } + break; + + case 122: +/* Line 1792 of yacc.c */ +#line 986 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalQualifierFixCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier); + parseContext.globalQualifierTypeCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, (yyvsp[(2) - (2)].interm.type)); + + if ((yyvsp[(2) - (2)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(2) - (2)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(2) - (2)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + } + + if ((yyvsp[(2) - (2)].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier)) + (yyvsp[(2) - (2)].interm.type).arraySizes = 0; + + parseContext.checkNoShaderLayouts((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); + (yyvsp[(2) - (2)].interm.type).shaderQualifiers.merge((yyvsp[(1) - (2)].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(2) - (2)].interm.type).qualifier, (yyvsp[(1) - (2)].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(2) - (2)].interm.type).basicType, (yyvsp[(2) - (2)].interm.type).qualifier); + + (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); + + if (! (yyval.interm.type).qualifier.isInterpolation() && + ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) || + (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) + (yyval.interm.type).qualifier.smooth = true; + } + break; + + case 123: +/* Line 1792 of yacc.c */ +#line 1013 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "invariant"); + parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.invariant = true; + } + break; + + case 124: +/* Line 1792 of yacc.c */ +#line 1022 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "smooth"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "smooth"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "smooth"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.smooth = true; + } + break; + + case 125: +/* Line 1792 of yacc.c */ +#line 1029 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "flat"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "flat"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "flat"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.flat = true; + } + break; + + case 126: +/* Line 1792 of yacc.c */ +#line 1036 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "noperspective"); + parseContext.requireProfile((yyvsp[(1) - (1)].lex).loc, ~EEsProfile, "noperspective"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "noperspective"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.nopersp = true; + } + break; + + case 127: +/* Line 1792 of yacc.c */ +#line 1046 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(3) - (4)].interm.type); + } + break; + + case 128: +/* Line 1792 of yacc.c */ +#line 1052 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 129: +/* Line 1792 of yacc.c */ +#line 1055 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type); + (yyval.interm.type).shaderQualifiers.merge((yyvsp[(3) - (3)].interm.type).shaderQualifiers); + parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[(3) - (3)].interm.type).qualifier, false); + } + break; + + case 130: +/* Line 1792 of yacc.c */ +#line 1062 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + parseContext.setLayoutQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type), *(yyvsp[(1) - (1)].lex).string); + } + break; + + case 131: +/* Line 1792 of yacc.c */ +#line 1066 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (3)].lex).loc); + parseContext.setLayoutQualifier((yyvsp[(1) - (3)].lex).loc, (yyval.interm.type), *(yyvsp[(1) - (3)].lex).string, (yyvsp[(3) - (3)].interm.intermTypedNode)); + } + break; + + case 132: +/* Line 1792 of yacc.c */ +#line 1070 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { // because "shared" is both an identifier and a keyword + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + TString strShared("shared"); + parseContext.setLayoutQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type), strShared); + } + break; + + case 133: +/* Line 1792 of yacc.c */ +#line 1078 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + } + break; + + case 134: +/* Line 1792 of yacc.c */ +#line 1084 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 135: +/* Line 1792 of yacc.c */ +#line 1087 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (2)].interm.type); + if ((yyval.interm.type).basicType == EbtVoid) + (yyval.interm.type).basicType = (yyvsp[(2) - (2)].interm.type).basicType; + + (yyval.interm.type).shaderQualifiers.merge((yyvsp[(2) - (2)].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[(2) - (2)].interm.type).qualifier, false); + } + break; + + case 136: +/* Line 1792 of yacc.c */ +#line 1098 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 137: +/* Line 1792 of yacc.c */ +#line 1101 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 138: +/* Line 1792 of yacc.c */ +#line 1104 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 139: +/* Line 1792 of yacc.c */ +#line 1107 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 140: +/* Line 1792 of yacc.c */ +#line 1111 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 141: +/* Line 1792 of yacc.c */ +#line 1115 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + } + break; + + case 142: +/* Line 1792 of yacc.c */ +#line 1122 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + } + break; + + case 143: +/* Line 1792 of yacc.c */ +#line 1126 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangVertex, "attribute"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 130, "attribute"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, "attribute"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 420, "attribute"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, "attribute"); + + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "attribute"); + + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqVaryingIn; + } + break; + + case 144: +/* Line 1792 of yacc.c */ +#line 1138 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, "varying"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 130, "varying"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 420, "varying"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, "varying"); + + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "varying"); + + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + if (parseContext.language == EShLangVertex) + (yyval.interm.type).qualifier.storage = EvqVaryingOut; + else + (yyval.interm.type).qualifier.storage = EvqVaryingIn; + } + break; + + case 145: +/* Line 1792 of yacc.c */ +#line 1152 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "inout"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqInOut; + } + break; + + case 146: +/* Line 1792 of yacc.c */ +#line 1157 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "in"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later + (yyval.interm.type).qualifier.storage = EvqIn; + } + break; + + case 147: +/* Line 1792 of yacc.c */ +#line 1163 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "out"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later + (yyval.interm.type).qualifier.storage = EvqOut; + } + break; + + case 148: +/* Line 1792 of yacc.c */ +#line 1169 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 120, 0, "centroid"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "centroid"); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "centroid"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.centroid = true; + } + break; + + case 149: +/* Line 1792 of yacc.c */ +#line 1176 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "patch"); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.patch = true; + } + break; + + case 150: +/* Line 1792 of yacc.c */ +#line 1182 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "sample"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.sample = true; + } + break; + + case 151: +/* Line 1792 of yacc.c */ +#line 1187 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "uniform"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqUniform; + } + break; + + case 152: +/* Line 1792 of yacc.c */ +#line 1192 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "buffer"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqBuffer; + } + break; + + case 153: +/* Line 1792 of yacc.c */ +#line 1197 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECoreProfile | ECompatibilityProfile, 430, 0, "shared"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 310, 0, "shared"); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangCompute, "shared"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqShared; + } + break; + + case 154: +/* Line 1792 of yacc.c */ +#line 1204 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.coherent = true; + } + break; + + case 155: +/* Line 1792 of yacc.c */ +#line 1208 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.volatil = true; + } + break; + + case 156: +/* Line 1792 of yacc.c */ +#line 1212 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.restrict = true; + } + break; + + case 157: +/* Line 1792 of yacc.c */ +#line 1216 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.readonly = true; + } + break; + + case 158: +/* Line 1792 of yacc.c */ +#line 1220 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.writeonly = true; + } + break; + + case 159: +/* Line 1792 of yacc.c */ +#line 1224 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.spvRemoved((yyvsp[(1) - (1)].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqUniform; + } + break; + + case 160: +/* Line 1792 of yacc.c */ +#line 1230 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.spvRemoved((yyvsp[(1) - (4)].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[(1) - (4)].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[(1) - (4)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqUniform; + // TODO: 4.0 semantics: subroutines + // 1) make sure each identifier is a type declared earlier with SUBROUTINE + // 2) save all of the identifiers for future comparison with the declared function + } + break; + + case 161: +/* Line 1792 of yacc.c */ +#line 1242 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // TODO: 4.0 functionality: subroutine type to list + } + break; + + case 162: +/* Line 1792 of yacc.c */ +#line 1245 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + } + break; + + case 163: +/* Line 1792 of yacc.c */ +#line 1250 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); + } + break; + + case 164: +/* Line 1792 of yacc.c */ +#line 1254 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.arrayDimCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(2) - (2)].interm).arraySizes, 0); + (yyval.interm.type) = (yyvsp[(1) - (2)].interm.type); + (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); + (yyval.interm.type).arraySizes = (yyvsp[(2) - (2)].interm).arraySizes; + } + break; + + case 165: +/* Line 1792 of yacc.c */ +#line 1263 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (2)].lex).loc; + (yyval.interm).arraySizes = new TArraySizes; + (yyval.interm).arraySizes->addInnerSize(); + } + break; + + case 166: +/* Line 1792 of yacc.c */ +#line 1268 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm).loc = (yyvsp[(1) - (3)].lex).loc; + (yyval.interm).arraySizes = new TArraySizes; + + TArraySize size; + parseContext.arraySizeCheck((yyvsp[(2) - (3)].interm.intermTypedNode)->getLoc(), (yyvsp[(2) - (3)].interm.intermTypedNode), size); + (yyval.interm).arraySizes->addInnerSize(size); + } + break; + + case 167: +/* Line 1792 of yacc.c */ +#line 1276 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (3)].interm); + (yyval.interm).arraySizes->addInnerSize(); + } + break; + + case 168: +/* Line 1792 of yacc.c */ +#line 1280 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (4)].interm); + + TArraySize size; + parseContext.arraySizeCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLoc(), (yyvsp[(3) - (4)].interm.intermTypedNode), size); + (yyval.interm).arraySizes->addInnerSize(size); + } + break; + + case 169: +/* Line 1792 of yacc.c */ +#line 1290 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtVoid; + } + break; + + case 170: +/* Line 1792 of yacc.c */ +#line 1294 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + } + break; + + case 171: +/* Line 1792 of yacc.c */ +#line 1298 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + } + break; + + case 172: +/* Line 1792 of yacc.c */ +#line 1303 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + } + break; + + case 173: +/* Line 1792 of yacc.c */ +#line 1307 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + } + break; + + case 174: +/* Line 1792 of yacc.c */ +#line 1312 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + } + break; + + case 175: +/* Line 1792 of yacc.c */ +#line 1316 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(2); + } + break; + + case 176: +/* Line 1792 of yacc.c */ +#line 1321 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(3); + } + break; + + case 177: +/* Line 1792 of yacc.c */ +#line 1326 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(4); + } + break; + + case 178: +/* Line 1792 of yacc.c */ +#line 1331 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(2); + } + break; + + case 179: +/* Line 1792 of yacc.c */ +#line 1337 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(3); + } + break; + + case 180: +/* Line 1792 of yacc.c */ +#line 1343 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(4); + } + break; + + case 181: +/* Line 1792 of yacc.c */ +#line 1349 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(2); + } + break; + + case 182: +/* Line 1792 of yacc.c */ +#line 1354 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(3); + } + break; + + case 183: +/* Line 1792 of yacc.c */ +#line 1359 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(4); + } + break; + + case 184: +/* Line 1792 of yacc.c */ +#line 1364 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(2); + } + break; + + case 185: +/* Line 1792 of yacc.c */ +#line 1369 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(3); + } + break; + + case 186: +/* Line 1792 of yacc.c */ +#line 1374 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(4); + } + break; + + case 187: +/* Line 1792 of yacc.c */ +#line 1379 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(2); + } + break; + + case 188: +/* Line 1792 of yacc.c */ +#line 1385 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(3); + } + break; + + case 189: +/* Line 1792 of yacc.c */ +#line 1391 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(4); + } + break; + + case 190: +/* Line 1792 of yacc.c */ +#line 1397 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); + } + break; + + case 191: +/* Line 1792 of yacc.c */ +#line 1402 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); + } + break; + + case 192: +/* Line 1792 of yacc.c */ +#line 1407 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); + } + break; + + case 193: +/* Line 1792 of yacc.c */ +#line 1412 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); + } + break; + + case 194: +/* Line 1792 of yacc.c */ +#line 1417 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 3); + } + break; + + case 195: +/* Line 1792 of yacc.c */ +#line 1422 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 4); + } + break; + + case 196: +/* Line 1792 of yacc.c */ +#line 1427 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 2); + } + break; + + case 197: +/* Line 1792 of yacc.c */ +#line 1432 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); + } + break; + + case 198: +/* Line 1792 of yacc.c */ +#line 1437 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 4); + } + break; + + case 199: +/* Line 1792 of yacc.c */ +#line 1442 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 2); + } + break; + + case 200: +/* Line 1792 of yacc.c */ +#line 1447 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 3); + } + break; + + case 201: +/* Line 1792 of yacc.c */ +#line 1452 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); + } + break; + + case 202: +/* Line 1792 of yacc.c */ +#line 1457 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); + } + break; + + case 203: +/* Line 1792 of yacc.c */ +#line 1463 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); + } + break; + + case 204: +/* Line 1792 of yacc.c */ +#line 1469 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); + } + break; + + case 205: +/* Line 1792 of yacc.c */ +#line 1475 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); + } + break; + + case 206: +/* Line 1792 of yacc.c */ +#line 1481 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 3); + } + break; + + case 207: +/* Line 1792 of yacc.c */ +#line 1487 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 4); + } + break; + + case 208: +/* Line 1792 of yacc.c */ +#line 1493 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 2); + } + break; + + case 209: +/* Line 1792 of yacc.c */ +#line 1499 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); + } + break; + + case 210: +/* Line 1792 of yacc.c */ +#line 1505 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 4); + } + break; + + case 211: +/* Line 1792 of yacc.c */ +#line 1511 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 2); + } + break; + + case 212: +/* Line 1792 of yacc.c */ +#line 1517 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 3); + } + break; + + case 213: +/* Line 1792 of yacc.c */ +#line 1523 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); + } + break; + + case 214: +/* Line 1792 of yacc.c */ +#line 1529 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.vulkanRemoved((yyvsp[(1) - (1)].lex).loc, "atomic counter types"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtAtomicUint; + } + break; + + case 215: +/* Line 1792 of yacc.c */ +#line 1534 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D); + } + break; + + case 216: +/* Line 1792 of yacc.c */ +#line 1539 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D); + } + break; + + case 217: +/* Line 1792 of yacc.c */ +#line 1544 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd3D); + } + break; + + case 218: +/* Line 1792 of yacc.c */ +#line 1549 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube); + } + break; + + case 219: +/* Line 1792 of yacc.c */ +#line 1554 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); + } + break; + + case 220: +/* Line 1792 of yacc.c */ +#line 1559 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); + } + break; + + case 221: +/* Line 1792 of yacc.c */ +#line 1564 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); + } + break; + + case 222: +/* Line 1792 of yacc.c */ +#line 1569 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); + } + break; + + case 223: +/* Line 1792 of yacc.c */ +#line 1574 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); + } + break; + + case 224: +/* Line 1792 of yacc.c */ +#line 1579 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); + } + break; + + case 225: +/* Line 1792 of yacc.c */ +#line 1584 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); + } + break; + + case 226: +/* Line 1792 of yacc.c */ +#line 1589 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); + } + break; + + case 227: +/* Line 1792 of yacc.c */ +#line 1594 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); + } + break; + + case 228: +/* Line 1792 of yacc.c */ +#line 1599 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd1D); + } + break; + + case 229: +/* Line 1792 of yacc.c */ +#line 1604 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd2D); + } + break; + + case 230: +/* Line 1792 of yacc.c */ +#line 1609 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd3D); + } + break; + + case 231: +/* Line 1792 of yacc.c */ +#line 1614 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, EsdCube); + } + break; + + case 232: +/* Line 1792 of yacc.c */ +#line 1619 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); + } + break; + + case 233: +/* Line 1792 of yacc.c */ +#line 1624 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); + } + break; + + case 234: +/* Line 1792 of yacc.c */ +#line 1629 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); + } + break; + + case 235: +/* Line 1792 of yacc.c */ +#line 1634 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd1D); + } + break; + + case 236: +/* Line 1792 of yacc.c */ +#line 1639 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd2D); + } + break; + + case 237: +/* Line 1792 of yacc.c */ +#line 1644 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd3D); + } + break; + + case 238: +/* Line 1792 of yacc.c */ +#line 1649 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, EsdCube); + } + break; + + case 239: +/* Line 1792 of yacc.c */ +#line 1654 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); + } + break; + + case 240: +/* Line 1792 of yacc.c */ +#line 1659 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); + } + break; + + case 241: +/* Line 1792 of yacc.c */ +#line 1664 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); + } + break; + + case 242: +/* Line 1792 of yacc.c */ +#line 1669 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdRect); + } + break; + + case 243: +/* Line 1792 of yacc.c */ +#line 1674 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); + } + break; + + case 244: +/* Line 1792 of yacc.c */ +#line 1679 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, EsdRect); + } + break; + + case 245: +/* Line 1792 of yacc.c */ +#line 1684 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, EsdRect); + } + break; + + case 246: +/* Line 1792 of yacc.c */ +#line 1689 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); + } + break; + + case 247: +/* Line 1792 of yacc.c */ +#line 1694 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); + } + break; + + case 248: +/* Line 1792 of yacc.c */ +#line 1699 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); + } + break; + + case 249: +/* Line 1792 of yacc.c */ +#line 1704 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); + } + break; + + case 250: +/* Line 1792 of yacc.c */ +#line 1709 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); + } + break; + + case 251: +/* Line 1792 of yacc.c */ +#line 1714 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); + } + break; + + case 252: +/* Line 1792 of yacc.c */ +#line 1719 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); + } + break; + + case 253: +/* Line 1792 of yacc.c */ +#line 1724 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); + } + break; + + case 254: +/* Line 1792 of yacc.c */ +#line 1729 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); + } + break; + + case 255: +/* Line 1792 of yacc.c */ +#line 1734 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setPureSampler(false); + } + break; + + case 256: +/* Line 1792 of yacc.c */ +#line 1739 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setPureSampler(true); + } + break; + + case 257: +/* Line 1792 of yacc.c */ +#line 1744 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); + } + break; + + case 258: +/* Line 1792 of yacc.c */ +#line 1749 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); + } + break; + + case 259: +/* Line 1792 of yacc.c */ +#line 1754 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); + } + break; + + case 260: +/* Line 1792 of yacc.c */ +#line 1759 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); + } + break; + + case 261: +/* Line 1792 of yacc.c */ +#line 1764 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); + } + break; + + case 262: +/* Line 1792 of yacc.c */ +#line 1769 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); + } + break; + + case 263: +/* Line 1792 of yacc.c */ +#line 1774 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); + } + break; + + case 264: +/* Line 1792 of yacc.c */ +#line 1779 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); + } + break; + + case 265: +/* Line 1792 of yacc.c */ +#line 1784 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); + } + break; + + case 266: +/* Line 1792 of yacc.c */ +#line 1789 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); + } + break; + + case 267: +/* Line 1792 of yacc.c */ +#line 1794 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); + } + break; + + case 268: +/* Line 1792 of yacc.c */ +#line 1799 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); + } + break; + + case 269: +/* Line 1792 of yacc.c */ +#line 1804 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); + } + break; + + case 270: +/* Line 1792 of yacc.c */ +#line 1809 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); + } + break; + + case 271: +/* Line 1792 of yacc.c */ +#line 1814 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); + } + break; + + case 272: +/* Line 1792 of yacc.c */ +#line 1819 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); + } + break; + + case 273: +/* Line 1792 of yacc.c */ +#line 1824 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); + } + break; + + case 274: +/* Line 1792 of yacc.c */ +#line 1829 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); + } + break; + + case 275: +/* Line 1792 of yacc.c */ +#line 1834 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); + } + break; + + case 276: +/* Line 1792 of yacc.c */ +#line 1839 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); + } + break; + + case 277: +/* Line 1792 of yacc.c */ +#line 1844 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); + } + break; + + case 278: +/* Line 1792 of yacc.c */ +#line 1849 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); + } + break; + + case 279: +/* Line 1792 of yacc.c */ +#line 1854 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); + } + break; + + case 280: +/* Line 1792 of yacc.c */ +#line 1859 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); + } + break; + + case 281: +/* Line 1792 of yacc.c */ +#line 1864 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); + } + break; + + case 282: +/* Line 1792 of yacc.c */ +#line 1869 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); + } + break; + + case 283: +/* Line 1792 of yacc.c */ +#line 1874 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); + } + break; + + case 284: +/* Line 1792 of yacc.c */ +#line 1879 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); + } + break; + + case 285: +/* Line 1792 of yacc.c */ +#line 1884 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); + } + break; + + case 286: +/* Line 1792 of yacc.c */ +#line 1889 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); + } + break; + + case 287: +/* Line 1792 of yacc.c */ +#line 1894 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); + } + break; + + case 288: +/* Line 1792 of yacc.c */ +#line 1899 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); + } + break; + + case 289: +/* Line 1792 of yacc.c */ +#line 1904 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); + } + break; + + case 290: +/* Line 1792 of yacc.c */ +#line 1909 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); + } + break; + + case 291: +/* Line 1792 of yacc.c */ +#line 1914 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); + } + break; + + case 292: +/* Line 1792 of yacc.c */ +#line 1919 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); + } + break; + + case 293: +/* Line 1792 of yacc.c */ +#line 1924 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); + } + break; + + case 294: +/* Line 1792 of yacc.c */ +#line 1929 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); + } + break; + + case 295: +/* Line 1792 of yacc.c */ +#line 1934 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); + } + break; + + case 296: +/* Line 1792 of yacc.c */ +#line 1939 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); + } + break; + + case 297: +/* Line 1792 of yacc.c */ +#line 1944 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); + } + break; + + case 298: +/* Line 1792 of yacc.c */ +#line 1949 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); + } + break; + + case 299: +/* Line 1792 of yacc.c */ +#line 1954 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); + } + break; + + case 300: +/* Line 1792 of yacc.c */ +#line 1959 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); + } + break; + + case 301: +/* Line 1792 of yacc.c */ +#line 1964 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); + } + break; + + case 302: +/* Line 1792 of yacc.c */ +#line 1969 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); + } + break; + + case 303: +/* Line 1792 of yacc.c */ +#line 1974 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); + } + break; + + case 304: +/* Line 1792 of yacc.c */ +#line 1979 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); + } + break; + + case 305: +/* Line 1792 of yacc.c */ +#line 1984 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); + } + break; + + case 306: +/* Line 1792 of yacc.c */ +#line 1989 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); + } + break; + + case 307: +/* Line 1792 of yacc.c */ +#line 1994 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); + } + break; + + case 308: +/* Line 1792 of yacc.c */ +#line 1999 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); + } + break; + + case 309: +/* Line 1792 of yacc.c */ +#line 2004 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); + } + break; + + case 310: +/* Line 1792 of yacc.c */ +#line 2009 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); + } + break; + + case 311: +/* Line 1792 of yacc.c */ +#line 2014 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); + } + break; + + case 312: +/* Line 1792 of yacc.c */ +#line 2019 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); + } + break; + + case 313: +/* Line 1792 of yacc.c */ +#line 2024 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); + } + break; + + case 314: +/* Line 1792 of yacc.c */ +#line 2029 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); + } + break; + + case 315: +/* Line 1792 of yacc.c */ +#line 2034 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); + } + break; + + case 316: +/* Line 1792 of yacc.c */ +#line 2039 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); + } + break; + + case 317: +/* Line 1792 of yacc.c */ +#line 2044 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); + } + break; + + case 318: +/* Line 1792 of yacc.c */ +#line 2049 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); + } + break; + + case 319: +/* Line 1792 of yacc.c */ +#line 2054 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); + } + break; + + case 320: +/* Line 1792 of yacc.c */ +#line 2059 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); + } + break; + + case 321: +/* Line 1792 of yacc.c */ +#line 2064 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); + } + break; + + case 322: +/* Line 1792 of yacc.c */ +#line 2069 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); + } + break; + + case 323: +/* Line 1792 of yacc.c */ +#line 2074 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { // GL_OES_EGL_image_external + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D); + (yyval.interm.type).sampler.external = true; + } + break; + + case 324: +/* Line 1792 of yacc.c */ +#line 2080 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtFloat); + } + break; + + case 325: +/* Line 1792 of yacc.c */ +#line 2086 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtFloat, true); + } + break; + + case 326: +/* Line 1792 of yacc.c */ +#line 2092 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtInt); + } + break; + + case 327: +/* Line 1792 of yacc.c */ +#line 2098 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtInt, true); + } + break; + + case 328: +/* Line 1792 of yacc.c */ +#line 2104 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtUint); + } + break; + + case 329: +/* Line 1792 of yacc.c */ +#line 2110 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtUint, true); + } + break; + + case 330: +/* Line 1792 of yacc.c */ +#line 2116 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); + } + break; + + case 331: +/* Line 1792 of yacc.c */ +#line 2121 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // + // This is for user defined type names. The lexical phase looked up the + // type. + // + if (const TVariable* variable = ((yyvsp[(1) - (1)].lex).symbol)->getAsVariable()) { + const TType& structure = variable->getType(); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtStruct; + (yyval.interm.type).userDef = &structure; + } else + parseContext.error((yyvsp[(1) - (1)].lex).loc, "expected type name", (yyvsp[(1) - (1)].lex).string->c_str(), ""); + } + break; + + case 332: +/* Line 1792 of yacc.c */ +#line 2137 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + if (parseContext.profile == EEsProfile) + (yyval.interm.type).qualifier.precision = EpqHigh; + } + break; + + case 333: +/* Line 1792 of yacc.c */ +#line 2143 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + if (parseContext.profile == EEsProfile) + (yyval.interm.type).qualifier.precision = EpqMedium; + } + break; + + case 334: +/* Line 1792 of yacc.c */ +#line 2149 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + if (parseContext.profile == EEsProfile) + (yyval.interm.type).qualifier.precision = EpqLow; + } + break; + + case 335: +/* Line 1792 of yacc.c */ +#line 2158 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { parseContext.nestedStructCheck((yyvsp[(1) - (3)].lex).loc); } + break; + + case 336: +/* Line 1792 of yacc.c */ +#line 2158 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + TType* structure = new TType((yyvsp[(5) - (6)].interm.typeList), *(yyvsp[(2) - (6)].lex).string); + parseContext.structArrayCheck((yyvsp[(2) - (6)].lex).loc, *structure); + TVariable* userTypeDef = new TVariable((yyvsp[(2) - (6)].lex).string, *structure, true); + if (! parseContext.symbolTable.insert(*userTypeDef)) + parseContext.error((yyvsp[(2) - (6)].lex).loc, "redefinition", (yyvsp[(2) - (6)].lex).string->c_str(), "struct"); + (yyval.interm.type).init((yyvsp[(1) - (6)].lex).loc); + (yyval.interm.type).basicType = EbtStruct; + (yyval.interm.type).userDef = structure; + --parseContext.structNestingLevel; + } + break; + + case 337: +/* Line 1792 of yacc.c */ +#line 2169 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { parseContext.nestedStructCheck((yyvsp[(1) - (2)].lex).loc); } + break; + + case 338: +/* Line 1792 of yacc.c */ +#line 2169 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString("")); + (yyval.interm.type).init((yyvsp[(1) - (5)].lex).loc); + (yyval.interm.type).basicType = EbtStruct; + (yyval.interm.type).userDef = structure; + --parseContext.structNestingLevel; + } + break; + + case 339: +/* Line 1792 of yacc.c */ +#line 2179 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList); + } + break; + + case 340: +/* Line 1792 of yacc.c */ +#line 2182 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList); + for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.typeList)->size(); ++i) { + for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) { + if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName()) + parseContext.error((*(yyvsp[(2) - (2)].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName().c_str()); + } + (yyval.interm.typeList)->push_back((*(yyvsp[(2) - (2)].interm.typeList))[i]); + } + } + break; + + case 341: +/* Line 1792 of yacc.c */ +#line 2195 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(1) - (3)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if (parseContext.profile == EEsProfile) + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); + } + + (yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList); + + parseContext.voidErrorCheck((yyvsp[(1) - (3)].interm.type).loc, (*(yyvsp[(2) - (3)].interm.typeList))[0].type->getFieldName(), (yyvsp[(1) - (3)].interm.type).basicType); + parseContext.precisionQualifierCheck((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).basicType, (yyvsp[(1) - (3)].interm.type).qualifier); + + for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { + parseContext.arrayDimCheck((yyvsp[(1) - (3)].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[(1) - (3)].interm.type).arraySizes); + (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[(1) - (3)].interm.type)); + } + } + break; + + case 342: +/* Line 1792 of yacc.c */ +#line 2213 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.globalQualifierFixCheck((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).qualifier); + if ((yyvsp[(2) - (4)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(2) - (4)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(2) - (4)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if (parseContext.profile == EEsProfile) + parseContext.arraySizeRequiredCheck((yyvsp[(2) - (4)].interm.type).loc, *(yyvsp[(2) - (4)].interm.type).arraySizes); + } + + (yyval.interm.typeList) = (yyvsp[(3) - (4)].interm.typeList); + + parseContext.checkNoShaderLayouts((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).shaderQualifiers); + parseContext.voidErrorCheck((yyvsp[(2) - (4)].interm.type).loc, (*(yyvsp[(3) - (4)].interm.typeList))[0].type->getFieldName(), (yyvsp[(2) - (4)].interm.type).basicType); + parseContext.mergeQualifiers((yyvsp[(2) - (4)].interm.type).loc, (yyvsp[(2) - (4)].interm.type).qualifier, (yyvsp[(1) - (4)].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[(2) - (4)].interm.type).loc, (yyvsp[(2) - (4)].interm.type).basicType, (yyvsp[(2) - (4)].interm.type).qualifier); + + for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { + parseContext.arrayDimCheck((yyvsp[(1) - (4)].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[(2) - (4)].interm.type).arraySizes); + (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[(2) - (4)].interm.type)); + } + } + break; + + case 343: +/* Line 1792 of yacc.c */ +#line 2237 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.typeList) = new TTypeList; + (yyval.interm.typeList)->push_back((yyvsp[(1) - (1)].interm.typeLine)); + } + break; + + case 344: +/* Line 1792 of yacc.c */ +#line 2241 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine)); + } + break; + + case 345: +/* Line 1792 of yacc.c */ +#line 2247 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.typeLine).type = new TType(EbtVoid); + (yyval.interm.typeLine).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (1)].lex).string); + } + break; + + case 346: +/* Line 1792 of yacc.c */ +#line 2252 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.arrayDimCheck((yyvsp[(1) - (2)].lex).loc, (yyvsp[(2) - (2)].interm).arraySizes, 0); + + (yyval.interm.typeLine).type = new TType(EbtVoid); + (yyval.interm.typeLine).loc = (yyvsp[(1) - (2)].lex).loc; + (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (2)].lex).string); + (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[(2) - (2)].interm).arraySizes); + } + break; + + case 347: +/* Line 1792 of yacc.c */ +#line 2263 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 348: +/* Line 1792 of yacc.c */ +#line 2266 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + const char* initFeature = "{ } style initializers"; + parseContext.requireProfile((yyvsp[(1) - (3)].lex).loc, ~EEsProfile, initFeature); + parseContext.profileRequires((yyvsp[(1) - (3)].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); + } + break; + + case 349: +/* Line 1792 of yacc.c */ +#line 2272 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + const char* initFeature = "{ } style initializers"; + parseContext.requireProfile((yyvsp[(1) - (4)].lex).loc, ~EEsProfile, initFeature); + parseContext.profileRequires((yyvsp[(1) - (4)].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (4)].interm.intermTypedNode); + } + break; + + case 350: +/* Line 1792 of yacc.c */ +#line 2281 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[(1) - (1)].interm.intermTypedNode), (yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc()); + } + break; + + case 351: +/* Line 1792 of yacc.c */ +#line 2284 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + } + break; + + case 352: +/* Line 1792 of yacc.c */ +#line 2290 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 353: +/* Line 1792 of yacc.c */ +#line 2294 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 354: +/* Line 1792 of yacc.c */ +#line 2295 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 355: +/* Line 1792 of yacc.c */ +#line 2301 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 356: +/* Line 1792 of yacc.c */ +#line 2302 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 357: +/* Line 1792 of yacc.c */ +#line 2303 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 358: +/* Line 1792 of yacc.c */ +#line 2304 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 359: +/* Line 1792 of yacc.c */ +#line 2305 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 360: +/* Line 1792 of yacc.c */ +#line 2306 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 361: +/* Line 1792 of yacc.c */ +#line 2307 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 362: +/* Line 1792 of yacc.c */ +#line 2311 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = 0; } + break; + + case 363: +/* Line 1792 of yacc.c */ +#line 2312 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.push(); + ++parseContext.statementNestingLevel; + } + break; + + case 364: +/* Line 1792 of yacc.c */ +#line 2316 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); + --parseContext.statementNestingLevel; + } + break; + + case 365: +/* Line 1792 of yacc.c */ +#line 2320 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(3) - (5)].interm.intermNode) && (yyvsp[(3) - (5)].interm.intermNode)->getAsAggregate()) + (yyvsp[(3) - (5)].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[(3) - (5)].interm.intermNode); + } + break; + + case 366: +/* Line 1792 of yacc.c */ +#line 2328 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 367: +/* Line 1792 of yacc.c */ +#line 2329 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + break; + + case 368: +/* Line 1792 of yacc.c */ +#line 2333 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + ++parseContext.controlFlowNestingLevel; + } + break; + + case 369: +/* Line 1792 of yacc.c */ +#line 2336 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + --parseContext.controlFlowNestingLevel; + (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); + } + break; + + case 370: +/* Line 1792 of yacc.c */ +#line 2340 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.push(); + ++parseContext.statementNestingLevel; + ++parseContext.controlFlowNestingLevel; + } + break; + + case 371: +/* Line 1792 of yacc.c */ +#line 2345 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); + --parseContext.statementNestingLevel; + --parseContext.controlFlowNestingLevel; + (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); + } + break; + + case 372: +/* Line 1792 of yacc.c */ +#line 2354 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = 0; + } + break; + + case 373: +/* Line 1792 of yacc.c */ +#line 2357 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(2) - (3)].interm.intermNode) && (yyvsp[(2) - (3)].interm.intermNode)->getAsAggregate()) + (yyvsp[(2) - (3)].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermNode); + } + break; + + case 374: +/* Line 1792 of yacc.c */ +#line 2365 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode)); + if ((yyvsp[(1) - (1)].interm.intermNode) && (yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode() && ((yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || + (yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { + parseContext.wrapupSwitchSubsequence(0, (yyvsp[(1) - (1)].interm.intermNode)); + (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case + } + } + break; + + case 375: +/* Line 1792 of yacc.c */ +#line 2373 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if ((yyvsp[(2) - (2)].interm.intermNode) && (yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode() && ((yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || + (yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { + parseContext.wrapupSwitchSubsequence((yyvsp[(1) - (2)].interm.intermNode) ? (yyvsp[(1) - (2)].interm.intermNode)->getAsAggregate() : 0, (yyvsp[(2) - (2)].interm.intermNode)); + (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case + } else + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode)); + } + break; + + case 376: +/* Line 1792 of yacc.c */ +#line 2384 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = 0; } + break; + + case 377: +/* Line 1792 of yacc.c */ +#line 2385 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = static_cast((yyvsp[(1) - (2)].interm.intermTypedNode)); } + break; + + case 378: +/* Line 1792 of yacc.c */ +#line 2389 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.boolCheck((yyvsp[(1) - (5)].lex).loc, (yyvsp[(3) - (5)].interm.intermTypedNode)); + (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).loc); + } + break; + + case 379: +/* Line 1792 of yacc.c */ +#line 2396 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); + (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); + } + break; + + case 380: +/* Line 1792 of yacc.c */ +#line 2400 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); + (yyval.interm.nodePair).node2 = 0; + } + break; + + case 381: +/* Line 1792 of yacc.c */ +#line 2408 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + parseContext.boolCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), (yyvsp[(1) - (1)].interm.intermTypedNode)); + } + break; + + case 382: +/* Line 1792 of yacc.c */ +#line 2412 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.boolCheck((yyvsp[(2) - (4)].lex).loc, (yyvsp[(1) - (4)].interm.type)); + + TType type((yyvsp[(1) - (4)].interm.type)); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (4)].lex).loc, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), 0, (yyvsp[(4) - (4)].interm.intermTypedNode)); + if (initNode) + (yyval.interm.intermTypedNode) = initNode->getAsTyped(); + else + (yyval.interm.intermTypedNode) = 0; + } + break; + + case 383: +/* Line 1792 of yacc.c */ +#line 2425 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // start new switch sequence on the switch stack + ++parseContext.controlFlowNestingLevel; + ++parseContext.statementNestingLevel; + parseContext.switchSequenceStack.push_back(new TIntermSequence); + parseContext.switchLevel.push_back(parseContext.statementNestingLevel); + parseContext.symbolTable.push(); + } + break; + + case 384: +/* Line 1792 of yacc.c */ +#line 2433 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[(1) - (8)].lex).loc, (yyvsp[(3) - (8)].interm.intermTypedNode), (yyvsp[(7) - (8)].interm.intermNode) ? (yyvsp[(7) - (8)].interm.intermNode)->getAsAggregate() : 0); + delete parseContext.switchSequenceStack.back(); + parseContext.switchSequenceStack.pop_back(); + parseContext.switchLevel.pop_back(); + parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); + --parseContext.statementNestingLevel; + --parseContext.controlFlowNestingLevel; + } + break; + + case 385: +/* Line 1792 of yacc.c */ +#line 2445 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = 0; + } + break; + + case 386: +/* Line 1792 of yacc.c */ +#line 2448 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + } + break; + + case 387: +/* Line 1792 of yacc.c */ +#line 2454 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = 0; + if (parseContext.switchLevel.size() == 0) + parseContext.error((yyvsp[(1) - (3)].lex).loc, "cannot appear outside switch statement", "case", ""); + else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) + parseContext.error((yyvsp[(1) - (3)].lex).loc, "cannot be nested inside control flow", "case", ""); + else { + parseContext.constantValueCheck((yyvsp[(2) - (3)].interm.intermTypedNode), "case"); + parseContext.integerCheck((yyvsp[(2) - (3)].interm.intermTypedNode), "case"); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).loc); + } + } + break; + + case 388: +/* Line 1792 of yacc.c */ +#line 2466 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = 0; + if (parseContext.switchLevel.size() == 0) + parseContext.error((yyvsp[(1) - (2)].lex).loc, "cannot appear outside switch statement", "default", ""); + else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) + parseContext.error((yyvsp[(1) - (2)].lex).loc, "cannot be nested inside control flow", "default", ""); + else + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[(1) - (2)].lex).loc); + } + break; + + case 389: +/* Line 1792 of yacc.c */ +#line 2478 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if (! parseContext.limits.whileLoops) + parseContext.error((yyvsp[(1) - (2)].lex).loc, "while loops not available", "limitation", ""); + parseContext.symbolTable.push(); + ++parseContext.loopNestingLevel; + ++parseContext.statementNestingLevel; + ++parseContext.controlFlowNestingLevel; + } + break; + + case 390: +/* Line 1792 of yacc.c */ +#line 2486 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[(6) - (6)].interm.intermNode), (yyvsp[(4) - (6)].interm.intermTypedNode), 0, true, (yyvsp[(1) - (6)].lex).loc); + --parseContext.loopNestingLevel; + --parseContext.statementNestingLevel; + --parseContext.controlFlowNestingLevel; + } + break; + + case 391: +/* Line 1792 of yacc.c */ +#line 2493 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + ++parseContext.loopNestingLevel; + ++parseContext.statementNestingLevel; + ++parseContext.controlFlowNestingLevel; + } + break; + + case 392: +/* Line 1792 of yacc.c */ +#line 2498 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if (! parseContext.limits.whileLoops) + parseContext.error((yyvsp[(1) - (8)].lex).loc, "do-while loops not available", "limitation", ""); + + parseContext.boolCheck((yyvsp[(8) - (8)].lex).loc, (yyvsp[(6) - (8)].interm.intermTypedNode)); + + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[(3) - (8)].interm.intermNode), (yyvsp[(6) - (8)].interm.intermTypedNode), 0, false, (yyvsp[(4) - (8)].lex).loc); + --parseContext.loopNestingLevel; + --parseContext.statementNestingLevel; + --parseContext.controlFlowNestingLevel; + } + break; + + case 393: +/* Line 1792 of yacc.c */ +#line 2509 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.push(); + ++parseContext.loopNestingLevel; + ++parseContext.statementNestingLevel; + ++parseContext.controlFlowNestingLevel; + } + break; + + case 394: +/* Line 1792 of yacc.c */ +#line 2515 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[(4) - (7)].interm.intermNode), (yyvsp[(2) - (7)].lex).loc); + TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[(7) - (7)].interm.intermNode), reinterpret_cast((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast((yyvsp[(5) - (7)].interm.nodePair).node2), true, (yyvsp[(1) - (7)].lex).loc); + if (! parseContext.limits.nonInductiveForLoops) + parseContext.inductiveLoopCheck((yyvsp[(1) - (7)].lex).loc, (yyvsp[(4) - (7)].interm.intermNode), forLoop); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[(1) - (7)].lex).loc); + (yyval.interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + --parseContext.loopNestingLevel; + --parseContext.statementNestingLevel; + --parseContext.controlFlowNestingLevel; + } + break; + + case 395: +/* Line 1792 of yacc.c */ +#line 2530 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + } + break; + + case 396: +/* Line 1792 of yacc.c */ +#line 2533 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + } + break; + + case 397: +/* Line 1792 of yacc.c */ +#line 2539 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + } + break; + + case 398: +/* Line 1792 of yacc.c */ +#line 2542 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = 0; + } + break; + + case 399: +/* Line 1792 of yacc.c */ +#line 2548 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); + (yyval.interm.nodePair).node2 = 0; + } + break; + + case 400: +/* Line 1792 of yacc.c */ +#line 2552 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); + } + break; + + case 401: +/* Line 1792 of yacc.c */ +#line 2559 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if (parseContext.loopNestingLevel <= 0) + parseContext.error((yyvsp[(1) - (2)].lex).loc, "continue statement only allowed in loops", "", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[(1) - (2)].lex).loc); + } + break; + + case 402: +/* Line 1792 of yacc.c */ +#line 2564 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) + parseContext.error((yyvsp[(1) - (2)].lex).loc, "break statement only allowed in switch and loops", "", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[(1) - (2)].lex).loc); + } + break; + + case 403: +/* Line 1792 of yacc.c */ +#line 2569 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).loc); + if (parseContext.currentFunctionType->getBasicType() != EbtVoid) + parseContext.error((yyvsp[(1) - (2)].lex).loc, "non-void function must return a value", "return", ""); + if (parseContext.inMain) + parseContext.postMainReturn = true; + } + break; + + case 404: +/* Line 1792 of yacc.c */ +#line 2576 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.functionReturnsValue = true; + if (parseContext.currentFunctionType->getBasicType() == EbtVoid) { + parseContext.error((yyvsp[(1) - (3)].lex).loc, "void function cannot return a value", "return", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[(1) - (3)].lex).loc); + } else if (*(parseContext.currentFunctionType) != (yyvsp[(2) - (3)].interm.intermTypedNode)->getType()) { + TIntermTyped* converted = parseContext.intermediate.addConversion(EOpReturn, *parseContext.currentFunctionType, (yyvsp[(2) - (3)].interm.intermTypedNode)); + if (converted) { + if (parseContext.version < 420) + parseContext.warn((yyvsp[(1) - (3)].lex).loc, "type conversion on return values was not explicitly allowed until version 420", "return", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, converted, (yyvsp[(1) - (3)].lex).loc); + } else { + parseContext.error((yyvsp[(1) - (3)].lex).loc, "type does not match, or is not convertible to, the function's return type", "return", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).loc); + } + } else + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).loc); + } + break; + + case 405: +/* Line 1792 of yacc.c */ +#line 2594 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[(1) - (2)].lex).loc, EShLangFragment, "discard"); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).loc); + } + break; + + case 406: +/* Line 1792 of yacc.c */ +#line 2603 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); + } + break; + + case 407: +/* Line 1792 of yacc.c */ +#line 2607 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode)); + parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); + } + break; + + case 408: +/* Line 1792 of yacc.c */ +#line 2614 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + } + break; + + case 409: +/* Line 1792 of yacc.c */ +#line 2617 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + } + break; + + case 410: +/* Line 1792 of yacc.c */ +#line 2623 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + (yyvsp[(1) - (1)].interm).function = parseContext.handleFunctionDeclarator((yyvsp[(1) - (1)].interm).loc, *(yyvsp[(1) - (1)].interm).function, false /* not prototype */); + (yyvsp[(1) - (1)].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[(1) - (1)].interm).loc, *(yyvsp[(1) - (1)].interm).function); + } + break; + + case 411: +/* Line 1792 of yacc.c */ +#line 2627 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + { + // May be best done as post process phase on intermediate code + if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) + parseContext.error((yyvsp[(1) - (3)].interm).loc, "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str()); + parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermNode)); + parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[(1) - (3)].interm).function->getType(), (yyvsp[(1) - (3)].interm).loc); + (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str()); + + // store the pragma information for debug and optimize and other vendor specific + // information. This information can be queried from the parse tree + (yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); + (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug); + (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); + } + break; + + +/* Line 1792 of yacc.c */ +#line 7558 "C:/Projects/glslang/glslang/MachineIndependent/glslang_tab.cpp" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (pParseContext, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (pParseContext, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, pParseContext); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, pParseContext); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (pParseContext, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, pParseContext); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, pParseContext); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +/* Line 2055 of yacc.c */ +#line 2644 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + diff --git a/glslang/MachineIndependent/glslang_tab.cpp.h b/glslang/MachineIndependent/glslang_tab.cpp.h new file mode 100644 index 00000000..0c6ab3bc --- /dev/null +++ b/glslang/MachineIndependent/glslang_tab.cpp.h @@ -0,0 +1,370 @@ +/* A Bison parser, made by GNU Bison 2.7. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_YY_C_PROJECTS_GLSLANG_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +# define YY_YY_C_PROJECTS_GLSLANG_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + ATTRIBUTE = 258, + VARYING = 259, + CONST = 260, + BOOL = 261, + FLOAT = 262, + DOUBLE = 263, + INT = 264, + UINT = 265, + BREAK = 266, + CONTINUE = 267, + DO = 268, + ELSE = 269, + FOR = 270, + IF = 271, + DISCARD = 272, + RETURN = 273, + SWITCH = 274, + CASE = 275, + DEFAULT = 276, + SUBROUTINE = 277, + BVEC2 = 278, + BVEC3 = 279, + BVEC4 = 280, + IVEC2 = 281, + IVEC3 = 282, + IVEC4 = 283, + UVEC2 = 284, + UVEC3 = 285, + UVEC4 = 286, + VEC2 = 287, + VEC3 = 288, + VEC4 = 289, + MAT2 = 290, + MAT3 = 291, + MAT4 = 292, + CENTROID = 293, + IN = 294, + OUT = 295, + INOUT = 296, + UNIFORM = 297, + PATCH = 298, + SAMPLE = 299, + BUFFER = 300, + SHARED = 301, + COHERENT = 302, + VOLATILE = 303, + RESTRICT = 304, + READONLY = 305, + WRITEONLY = 306, + DVEC2 = 307, + DVEC3 = 308, + DVEC4 = 309, + DMAT2 = 310, + DMAT3 = 311, + DMAT4 = 312, + NOPERSPECTIVE = 313, + FLAT = 314, + SMOOTH = 315, + LAYOUT = 316, + MAT2X2 = 317, + MAT2X3 = 318, + MAT2X4 = 319, + MAT3X2 = 320, + MAT3X3 = 321, + MAT3X4 = 322, + MAT4X2 = 323, + MAT4X3 = 324, + MAT4X4 = 325, + DMAT2X2 = 326, + DMAT2X3 = 327, + DMAT2X4 = 328, + DMAT3X2 = 329, + DMAT3X3 = 330, + DMAT3X4 = 331, + DMAT4X2 = 332, + DMAT4X3 = 333, + DMAT4X4 = 334, + ATOMIC_UINT = 335, + SAMPLER1D = 336, + SAMPLER2D = 337, + SAMPLER3D = 338, + SAMPLERCUBE = 339, + SAMPLER1DSHADOW = 340, + SAMPLER2DSHADOW = 341, + SAMPLERCUBESHADOW = 342, + SAMPLER1DARRAY = 343, + SAMPLER2DARRAY = 344, + SAMPLER1DARRAYSHADOW = 345, + SAMPLER2DARRAYSHADOW = 346, + ISAMPLER1D = 347, + ISAMPLER2D = 348, + ISAMPLER3D = 349, + ISAMPLERCUBE = 350, + ISAMPLER1DARRAY = 351, + ISAMPLER2DARRAY = 352, + USAMPLER1D = 353, + USAMPLER2D = 354, + USAMPLER3D = 355, + USAMPLERCUBE = 356, + USAMPLER1DARRAY = 357, + USAMPLER2DARRAY = 358, + SAMPLER2DRECT = 359, + SAMPLER2DRECTSHADOW = 360, + ISAMPLER2DRECT = 361, + USAMPLER2DRECT = 362, + SAMPLERBUFFER = 363, + ISAMPLERBUFFER = 364, + USAMPLERBUFFER = 365, + SAMPLERCUBEARRAY = 366, + SAMPLERCUBEARRAYSHADOW = 367, + ISAMPLERCUBEARRAY = 368, + USAMPLERCUBEARRAY = 369, + SAMPLER2DMS = 370, + ISAMPLER2DMS = 371, + USAMPLER2DMS = 372, + SAMPLER2DMSARRAY = 373, + ISAMPLER2DMSARRAY = 374, + USAMPLER2DMSARRAY = 375, + SAMPLEREXTERNALOES = 376, + SAMPLER = 377, + SAMPLERSHADOW = 378, + TEXTURE1D = 379, + TEXTURE2D = 380, + TEXTURE3D = 381, + TEXTURECUBE = 382, + TEXTURE1DARRAY = 383, + TEXTURE2DARRAY = 384, + ITEXTURE1D = 385, + ITEXTURE2D = 386, + ITEXTURE3D = 387, + ITEXTURECUBE = 388, + ITEXTURE1DARRAY = 389, + ITEXTURE2DARRAY = 390, + UTEXTURE1D = 391, + UTEXTURE2D = 392, + UTEXTURE3D = 393, + UTEXTURECUBE = 394, + UTEXTURE1DARRAY = 395, + UTEXTURE2DARRAY = 396, + TEXTURE2DRECT = 397, + ITEXTURE2DRECT = 398, + UTEXTURE2DRECT = 399, + TEXTUREBUFFER = 400, + ITEXTUREBUFFER = 401, + UTEXTUREBUFFER = 402, + TEXTURECUBEARRAY = 403, + ITEXTURECUBEARRAY = 404, + UTEXTURECUBEARRAY = 405, + TEXTURE2DMS = 406, + ITEXTURE2DMS = 407, + UTEXTURE2DMS = 408, + TEXTURE2DMSARRAY = 409, + ITEXTURE2DMSARRAY = 410, + UTEXTURE2DMSARRAY = 411, + SUBPASSINPUT = 412, + SUBPASSINPUTMS = 413, + ISUBPASSINPUT = 414, + ISUBPASSINPUTMS = 415, + USUBPASSINPUT = 416, + USUBPASSINPUTMS = 417, + IMAGE1D = 418, + IIMAGE1D = 419, + UIMAGE1D = 420, + IMAGE2D = 421, + IIMAGE2D = 422, + UIMAGE2D = 423, + IMAGE3D = 424, + IIMAGE3D = 425, + UIMAGE3D = 426, + IMAGE2DRECT = 427, + IIMAGE2DRECT = 428, + UIMAGE2DRECT = 429, + IMAGECUBE = 430, + IIMAGECUBE = 431, + UIMAGECUBE = 432, + IMAGEBUFFER = 433, + IIMAGEBUFFER = 434, + UIMAGEBUFFER = 435, + IMAGE1DARRAY = 436, + IIMAGE1DARRAY = 437, + UIMAGE1DARRAY = 438, + IMAGE2DARRAY = 439, + IIMAGE2DARRAY = 440, + UIMAGE2DARRAY = 441, + IMAGECUBEARRAY = 442, + IIMAGECUBEARRAY = 443, + UIMAGECUBEARRAY = 444, + IMAGE2DMS = 445, + IIMAGE2DMS = 446, + UIMAGE2DMS = 447, + IMAGE2DMSARRAY = 448, + IIMAGE2DMSARRAY = 449, + UIMAGE2DMSARRAY = 450, + STRUCT = 451, + VOID = 452, + WHILE = 453, + IDENTIFIER = 454, + TYPE_NAME = 455, + FLOATCONSTANT = 456, + DOUBLECONSTANT = 457, + INTCONSTANT = 458, + UINTCONSTANT = 459, + BOOLCONSTANT = 460, + LEFT_OP = 461, + RIGHT_OP = 462, + INC_OP = 463, + DEC_OP = 464, + LE_OP = 465, + GE_OP = 466, + EQ_OP = 467, + NE_OP = 468, + AND_OP = 469, + OR_OP = 470, + XOR_OP = 471, + MUL_ASSIGN = 472, + DIV_ASSIGN = 473, + ADD_ASSIGN = 474, + MOD_ASSIGN = 475, + LEFT_ASSIGN = 476, + RIGHT_ASSIGN = 477, + AND_ASSIGN = 478, + XOR_ASSIGN = 479, + OR_ASSIGN = 480, + SUB_ASSIGN = 481, + LEFT_PAREN = 482, + RIGHT_PAREN = 483, + LEFT_BRACKET = 484, + RIGHT_BRACKET = 485, + LEFT_BRACE = 486, + RIGHT_BRACE = 487, + DOT = 488, + COMMA = 489, + COLON = 490, + EQUAL = 491, + SEMICOLON = 492, + BANG = 493, + DASH = 494, + TILDE = 495, + PLUS = 496, + STAR = 497, + SLASH = 498, + PERCENT = 499, + LEFT_ANGLE = 500, + RIGHT_ANGLE = 501, + VERTICAL_BAR = 502, + CARET = 503, + AMPERSAND = 504, + QUESTION = 505, + INVARIANT = 506, + PRECISE = 507, + HIGH_PRECISION = 508, + MEDIUM_PRECISION = 509, + LOW_PRECISION = 510, + PRECISION = 511, + PACKED = 512, + RESOURCE = 513, + SUPERP = 514 + }; +#endif + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ +/* Line 2058 of yacc.c */ +#line 66 "C:/Projects/glslang/glslang/MachineIndependent/glslang.y" + + struct { + glslang::TSourceLoc loc; + union { + glslang::TString *string; + int i; + unsigned int u; + bool b; + double d; + }; + glslang::TSymbol* symbol; + } lex; + struct { + glslang::TSourceLoc loc; + glslang::TOperator op; + union { + TIntermNode* intermNode; + glslang::TIntermNodePair nodePair; + glslang::TIntermTyped* intermTypedNode; + }; + union { + glslang::TPublicType type; + glslang::TFunction* function; + glslang::TParameter param; + glslang::TTypeLoc typeLine; + glslang::TTypeList* typeList; + glslang::TArraySizes* arraySizes; + glslang::TIdentifierList* identifierList; + }; + } interm; + + +/* Line 2058 of yacc.c */ +#line 349 "C:/Projects/glslang/glslang/MachineIndependent/glslang_tab.cpp.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (glslang::TParseContext* pParseContext); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_YY_C_PROJECTS_GLSLANG_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ From 395b7dd3f5dd738998d97f78469885debb901c92 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 1 Jan 2016 01:21:56 +0100 Subject: [PATCH 76/84] Remove custom command for bison, it fails if bison is not found --- glslang/CMakeLists.txt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 803203df..9725eccf 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -64,22 +64,6 @@ set(HEADERS MachineIndependent/preprocessor/PpContext.h MachineIndependent/preprocessor/PpTokens.h) -find_package(BISON) -if(NOT BISON_FOUND) - if (WIN32) - set(BISON_EXECUTABLE ../tools/bison.exe) - message("bison not found. Assuming it is at ${BISON_EXECUTABLE}") - else() - message(FATAL_ERROR "bison required but not found. Please install via your package management tool.") - endif() -endif() - -# Always use a custom command since our use of --defines isn't assumed by CMake's BISON_TARGET, -# which ends up causing the target to always be rebuilt. -add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h - COMMAND ${BISON_EXECUTABLE} --defines=${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -t ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang.y -o ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp - MAIN_DEPENDENCY MachineIndependent/glslang.y - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) From 8e3f4c2d6681eacdc9c976a59b917313f3d073fc Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Tue, 1 Mar 2016 08:43:17 -0700 Subject: [PATCH 77/84] Syntax: correct spelling of rgb10_a2ui. --- glslang/Include/Types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 1d78130a..c88bca67 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -786,7 +786,7 @@ public: case ElfRgba8ui: return "rgba8ui"; case ElfRg32ui: return "rg32ui"; case ElfRg16ui: return "rg16ui"; - case ElfRgb10a2ui: return "rgb10a2ui"; + case ElfRgb10a2ui: return "rgb10_a2ui"; case ElfRg8ui: return "rg8ui"; case ElfR32ui: return "r32ui"; case ElfR16ui: return "r16ui"; From b4fd8d10f0012d8476ea5dba3ae176e554e48f48 Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Thu, 3 Mar 2016 14:38:51 +0800 Subject: [PATCH 78/84] SPV: Continue to fix the issue of bool -> uint32 For short-circuit operator (&& and ||), the conversion is missing. --- SPIRV/GlslangToSpv.cpp | 4 +- Test/baseResults/spv.boolInBlock.frag.out | 49 ++++++++++++++++++++++- Test/spv.boolInBlock.frag | 5 +++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 81f7cc1c..97739c06 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -3876,7 +3876,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan // emit left operand builder.clearAccessChain(); left.traverse(this); - spv::Id leftId = builder.accessChainLoad(spv::NoPrecision, boolTypeId); + spv::Id leftId = accessChainLoad(left.getType()); // Operands to accumulate OpPhi operands std::vector phiOperands; @@ -3899,7 +3899,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan // emit right operand as the "then" part of the "if" builder.clearAccessChain(); right.traverse(this); - spv::Id rightId = builder.accessChainLoad(spv::NoPrecision, boolTypeId); + spv::Id rightId = accessChainLoad(right.getType()); // accumulate left operand's phi information phiOperands.push_back(rightId); diff --git a/Test/baseResults/spv.boolInBlock.frag.out b/Test/baseResults/spv.boolInBlock.frag.out index e49d0678..6e7cf40e 100644 --- a/Test/baseResults/spv.boolInBlock.frag.out +++ b/Test/baseResults/spv.boolInBlock.frag.out @@ -7,12 +7,12 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 72 +// Id's are bound by 107 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" + EntryPoint Fragment 4 "main" 75 ExecutionMode 4 OriginUpperLeft Source GLSL 450 Name 4 "main" @@ -28,6 +28,7 @@ Linked fragment stage: Name 41 "" Name 62 "param" Name 67 "param" + Name 75 "fragColor" MemberDecorate 24(Buffer) 0 Offset 0 Decorate 24(Buffer) BufferBlock Decorate 26 DescriptorSet 0 @@ -36,6 +37,7 @@ Linked fragment stage: Decorate 39(Uniform) Block Decorate 41 DescriptorSet 0 Decorate 41 Binding 0 + Decorate 75(fragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeBool @@ -65,6 +67,12 @@ Linked fragment stage: 41: 40(ptr) Variable Uniform 42: TypePointer Uniform 38(ivec4) 65: 38(ivec4) ConstantComposite 31 31 31 31 + 72: TypeFloat 32 + 73: TypeVector 72(float) 4 + 74: TypePointer Output 73(fvec4) + 75(fragColor): 74(ptr) Variable Output + 87: 72(float) Constant 0 + 88: 72(float) Constant 1065353216 4(main): 2 Function None 3 5: Label 62(param): 8(ptr) Variable Function @@ -107,6 +115,43 @@ Linked fragment stage: Store 71 70 Branch 61 61: Label + 76: 42(ptr) AccessChain 41 28 + 77: 38(ivec4) Load 76 + 78: 22(int) CompositeExtract 77 0 + 79: 6(bool) INotEqual 78 31 + SelectionMerge 81 None + BranchConditional 79 80 81 + 80: Label + 82: 42(ptr) AccessChain 41 28 + 83: 38(ivec4) Load 82 + 84: 22(int) CompositeExtract 83 1 + 85: 6(bool) INotEqual 84 31 + Branch 81 + 81: Label + 86: 6(bool) Phi 79 61 85 80 + 89: 72(float) Select 86 88 87 + 90: 73(fvec4) CompositeConstruct 89 89 89 89 + Store 75(fragColor) 90 + 91: 42(ptr) AccessChain 41 28 + 92: 38(ivec4) Load 91 + 93: 22(int) CompositeExtract 92 0 + 94: 6(bool) INotEqual 93 31 + 95: 6(bool) LogicalNot 94 + SelectionMerge 97 None + BranchConditional 95 96 97 + 96: Label + 98: 42(ptr) AccessChain 41 28 + 99: 38(ivec4) Load 98 + 100: 22(int) CompositeExtract 99 1 + 101: 6(bool) INotEqual 100 31 + Branch 97 + 97: Label + 102: 6(bool) Phi 94 81 101 96 + 103: 72(float) Select 102 88 87 + 104: 73(fvec4) CompositeConstruct 103 103 103 103 + 105: 73(fvec4) Load 75(fragColor) + 106: 73(fvec4) FSub 105 104 + Store 75(fragColor) 106 Return FunctionEnd 14(foo(vb4;vb2;): 2 Function None 11 diff --git a/Test/spv.boolInBlock.frag b/Test/spv.boolInBlock.frag index 96b2de0e..a4f62fae 100644 --- a/Test/spv.boolInBlock.frag +++ b/Test/spv.boolInBlock.frag @@ -16,6 +16,8 @@ void foo(bvec4 paramb4, out bvec2 paramb2) paramb2 = bvec2(b1); } +layout(location = 0) out vec4 fragColor; + void main() { b2 = bvec2(0.0); @@ -23,4 +25,7 @@ void main() b2 = bvec2(b4.x); if (b2.x) foo(b4, b2); + + fragColor = vec4(b4.x && b4.y); + fragColor -= vec4(b4.x || b4.y); } \ No newline at end of file From 5dc8a76265ee31733b5a765e034ad7f5097a3cbe Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 3 Mar 2016 12:12:07 -0500 Subject: [PATCH 79/84] Fix line endings in Test/100.conf. --- Test/100.conf | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Test/100.conf b/Test/100.conf index 29b9b63d..3899d343 100644 --- a/Test/100.conf +++ b/Test/100.conf @@ -1,28 +1,28 @@ -MaxLights 32 -MaxClipPlanes 6 -MaxTextureUnits 32 -MaxTextureCoords 32 -MaxVertexAttribs 8 -MaxVertexUniformComponents 4096 -MaxVaryingFloats 64 -MaxVertexTextureImageUnits 0 -MaxCombinedTextureImageUnits 8 -MaxTextureImageUnits 8 -MaxFragmentUniformComponents 4096 -MaxDrawBuffers 1 -MaxVertexUniformVectors 16 -MaxVaryingVectors 8 -MaxFragmentUniformVectors 16 -MaxVertexOutputVectors 16 -MaxFragmentInputVectors 15 -MinProgramTexelOffset -8 -MaxProgramTexelOffset 7 -nonInductiveForLoops 0 -whileLoops 0 -doWhileLoops 0 -generalUniformIndexing 0 -generalAttributeMatrixVectorIndexing 0 -generalVaryingIndexing 0 -generalSamplerIndexing 0 -generalVariableIndexing 0 -generalConstantMatrixVectorIndexing 0 +MaxLights 32 +MaxClipPlanes 6 +MaxTextureUnits 32 +MaxTextureCoords 32 +MaxVertexAttribs 8 +MaxVertexUniformComponents 4096 +MaxVaryingFloats 64 +MaxVertexTextureImageUnits 0 +MaxCombinedTextureImageUnits 8 +MaxTextureImageUnits 8 +MaxFragmentUniformComponents 4096 +MaxDrawBuffers 1 +MaxVertexUniformVectors 16 +MaxVaryingVectors 8 +MaxFragmentUniformVectors 16 +MaxVertexOutputVectors 16 +MaxFragmentInputVectors 15 +MinProgramTexelOffset -8 +MaxProgramTexelOffset 7 +nonInductiveForLoops 0 +whileLoops 0 +doWhileLoops 0 +generalUniformIndexing 0 +generalAttributeMatrixVectorIndexing 0 +generalVaryingIndexing 0 +generalSamplerIndexing 0 +generalVariableIndexing 0 +generalConstantMatrixVectorIndexing 0 From f2d8a5c53fda69a7e19defbda7964f380da54ad1 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Thu, 3 Mar 2016 22:29:11 -0700 Subject: [PATCH 80/84] SPV: Use heuristic to avoid geometry multi-streams when possible. --- SPIRV/GlslangToSpv.cpp | 4 ++-- Test/baseResults/spv.330.geom.out | 3 --- glslang/MachineIndependent/ParseHelper.cpp | 7 +++++++ glslang/MachineIndependent/localintermediate.h | 6 +++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 212d45b9..5eb097bd 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1803,7 +1803,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // Decorate the structure addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); addDecoration(spvType, TranslateBlockDecoration(type)); - if (type.getQualifier().hasStream()) { + if (type.getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(spvType, spv::DecorationStream, type.getQualifier().layoutStream); } @@ -3599,7 +3599,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier())); - if (symbol->getQualifier().hasStream()) { + if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(id, spv::DecorationStream, symbol->getQualifier().layoutStream); } diff --git a/Test/baseResults/spv.330.geom.out b/Test/baseResults/spv.330.geom.out index 55ee35c8..3077769a 100755 --- a/Test/baseResults/spv.330.geom.out +++ b/Test/baseResults/spv.330.geom.out @@ -9,7 +9,6 @@ Linked geometry stage: Capability Geometry Capability ClipDistance - Capability GeometryStreams 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Geometry 4 "main" 13 20 @@ -31,8 +30,6 @@ Linked geometry stage: MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position MemberDecorate 11(gl_PerVertex) 1 BuiltIn ClipDistance Decorate 11(gl_PerVertex) Block - Decorate 11(gl_PerVertex) Stream 0 - Decorate 13 Stream 0 MemberDecorate 16(gl_PerVertex) 0 BuiltIn Position MemberDecorate 16(gl_PerVertex) 1 BuiltIn ClipDistance Decorate 16(gl_PerVertex) Block diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index b97c96c2..03370b88 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1524,6 +1524,11 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; + case EOpEmitStreamVertex: + case EOpEndStreamPrimitive: + intermediate.setMultiStream(); + break; + default: break; } @@ -4050,6 +4055,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi if (id == "stream") { requireProfile(loc, ~EEsProfile, "selecting output stream"); publicType.qualifier.layoutStream = value; + if (value > 0) + intermediate.setMultiStream(); return; } break; diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 60bf68ed..99267475 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -128,7 +128,8 @@ public: numMains(0), numErrors(0), numPushConstants(0), recursive(false), invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false), - vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), depthLayout(EldNone), depthReplacing(false), blendEquations(0), xfbMode(false) + vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), depthLayout(EldNone), depthReplacing(false), blendEquations(0), + multiStream(false), xfbMode(false) { localSize[0] = 1; localSize[1] = 1; @@ -271,6 +272,8 @@ public: void setXfbMode() { xfbMode = true; } bool getXfbMode() const { return xfbMode; } + void setMultiStream() { multiStream = true; } + bool isMultiStream() const { return multiStream; } bool setOutputPrimitive(TLayoutGeometry p) { if (outputPrimitive != ElgNone) @@ -361,6 +364,7 @@ protected: bool depthReplacing; int blendEquations; // an 'or'ing of masks of shifts of TBlendEquationShift bool xfbMode; + bool multiStream; typedef std::list TGraph; TGraph callGraph; From 84ecb413aceaace929bdf8329cf02daf64ceb62a Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sun, 6 Mar 2016 15:37:56 -0700 Subject: [PATCH 81/84] Infrastructure: Tweak CMake for 31c294cea86ae0115820f2a02c5a33cfca662a26, removal of bison. --- glslang/CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 9725eccf..28f4742c 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -5,11 +5,12 @@ if(WIN32) elseif(UNIX) add_subdirectory(OSDependent/Unix) else(WIN32) - message("unkown platform") + message("unknown platform") endif(WIN32) set(SOURCES MachineIndependent/glslang.y + MachineIndependent/glslang_tab.cpp MachineIndependent/Constant.cpp MachineIndependent/InfoSink.cpp MachineIndependent/Initialize.cpp @@ -51,6 +52,7 @@ set(HEADERS Include/revision.h Include/ShHandle.h Include/Types.h + MachineIndependent/glslang_tab.cpp.h MachineIndependent/gl_types.h MachineIndependent/Initialize.h MachineIndependent/localintermediate.h @@ -64,14 +66,20 @@ set(HEADERS MachineIndependent/preprocessor/PpContext.h MachineIndependent/preprocessor/PpTokens.h) -set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) +# This might be useful for making grammar changes: +# +# find_package(BISON) +# add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h +# COMMAND ${BISON_EXECUTABLE} --defines=${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -t ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang.y -o ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp +# MAIN_DEPENDENCY MachineIndependent/glslang.y +# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +# set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) if(WIN32) source_group("Public" REGULAR_EXPRESSION "Public/*") source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*") - source_group("Generated Files" FILES MachineIndependent/glslang_tab.cpp MachineIndependent/glslang_tab.cpp.h) source_group("Include" REGULAR_EXPRESSION "Include/[^/]*") source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*") source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*") From 3d7b89a87268c3ae828b6206920d6b3aa46e2437 Mon Sep 17 00:00:00 2001 From: qining Date: Mon, 7 Mar 2016 21:32:15 -0500 Subject: [PATCH 82/84] Enable adding capability: MultiViewport Fix issue #191: https://github.com/KhronosGroup/glslang/issues/191 --- SPIRV/GlslangToSpv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 5eb097bd..7c97e8bd 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -366,7 +366,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInCullDistance; case glslang::EbvViewportIndex: - // TODO: builder.addCapability(spv::CapabilityMultiViewport); + builder.addCapability(spv::CapabilityMultiViewport); return spv::BuiltInViewportIndex; case glslang::EbvSampleId: From be4f52a48414194eabe951cf7f4ffc4bd3c7904a Mon Sep 17 00:00:00 2001 From: qining Date: Mon, 7 Mar 2016 23:05:59 -0500 Subject: [PATCH 83/84] Run regression tests, update spv.420.geom.out so capability MultiViewport is declared --- Test/baseResults/spv.420.geom.out | 1 + 1 file changed, 1 insertion(+) diff --git a/Test/baseResults/spv.420.geom.out b/Test/baseResults/spv.420.geom.out index 09fffb8e..cb535599 100644 --- a/Test/baseResults/spv.420.geom.out +++ b/Test/baseResults/spv.420.geom.out @@ -12,6 +12,7 @@ Linked geometry stage: Capability Geometry Capability GeometryPointSize Capability GeometryStreams + Capability MultiViewport 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Geometry 4 "main" 14 23 28 33 46 From f7497e289bcd214e33fbf29a34b693acb82a0fb0 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Tue, 8 Mar 2016 21:36:22 -0700 Subject: [PATCH 84/84] SPV: Issue #180: push_constants don't have descriptor sets. --- SPIRV/GlslangToSpv.cpp | 4 ++-- Test/baseResults/spv.pushConstant.vert.out | 1 - Test/baseResults/vulkan.vert.out | 3 ++- Test/vulkan.vert | 4 +++- glslang/MachineIndependent/ParseHelper.cpp | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 1676b9d8..1a8ba449 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -521,9 +521,9 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy // descriptor set. bool IsDescriptorResource(const glslang::TType& type) { - // uniform and buffer blocks are included + // uniform and buffer blocks are included, unless it is a push_constant if (type.getBasicType() == glslang::EbtBlock) - return type.getQualifier().isUniformOrBuffer(); + return type.getQualifier().isUniformOrBuffer() && ! type.getQualifier().layoutPushConstant; // non block... // basically samplerXXX/subpass/sampler/texture are all included diff --git a/Test/baseResults/spv.pushConstant.vert.out b/Test/baseResults/spv.pushConstant.vert.out index aff99ae9..6b314e08 100644 --- a/Test/baseResults/spv.pushConstant.vert.out +++ b/Test/baseResults/spv.pushConstant.vert.out @@ -24,7 +24,6 @@ Linked vertex stage: MemberDecorate 11(Material) 0 Offset 0 MemberDecorate 11(Material) 1 Offset 4 Decorate 11(Material) Block - Decorate 13(matInst) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 diff --git a/Test/baseResults/vulkan.vert.out b/Test/baseResults/vulkan.vert.out index 1e70b5b2..0cac808f 100644 --- a/Test/baseResults/vulkan.vert.out +++ b/Test/baseResults/vulkan.vert.out @@ -22,7 +22,8 @@ ERROR: 0:25: 'packed' : not allowed when using GLSL for Vulkan ERROR: 0:32: 'initializer' : can't use with types containing arrays sized with a specialization constant ERROR: 0:34: '=' : can't use with types containing arrays sized with a specialization constant ERROR: 0:35: '==' : can't use with types containing arrays sized with a specialization constant -ERROR: 22 compilation errors. No code generated. +ERROR: 0:39: 'set' : cannot be used with push_constant +ERROR: 23 compilation errors. No code generated. diff --git a/Test/vulkan.vert b/Test/vulkan.vert index a4ee9cd1..ad33a53b 100644 --- a/Test/vulkan.vert +++ b/Test/vulkan.vert @@ -34,4 +34,6 @@ void foo() a1 = a2; // ERROR, can't assign, even though the same type if (a1 == a2) // ERROR, can't compare either ++color; -} \ No newline at end of file +} + +layout(set = 1, push_constant) uniform badpc { int a; } badpcI; // ERROR, no descriptor set with push_constant diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 03370b88..8cee3e4b 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -4483,6 +4483,8 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier if (qualifier.layoutPushConstant) { if (qualifier.storage != EvqUniform) error(loc, "can only be used with a uniform", "push_constant", ""); + if (qualifier.hasSet()) + error(loc, "cannot be used with push_constant", "set", ""); } }