59 #include <unordered_map> 82 strings.push_back(std::unique_ptr<Instruction>(fileString));
89 Id import(
const char*);
183 return module.getInstruction(scalarTypeId)->getImmediateOperand(0);
202 return (
Dim)
module.getInstruction(typeId)->getImmediateOperand(1);
213 return module.getInstruction(typeId)->getImmediateOperand(3) != 0;
257 const std::vector<std::vector<Decoration>>& precisions,
Block **entry = 0);
428 const std::vector<int>& valueToSegment,
int defaultSegment, std::vector<Block*>& segmentBB);
437 void endSwitch(std::vector<Block*>& segmentBB);
569 void dump(std::vector<unsigned int>&)
const;
596 void dumpInstructions(std::vector<unsigned int>&,
const std::vector<std::unique_ptr<Instruction> >&)
const;
621 std::vector<std::unique_ptr<Instruction> >
strings;
622 std::vector<std::unique_ptr<Instruction> >
imports;
625 std::vector<std::unique_ptr<Instruction> >
names;
634 std::unordered_map<unsigned int, std::vector<Instruction*>>
groupedTypes;
648 #endif // SpvBuilder_H void eliminateDeadDecorations()
Definition: SpvBuilder.cpp:2457
std::vector< Id > indexChain
Definition: SpvBuilder.h:499
std::vector< std::unique_ptr< Instruction > > constantsTypesGlobals
Definition: SpvBuilder.h:627
Id makeInt8Constant(int i, bool specConstant=false)
Definition: SpvBuilder.h:218
void makeSwitch(Id condition, unsigned int control, int numSegments, const std::vector< int > &caseValues, const std::vector< int > &valueToSegment, int defaultSegment, std::vector< Block *> &segmentBB)
Definition: SpvBuilder.cpp:2170
Block & continue_target
Definition: SpvBuilder.h:442
Id makePointer(StorageClass, Id type)
Definition: SpvBuilder.cpp:152
void setSourceFile(const std::string &file)
Definition: SpvBuilder.h:77
Id makeMatrixType(Id component, int cols, int rows)
Definition: SpvBuilder.cpp:310
Id instr
Definition: SpvBuilder.h:500
GLuint const GLchar * name
Definition: glext.h:6671
void createSelectionMerge(Block *mergeBlock, unsigned int control)
Definition: SpvBuilder.cpp:2688
LoopBlocks & makeNewLoop()
Definition: SpvBuilder.cpp:2245
std::vector< std::unique_ptr< Instruction > > decorations
Definition: SpvBuilder.h:626
std::vector< std::unique_ptr< Instruction > > strings
Definition: SpvBuilder.h:621
Id getDerefTypeId(Id resultId) const
Definition: SpvBuilder.cpp:507
void createLoopContinue()
Definition: SpvBuilder.cpp:2260
Id setPrecision(Id id, Decoration precision)
Definition: SpvBuilder.h:321
std::vector< std::unique_ptr< Function > > functions
Definition: SpvBuilder.h:629
std::stack< LoopBlocks > loops
Definition: SpvBuilder.h:640
MemoryModel memoryModel
Definition: SpvBuilder.h:610
void accessChainPush(Id offset)
Definition: SpvBuilder.h:534
void dumpSourceInstructions(std::vector< unsigned int > &) const
Definition: SpvBuilder.cpp:2722
void setToSpecConstCodeGenMode()
Definition: SpvBuilder.h:576
Id makeDoubleConstant(double d, bool specConstant=false)
Definition: SpvBuilder.cpp:795
Id getUniqueIds(int numIds)
Definition: SpvBuilder.h:102
Scope
Definition: spirv.hpp:562
GLenum mode
Definition: glext.h:6857
GLsizei GLsizei numSegments
Definition: glext.h:12661
Definition: spirv.hpp:740
Definition: disassemble.cpp:50
unsigned int Id
Definition: spirv.hpp:47
Id makeIntegerType(int width, bool hasSign)
Definition: SpvBuilder.cpp:174
bool isPointer(Id resultId) const
Definition: SpvBuilder.h:149
Id getImageType(Id resultId) const
Definition: SpvBuilder.h:204
Id makeStructResultType(Id type0, Id type1)
Definition: SpvBuilder.cpp:266
bool isSpecConstantOpCode(Op opcode) const
Definition: SpvBuilder.cpp:681
SourceLanguage
Definition: spirv.hpp:58
Definition: spirv.hpp:735
Definition: spirv.hpp:738
std::string sourceText
Definition: SpvBuilder.h:603
void accessChainStore(Id rvalue)
Definition: SpvBuilder.cpp:2314
StorageClass
Definition: spirv.hpp:137
Id makeRuntimeArray(Id element)
Definition: SpvBuilder.cpp:364
Id offsets
Definition: SpvBuilder.h:359
Id getUniqueId()
Definition: SpvBuilder.h:99
StorageClass getStorageClass(Id resultId) const
Definition: SpvBuilder.h:177
std::unordered_map< unsigned int, std::vector< Instruction * > > groupedTypes
Definition: SpvBuilder.h:634
Id createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicit, const TextureParameters &)
Definition: SpvBuilder.cpp:1573
void addName(Id, const char *name)
Definition: SpvBuilder.cpp:992
Block * thenBlock
Definition: SpvBuilder.h:410
Id base
Definition: SpvBuilder.h:498
bool isIntType(Id typeId) const
Definition: SpvBuilder.h:157
GLsizei const GLchar *const * strings
Definition: glext.h:8289
Builder(unsigned int spvVersion, unsigned int userNumber, SpvBuildLogger *logger)
Definition: SpvBuilder.cpp:57
Definition: spirv.hpp:744
Definition: spirv.hpp:722
Definition: spirv.hpp:734
GLsizeiptr size
Definition: glext.h:6559
Id getTypeId(Id resultId) const
Definition: SpvBuilder.h:135
void createAndSetNoPredecessorBlock(const char *)
Definition: SpvBuilder.cpp:2668
Id createCompositeCompare(Decoration precision, Id, Id, bool)
Definition: SpvBuilder.cpp:1846
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glsym_gl.h:634
GLfloat f
Definition: glext.h:8207
bool isConstant(Id resultId) const
Definition: SpvBuilder.h:173
Id createCompositeExtract(Id composite, Id typeId, unsigned index)
Definition: SpvBuilder.cpp:1252
void accessChainPushSwizzle(std::vector< unsigned > &swizzle, Id preSwizzleBaseType)
Definition: SpvBuilder.cpp:2291
Id createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex)
Definition: SpvBuilder.cpp:1306
GLenum GLuint id
Definition: glext.h:6233
void createLoopExit()
Definition: SpvBuilder.cpp:2267
bool isConstantOpCode(Op opcode) const
Definition: SpvBuilder.cpp:659
static const signed char indexes[2][4][20]
Definition: camellia.c:218
Id createVariable(StorageClass, Id type, const char *name=0)
Definition: SpvBuilder.cpp:1164
bool isScalar(Id resultId) const
Definition: SpvBuilder.h:150
Id createBuiltinCall(Id resultType, Id builtins, int entryPoint, const std::vector< Id > &args)
Definition: SpvBuilder.cpp:1558
Id preSwizzleBaseType
Definition: SpvBuilder.h:503
Id makeBoolConstant(bool b, bool specConstant=false)
Definition: SpvBuilder.cpp:695
bool isAggregateType(Id typeId) const
Definition: SpvBuilder.h:166
Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value)
Definition: SpvBuilder.cpp:626
void setLine(int line)
Definition: SpvBuilder.cpp:91
Definition: spirv.hpp:754
void endSwitch(std::vector< Block *> &segmentBB)
Definition: SpvBuilder.cpp:2225
GLsizei const GLchar *const * string
Definition: glext.h:6699
GLuint GLenum swizzle
Definition: glext.h:10418
unsigned int getSpvVersion() const
Definition: SpvBuilder.h:70
If(Id condition, unsigned int ctrl, Builder &builder)
Definition: SpvBuilder.cpp:2114
bool isRValue
Definition: SpvBuilder.h:504
void createMemoryBarrier(unsigned executionScope, unsigned memorySemantics)
Definition: SpvBuilder.cpp:1360
Id findCompositeConstant(Op typeClass, const std::vector< Id > &comps)
Definition: SpvBuilder.cpp:870
void setEmitOpLines()
Definition: SpvBuilder.h:87
const char * entryPoint
Definition: Hlsl.FromFile.cpp:45
int getNumTypeConstituents(Id typeId) const
Definition: SpvBuilder.cpp:541
ExecutionMode
Definition: spirv.hpp:93
GLenum GLint GLint * precision
Definition: glext.h:8206
LoopBlocks & operator=(const LoopBlocks &)
Id offset
Definition: SpvBuilder.h:358
Id condition
Definition: SpvBuilder.h:406
Id sample
Definition: SpvBuilder.h:362
int getNumRows(Id resultId) const
Definition: SpvBuilder.h:197
Id makeInt64Constant(long long i, bool specConstant=false)
Definition: SpvBuilder.h:224
GLdouble GLdouble right
Definition: glext.h:11766
Id makeCompositeConstant(Id type, const std::vector< Id > &comps, bool specConst=false)
Definition: SpvBuilder.cpp:923
Definition: spirv.hpp:737
void addDecorationId(Id id, Decoration, Id idDecoration)
Definition: SpvBuilder.cpp:1038
Function * makeEntryPoint(const char *)
Definition: SpvBuilder.cpp:1081
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
void dumpModuleProcesses(std::vector< unsigned int > &) const
Definition: SpvBuilder.cpp:2768
MemoryModel
Definition: spirv.hpp:86
Id createBinOp(Op, Id typeId, Id operand1, Id operand2)
Definition: SpvBuilder.cpp:1383
std::vector< const char * > moduleProcesses
Definition: SpvBuilder.h:608
Id makeBoolType()
Definition: SpvBuilder.cpp:124
GLuint GLuint num
Definition: glext.h:10525
int getNumColumns(Id resultId) const
Definition: SpvBuilder.h:191
GLfloat GLfloat GLfloat v2
Definition: glext.h:6703
void createBranch(Block *block)
Definition: SpvBuilder.cpp:2680
Id bias
Definition: SpvBuilder.h:355
bool isUintType(Id typeId) const
Definition: SpvBuilder.h:158
void createConditionalBranch(Id condition, Block *thenBlock, Block *elseBlock)
Definition: SpvBuilder.cpp:2708
Decoration
Definition: spirv.hpp:344
std::vector< std::unique_ptr< Instruction > > imports
Definition: SpvBuilder.h:622
ImageFormat getImageTypeFormat(Id typeId) const
Definition: SpvBuilder.h:147
void setSource(spv::SourceLanguage lang, int version)
Definition: SpvBuilder.h:72
Id sampler
Definition: SpvBuilder.h:353
Id createBitFieldExtractCall(Decoration precision, Id, Id, Id, bool isSigned)
Id makeSampledImageType(Id imageType)
Definition: SpvBuilder.cpp:486
bool isSamplerType(Id typeId) const
Definition: SpvBuilder.h:168
void makeBeginElse()
Definition: SpvBuilder.cpp:2137
Id createBitFieldInsertCall(Decoration precision, Id, Id, Id, Id)
void addMemberDecoration(Id, unsigned int member, Decoration, int num=-1)
Definition: SpvBuilder.cpp:1051
Definition: spirv.hpp:732
Module module
Definition: SpvBuilder.h:613
Id createUndefined(Id type)
Definition: SpvBuilder.cpp:1189
Block & body
Definition: SpvBuilder.h:442
Block * elseBlock
Definition: SpvBuilder.h:411
bool isArrayType(Id typeId) const
Definition: SpvBuilder.h:165
Definition: SpvBuilder.h:352
std::unordered_map< unsigned int, std::vector< Instruction * > > groupedConstants
Definition: SpvBuilder.h:632
GLenum type
Definition: glext.h:6233
void setAccessChainLValue(Id lValue)
Definition: SpvBuilder.h:520
Id findStructConstant(Id typeId, const std::vector< Id > &comps)
Definition: SpvBuilder.cpp:898
void leaveFunction()
Definition: SpvBuilder.cpp:1140
Block & makeNewBlock()
Definition: SpvBuilder.cpp:2237
AccessChain accessChain
Definition: SpvBuilder.h:618
void setMemoryModel(spv::AddressingModel addr, spv::MemoryModel mem)
Definition: SpvBuilder.h:90
Id makeIntType(int width)
Definition: SpvBuilder.h:120
std::set< spv::Capability > capabilities
Definition: SpvBuilder.h:611
bool isSpecConstant(Id resultId) const
Definition: SpvBuilder.h:175
void clearAccessChain()
Definition: SpvBuilder.cpp:2279
Definition: spirv.hpp:733
Id createSamplePositionCall(Decoration precision, Id, Id)
Op
Definition: spirv.hpp:714
Id makeIntConstant(int i, bool specConstant=false)
Definition: SpvBuilder.h:222
Id createArrayLength(Id base, unsigned int member)
Definition: SpvBuilder.cpp:1241
spv::Id sourceFileStringId
Definition: SpvBuilder.h:602
void addDecoration(Id, Decoration, int num=-1)
Definition: SpvBuilder.cpp:1011
void promoteScalar(Decoration precision, Id &left, Id &right)
Definition: SpvBuilder.cpp:1512
version
Definition: setup.py:6
std::vector< std::unique_ptr< Instruction > > externals
Definition: SpvBuilder.h:628
Id createLvalueSwizzle(Id typeId, Id target, Id source, const std::vector< unsigned > &channels)
Definition: SpvBuilder.cpp:1479
Id makeArrayType(Id element, Id sizeId, int stride)
Definition: SpvBuilder.cpp:340
std::vector< unsigned > swizzle
Definition: SpvBuilder.h:501
bool isFloatType(Id typeId) const
Definition: SpvBuilder.h:159
GLenum const GLvoid * addr
Definition: glext.h:10528
Id createCompositeConstruct(Id typeId, const std::vector< Id > &constituents)
Definition: SpvBuilder.cpp:1914
void createLoopMerge(Block *mergeBlock, Block *continueBlock, unsigned int control, unsigned int dependencyLength)
Definition: SpvBuilder.cpp:2696
Id makeFpConstant(Id type, double d, bool specConstant=false)
Definition: SpvBuilder.cpp:851
Id createRvalueSwizzle(Decoration precision, Id typeId, Id source, const std::vector< unsigned > &channels)
Definition: SpvBuilder.cpp:1457
Block * getBuildPoint() const
Definition: SpvBuilder.h:247
bool isSampledImage(Id resultId) const
Definition: SpvBuilder.h:154
unsigned int spvVersion
Definition: SpvBuilder.h:599
Id accessChainGetInferredType()
Definition: SpvBuilder.cpp:2424
LoopBlocks(Block &head, Block &body, Block &merge, Block &continue_target)
Definition: SpvBuilder.h:440
AccessChain getAccessChain()
Definition: SpvBuilder.h:513
Id createAccessChain(StorageClass, Id base, const std::vector< Id > &offsets)
Definition: SpvBuilder.cpp:1216
Id getScalarTypeId(Id typeId) const
Definition: SpvBuilder.cpp:570
bool isConstantScalar(Id resultId) const
Definition: SpvBuilder.h:174
Id createUnaryOp(Op, Id typeId, Id operand)
Definition: SpvBuilder.cpp:1369
Id component
Definition: SpvBuilder.h:502
bool isBoolType(Id typeId)
Definition: SpvBuilder.h:156
void setAccessChainRValue(Id rValue)
Definition: SpvBuilder.h:527
unsigned int control
Definition: SpvBuilder.h:407
StorageClass getTypeStorageClass(Id typeId) const
Definition: SpvBuilder.h:146
bool emitOpLines
Definition: SpvBuilder.h:605
bool isInSpecConstCodeGenMode()
Definition: SpvBuilder.h:580
Id createLoad(Id lValue)
Definition: SpvBuilder.cpp:1206
bool isImageType(Id typeId) const
Definition: SpvBuilder.h:167
bool isAggregate(Id resultId) const
Definition: SpvBuilder.h:153
const Decoration NoPrecision
Definition: spvIR.h:67
void accessChainPushComponent(Id component, Id preSwizzleBaseType)
Definition: SpvBuilder.h:544
Id createCompositeInsert(Id object, Id composite, Id typeId, unsigned index)
Definition: SpvBuilder.cpp:1283
const Id NoResult
Definition: spvIR.h:64
dictionary args
Definition: test_shaders.py:20
std::stack< Block * > switchMerges
Definition: SpvBuilder.h:637
Function * makeFunctionEntry(Decoration precision, Id returnType, const char *name, const std::vector< Id > ¶mTypes, const std::vector< std::vector< Decoration >> &precisions, Block **entry=0)
Definition: SpvBuilder.cpp:1095
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glext.h:6293
void setAccessChain(AccessChain newChain)
Definition: SpvBuilder.h:514
Id makeStructType(const std::vector< Id > &members, const char *)
Definition: SpvBuilder.cpp:247
Capability
Definition: spirv.hpp:599
void addExtension(const char *ext)
Definition: SpvBuilder.h:88
Id makeVoidType()
Definition: SpvBuilder.cpp:110
GLfloat GLfloat p
Definition: glext.h:9809
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:6316
virtual ~Builder()
Definition: SpvBuilder.cpp:76
Id createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex)
Definition: SpvBuilder.cpp:1316
void simplifyAccessChainSwizzle()
Definition: SpvBuilder.cpp:2613
ExecutionModel
Definition: spirv.hpp:68
Id createTriOp(Op, Id typeId, Id operand1, Id operand2, Id operand3)
Definition: SpvBuilder.cpp:1400
Id createMatrixConstructor(Decoration precision, const std::vector< Id > &sources, Id constructee)
Definition: SpvBuilder.cpp:2025
void addLine(Id fileName, int line, int column)
Definition: SpvBuilder.cpp:100
void remapDynamicSwizzle()
Definition: SpvBuilder.cpp:2594
Op getOpCode(Id id) const
Definition: SpvBuilder.h:137
static const int maxMatrixSize
Definition: SpvBuilder.h:68
static int block
Definition: psp2.c:31
Id makeFloatConstant(float f, bool specConstant=false)
Definition: SpvBuilder.cpp:770
Definition: spirv.hpp:736
const char * fileName
Definition: Hlsl.FromFile.cpp:44
GLuint index
Definition: glext.h:6671
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format)
Definition: SpvBuilder.cpp:405
int builderNumber
Definition: SpvBuilder.h:612
Id getResultId() const
Definition: spvIR.h:123
int getTypeNumRows(Id typeId) const
Definition: SpvBuilder.h:192
void createStore(Id rValue, Id lValue)
Definition: SpvBuilder.cpp:1197
Definition: SpvBuilder.h:439
SpvBuildLogger * logger
Definition: SpvBuilder.h:643
Id makeUintConstant(unsigned u, bool specConstant=false)
Definition: SpvBuilder.h:223
GLsizei GLsizei GLchar * source
Definition: glext.h:6688
Id createTextureQueryCall(Op, const TextureParameters &, bool isUnsignedResult)
Definition: SpvBuilder.cpp:1775
Id component
Definition: SpvBuilder.h:363
Definition: SpvBuilder.h:63
int getNumComponents(Id resultId) const
Definition: SpvBuilder.h:140
bool isStructType(Id typeId) const
Definition: SpvBuilder.h:164
MemorySemanticsMask
Definition: spirv.hpp:534
void addExecutionMode(Function *, ExecutionMode mode, int value1=-1, int value2=-1, int value3=-1)
Definition: SpvBuilder.cpp:977
bool isPointerType(Id typeId) const
Definition: SpvBuilder.h:160
Id coords
Definition: SpvBuilder.h:354
GLenum cap
Definition: glext.h:10546
Id accessChainGetLValue()
Definition: SpvBuilder.cpp:2407
void makeDiscard()
Definition: SpvBuilder.cpp:1157
AddressingModel
Definition: spirv.hpp:79
SourceLanguage source
Definition: SpvBuilder.h:600
Id gradX
Definition: SpvBuilder.h:360
bool isScalarType(Id typeId) const
Definition: SpvBuilder.h:161
void setBuildPoint(Block *bp)
Definition: SpvBuilder.h:246
GLsizei GLenum * sources
Definition: glext.h:8420
int getNumTypeComponents(Id typeId) const
Definition: SpvBuilder.h:142
Id gradY
Definition: SpvBuilder.h:361
Definition: spirv.hpp:739
void createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask)
Definition: SpvBuilder.cpp:1351
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
std::set< std::string > extensions
Definition: SpvBuilder.h:606
Function * entryPointFunction
Definition: SpvBuilder.h:616
GLint GLint GLsizei width
Definition: glext.h:6293
Id makeUint16Constant(unsigned u, bool specConstant=false)
Definition: SpvBuilder.h:221
bool isSampledImageType(Id typeId) const
Definition: SpvBuilder.h:169
void setToNormalCodeGenMode()
Definition: SpvBuilder.h:578
Op getMostBasicTypeClass(Id typeId) const
Definition: SpvBuilder.cpp:515
void addSwitchBreak()
Definition: SpvBuilder.cpp:2203
bool generatingOpCodeForSpecConst
Definition: SpvBuilder.h:617
Id createConstructor(Decoration precision, const std::vector< Id > &sources, Id resultTypeId)
Definition: SpvBuilder.cpp:1941
Id makeFunctionType(Id returnType, const std::vector< Id > ¶mTypes)
Definition: SpvBuilder.cpp:374
Definition: ffmpeg_fft.c:36
Id lod
Definition: SpvBuilder.h:356
unsigned int getConstantScalar(Id resultId) const
Definition: SpvBuilder.h:176
~If()
Definition: SpvBuilder.h:396
GLenum condition
Definition: glext.h:10162
std::vector< const char * > sourceExtensions
Definition: SpvBuilder.h:607
void createNoResultOp(Op)
Definition: SpvBuilder.cpp:1328
Definition: SpvBuilder.h:393
Id makeVectorType(Id component, int size)
Definition: SpvBuilder.cpp:288
void closeLoop()
Definition: SpvBuilder.cpp:2274
bool isArrayedImageType(Id typeId) const
Definition: SpvBuilder.h:210
Id makeInt16Constant(int i, bool specConstant=false)
Definition: SpvBuilder.h:220
int sourceVersion
Definition: SpvBuilder.h:601
bool isMatrix(Id resultId) const
Definition: SpvBuilder.h:152
GLsizei const GLfloat * value
Definition: glext.h:6709
void addModuleProcessed(const std::string &p)
Definition: SpvBuilder.h:86
void nextSwitchSegment(std::vector< Block *> &segmentBB, int segment)
Definition: SpvBuilder.cpp:2211
Definition: spirv.hpp:742
const Id NoType
Definition: spvIR.h:65
Id createOp(Op, Id typeId, const std::vector< Id > &operands)
Definition: SpvBuilder.cpp:1421
Block & head
Definition: SpvBuilder.h:442
Dim
Definition: spirv.hpp:154
bool isVector(Id resultId) const
Definition: SpvBuilder.h:151
Id makeFloat16Constant(float f16, bool specConstant=false)
Definition: SpvBuilder.cpp:823
void addSourceExtension(const char *ext)
Definition: SpvBuilder.h:85
Id makeUintType(int width)
Definition: SpvBuilder.h:121
GLsizei stride
Definition: glext.h:6488
int currentLine
Definition: SpvBuilder.h:604
void transferAccessChainSwizzle(bool dynamic)
Definition: SpvBuilder.cpp:2638
unsigned long Instruction
Definition: llimits.h:165
std::vector< std::unique_ptr< Instruction > > entryPoints
Definition: SpvBuilder.h:623
Id Dref
Definition: SpvBuilder.h:357
Builder & builder
Definition: SpvBuilder.h:405
AddressingModel addressModel
Definition: SpvBuilder.h:609
Id makeSamplerType()
Definition: SpvBuilder.cpp:138
void dump(std::vector< unsigned int > &) const
Definition: SpvBuilder.cpp:2492
Id createFunctionCall(spv::Function *, const std::vector< spv::Id > &)
Definition: SpvBuilder.cpp:1445
int getScalarTypeWidth(Id typeId) const
Definition: SpvBuilder.h:179
Definition: civetweb.c:1024
int getTypeNumColumns(Id typeId) const
Definition: SpvBuilder.h:186
GLintptr offset
Definition: glext.h:6560
Id texelOut
Definition: SpvBuilder.h:364
GLint left
Definition: glext.h:8393
Dim getTypeDimensionality(Id typeId) const
Definition: SpvBuilder.h:199
void makeEndIf()
Definition: SpvBuilder.cpp:2151
GLfloat GLfloat v1
Definition: glext.h:6702
std::vector< std::unique_ptr< Instruction > > names
Definition: SpvBuilder.h:625
Id smearScalar(Decoration precision, Id scalarVal, Id vectorType)
Definition: SpvBuilder.cpp:1525
std::vector< std::unique_ptr< Instruction > > executionModes
Definition: SpvBuilder.h:624
Definition: SpvBuilder.h:497
std::unordered_map< unsigned int, std::vector< Instruction * > > groupedStructConstants
Definition: SpvBuilder.h:633
bool isVectorType(Id typeId) const
Definition: SpvBuilder.h:162
void addMemberName(Id, int member, const char *name)
Definition: SpvBuilder.cpp:1001
Block * mergeBlock
Definition: SpvBuilder.h:412
Id makeUint64Constant(unsigned long long u, bool specConstant=false)
Definition: SpvBuilder.h:225
void makeReturn(bool implicit, Id retVal=0)
Definition: SpvBuilder.cpp:1126
Id collapseAccessChain()
Definition: SpvBuilder.cpp:2554
void addStringOperand(const char *str)
Definition: spvIR.h:93
Id getContainedTypeId(Id typeId) const
Definition: SpvBuilder.cpp:619
Instruction * addEntryPoint(ExecutionModel, Function *, const char *name)
Definition: SpvBuilder.cpp:964
void dumpInstructions(std::vector< unsigned int > &, const std::vector< std::unique_ptr< Instruction > > &) const
Definition: SpvBuilder.cpp:2761
Id uniqueId
Definition: SpvBuilder.h:615
ImageFormat
Definition: spirv.hpp:180
Op getTypeClass(Id typeId) const
Definition: SpvBuilder.h:138
Block * headerBlock
Definition: SpvBuilder.h:409
void addCapability(spv::Capability cap)
Definition: SpvBuilder.h:96
Id accessChainLoad(Decoration precision, Decoration nonUniform, Id ResultType)
Definition: SpvBuilder.cpp:2336
Block * buildPoint
Definition: SpvBuilder.h:614
Id makeFloatType(int width)
Definition: SpvBuilder.cpp:211
Block & merge
Definition: SpvBuilder.h:442
bool isMatrixType(Id typeId) const
Definition: SpvBuilder.h:163
Id createSpecConstantOp(Op, Id typeId, const std::vector< spv::Id > &operands, const std::vector< unsigned > &literals)
Definition: SpvBuilder.cpp:1431
Id makeUint8Constant(unsigned u, bool specConstant=false)
Definition: SpvBuilder.h:219
void setSourceText(const std::string &text)
Definition: SpvBuilder.h:84
Id lodClamp
Definition: SpvBuilder.h:365