RetroArch
hlslParseHelper.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2016 Google, Inc.
3 // Copyright (C) 2016 LunarG, Inc.
4 //
5 // All rights reserved.
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions
9 // are met:
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 //
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.
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 #include "../glslang/MachineIndependent/attribute.h"
42 
43 #include <array>
44 
45 namespace glslang {
46 
47 class TFunctionDeclarator;
48 
50 public:
55  virtual ~HlslParseContext();
56  void initializeExtensionBehavior() override;
57 
58  void setLimits(const TBuiltInResource&) override;
59  bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override;
60  virtual const char* getGlobalUniformBlockName() const override { return "$Global"; }
61  virtual void setUniformBlockDefaults(TType& block) const override
62  {
63  block.getQualifier().layoutPacking = ElpStd140;
64  block.getQualifier().layoutMatrix = ElmRowMajor;
65  }
66 
67  void reservedPpErrorCheck(const TSourceLoc&, const char* /*name*/, const char* /*op*/) override { }
68  bool lineContinuationCheck(const TSourceLoc&, bool /*endOfComment*/) override { return true; }
69  bool lineDirectiveShouldSetNextLine() const override { return true; }
70  bool builtInName(const TString&);
71 
72  void handlePragma(const TSourceLoc&, const TVector<TString>&) override;
73  TIntermTyped* handleVariable(const TSourceLoc&, const TString* string);
76 
78  TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode);
80  bool isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, const TString& field);
82  void handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
86  void transferTypeAttributes(const TSourceLoc&, const TAttributes&, TType&, bool allowEntry = false);
87  void handleFunctionBody(const TSourceLoc&, TFunction&, TIntermNode* functionBody, TIntermNode*& node);
88  void remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector<TVariable*>& inputs, TVector<TVariable*>& outputs);
89  void remapNonEntryPointIO(TFunction& function);
91  void handleFunctionArgument(TFunction*, TIntermTyped*& arguments, TIntermTyped* newArg);
97  void decomposeIntrinsic(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
98  void decomposeSampleMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
99  void decomposeStructBufferMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
100  void decomposeGeometryMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
101  void pushFrontArguments(TIntermTyped* front, TIntermTyped*& arguments);
103  void expandArguments(const TSourceLoc&, const TFunction&, TIntermTyped*&);
105  void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&);
107  void handleSemantic(TSourceLoc, TQualifier&, TBuiltInVariable, const TString& upperCase);
109  const glslang::TString* component);
111  int subComponent, const glslang::TString*);
112  TIntermTyped* convertConditionalExpression(const TSourceLoc&, TIntermTyped*, bool mustBeScalar = true);
114 
115  bool parseMatrixSwizzleSelector(const TSourceLoc&, const TString&, int cols, int rows, TSwizzleSelectors<TMatrixSelector>&);
117  void assignError(const TSourceLoc&, const char* op, TString left, TString right);
118  void unaryOpError(const TSourceLoc&, const char* op, TString operand);
119  void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
120  void variableCheck(TIntermTyped*& nodePtr);
121  void constantValueCheck(TIntermTyped* node, const char* token);
122  void integerCheck(const TIntermTyped* node, const char* token);
123  void globalCheck(const TSourceLoc&, const char* token);
127  void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
128  void structArrayCheck(const TSourceLoc&, const TType& structure);
129  bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType);
131  bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
135  void paramFix(TType& type);
136  void specializationCheck(const TSourceLoc&, const TType&, const char* op);
137 
140  void setSpecConstantId(const TSourceLoc&, TQualifier&, int value);
141  void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly);
143 
144  const TFunction* findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, int& thisDepth, TIntermTyped*& args);
146  void declareTypedef(const TSourceLoc&, const TString& identifier, const TType&);
147  void declareStruct(const TSourceLoc&, TString& structName, TType&);
148  TSymbol* lookupUserType(const TString&, TType&);
149  TIntermNode* declareVariable(const TSourceLoc&, const TString& identifier, TType&, TIntermTyped* initializer = 0);
150  void lengthenList(const TSourceLoc&, TIntermSequence& list, int size, TIntermTyped* scalarInit);
155  TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
156  void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0);
157  void declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name);
158  void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
161  void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier);
164  void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
166 
172  void pushScope() { symbolTable.push(); }
173  void popScope() { symbolTable.pop(0); }
174 
175  void pushThisScope(const TType&, const TVector<TFunctionDeclarator>&);
176  void popThisScope() { symbolTable.pop(0); }
177 
178  void pushImplicitThis(TVariable* thisParameter) { implicitThisStack.push_back(thisParameter); }
179  void popImplicitThis() { implicitThisStack.pop_back(); }
180  TVariable* getImplicitThis(int thisDepth) const { return implicitThisStack[implicitThisStack.size() - thisDepth]; }
181 
182  void pushNamespace(const TString& name);
183  void popNamespace();
184  void getFullNamespaceName(TString*&) const;
185  void addScopeMangler(TString&);
186 
187  void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); }
188  void popSwitchSequence() { switchSequenceStack.pop_back(); }
189 
190  virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName,
191  TTypeList* typeList = nullptr) override;
192 
193  // Apply L-value conversions. E.g, turning a write to a RWTexture into an ImageStore.
194  TIntermTyped* handleLvalue(const TSourceLoc&, const char* op, TIntermTyped*& node);
195  bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*) override;
196 
198 
199  bool handleOutputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry);
200  bool handleInputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry);
201 
202  // Determine selection control from attributes
205 
206  // Determine loop control from attributes
208 
209  // Share struct buffer deep types
211 
212  // Set texture return type of the given sampler. Returns success (not all types are valid).
213  bool setTextureReturnType(TSampler& sampler, const TType& retType, const TSourceLoc& loc);
214 
215  // Obtain the sampler return type of the given sampler in retType.
216  void getTextureReturnType(const TSampler& sampler, TType& retType) const;
217 
218  TAttributeType attributeFromName(const TString& nameSpace, const TString& name) const;
219 
220 protected:
221  struct TFlattenData {
222  TFlattenData() : nextBinding(TQualifier::layoutBindingEnd),
223  nextLocation(TQualifier::layoutLocationEnd) { }
224  TFlattenData(int nb, int nl) : nextBinding(nb), nextLocation(nl) { }
225 
226  TVector<TVariable*> members; // individual flattened variables
227  TVector<int> offsets; // offset to next tree level
228  unsigned int nextBinding; // next binding to use.
229  unsigned int nextLocation; // next location to use
230  };
231 
232  void fixConstInit(const TSourceLoc&, const TString& identifier, TType& type, TIntermTyped*& initializer);
233  void inheritGlobalDefaults(TQualifier& dst) const;
234  TVariable* makeInternalVariable(const char* name, const TType&) const;
236  return makeInternalVariable(name.c_str(), type);
237  }
238  TIntermSymbol* makeInternalVariableNode(const TSourceLoc&, const char* name, const TType&) const;
239  TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&, bool track);
240  void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&, bool track);
242  TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit);
243  bool isScalarConstructor(const TIntermNode*);
244  TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage);
245 
246  // Return true if this node requires L-value conversion (e.g, to an imageStore).
247  bool shouldConvertLValue(const TIntermNode*) const;
248 
249  // Array and struct flattening
250  TIntermTyped* flattenAccess(TIntermTyped* base, int member);
251  TIntermTyped* flattenAccess(int uniqueId, int member, TStorageQualifier outerStorage, const TType&, int subset = -1);
252  int findSubtreeOffset(const TIntermNode&) const;
253  int findSubtreeOffset(const TType&, int subset, const TVector<int>& offsets) const;
254  bool shouldFlatten(const TType&, TStorageQualifier, bool topLevel) const;
255  bool wasFlattened(const TIntermTyped* node) const;
256  bool wasFlattened(int id) const { return flattenMap.find(id) != flattenMap.end(); }
257  int addFlattenedMember(const TVariable&, const TType&, TFlattenData&, const TString& name, bool linkage,
258  const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes);
259 
260  // Structure splitting (splits interstage built-in types into its own struct)
261  void split(const TVariable&);
262  void splitBuiltIn(const TString& baseName, const TType& memberType, const TArraySizes*, const TQualifier&);
263  const TType& split(const TType& type, const TString& name, const TQualifier&);
264  bool wasSplit(const TIntermTyped* node) const;
265  bool wasSplit(int id) const { return splitNonIoVars.find(id) != splitNonIoVars.end(); }
266  TVariable* getSplitNonIoVar(int id) const;
268  void fixTextureShadowModes();
269  void finalizeAppendMethods();
271 
272  void fixBuiltInIoType(TType&);
273 
274  void flatten(const TVariable& variable, bool linkage);
275  int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,
276  const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes);
277  int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,
278  const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes);
279  int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,
280  const TQualifier& outerQualifier);
281 
282  bool hasUniform(const TQualifier& qualifier) const;
283  void clearUniform(TQualifier& qualifier);
284  bool isInputBuiltIn(const TQualifier& qualifier) const;
285  bool hasInput(const TQualifier& qualifier) const;
286  void correctOutput(TQualifier& qualifier);
287  bool isOutputBuiltIn(const TQualifier& qualifier) const;
288  bool hasOutput(const TQualifier& qualifier) const;
289  void correctInput(TQualifier& qualifier);
290  void correctUniform(TQualifier& qualifier);
291  void clearUniformInputOutput(TQualifier& qualifier);
292 
293  // Test method names
294  bool isStructBufferMethod(const TString& name) const;
295  void counterBufferType(const TSourceLoc& loc, TType& type);
296 
297  // Return standard sample position array
299 
301  bool isStructBufferType(const TType& type) const { return getStructBufferContentType(type) != nullptr; }
307 
308  // Return true if this type is a reference. This is not currently a type method in case that's
309  // a language specific answer.
310  bool isReference(const TType& type) const { return isStructBufferType(type); }
311 
312  // Return true if this a buffer type that has an associated counter buffer.
313  bool hasStructBuffCounter(const TType&) const;
314 
315  // Finalization step: remove unused buffer blocks from linkage (we don't know until the
316  // shader is entirely compiled)
318 
320  static bool isClipOrCullDistance(const TQualifier& qual) { return isClipOrCullDistance(qual.builtIn); }
321  static bool isClipOrCullDistance(const TType& type) { return isClipOrCullDistance(type.getQualifier()); }
322 
323  // Find the patch constant function (issues error, returns nullptr if not found)
325 
326  // Pass through to base class after remembering built-in mappings.
328  void trackLinkage(TSymbol& variable) override;
329 
330  void finish() override; // post-processing
331 
332  // Linkage symbol helpers
334 
335  // Current state of parsing
336  int annotationNestingLevel; // 0 if outside all annotations
337 
340 
341  static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2)); // see computeSamplerTypeIndex()
346  TString currentCaller; // name of last function body entered (not valid when at global scope)
349 
350  //
351  // Geometry shader input arrays:
352  // - array sizing is based on input primitive and/or explicit size
353  //
354  // Tessellation control output arrays:
355  // - array sizing is based on output layout(vertices=...) and/or explicit size
356  //
357  // Both:
358  // - array sizing is retroactive
359  // - built-in block redeclarations interact with this
360  //
361  // Design:
362  // - use a per-context "resize-list", a list of symbols whose array sizes
363  // can be fixed
364  //
365  // - the resize-list starts empty at beginning of user-shader compilation, it does
366  // not have built-ins in it
367  //
368  // - on built-in array use: copyUp() symbol and add it to the resize-list
369  //
370  // - on user array declaration: add it to the resize-list
371  //
372  // - on block redeclaration: copyUp() symbol and add it to the resize-list
373  // * note, that appropriately gives an error if redeclaring a block that
374  // was already used and hence already copied-up
375  //
376  // - on seeing a layout declaration that sizes the array, fix everything in the
377  // resize-list, giving errors for mismatch
378  //
379  // - on seeing an array size declaration, give errors on mismatch between it and previous
380  // array-sizing declarations
381  //
383 
385 
386  // IO-type map. Maps a pure symbol-table form of a structure-member list into
387  // each of the (up to) three kinds of IO, as each as different allowed decorations,
388  // but HLSL allows mixing all in the same structure.
389  struct tIoKinds {
393  };
395 
396  // Structure splitting data:
397  TMap<int, TVariable*> splitNonIoVars; // variables with the built-in interstage IO removed, indexed by unique ID.
398 
399  // Structuredbuffer shared types. Typically there are only a few.
401 
402  // This tracks texture sample user structure return types. Only a limited number are supported, as
403  // may fit in TSampler::structReturnIndex.
405 
406  TMap<TString, bool> structBufferCounter; // true if counter buffer is in use
407 
408  // The built-in interstage IO map considers e.g, EvqPosition on input and output separately, so that we
409  // can build the linkage correctly if position appears on both sides. Otherwise, multiple positions
410  // are considered identical.
413  builtIn(bi), storage(q) { }
414 
417 
418  // ordering for maps
419  bool operator<(const tInterstageIoData d) const {
420  return (builtIn != d.builtIn) ? (builtIn < d.builtIn) : (storage < d.storage);
421  }
422  };
423 
424  TMap<tInterstageIoData, TVariable*> splitBuiltIns; // split built-ins, indexed by built-in type.
425  TVariable* inputPatch; // input patch is special for PCF: it's the only non-builtin PCF input,
426  // and is handled as a pseudo-builtin.
427 
428  unsigned int nextInLocation;
429  unsigned int nextOutLocation;
430 
433 
434  TString patchConstantFunctionName; // hull shader patch constant function name, from function level attribute.
435  TMap<TBuiltInVariable, TSymbol*> builtInTessLinkageSymbols; // used for tessellation, finding declared built-ins
436 
437  TVector<TString> currentTypePrefix; // current scoping prefix for nested structures
438  TVector<TVariable*> implicitThisStack; // currently active 'this' variables for nested structures
439 
440  TVariable* gsStreamOutput; // geometry shader stream outputs, for emit (Append method)
441 
442  TVariable* clipDistanceOutput; // synthesized clip distance out variable (shader might have >1)
443  TVariable* cullDistanceOutput; // synthesized cull distance out variable (shader might have >1)
444  TVariable* clipDistanceInput; // synthesized clip distance in variable (shader might have >1)
445  TVariable* cullDistanceInput; // synthesized cull distance in variable (shader might have >1)
446 
447  static const int maxClipCullRegs = 2;
448  std::array<int, maxClipCullRegs> clipSemanticNSizeIn; // vector, indexed by clip semantic ID
449  std::array<int, maxClipCullRegs> cullSemanticNSizeIn; // vector, indexed by cull semantic ID
450  std::array<int, maxClipCullRegs> clipSemanticNSizeOut; // vector, indexed by clip semantic ID
451  std::array<int, maxClipCullRegs> cullSemanticNSizeOut; // vector, indexed by cull semantic ID
452 
453  // This tracks the first (mip level) argument to the .mips[][] operator. Since this can be nested as
454  // in tx.mips[tx.mips[0][1].x][2], we need a stack. We also track the TSourceLoc for error reporting
455  // purposes.
460  };
461 
463 
464  // The geometry output stream is not copied out from the entry point as a typical output variable
465  // is. It's written via EmitVertex (hlsl=Append), which may happen in arbitrary control flow.
466  // For this we need the real output symbol. Since it may not be known at the time and Append()
467  // method is parsed, the sequence will be patched during finalization.
468  struct tGsAppendData {
471  };
472 
474 
475  // A texture object may be used with shadow and non-shadow samplers, but both may not be
476  // alive post-DCE in the same shader. We do not know at compilation time which are alive: that's
477  // only known post-DCE. If a texture is used both ways, we create two textures, and
478  // leave the elimiation of one to the optimizer. This maps the shader variant to
479  // the shadow variant.
480  //
481  // This can be removed if and when the texture shadow code in
482  // HlslParseContext::handleSamplerTextureCombine is removed.
484  tShadowTextureSymbols() { symId.fill(-1); }
485 
486  void set(bool shadow, int id) { symId[int(shadow)] = id; }
487  int get(bool shadow) const { return symId[int(shadow)]; }
488 
489  // True if this texture has been seen with both shadow and non-shadow modes
490  bool overloaded() const { return symId[0] != -1 && symId[1] != -1; }
491  bool isShadowId(int id) const { return symId[1] == id; }
492 
493  private:
494  std::array<int, 2> symId;
495  };
496 
498 };
499 
500 // This is the prefix we use for built-in methods to avoid namespace collisions with
501 // global scope user functions.
502 // TODO: this would be better as a nonparseable character, but that would
503 // require changing the scanner.
504 #define BUILTIN_PREFIX "__BI_"
505 
506 } // end namespace glslang
507 
508 #endif // HLSL_PARSE_INCLUDED_
Definition: SymbolTable.h:197
GLenum GLenum variable
Definition: glext.h:9938
Definition: localintermediate.h:62
unsigned int nextLocation
Definition: hlslParseHelper.h:229
std::array< int, maxClipCullRegs > cullSemanticNSizeOut
Definition: hlslParseHelper.h:451
unsigned int nextOutLocation
Definition: hlslParseHelper.h:429
Definition: Types.h:1103
Definition: intermediate.h:1194
std::set< int > TIdSetType
Definition: ParseHelper.h:67
int getMatrixComponentsColumn(int rows, const TSwizzleSelectors< TMatrixSelector > &)
Definition: hlslParseHelper.cpp:626
Definition: Common.h:190
TMap< int, tShadowTextureSymbols * > textureShadowVariant
Definition: hlslParseHelper.h:497
TMap< int, TFlattenData > flattenMap
Definition: hlslParseHelper.h:384
Definition: PpContext.h:189
Definition: hlslParseHelper.h:221
bool forwardCompatible
Definition: parseVersions.h:131
bool structQualifierErrorCheck(const TSourceLoc &, const TPublicType &pType)
GLuint const GLchar * name
Definition: glext.h:6671
Definition: intermediate.h:1520
TIntermTyped * assignPosition(const TSourceLoc &, TOperator, TIntermTyped *left, TIntermTyped *right)
Definition: hlslParseHelper.cpp:2368
void declareStructBufferCounter(const TSourceLoc &loc, const TType &bufferType, const TString &name)
Definition: hlslParseHelper.cpp:3202
TIntermAggregate * handleSamplerTextureCombine(const TSourceLoc &loc, TIntermTyped *argTex, TIntermTyped *argSampler)
Definition: hlslParseHelper.cpp:3095
TIntermNode * transformEntryPoint(const TSourceLoc &, TFunction &, const TAttributes &)
Definition: hlslParseHelper.cpp:1988
HlslParseContext(TSymbolTable &, TIntermediate &, bool parsingBuiltins, int version, EProfile, const SpvVersion &spvVersion, EShLanguage, TInfoSink &, const TString sourceEntryPointName, bool forwardCompatible=false, EShMessages messages=EShMsgDefault)
Definition: hlslParseHelper.cpp:55
TOperator
Definition: intermediate.h:66
TAttributeType
Definition: attribute.h:45
void handleSwitchAttributes(const TSourceLoc &loc, TIntermSwitch *, const TAttributes &attributes)
Definition: hlslParseHelper.cpp:8923
Definition: arrays.h:57
TIntermNode * entryPointFunctionBody
Definition: hlslParseHelper.h:432
TQualifier globalInputDefaults
Definition: hlslParseHelper.h:344
TIntermNode * executeInitializer(const TSourceLoc &, TIntermTyped *initializer, TVariable *variable)
Definition: hlslParseHelper.cpp:7872
TMap< TBuiltInVariable, TSymbol * > builtInTessLinkageSymbols
Definition: hlslParseHelper.h:435
int version
Definition: parseVersions.h:127
void arraySizeCheck(const TSourceLoc &, TIntermTyped *expr, TArraySize &)
Definition: hlslParseHelper.cpp:6596
void finish() override
Definition: hlslParseHelper.cpp:9973
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
TVariable * cullDistanceInput
Definition: hlslParseHelper.h:445
void specializationCheck(const TSourceLoc &, const TType &, const char *op)
Definition: hlslParseHelper.cpp:6859
void constantValueCheck(TIntermTyped *node, const char *token)
Definition: hlslParseHelper.cpp:6204
void popImplicitThis()
Definition: hlslParseHelper.h:179
TVariable * makeInternalVariable(const char *name, const TType &) const
Definition: hlslParseHelper.cpp:7824
int flattenStruct(const TVariable &variable, const TType &, TFlattenData &, TString name, bool linkage, const TQualifier &outerQualifier, const TArraySizes *builtInArraySizes)
Definition: hlslParseHelper.cpp:1283
TVariable * inputPatch
Definition: hlslParseHelper.h:425
Definition: InfoSink.h:138
void inheritGlobalDefaults(TQualifier &dst) const
Definition: hlslParseHelper.cpp:7808
Definition: Versions.h:83
TIntermTyped * addConstructor(const TSourceLoc &, TIntermTyped *, const TType &)
Definition: hlslParseHelper.cpp:8174
EShLanguage
Definition: ShaderLang.h:90
void correctOutput(TQualifier &qualifier)
Definition: hlslParseHelper.cpp:9358
TFunction * entryPointFunction
Definition: hlslParseHelper.h:431
bool shouldFlatten(const TType &, TStorageQualifier, bool topLevel) const
Definition: hlslParseHelper.cpp:1164
void pushNamespace(const TString &name)
Definition: hlslParseHelper.cpp:9171
TSourceLoc loc
Definition: hlslParseHelper.h:458
Definition: Common.h:231
TIntermTyped * constructBuiltIn(const TType &, TOperator, TIntermTyped *, const TSourceLoc &, bool subset)
Definition: hlslParseHelper.cpp:8274
void integerCheck(const TIntermTyped *node, const char *token)
Definition: hlslParseHelper.cpp:6214
TStorageQualifier storage
Definition: hlslParseHelper.h:416
Definition: SymbolTable.h:151
TVariable * makeInternalVariable(const TString &name, const TType &type) const
Definition: hlslParseHelper.h:235
void globalCheck(const TSourceLoc &, const char *token)
Definition: hlslParseHelper.cpp:6226
virtual void trackLinkage(TSymbol &symbol)
Definition: ParseContextBase.cpp:232
static const int maxSamplerIndex
Definition: hlslParseHelper.h:341
void handleLoopAttributes(const TSourceLoc &loc, TIntermLoop *, const TAttributes &attributes)
Definition: hlslParseHelper.cpp:8947
void remapNonEntryPointIO(TFunction &function)
Definition: hlslParseHelper.cpp:2317
void popNamespace()
Definition: hlslParseHelper.cpp:9183
bool lineDirectiveShouldSetNextLine() const override
Definition: hlslParseHelper.h:69
TVariable * getSplitNonIoVar(int id) const
Definition: hlslParseHelper.cpp:1443
virtual void growGlobalUniformBlock(const TSourceLoc &, TType &, const TString &memberName, TTypeList *typeList=nullptr) override
Definition: hlslParseHelper.cpp:172
TIntermTyped * handleUnaryMath(const TSourceLoc &, const char *str, TOperator op, TIntermTyped *childNode)
Definition: hlslParseHelper.cpp:888
void initializeExtensionBehavior() override
Definition: hlslParseHelper.cpp:109
TSymbolTable & symbolTable
Definition: ParseHelper.h:170
TIntermTyped * getStructBufferCounter(const TSourceLoc &loc, TIntermTyped *buffer)
Definition: hlslParseHelper.cpp:3224
void addGenMulArgumentConversion(const TSourceLoc &loc, TFunction &call, TIntermTyped *&args)
Definition: hlslParseHelper.cpp:5420
void pop(TPrecisionQualifier *p)
Definition: SymbolTable.h:607
void handleFunctionDeclarator(const TSourceLoc &, TFunction &function, bool prototype)
Definition: hlslParseHelper.cpp:1585
void handleEntryPointAttributes(const TSourceLoc &, const TAttributes &)
Definition: hlslParseHelper.cpp:1742
virtual void setUniformBlockDefaults(TType &block) const override
Definition: hlslParseHelper.h:61
void fixConstInit(const TSourceLoc &, const TString &identifier, TType &type, TIntermTyped *&initializer)
Definition: hlslParseHelper.cpp:6706
Definition: ParseHelper.h:75
bool isInputBuiltIn(const TQualifier &qualifier) const
Definition: hlslParseHelper.cpp:9223
GLsizeiptr size
Definition: glext.h:6559
void checkNoShaderLayouts(const TSourceLoc &, const TShaderQualifiers &)
bool hasOutput(const TQualifier &qualifier) const
Definition: hlslParseHelper.cpp:9317
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glsym_gl.h:634
TIntermNode * addSwitch(const TSourceLoc &, TIntermTyped *expression, TIntermAggregate *body, const TAttributes &)
Definition: hlslParseHelper.cpp:9109
void flatten(const TVariable &variable, bool linkage)
Definition: hlslParseHelper.cpp:1179
GLenum GLuint id
Definition: glext.h:6233
Definition: localintermediate.h:210
TVector< int > offsets
Definition: hlslParseHelper.h:227
bool wasSplit(int id) const
Definition: hlslParseHelper.h:265
TIntermTyped * handleAssign(const TSourceLoc &, TOperator, TIntermTyped *left, TIntermTyped *right)
Definition: hlslParseHelper.cpp:2663
Definition: ResourceLimits.h:52
int loopNestingLevel
Definition: ParseHelper.h:172
TFunction * makeConstructorCall(const TSourceLoc &, const TType &)
Definition: hlslParseHelper.cpp:5932
std::array< int, maxClipCullRegs > clipSemanticNSizeOut
Definition: hlslParseHelper.h:450
void fixBuiltInIoType(TType &)
Definition: hlslParseHelper.cpp:1475
Definition: SymbolTable.h:539
TBuiltInVariable
Definition: BaseTypes.h:135
int get(bool shadow) const
Definition: hlslParseHelper.h:487
Definition: SymbolTable.h:216
TLayoutFormat getLayoutFromTxType(const TSourceLoc &, const TType &)
Definition: hlslParseHelper.cpp:188
bool constructorTextureSamplerError(const TSourceLoc &, const TFunction &)
Definition: hlslParseHelper.cpp:6446
TMap< int, TVariable * > splitNonIoVars
Definition: hlslParseHelper.h:397
TIntermSymbol * findTessLinkageSymbol(TBuiltInVariable biType) const
Definition: hlslParseHelper.cpp:9519
void correctUniform(TQualifier &qualifier)
Definition: hlslParseHelper.cpp:9394
void clearUniform(TQualifier &qualifier)
Definition: hlslParseHelper.cpp:9216
TType * getStructBufferContentType(const TType &type) const
Definition: hlslParseHelper.cpp:6764
Definition: intermediate.h:1234
Definition: hlslParseHelper.h:483
bool wasFlattened(int id) const
Definition: hlslParseHelper.h:256
GLenum GLenum GLenum input
Definition: glext.h:9938
void push()
Definition: SymbolTable.h:588
TIntermTyped * addOutputArgumentConversions(const TFunction &, TIntermOperator &)
Definition: hlslParseHelper.cpp:5641
Definition: hlslParseHelper.h:411
GLdouble GLdouble right
Definition: glext.h:11766
Definition: Types.h:1003
Definition: intermediate.h:1154
TIntermAggregate * node
Definition: hlslParseHelper.h:469
bool isBuiltInMethod(const TSourceLoc &, TIntermTyped *base, const TString &field)
Definition: hlslParseHelper.cpp:1072
Definition: hlslParseHelper.h:49
void mergeObjectLayoutQualifiers(TQualifier &dest, const TQualifier &src, bool inheritOnly)
Definition: hlslParseHelper.cpp:7245
void splitBuiltIn(const TString &baseName, const TType &memberType, const TArraySizes *, const TQualifier &)
Definition: hlslParseHelper.cpp:1095
TIntermTyped * handleDotDereference(const TSourceLoc &, TIntermTyped *base, const TString &field)
Definition: hlslParseHelper.cpp:934
Definition: Types.h:74
GLuint GLuint GLsizei count
Definition: glext.h:6292
int flattenArray(const TVariable &variable, const TType &, TFlattenData &, TString name, bool linkage, const TQualifier &outerQualifier)
Definition: hlslParseHelper.cpp:1319
unsigned int nextInLocation
Definition: hlslParseHelper.h:428
Definition: intermediate.h:1076
void declareBlock(const TSourceLoc &, TType &, const TString *instanceName=0)
Definition: hlslParseHelper.cpp:8511
void popScope()
Definition: hlslParseHelper.h:173
TSymbol * lookupUserType(const TString &, TType &)
Definition: hlslParseHelper.cpp:7705
TMap< const TTypeList *, tIoKinds > ioTypeMap
Definition: hlslParseHelper.h:394
tInterstageIoData(TBuiltInVariable bi, TStorageQualifier q)
Definition: hlslParseHelper.h:412
TIntermTyped * handleLvalue(const TSourceLoc &, const char *op, TIntermTyped *&node)
Definition: hlslParseHelper.cpp:256
bool isStructBufferMethod(const TString &name) const
Definition: hlslParseHelper.cpp:903
void addPatchConstantInvocation()
Definition: hlslParseHelper.cpp:9562
GLint location
Definition: glext.h:6690
Definition: intermediate.h:988
static GX2AttribVar attributes[]
Definition: bokeh.c:713
TVector< TVariable * > members
Definition: hlslParseHelper.h:226
tMipsOperatorData(TSourceLoc l, TIntermTyped *m)
Definition: hlslParseHelper.h:457
void clearUniformInputOutput(TQualifier &qualifier)
Definition: hlslParseHelper.cpp:9405
void declareTypedef(const TSourceLoc &, const TString &identifier, const TType &)
Definition: hlslParseHelper.cpp:7590
void fixBlockUniformOffsets(const TQualifier &, TTypeList &)
Definition: hlslParseHelper.cpp:8744
TVariable * getImplicitThis(int thisDepth) const
Definition: hlslParseHelper.h:180
TIntermNode * handleReturnValue(const TSourceLoc &, TIntermTyped *)
Definition: hlslParseHelper.cpp:2332
void getFullNamespaceName(TString *&) const
Definition: hlslParseHelper.cpp:9190
void nestLooping()
Definition: hlslParseHelper.h:167
void addStructBuffArguments(const TSourceLoc &loc, TIntermAggregate *&)
Definition: hlslParseHelper.cpp:5732
void wrapupSwitchSubsequence(TIntermAggregate *statements, TIntermNode *branchNode)
Definition: hlslParseHelper.cpp:9075
void arraySizeRequiredCheck(const TSourceLoc &, const TArraySizes &)
Definition: hlslParseHelper.cpp:6632
GLenum type
Definition: glext.h:6233
tShadowTextureSymbols()
Definition: hlslParseHelper.h:484
bool l
Definition: connect_wiiupro.c:37
void declareArray(const TSourceLoc &, const TString &identifier, const TType &, TSymbol *&, bool track)
Definition: hlslParseHelper.cpp:6652
TIntermTyped * handleBinaryMath(const TSourceLoc &, const char *str, TOperator op, TIntermTyped *left, TIntermTyped *right)
Definition: hlslParseHelper.cpp:877
Definition: Types.h:1169
bool handleInputGeometry(const TSourceLoc &, const TLayoutGeometry &geometry)
Definition: hlslParseHelper.cpp:8847
EProfile
Definition: Versions.h:51
Definition: hlslParseHelper.h:389
TVector< tGsAppendData > gsAppends
Definition: hlslParseHelper.h:473
TString getStructBuffCounterName(const TString &) const
void setSpecConstantId(const TSourceLoc &, TQualifier &, int value)
Definition: hlslParseHelper.cpp:7217
Definition: Types.h:418
TIntermTyped * handleConstructor(const TSourceLoc &, TIntermTyped *, const TType &)
Definition: hlslParseHelper.cpp:8136
void handleFunctionArgument(TFunction *, TIntermTyped *&arguments, TIntermTyped *newArg)
Definition: hlslParseHelper.cpp:2352
virtual const char * getGlobalUniformBlockName() const override
Definition: hlslParseHelper.h:60
TIntermTyped * handleAssignToMatrixSwizzle(const TSourceLoc &, TOperator, TIntermTyped *left, TIntermTyped *right)
Definition: hlslParseHelper.cpp:3012
TFlattenData(int nb, int nl)
Definition: hlslParseHelper.h:224
Definition: Types.h:71
TIntermTyped * makeIntegerIndex(TIntermTyped *)
Definition: hlslParseHelper.cpp:782
TVariable * cullDistanceOutput
Definition: hlslParseHelper.h:443
void decomposeStructBufferMethods(const TSourceLoc &, TIntermTyped *&node, TIntermNode *arguments)
Definition: hlslParseHelper.cpp:3246
EProfile profile
Definition: parseVersions.h:128
TSourceLoc loc
Definition: hlslParseHelper.h:470
void getTextureReturnType(const TSampler &sampler, TType &retType) const
Definition: hlslParseHelper.cpp:9500
TString currentCaller
Definition: hlslParseHelper.h:346
TTypeList * output
Definition: hlslParseHelper.h:391
Definition: Types.h:285
TVector< tMipsOperatorData > mipsOperatorMipArg
Definition: hlslParseHelper.h:462
TVariable * declareNonArray(const TSourceLoc &, const TString &identifier, const TType &, bool track)
Definition: hlslParseHelper.cpp:7849
static const int maxClipCullRegs
Definition: hlslParseHelper.h:447
std::array< int, maxClipCullRegs > cullSemanticNSizeIn
Definition: hlslParseHelper.h:449
TTypeList * uniform
Definition: hlslParseHelper.h:392
TList< TIntermSequence * > switchSequenceStack
Definition: ParseHelper.h:180
TQualifier globalOutputDefaults
Definition: hlslParseHelper.h:345
void declareStruct(const TSourceLoc &, TString &structName, TType &)
Definition: hlslParseHelper.cpp:7600
bool hasStructBuffCounter(const TType &) const
Definition: hlslParseHelper.cpp:3173
TIntermTyped * flattenAccess(TIntermTyped *base, int member)
Definition: hlslParseHelper.cpp:1366
GLenum src
Definition: glext.h:6980
void mergeQualifiers(TQualifier &dst, const TQualifier &src)
Definition: hlslParseHelper.cpp:6546
void handleSelectionAttributes(const TSourceLoc &loc, TIntermSelection *, const TAttributes &attributes)
Definition: hlslParseHelper.cpp:8899
std::array< int, 2 > symId
Definition: hlslParseHelper.h:494
void unnestLooping()
Definition: hlslParseHelper.h:168
TLayoutGeometry
Definition: Types.h:293
void transferTypeAttributes(const TSourceLoc &, const TAttributes &, TType &, bool allowEntry=false)
Definition: hlslParseHelper.cpp:1891
GLdouble GLdouble GLdouble GLdouble q
Definition: glext.h:6414
void pushSwitchSequence(TIntermSequence *sequence)
Definition: hlslParseHelper.h:187
TIntermTyped * indexStructBufferContent(const TSourceLoc &loc, TIntermTyped *buffer) const
Definition: hlslParseHelper.cpp:6744
TVariable * gsStreamOutput
Definition: hlslParseHelper.h:440
Definition: hlslParseHelper.h:468
void decomposeIntrinsic(const TSourceLoc &, TIntermTyped *&node, TIntermNode *arguments)
Definition: hlslParseHelper.cpp:4549
dictionary args
Definition: test_shaders.py:20
bool overloaded() const
Definition: hlslParseHelper.h:490
HlslParseContext & operator=(HlslParseContext &)
TIntermTyped * handleVariable(const TSourceLoc &, const TString *string)
Definition: hlslParseHelper.cpp:650
void binaryOpError(const TSourceLoc &, const char *op, TString left, TString right)
Definition: hlslParseHelper.cpp:6167
TIntermConstantUnion * getSamplePosArray(int count)
Definition: hlslParseHelper.cpp:3581
const TFunction * findFunction(const TSourceLoc &loc, TFunction &call, bool &builtIn, int &thisDepth, TIntermTyped *&args)
Definition: hlslParseHelper.cpp:7304
TSymbol * redeclareBuiltinVariable(const TSourceLoc &, const TString &, const TQualifier &, const TShaderQualifiers &)
Definition: hlslParseHelper.cpp:6731
int getAnnotationNestingLevel()
Definition: hlslParseHelper.h:171
void handlePackOffset(const TSourceLoc &, TQualifier &, const glslang::TString &location, const glslang::TString *component)
Definition: hlslParseHelper.cpp:6014
Definition: intermediate.h:1482
bool setTextureReturnType(TSampler &sampler, const TType &retType, const TSourceLoc &loc)
Definition: hlslParseHelper.cpp:9413
Definition: arrays.h:222
void handlePragma(const TSourceLoc &, const TVector< TString > &) override
Definition: hlslParseHelper.cpp:525
TVector< TString > currentTypePrefix
Definition: hlslParseHelper.h:437
bool handleOutputGeometry(const TSourceLoc &, const TLayoutGeometry &geometry)
Definition: hlslParseHelper.cpp:8872
static int block
Definition: psp2.c:31
bool isOutputBuiltIn(const TQualifier &qualifier) const
Definition: hlslParseHelper.cpp:9289
Definition: arrays.h:46
TOperator mapAtomicOp(const TSourceLoc &loc, TOperator op, bool isImage)
Definition: hlslParseHelper.cpp:3074
void addQualifierToExisting(const TSourceLoc &, TQualifier, const TString &identifier)
Definition: hlslParseHelper.cpp:8795
TStorageQualifier
Definition: BaseTypes.h:81
void updateStandaloneQualifierDefaults(const TSourceLoc &, const TPublicType &)
Definition: hlslParseHelper.cpp:8972
void assignError(const TSourceLoc &, const char *op, TString left, TString right)
Definition: hlslParseHelper.cpp:6148
Definition: Types.h:277
TString sourceEntryPointName
Definition: ParseHelper.h:195
TTypeList * input
Definition: hlslParseHelper.h:390
GLuint index
Definition: glext.h:6671
bool isScalarConstructor(const TIntermNode *)
Definition: hlslParseHelper.cpp:6430
void split(const TVariable &)
Definition: hlslParseHelper.cpp:1131
TIntermTyped * mipLevel
Definition: hlslParseHelper.h:459
bool shouldConvertLValue(const TIntermNode *) const
Definition: hlslParseHelper.cpp:154
static bool isClipOrCullDistance(TBuiltInVariable)
Definition: hlslParseHelper.cpp:1465
TIntermTyped * constructAggregate(TIntermNode *, const TType &, int, const TSourceLoc &)
Definition: hlslParseHelper.cpp:8493
bool lineContinuationCheck(const TSourceLoc &, bool) override
Definition: hlslParseHelper.h:68
bool hasInput(const TQualifier &qualifier) const
Definition: hlslParseHelper.cpp:9271
void unnestAnnotations()
Definition: hlslParseHelper.h:170
TIntermTyped * handleFunctionCall(const TSourceLoc &, TFunction *, TIntermTyped *)
Definition: hlslParseHelper.cpp:5218
bool hasUniform(const TQualifier &qualifier) const
Definition: hlslParseHelper.cpp:9207
void handleSemantic(TSourceLoc, TQualifier &, TBuiltInVariable, const TString &upperCase)
Definition: hlslParseHelper.cpp:5950
void globalQualifierFix(const TSourceLoc &, TQualifier &)
Definition: hlslParseHelper.cpp:6522
void shareStructBufferType(TType &)
Definition: hlslParseHelper.cpp:6780
void assignToInterface(TVariable &variable)
Definition: hlslParseHelper.cpp:1540
TIntermTyped * handleBracketOperator(const TSourceLoc &, TIntermTyped *base, TIntermTyped *index)
Definition: hlslParseHelper.cpp:725
Definition: hlslParseHelper.h:456
void correctInput(TQualifier &qualifier)
Definition: hlslParseHelper.cpp:9338
Definition: SymbolTable.h:81
TString patchConstantFunctionName
Definition: hlslParseHelper.h:434
void variableCheck(TIntermTyped *&nodePtr)
Definition: hlslParseHelper.cpp:6180
TQualifier globalBufferDefaults
Definition: hlslParseHelper.h:342
TIntermTyped * convertArray(TIntermTyped *, const TType &)
Definition: hlslParseHelper.cpp:8420
void paramFix(TType &type)
Definition: hlslParseHelper.cpp:6830
void setLimits(const TBuiltInResource &) override
Definition: hlslParseHelper.cpp:117
void addStructBufferHiddenCounterParam(const TSourceLoc &loc, TParameter &, TIntermAggregate *&)
Definition: hlslParseHelper.cpp:1618
void fixBlockXfbOffsets(TQualifier &, TTypeList &)
Definition: hlslParseHelper.cpp:8707
void reservedPpErrorCheck(const TSourceLoc &, const char *, const char *) override
Definition: hlslParseHelper.h:67
void pushImplicitThis(TVariable *thisParameter)
Definition: hlslParseHelper.h:178
virtual ~HlslParseContext()
Definition: hlslParseHelper.cpp:105
void removeUnusedStructBufferCounters()
Definition: hlslParseHelper.cpp:9916
TVector< TTypeList * > textureReturnStruct
Definition: hlslParseHelper.h:404
bool isShadowId(int id) const
Definition: hlslParseHelper.h:491
bool lValueErrorCheck(const TSourceLoc &, const char *op, TIntermTyped *) override
Definition: hlslParseHelper.cpp:223
void nestAnnotations()
Definition: hlslParseHelper.h:169
TIntermNode * declareVariable(const TSourceLoc &, const TString &identifier, TType &, TIntermTyped *initializer=0)
Definition: hlslParseHelper.cpp:7726
TVariable * clipDistanceInput
Definition: hlslParseHelper.h:444
void pushScope()
Definition: hlslParseHelper.h:172
TVector< TType * > structBufferTypes
Definition: hlslParseHelper.h:400
void finalizeAppendMethods()
Definition: hlslParseHelper.cpp:9949
std::basic_string< char, std::char_traits< char >, TStringAllocator > TString
Definition: Common.h:128
static bool isClipOrCullDistance(const TQualifier &qual)
Definition: hlslParseHelper.h:320
TBuiltInVariable builtIn
Definition: hlslParseHelper.h:415
TIntermTyped * handleBracketDereference(const TSourceLoc &, TIntermTyped *base, TIntermTyped *index)
Definition: hlslParseHelper.cpp:799
void handleRegister(const TSourceLoc &, TQualifier &, const glslang::TString *profile, const glslang::TString &desc, int subComponent, const glslang::TString *)
Definition: hlslParseHelper.cpp:6054
TBasicType
Definition: BaseTypes.h:46
bool parseMatrixSwizzleSelector(const TSourceLoc &, const TString &, int cols, int rows, TSwizzleSelectors< TMatrixSelector > &)
Definition: hlslParseHelper.cpp:572
TIntermTyped * convertConditionalExpression(const TSourceLoc &, TIntermTyped *, bool mustBeScalar=true)
Definition: hlslParseHelper.cpp:6133
TIdSetType inductiveLoopIds
Definition: hlslParseHelper.h:347
void addScopeMangler(TString &)
Definition: hlslParseHelper.cpp:9201
void pushFrontArguments(TIntermTyped *front, TIntermTyped *&arguments)
Definition: hlslParseHelper.cpp:5405
unsigned int nextBinding
Definition: hlslParseHelper.h:228
TIntermSymbol * makeInternalVariableNode(const TSourceLoc &, const char *name, const TType &) const
Definition: hlslParseHelper.cpp:7834
const TFunction * findPatchConstantFunction(const TSourceLoc &loc)
Definition: hlslParseHelper.cpp:9529
void handleFunctionBody(const TSourceLoc &, TFunction &, TIntermNode *functionBody, TIntermNode *&node)
Definition: hlslParseHelper.cpp:2174
bool isReference(const TType &type) const
Definition: hlslParseHelper.h:310
TAttributeType attributeFromName(const TString &nameSpace, const TString &name) const
Definition: hlslAttributes.cpp:42
void decomposeGeometryMethods(const TSourceLoc &, TIntermTyped *&node, TIntermNode *arguments)
Definition: hlslParseHelper.cpp:4487
void counterBufferType(const TSourceLoc &loc, TType &type)
Definition: hlslParseHelper.cpp:3184
GLsizei const GLfloat * value
Definition: glext.h:6709
bool parseShaderStrings(TPpContext &, TInputScanner &input, bool versionWillBeError=false) override
Definition: hlslParseHelper.cpp:128
static void expr(LexState *ls, expdesc *v)
Definition: lparser.c:1078
TMap< tInterstageIoData, TVariable * > splitBuiltIns
Definition: hlslParseHelper.h:424
TLayoutFormat
Definition: Types.h:320
bool voidErrorCheck(const TSourceLoc &, const TString &, TBasicType)
Definition: hlslParseHelper.cpp:6509
void popThisScope()
Definition: hlslParseHelper.h:176
TFlattenData()
Definition: hlslParseHelper.h:222
void popSwitchSequence()
Definition: hlslParseHelper.h:188
GLenum GLenum dst
Definition: glext.h:6980
TBuiltInVariable builtIn
Definition: Types.h:487
static void field(LexState *ls, struct ConsControl *cc)
Definition: lparser.c:702
bool operator<(const tInterstageIoData d) const
Definition: hlslParseHelper.h:419
bool wasFlattened(const TIntermTyped *node) const
Definition: hlslParseHelper.cpp:1350
TIntermAggregate * handleFunctionDefinition(const TSourceLoc &, TFunction &, const TAttributes &, TIntermNode *&entryPointTree)
Definition: hlslParseHelper.cpp:1644
bool builtInName(const TString &)
Definition: hlslParseHelper.cpp:6232
EShMessages
Definition: ShaderLang.h:204
TIntermAggregate * assignClipCullDistance(const TSourceLoc &, TOperator, int semanticId, TIntermTyped *left, TIntermTyped *right)
Definition: hlslParseHelper.cpp:2429
TQualifier globalUniformDefaults
Definition: hlslParseHelper.h:343
TIntermTyped * convertInitializerList(const TSourceLoc &, const TType &, TIntermTyped *initializer, TIntermTyped *scalarInit)
Definition: hlslParseHelper.cpp:7974
TVector< TIntermTyped * > needsIndexLimitationChecking
Definition: hlslParseHelper.h:348
GLuint sampler
Definition: glext.h:7950
Definition: video4linux2.c:51
void structArrayCheck(const TSourceLoc &, const TType &structure)
Definition: hlslParseHelper.cpp:6638
void set(bool shadow, int id)
Definition: hlslParseHelper.h:486
GLint left
Definition: glext.h:8393
static bool isClipOrCullDistance(const TType &type)
Definition: hlslParseHelper.h:321
TMap< TString, bool > structBufferCounter
Definition: hlslParseHelper.h:406
Definition: intermediate.h:1560
bool constructorError(const TSourceLoc &, TIntermNode *, TFunction &, TOperator, TType &)
Definition: hlslParseHelper.cpp:6244
bool isStructBufferType(const TType &type) const
Definition: hlslParseHelper.h:301
TVariable * clipDistanceOutput
Definition: hlslParseHelper.h:442
int computeSamplerTypeIndex(TSampler &)
Definition: hlslParseHelper.cpp:6583
Definition: intermediate.h:1042
void builtInOpCheck(const TSourceLoc &, const TFunction &, TIntermOperator &)
Definition: hlslParseHelper.cpp:5781
int annotationNestingLevel
Definition: hlslParseHelper.h:336
void remapEntryPointIO(TFunction &function, TVariable *&returnValue, TVector< TVariable *> &inputs, TVector< TVariable *> &outputs)
Definition: hlslParseHelper.cpp:2192
void expandArguments(const TSourceLoc &, const TFunction &, TIntermTyped *&)
Definition: hlslParseHelper.cpp:5568
EShMessages messages
Definition: parseVersions.h:136
const bool parsingBuiltins
Definition: ParseHelper.h:189
Definition: Scan.h:52
void pushThisScope(const TType &, const TVector< TFunctionDeclarator > &)
Definition: hlslParseHelper.cpp:9145
static uint8_t body[]
Definition: remotepad.h:4
TVector< TSymbol * > ioArraySymbolResizeList
Definition: hlslParseHelper.h:382
void lengthenList(const TSourceLoc &, TIntermSequence &list, int size, TIntermTyped *scalarInit)
Definition: hlslParseHelper.cpp:8120
Definition: ShaderLang.h:205
TVector< TVariable * > implicitThisStack
Definition: hlslParseHelper.h:438
void addInputArgumentConversions(const TFunction &, TIntermTyped *&)
Definition: hlslParseHelper.cpp:5495
any call(F fn, Args &&... args)
Definition: peglib.h:337
const GLfloat * m
Definition: glext.h:11755
void fixBlockLocations(const TSourceLoc &, TQualifier &, TTypeList &, bool memberWithLocation, bool memberWithoutLocation)
Definition: hlslParseHelper.cpp:8670
Definition: lobject.h:303
const char *const str
Definition: portlistingparse.c:18
int findSubtreeOffset(const TIntermNode &) const
Definition: hlslParseHelper.cpp:1409
void unaryOpError(const TSourceLoc &, const char *op, TString operand)
Definition: hlslParseHelper.cpp:6157
Definition: BaseTypes.h:68
SpvVersion spvVersion
Definition: parseVersions.h:130
std::array< int, maxClipCullRegs > clipSemanticNSizeIn
Definition: hlslParseHelper.h:448
int addFlattenedMember(const TVariable &, const TType &, TFlattenData &, const TString &name, bool linkage, const TQualifier &outerQualifier, const TArraySizes *builtInArraySizes)
Definition: hlslParseHelper.cpp:1241
void decomposeSampleMethods(const TSourceLoc &, TIntermTyped *&node, TIntermNode *arguments)
Definition: hlslParseHelper.cpp:3648
void fixTextureShadowModes()
Definition: hlslParseHelper.cpp:9928
void trackLinkage(TSymbol &variable) override
Definition: hlslParseHelper.cpp:1453
void setLayoutQualifier(const TSourceLoc &, TQualifier &, TString &)
Definition: hlslParseHelper.cpp:6871
bool wasSplit(const TIntermTyped *node) const
Definition: hlslParseHelper.cpp:1357