John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 1 | // |
John Kessenich | 927608b | 2017-01-06 12:34:14 -0700 | [diff] [blame] | 2 | // Copyright (C) 2016 Google, Inc. |
| 3 | // Copyright (C) 2016 LunarG, Inc. |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 4 | // |
John Kessenich | 927608b | 2017-01-06 12:34:14 -0700 | [diff] [blame] | 5 | // All rights reserved. |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 6 | // |
John Kessenich | 927608b | 2017-01-06 12:34:14 -0700 | [diff] [blame] | 7 | // Redistribution and use in source and binary forms, with or without |
| 8 | // modification, are permitted provided that the following conditions |
| 9 | // are met: |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 10 | // |
| 11 | // Redistributions of source code must retain the above copyright |
| 12 | // notice, this list of conditions and the following disclaimer. |
| 13 | // |
| 14 | // Redistributions in binary form must reproduce the above |
| 15 | // copyright notice, this list of conditions and the following |
| 16 | // disclaimer in the documentation and/or other materials provided |
| 17 | // with the distribution. |
| 18 | // |
| 19 | // Neither the name of 3Dlabs Inc. Ltd. nor the names of its |
| 20 | // contributors may be used to endorse or promote products derived |
| 21 | // from this software without specific prior written permission. |
| 22 | // |
John Kessenich | 927608b | 2017-01-06 12:34:14 -0700 | [diff] [blame] | 23 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 24 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 25 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 26 | // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 27 | // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 28 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 29 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 30 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 31 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 32 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 33 | // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 34 | // POSSIBILITY OF SUCH DAMAGE. |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 35 | // |
| 36 | #ifndef HLSL_PARSE_INCLUDED_ |
| 37 | #define HLSL_PARSE_INCLUDED_ |
| 38 | |
| 39 | #include "../glslang/MachineIndependent/parseVersions.h" |
| 40 | #include "../glslang/MachineIndependent/ParseHelper.h" |
| 41 | |
| 42 | namespace glslang { |
| 43 | |
steve-lunarg | 1868b14 | 2016-10-20 13:07:10 -0600 | [diff] [blame] | 44 | class TAttributeMap; // forward declare |
John Kessenich | 0a2a0cd | 2017-05-16 23:16:26 -0600 | [diff] [blame] | 45 | class TFunctionDeclarator; |
steve-lunarg | 1868b14 | 2016-10-20 13:07:10 -0600 | [diff] [blame] | 46 | |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 47 | class HlslParseContext : public TParseContextBase { |
| 48 | public: |
| 49 | HlslParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins, |
John Kessenich | b901ade | 2016-06-16 20:59:42 -0600 | [diff] [blame] | 50 | int version, EProfile, const SpvVersion& spvVersion, EShLanguage, TInfoSink&, |
steve-lunarg | f1e0c87 | 2016-10-31 15:13:43 -0600 | [diff] [blame] | 51 | const TString sourceEntryPointName, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 52 | bool forwardCompatible = false, EShMessages messages = EShMsgDefault); |
| 53 | virtual ~HlslParseContext(); |
Henrik Rydgård | 9a931b3 | 2016-12-21 12:48:08 +0100 | [diff] [blame] | 54 | void initializeExtensionBehavior() override; |
LoopDawg | 6256146 | 2016-07-22 20:46:03 -0600 | [diff] [blame] | 55 | |
Henrik Rydgård | 9a931b3 | 2016-12-21 12:48:08 +0100 | [diff] [blame] | 56 | void setLimits(const TBuiltInResource&) override; |
| 57 | bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override; |
John Kessenich | 000c818 | 2017-03-22 23:21:34 -0600 | [diff] [blame] | 58 | virtual const char* getGlobalUniformBlockName() const override { return "$Global"; } |
| 59 | virtual void setUniformBlockDefaults(TType& block) const override |
| 60 | { |
| 61 | block.getQualifier().layoutPacking = ElpStd140; |
| 62 | block.getQualifier().layoutMatrix = ElmRowMajor; |
| 63 | } |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 64 | |
Henrik Rydgård | 9a931b3 | 2016-12-21 12:48:08 +0100 | [diff] [blame] | 65 | void reservedPpErrorCheck(const TSourceLoc&, const char* /*name*/, const char* /*op*/) override { } |
| 66 | bool lineContinuationCheck(const TSourceLoc&, bool /*endOfComment*/) override { return true; } |
| 67 | bool lineDirectiveShouldSetNextLine() const override { return true; } |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 68 | bool builtInName(const TString&); |
| 69 | |
Henrik Rydgård | 9a931b3 | 2016-12-21 12:48:08 +0100 | [diff] [blame] | 70 | void handlePragma(const TSourceLoc&, const TVector<TString>&) override; |
John Kessenich | f4ba25e | 2017-03-21 18:35:04 -0600 | [diff] [blame] | 71 | TIntermTyped* handleVariable(const TSourceLoc&, const TString* string); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 72 | TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); |
steve-lunarg | 6b43d27 | 2016-10-06 20:12:24 -0600 | [diff] [blame] | 73 | TIntermTyped* handleBracketOperator(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 74 | void checkIndex(const TSourceLoc&, const TType&, int& index); |
| 75 | |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 76 | TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right); |
| 77 | TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode); |
| 78 | TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field); |
John Kessenich | 5f12d2f | 2017-03-11 09:39:55 -0700 | [diff] [blame] | 79 | bool isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, const TString& field); |
John Kessenich | 54596ff | 2017-06-20 03:20:59 -0600 | [diff] [blame^] | 80 | void assignToInterface(TVariable& variable); |
John Kessenich | 088d52b | 2017-03-11 17:55:28 -0700 | [diff] [blame] | 81 | void handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype); |
John Kessenich | 02467d8 | 2017-01-19 15:41:47 -0700 | [diff] [blame] | 82 | TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributeMap&, TIntermNode*& entryPointTree); |
| 83 | TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributeMap&); |
steve-lunarg | e741249 | 2017-03-23 11:56:07 -0600 | [diff] [blame] | 84 | void handleEntryPointAttributes(const TSourceLoc&, const TAttributeMap&); |
John Kessenich | a305166 | 2016-09-02 19:13:36 -0600 | [diff] [blame] | 85 | void handleFunctionBody(const TSourceLoc&, TFunction&, TIntermNode* functionBody, TIntermNode*& node); |
John Kessenich | 727b374 | 2017-02-03 17:57:55 -0700 | [diff] [blame] | 86 | void remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector<TVariable*>& inputs, TVector<TVariable*>& outputs); |
John Kessenich | 6fccb3c | 2016-09-19 16:01:41 -0600 | [diff] [blame] | 87 | void remapNonEntryPointIO(TFunction& function); |
steve-lunarg | c4a1307 | 2016-08-09 11:28:03 -0600 | [diff] [blame] | 88 | TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*); |
John Kessenich | 4678ca9 | 2016-05-13 09:33:42 -0600 | [diff] [blame] | 89 | void handleFunctionArgument(TFunction*, TIntermTyped*& arguments, TIntermTyped* newArg); |
John Kessenich | fdf6347 | 2017-01-13 12:27:52 -0700 | [diff] [blame] | 90 | TIntermTyped* handleAssign(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); |
| 91 | TIntermTyped* handleAssignToMatrixSwizzle(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); |
steve-lunarg | 26d3145 | 2016-12-23 18:56:57 -0700 | [diff] [blame] | 92 | TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermTyped*); |
LoopDawg | 592860c | 2016-06-09 08:57:35 -0600 | [diff] [blame] | 93 | void decomposeIntrinsic(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); |
LoopDawg | 4886f69 | 2016-06-29 10:58:58 -0600 | [diff] [blame] | 94 | void decomposeSampleMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); |
steve-lunarg | 5da1f03 | 2017-02-12 17:50:28 -0700 | [diff] [blame] | 95 | void decomposeStructBufferMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); |
steve-lunarg | f49cdf4 | 2016-11-17 15:04:20 -0700 | [diff] [blame] | 96 | void decomposeGeometryMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); |
John Kessenich | 0a2a0cd | 2017-05-16 23:16:26 -0600 | [diff] [blame] | 97 | void pushFrontArguments(TIntermTyped* front, TIntermTyped*& arguments); |
steve-lunarg | 26d3145 | 2016-12-23 18:56:57 -0700 | [diff] [blame] | 98 | void addInputArgumentConversions(const TFunction&, TIntermTyped*&); |
John Kessenich | 750c2d0 | 2017-05-26 00:01:36 -0600 | [diff] [blame] | 99 | void expandArguments(const TSourceLoc&, const TFunction&, TIntermTyped*&); |
steve-lunarg | ef33ec0 | 2016-11-02 12:42:34 -0600 | [diff] [blame] | 100 | TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermOperator&); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 101 | void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&); |
John Kessenich | c633f64 | 2017-04-03 21:48:37 -0600 | [diff] [blame] | 102 | TFunction* makeConstructorCall(const TSourceLoc&, const TType&); |
John Kessenich | 2dd643f | 2017-03-14 21:50:06 -0600 | [diff] [blame] | 103 | void handleSemantic(TSourceLoc, TQualifier&, TBuiltInVariable, const TString& upperCase); |
John Kessenich | 7735b94 | 2016-09-05 12:40:06 -0600 | [diff] [blame] | 104 | void handlePackOffset(const TSourceLoc&, TQualifier&, const glslang::TString& location, |
John Kessenich | b38f071 | 2016-07-30 10:29:54 -0600 | [diff] [blame] | 105 | const glslang::TString* component); |
John Kessenich | 7735b94 | 2016-09-05 12:40:06 -0600 | [diff] [blame] | 106 | void handleRegister(const TSourceLoc&, TQualifier&, const glslang::TString* profile, const glslang::TString& desc, |
John Kessenich | cfd7ce8 | 2016-09-05 16:03:12 -0600 | [diff] [blame] | 107 | int subComponent, const glslang::TString*); |
John Kessenich | 636b62d | 2017-04-11 19:45:00 -0600 | [diff] [blame] | 108 | TIntermTyped* convertConditionalExpression(const TSourceLoc&, TIntermTyped*, bool mustBeScalar = true); |
LoopDawg | a2b7991 | 2016-07-14 14:45:14 -0600 | [diff] [blame] | 109 | TIntermAggregate* handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, TIntermTyped* argSampler); |
| 110 | |
John Kessenich | c142c88 | 2017-01-13 19:34:22 -0700 | [diff] [blame] | 111 | bool parseMatrixSwizzleSelector(const TSourceLoc&, const TString&, int cols, int rows, TSwizzleSelectors<TMatrixSelector>&); |
| 112 | int getMatrixComponentsColumn(int rows, const TSwizzleSelectors<TMatrixSelector>&); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 113 | void assignError(const TSourceLoc&, const char* op, TString left, TString right); |
| 114 | void unaryOpError(const TSourceLoc&, const char* op, TString operand); |
| 115 | void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right); |
| 116 | void variableCheck(TIntermTyped*& nodePtr); |
| 117 | void constantValueCheck(TIntermTyped* node, const char* token); |
| 118 | void integerCheck(const TIntermTyped* node, const char* token); |
| 119 | void globalCheck(const TSourceLoc&, const char* token); |
| 120 | bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&); |
| 121 | bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&); |
| 122 | void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&); |
| 123 | void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); |
| 124 | void structArrayCheck(const TSourceLoc&, const TType& structure); |
| 125 | void arrayDimMerge(TType& type, const TArraySizes* sizes); |
| 126 | bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 127 | void globalQualifierFix(const TSourceLoc&, TQualifier&); |
| 128 | bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); |
John Kessenich | 34e7ee7 | 2016-09-16 17:10:39 -0600 | [diff] [blame] | 129 | void mergeQualifiers(TQualifier& dst, const TQualifier& src); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 130 | int computeSamplerTypeIndex(TSampler&); |
John Kessenich | d3f1122 | 2016-11-05 10:15:53 -0600 | [diff] [blame] | 131 | TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 132 | void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes); |
John Kessenich | 5aa59e2 | 2016-06-17 15:50:47 -0600 | [diff] [blame] | 133 | void paramFix(TType& type); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 134 | void specializationCheck(const TSourceLoc&, const TType&, const char* op); |
| 135 | |
John Kessenich | b9e3912 | 2016-08-17 10:22:08 -0600 | [diff] [blame] | 136 | void setLayoutQualifier(const TSourceLoc&, TQualifier&, TString&); |
| 137 | void setLayoutQualifier(const TSourceLoc&, TQualifier&, TString&, const TIntermTyped*); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 138 | void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly); |
| 139 | void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&); |
| 140 | |
John Kessenich | 0a2a0cd | 2017-05-16 23:16:26 -0600 | [diff] [blame] | 141 | const TFunction* findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, int& thisDepth, TIntermTyped*& args); |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 142 | void declareTypedef(const TSourceLoc&, const TString& identifier, const TType&); |
John Kessenich | 727b374 | 2017-02-03 17:57:55 -0700 | [diff] [blame] | 143 | void declareStruct(const TSourceLoc&, TString& structName, TType&); |
John Kessenich | 854fe24 | 2017-03-02 14:30:59 -0700 | [diff] [blame] | 144 | TSymbol* lookupUserType(const TString&, TType&); |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 145 | TIntermNode* declareVariable(const TSourceLoc&, const TString& identifier, TType&, TIntermTyped* initializer = 0); |
John Kessenich | 82460b5 | 2017-04-04 11:47:42 -0600 | [diff] [blame] | 146 | void lengthenList(const TSourceLoc&, TIntermSequence& list, int size, TIntermTyped* scalarInit); |
John Kessenich | c633f64 | 2017-04-03 21:48:37 -0600 | [diff] [blame] | 147 | TIntermTyped* handleConstructor(const TSourceLoc&, TIntermTyped*, const TType&); |
| 148 | TIntermTyped* addConstructor(const TSourceLoc&, TIntermTyped*, const TType&); |
John Kessenich | 82ae8c3 | 2017-06-13 23:13:10 -0600 | [diff] [blame] | 149 | TIntermTyped* convertArray(TIntermTyped*, const TType&); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 150 | TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); |
| 151 | TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); |
John Kessenich | 3d157c5 | 2016-07-25 16:05:33 -0600 | [diff] [blame] | 152 | void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0, TArraySizes* arraySizes = 0); |
steve-lunarg | 8e26feb | 2017-04-10 08:19:21 -0600 | [diff] [blame] | 153 | void declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 154 | void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); |
| 155 | void fixBlockXfbOffsets(TQualifier&, TTypeList&); |
John Kessenich | 6dbc0a7 | 2016-09-27 19:13:05 -0600 | [diff] [blame] | 156 | void fixBlockUniformOffsets(const TQualifier&, TTypeList&); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 157 | void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier); |
| 158 | void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); |
| 159 | void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&); |
| 160 | void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); |
| 161 | TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); |
| 162 | |
| 163 | void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index); |
| 164 | |
John Kessenich | a1e2d49 | 2016-09-20 13:22:58 -0600 | [diff] [blame] | 165 | void nestLooping() { ++loopNestingLevel; } |
| 166 | void unnestLooping() { --loopNestingLevel; } |
| 167 | void nestAnnotations() { ++annotationNestingLevel; } |
| 168 | void unnestAnnotations() { --annotationNestingLevel; } |
John Kessenich | 6dbc0a7 | 2016-09-27 19:13:05 -0600 | [diff] [blame] | 169 | int getAnnotationNestingLevel() { return annotationNestingLevel; } |
John Kessenich | a1e2d49 | 2016-09-20 13:22:58 -0600 | [diff] [blame] | 170 | void pushScope() { symbolTable.push(); } |
| 171 | void popScope() { symbolTable.pop(0); } |
John Kessenich | 0d2b6de | 2016-06-05 11:23:11 -0600 | [diff] [blame] | 172 | |
John Kessenich | 0a2a0cd | 2017-05-16 23:16:26 -0600 | [diff] [blame] | 173 | void pushThisScope(const TType&, const TVector<TFunctionDeclarator>&); |
John Kessenich | 3778979 | 2017-03-21 23:56:40 -0600 | [diff] [blame] | 174 | void popThisScope() { symbolTable.pop(0); } |
| 175 | |
| 176 | void pushImplicitThis(TVariable* thisParameter) { implicitThisStack.push_back(thisParameter); } |
| 177 | void popImplicitThis() { implicitThisStack.pop_back(); } |
| 178 | TVariable* getImplicitThis(int thisDepth) const { return implicitThisStack[implicitThisStack.size() - thisDepth]; } |
| 179 | |
John Kessenich | f3d88bd | 2017-03-19 12:24:29 -0600 | [diff] [blame] | 180 | void pushNamespace(const TString& name); |
| 181 | void popNamespace(); |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 182 | void getFullNamespaceName(const TString*&) const; |
John Kessenich | f3d88bd | 2017-03-19 12:24:29 -0600 | [diff] [blame] | 183 | void addScopeMangler(TString&); |
John Kessenich | 54ee28f | 2017-03-11 14:13:00 -0700 | [diff] [blame] | 184 | |
John Kessenich | d02dc5d | 2016-07-01 00:04:11 -0600 | [diff] [blame] | 185 | void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); } |
| 186 | void popSwitchSequence() { switchSequenceStack.pop_back(); } |
| 187 | |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 188 | virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override; |
John Kessenich | 88c4464 | 2017-02-03 14:06:36 -0700 | [diff] [blame] | 189 | |
steve-lunarg | 9070796 | 2016-10-07 19:35:40 -0600 | [diff] [blame] | 190 | // Apply L-value conversions. E.g, turning a write to a RWTexture into an ImageStore. |
John Kessenich | f315074 | 2017-06-02 16:28:39 -0600 | [diff] [blame] | 191 | TIntermTyped* handleLvalue(const TSourceLoc&, const char* op, TIntermTyped*& node); |
| 192 | TIntermTyped* handleSamplerLvalue(const TSourceLoc&, const char* op, TIntermTyped*& node); |
steve-lunarg | 0de16da | 2016-10-08 10:54:52 -0600 | [diff] [blame] | 193 | bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*) override; |
steve-lunarg | 9070796 | 2016-10-07 19:35:40 -0600 | [diff] [blame] | 194 | |
steve-lunarg | 4f2da27 | 2016-10-10 15:24:57 -0600 | [diff] [blame] | 195 | TLayoutFormat getLayoutFromTxType(const TSourceLoc&, const TType&); |
| 196 | |
steve-lunarg | f49cdf4 | 2016-11-17 15:04:20 -0700 | [diff] [blame] | 197 | bool handleOutputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry); |
| 198 | bool handleInputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry); |
| 199 | |
steve-lunarg | f1709e7 | 2017-05-02 20:14:50 -0600 | [diff] [blame] | 200 | // Determine loop control from attributes |
| 201 | TLoopControl handleLoopControl(const TAttributeMap& attributes) const; |
| 202 | |
steve-lunarg | f1e0c87 | 2016-10-31 15:13:43 -0600 | [diff] [blame] | 203 | // Potentially rename shader entry point function |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 204 | void renameShaderFunction(const TString*& name) const; |
steve-lunarg | f1e0c87 | 2016-10-31 15:13:43 -0600 | [diff] [blame] | 205 | |
steve-lunarg | a2b01a0 | 2016-11-28 17:09:54 -0700 | [diff] [blame] | 206 | // Reset data for incrementally built referencing of flattened composite structures |
| 207 | void initFlattening() { flattenLevel.push_back(0); flattenOffset.push_back(0); } |
| 208 | void finalizeFlattening() { flattenLevel.pop_back(); flattenOffset.pop_back(); } |
| 209 | |
steve-lunarg | dd8287a | 2017-02-23 18:04:12 -0700 | [diff] [blame] | 210 | // Share struct buffer deep types |
| 211 | void shareStructBufferType(TType&); |
| 212 | |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 213 | protected: |
steve-lunarg | a2b01a0 | 2016-11-28 17:09:54 -0700 | [diff] [blame] | 214 | struct TFlattenData { |
| 215 | TFlattenData() : nextBinding(TQualifier::layoutBindingEnd) { } |
| 216 | TFlattenData(int nb) : nextBinding(nb) { } |
| 217 | |
| 218 | TVector<TVariable*> members; // individual flattened variables |
| 219 | TVector<int> offsets; // offset to next tree level |
| 220 | int nextBinding; // next binding to use. |
| 221 | }; |
| 222 | |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 223 | void fixConstInit(const TSourceLoc&, const TString& identifier, TType& type, TIntermTyped*& initializer); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 224 | void inheritGlobalDefaults(TQualifier& dst) const; |
| 225 | TVariable* makeInternalVariable(const char* name, const TType&) const; |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 226 | TVariable* makeInternalVariable(const TString& name, const TType& type) const { |
| 227 | return makeInternalVariable(name.c_str(), type); |
| 228 | } |
John Kessenich | 82460b5 | 2017-04-04 11:47:42 -0600 | [diff] [blame] | 229 | TIntermSymbol* makeInternalVariableNode(const TSourceLoc&, const char* name, const TType&) const; |
John Kessenich | 4dc835c | 2017-03-28 23:43:10 -0600 | [diff] [blame] | 230 | TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&, bool track); |
| 231 | void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&, bool track); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 232 | TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); |
John Kessenich | 82460b5 | 2017-04-04 11:47:42 -0600 | [diff] [blame] | 233 | TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit); |
| 234 | bool isScalarConstructor(const TIntermNode*); |
LoopDawg | 5891070 | 2016-06-13 09:22:28 -0600 | [diff] [blame] | 235 | TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage); |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 236 | |
steve-lunarg | 9070796 | 2016-10-07 19:35:40 -0600 | [diff] [blame] | 237 | // Return true if this node requires L-value conversion (e.g, to an imageStore). |
| 238 | bool shouldConvertLValue(const TIntermNode*) const; |
| 239 | |
steve-lunarg | e0b9deb | 2016-09-16 13:26:37 -0600 | [diff] [blame] | 240 | // Array and struct flattening |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 241 | TIntermTyped* flattenAccess(TIntermTyped* base, int member); |
John Kessenich | 750c2d0 | 2017-05-26 00:01:36 -0600 | [diff] [blame] | 242 | TIntermTyped* flattenAccess(int uniqueId, int member, const TType&); |
| 243 | bool shouldFlatten(const TType&) const; |
steve-lunarg | a2b01a0 | 2016-11-28 17:09:54 -0700 | [diff] [blame] | 244 | bool wasFlattened(const TIntermTyped* node) const; |
| 245 | bool wasFlattened(int id) const { return flattenMap.find(id) != flattenMap.end(); } |
| 246 | int addFlattenedMember(const TSourceLoc& loc, const TVariable&, const TType&, TFlattenData&, const TString& name, bool track); |
| 247 | bool isFinalFlattening(const TType& type) const { return !(type.isStruct() || type.isArray()); } |
| 248 | |
John Kessenich | 750c2d0 | 2017-05-26 00:01:36 -0600 | [diff] [blame] | 249 | // Structure splitting (splits interstage built-in types into its own struct) |
steve-lunarg | 132d331 | 2016-12-19 15:48:01 -0700 | [diff] [blame] | 250 | TIntermTyped* splitAccessStruct(const TSourceLoc& loc, TIntermTyped*& base, int& member); |
| 251 | void splitAccessArray(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index); |
| 252 | TType& split(TType& type, TString name, const TType* outerStructType = nullptr); |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 253 | void split(TIntermTyped*); |
| 254 | void split(const TVariable&); |
| 255 | bool wasSplit(const TIntermTyped* node) const; |
| 256 | bool wasSplit(int id) const { return splitIoVars.find(id) != splitIoVars.end(); } |
| 257 | TVariable* getSplitIoVar(const TIntermTyped* node) const; |
| 258 | TVariable* getSplitIoVar(const TVariable* var) const; |
| 259 | TVariable* getSplitIoVar(int id) const; |
| 260 | void addInterstageIoToLinkage(); |
steve-lunarg | 858c928 | 2017-01-07 08:54:10 -0700 | [diff] [blame] | 261 | void addPatchConstantInvocation(); |
steve-lunarg | f8203a0 | 2017-04-20 09:00:56 -0600 | [diff] [blame] | 262 | TIntermTyped* makeIntegerIndex(TIntermTyped*); |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 263 | |
steve-lunarg | ccb076a | 2017-04-05 11:03:02 -0600 | [diff] [blame] | 264 | void fixBuiltInIoType(TType&); |
steve-lunarg | 194f0f3 | 2017-03-17 18:51:05 -0600 | [diff] [blame] | 265 | |
steve-lunarg | e0b9deb | 2016-09-16 13:26:37 -0600 | [diff] [blame] | 266 | void flatten(const TSourceLoc& loc, const TVariable& variable); |
steve-lunarg | a2b01a0 | 2016-11-28 17:09:54 -0700 | [diff] [blame] | 267 | int flatten(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); |
| 268 | int flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); |
| 269 | int flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); |
steve-lunarg | e0b9deb | 2016-09-16 13:26:37 -0600 | [diff] [blame] | 270 | |
John Kessenich | bf47286 | 2017-02-05 20:27:30 -0700 | [diff] [blame] | 271 | bool hasUniform(const TQualifier& qualifier) const; |
| 272 | void clearUniform(TQualifier& qualifier); |
| 273 | bool isInputBuiltIn(const TQualifier& qualifier) const; |
| 274 | bool hasInput(const TQualifier& qualifier) const; |
| 275 | void correctOutput(TQualifier& qualifier); |
| 276 | bool isOutputBuiltIn(const TQualifier& qualifier) const; |
| 277 | bool hasOutput(const TQualifier& qualifier) const; |
| 278 | void correctInput(TQualifier& qualifier); |
| 279 | void correctUniform(TQualifier& qualifier); |
| 280 | void clearUniformInputOutput(TQualifier& qualifier); |
| 281 | |
steve-lunarg | 5da1f03 | 2017-02-12 17:50:28 -0700 | [diff] [blame] | 282 | // Test method names |
steve-lunarg | 5da1f03 | 2017-02-12 17:50:28 -0700 | [diff] [blame] | 283 | bool isStructBufferMethod(const TString& name) const; |
steve-lunarg | 2bb1f39 | 2017-04-27 11:22:32 -0600 | [diff] [blame] | 284 | void counterBufferType(const TSourceLoc& loc, TType& type); |
steve-lunarg | 5da1f03 | 2017-02-12 17:50:28 -0700 | [diff] [blame] | 285 | |
steve-lunarg | d4d0b29 | 2017-04-26 08:31:56 -0600 | [diff] [blame] | 286 | // Return standard sample position array |
| 287 | TIntermConstantUnion* getSamplePosArray(int count); |
| 288 | |
steve-lunarg | dd8287a | 2017-02-23 18:04:12 -0700 | [diff] [blame] | 289 | TType* getStructBufferContentType(const TType& type) const; |
| 290 | bool isStructBufferType(const TType& type) const { return getStructBufferContentType(type) != nullptr; } |
| 291 | TIntermTyped* indexStructBufferContent(const TSourceLoc& loc, TIntermTyped* buffer) const; |
steve-lunarg | 8e26feb | 2017-04-10 08:19:21 -0600 | [diff] [blame] | 292 | TIntermTyped* getStructBufferCounter(const TSourceLoc& loc, TIntermTyped* buffer); |
steve-lunarg | 2bb1f39 | 2017-04-27 11:22:32 -0600 | [diff] [blame] | 293 | TString getStructBuffCounterName(const TString&) const; |
| 294 | void addStructBuffArguments(const TSourceLoc& loc, TIntermAggregate*&); |
| 295 | void addStructBufferHiddenCounterParam(const TSourceLoc& loc, TParameter&, TIntermAggregate*&); |
steve-lunarg | dd8287a | 2017-02-23 18:04:12 -0700 | [diff] [blame] | 296 | |
| 297 | // Return true if this type is a reference. This is not currently a type method in case that's |
| 298 | // a language specific answer. |
| 299 | bool isReference(const TType& type) const { return isStructBufferType(type); } |
| 300 | |
steve-lunarg | 8e26feb | 2017-04-10 08:19:21 -0600 | [diff] [blame] | 301 | // Return true if this a buffer type that has an associated counter buffer. |
steve-lunarg | a4bfed1 | 2017-04-23 19:44:28 -0600 | [diff] [blame] | 302 | bool hasStructBuffCounter(const TType&) const; |
steve-lunarg | 8e26feb | 2017-04-10 08:19:21 -0600 | [diff] [blame] | 303 | |
| 304 | // Finalization step: remove unused buffer blocks from linkage (we don't know until the |
| 305 | // shader is entirely compiled) |
| 306 | void removeUnusedStructBufferCounters(); |
| 307 | |
steve-lunarg | 858c928 | 2017-01-07 08:54:10 -0700 | [diff] [blame] | 308 | // Pass through to base class after remembering builtin mappings. |
| 309 | using TParseContextBase::trackLinkage; |
| 310 | void trackLinkage(TSymbol& variable) override; |
| 311 | |
Alex Szpakowski | 7d39ad5 | 2017-01-08 17:54:48 -0400 | [diff] [blame] | 312 | void finish() override; // post-processing |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 313 | |
steve-lunarg | e752f46 | 2017-03-22 18:39:25 -0600 | [diff] [blame] | 314 | // Linkage symbol helpers |
| 315 | TIntermSymbol* findLinkageSymbol(TBuiltInVariable biType) const; |
| 316 | |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 317 | // Current state of parsing |
John Kessenich | a1e2d49 | 2016-09-20 13:22:58 -0600 | [diff] [blame] | 318 | int annotationNestingLevel; // 0 if outside all annotations |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 319 | |
| 320 | HlslParseContext(HlslParseContext&); |
| 321 | HlslParseContext& operator=(HlslParseContext&); |
| 322 | |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 323 | static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2)); // see computeSamplerTypeIndex() |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 324 | TQualifier globalBufferDefaults; |
| 325 | TQualifier globalUniformDefaults; |
| 326 | TQualifier globalInputDefaults; |
| 327 | TQualifier globalOutputDefaults; |
| 328 | TString currentCaller; // name of last function body entered (not valid when at global scope) |
| 329 | TIdSetType inductiveLoopIds; |
| 330 | TVector<TIntermTyped*> needsIndexLimitationChecking; |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 331 | |
| 332 | // |
| 333 | // Geometry shader input arrays: |
| 334 | // - array sizing is based on input primitive and/or explicit size |
| 335 | // |
| 336 | // Tessellation control output arrays: |
| 337 | // - array sizing is based on output layout(vertices=...) and/or explicit size |
| 338 | // |
| 339 | // Both: |
| 340 | // - array sizing is retroactive |
| 341 | // - built-in block redeclarations interact with this |
| 342 | // |
| 343 | // Design: |
| 344 | // - use a per-context "resize-list", a list of symbols whose array sizes |
| 345 | // can be fixed |
| 346 | // |
| 347 | // - the resize-list starts empty at beginning of user-shader compilation, it does |
| 348 | // not have built-ins in it |
| 349 | // |
| 350 | // - on built-in array use: copyUp() symbol and add it to the resize-list |
| 351 | // |
| 352 | // - on user array declaration: add it to the resize-list |
| 353 | // |
| 354 | // - on block redeclaration: copyUp() symbol and add it to the resize-list |
| 355 | // * note, that appropriately gives an error if redeclaring a block that |
| 356 | // was already used and hence already copied-up |
| 357 | // |
John Kessenich | ecba76f | 2017-01-06 00:34:48 -0700 | [diff] [blame] | 358 | // - on seeing a layout declaration that sizes the array, fix everything in the |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 359 | // resize-list, giving errors for mismatch |
| 360 | // |
| 361 | // - on seeing an array size declaration, give errors on mismatch between it and previous |
| 362 | // array-sizing declarations |
| 363 | // |
| 364 | TVector<TSymbol*> ioArraySymbolResizeList; |
John Kessenich | cd0a78a | 2016-09-09 16:32:09 -0600 | [diff] [blame] | 365 | |
steve-lunarg | a2b01a0 | 2016-11-28 17:09:54 -0700 | [diff] [blame] | 366 | TMap<int, TFlattenData> flattenMap; |
| 367 | TVector<int> flattenLevel; // nested postfix operator level for flattening |
| 368 | TVector<int> flattenOffset; // cumulative offset for flattening |
| 369 | |
John Kessenich | bf47286 | 2017-02-05 20:27:30 -0700 | [diff] [blame] | 370 | // IO-type map. Maps a pure symbol-table form of a structure-member list into |
| 371 | // each of the (up to) three kinds of IO, as each as different allowed decorations, |
| 372 | // but HLSL allows mixing all in the same structure. |
| 373 | struct tIoKinds { |
| 374 | TTypeList* input; |
| 375 | TTypeList* output; |
| 376 | TTypeList* uniform; |
| 377 | }; |
| 378 | TMap<const TTypeList*, tIoKinds> ioTypeMap; |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 379 | |
| 380 | // Structure splitting data: |
steve-lunarg | 132d331 | 2016-12-19 15:48:01 -0700 | [diff] [blame] | 381 | TMap<int, TVariable*> splitIoVars; // variables with the builtin interstage IO removed, indexed by unique ID. |
| 382 | |
steve-lunarg | dd8287a | 2017-02-23 18:04:12 -0700 | [diff] [blame] | 383 | // Structuredbuffer shared types. Typically there are only a few. |
| 384 | TVector<TType*> structBufferTypes; |
steve-lunarg | 8e26feb | 2017-04-10 08:19:21 -0600 | [diff] [blame] | 385 | |
steve-lunarg | 8e26feb | 2017-04-10 08:19:21 -0600 | [diff] [blame] | 386 | TMap<TString, bool> structBufferCounter; |
steve-lunarg | dd8287a | 2017-02-23 18:04:12 -0700 | [diff] [blame] | 387 | |
steve-lunarg | 132d331 | 2016-12-19 15:48:01 -0700 | [diff] [blame] | 388 | // The builtin interstage IO map considers e.g, EvqPosition on input and output separately, so that we |
| 389 | // can build the linkage correctly if position appears on both sides. Otherwise, multiple positions |
| 390 | // are considered identical. |
| 391 | struct tInterstageIoData { |
steve-lunarg | 858c928 | 2017-01-07 08:54:10 -0700 | [diff] [blame] | 392 | tInterstageIoData(TBuiltInVariable bi, TStorageQualifier q) : |
| 393 | builtIn(bi), storage(q) { } |
| 394 | |
steve-lunarg | 132d331 | 2016-12-19 15:48:01 -0700 | [diff] [blame] | 395 | tInterstageIoData(const TType& memberType, const TType& storageType) : |
| 396 | builtIn(memberType.getQualifier().builtIn), |
| 397 | storage(storageType.getQualifier().storage) { } |
| 398 | |
| 399 | TBuiltInVariable builtIn; |
| 400 | TStorageQualifier storage; |
| 401 | |
| 402 | // ordering for maps |
| 403 | bool operator<(const tInterstageIoData d) const { |
| 404 | return (builtIn != d.builtIn) ? (builtIn < d.builtIn) : (storage < d.storage); |
| 405 | } |
| 406 | }; |
| 407 | |
John Kessenich | bf47286 | 2017-02-05 20:27:30 -0700 | [diff] [blame] | 408 | TMap<tInterstageIoData, TVariable*> interstageBuiltInIo; // individual builtin interstage IO vars, indexed by builtin type. |
steve-lunarg | 067eb9b | 2017-04-01 15:34:48 -0600 | [diff] [blame] | 409 | TVariable* inputPatch; |
steve-lunarg | 132d331 | 2016-12-19 15:48:01 -0700 | [diff] [blame] | 410 | |
| 411 | // We have to move array references to structs containing builtin interstage IO to the split variables. |
| 412 | // This is only handled for one level. This stores the index, because we'll need it in the future, since |
| 413 | // unlike normal array references, here the index happens before we discover what it applies to. |
| 414 | TIntermTyped* builtInIoIndex; |
| 415 | TIntermTyped* builtInIoBase; |
steve-lunarg | a2e7531 | 2016-12-14 15:22:25 -0700 | [diff] [blame] | 416 | |
John Kessenich | 7dc630f | 2016-09-16 01:44:43 -0600 | [diff] [blame] | 417 | unsigned int nextInLocation; |
| 418 | unsigned int nextOutLocation; |
steve-lunarg | f1e0c87 | 2016-10-31 15:13:43 -0600 | [diff] [blame] | 419 | |
steve-lunarg | 858c928 | 2017-01-07 08:54:10 -0700 | [diff] [blame] | 420 | TString sourceEntryPointName; |
| 421 | TFunction* entryPointFunction; |
| 422 | TIntermNode* entryPointFunctionBody; |
| 423 | |
| 424 | TString patchConstantFunctionName; // hull shader patch constant function name, from function level attribute. |
| 425 | TMap<TBuiltInVariable, TSymbol*> builtInLinkageSymbols; // used for tessellation, finding declared builtins |
| 426 | |
John Kessenich | 3778979 | 2017-03-21 23:56:40 -0600 | [diff] [blame] | 427 | TVector<TString> currentTypePrefix; // current scoping prefix for nested structures |
| 428 | TVector<TVariable*> implicitThisStack; // currently active 'this' variables for nested structures |
steve-lunarg | 08e0c08 | 2017-03-29 20:01:13 -0600 | [diff] [blame] | 429 | |
| 430 | TVariable* gsStreamOutput; // geometry shader stream outputs, for emit (Append method) |
LoopDawg | 726bf96 | 2017-05-12 17:14:31 -0600 | [diff] [blame] | 431 | |
| 432 | // This tracks the first (mip level) argument to the .mips[][] operator. Since this can be nested as |
| 433 | // in tx.mips[tx.mips[0][1].x][2], we need a stack. We also track the TSourceLoc for error reporting |
| 434 | // purposes. |
| 435 | struct tMipsOperatorData { |
| 436 | tMipsOperatorData(TSourceLoc l, TIntermTyped* m) : loc(l), mipLevel(m) { } |
| 437 | TSourceLoc loc; |
| 438 | TIntermTyped* mipLevel; |
| 439 | }; |
| 440 | |
| 441 | TVector<tMipsOperatorData> mipsOperatorMipArg; |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 442 | }; |
| 443 | |
steve-lunarg | e7d0752 | 2017-03-19 18:12:37 -0600 | [diff] [blame] | 444 | // This is the prefix we use for builtin methods to avoid namespace collisions with |
| 445 | // global scope user functions. |
| 446 | // TODO: this would be better as a nonparseable character, but that would |
| 447 | // require changing the scanner. |
| 448 | #define BUILTIN_PREFIX "__BI_" |
| 449 | |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 450 | } // end namespace glslang |
| 451 | |
| 452 | #endif // HLSL_PARSE_INCLUDED_ |