36 #ifndef _COMPILER_INTERFACE_INCLUDED_ 37 #define _COMPILER_INTERFACE_INCLUDED_ 39 #include "../Include/ResourceLimits.h" 40 #include "../MachineIndependent/Versions.h" 46 #define C_DECL __cdecl 52 #define SH_IMPORT_EXPORT 54 #define SH_IMPORT_EXPORT 73 #define GLSLANG_MINOR_VERSION 7 264 const char*
const shaderStrings[],
265 const int numStrings,
270 int defaultVersion = 110,
271 bool forwardCompatible =
false,
278 const int numHandles);
340 class TPoolAllocator;
381 const char*
const*
s,
const int*
l,
const char*
const*
names,
int n);
492 size_t ) {
return nullptr; }
499 size_t ) {
return nullptr; }
520 return parse(
res, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, includer);
526 return parse(builtInResources, defaultVersion,
ENoProfile,
false, forwardCompatible, messages);
532 return parse(builtInResources, defaultVersion,
ENoProfile,
false, forwardCompatible, messages, includer);
536 int defaultVersion,
EProfile defaultProfile,
bool forceDefaultVersionAndProfile,
714 #endif // _COMPILER_INTERFACE_INCLUDED_ TEnvironment environment
Definition: ShaderLang.h:569
TReflection * reflection
Definition: ShaderLang.h:703
TIntermediate * intermediate[EShLangCount]
Definition: ShaderLang.h:700
void setEnvTargetHlslFunctionality1()
Definition: ShaderLang.h:427
Definition: ShaderLang.h:189
Definition: ShaderLang.h:127
Definition: ShaderLang.h:445
GLuint shader
Definition: glext.h:6670
void setNoStorageFormat(bool useUnknownFormat)
Definition: ShaderLang.cpp:1701
void FinalizeProcess()
Definition: ShaderLang.cpp:1595
EShTargetClientVersion
Definition: ShaderLang.h:131
void setStringsWithLengths(const char *const *s, const int *l, int n)
Definition: ShaderLang.cpp:1637
GLuint const GLchar * name
Definition: glext.h:6671
void setAutoMapLocations(bool map)
Definition: ShaderLang.cpp:1697
Definition: Versions.h:53
void setFlattenUniformArrays(bool flatten)
Definition: ShaderLang.cpp:1700
Definition: ShaderLang.h:92
SH_IMPORT_EXPORT int ShInitialize()
Definition: ShaderLang.cpp:1194
const std::string headerName
Definition: ShaderLang.h:456
virtual int resolveSet(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
EShSource languageFamily
Definition: ShaderLang.h:145
EShTextureSamplerTransformMode
Definition: ShaderLang.h:196
Definition: ShaderLang.h:94
bool linked
Definition: ShaderLang.h:705
Definition: ShaderLang.h:603
GLenum mode
Definition: glext.h:6857
const char * getAttributeName(int index) const
Definition: ShaderLang.cpp:1920
virtual ~TIoMapResolver()
Definition: ShaderLang.h:606
Definition: ShaderLang.h:208
TCompiler * compiler
Definition: ShaderLang.h:548
Definition: InfoSink.h:138
int getUniformBlockCounterIndex(int index) const
Definition: ShaderLang.cpp:1915
IncludeResult & operator=(const IncludeResult &)
EShClient dialect
Definition: ShaderLang.h:147
EShLanguage
Definition: ShaderLang.h:90
Definition: ShaderLang.h:95
bool newedIntermediate[EShLangCount]
Definition: ShaderLang.h:701
void setShiftBinding(TResourceType res, unsigned int base)
Definition: ShaderLang.cpp:1669
virtual IncludeResult * includeSystem(const char *, const char *, size_t)
Definition: ShaderLang.h:490
void setResourceSetBinding(const std::vector< std::string > &base)
Definition: ShaderLang.cpp:1702
SH_IMPORT_EXPORT ShHandle ShConstructUniformMap()
Definition: ShaderLang.cpp:1241
const char * preamble
Definition: ShaderLang.h:563
int numStrings
Definition: ShaderLang.h:564
void setEnvInput(EShSource lang, EShLanguage envStage, EShClient client, int version)
Definition: ShaderLang.h:410
SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char *name)
Definition: ShaderLang.cpp:1544
void setEntryPoint(const char *entryPoint)
Definition: ShaderLang.cpp:1653
void setShiftSsboBinding(unsigned int base)
Definition: ShaderLang.cpp:1691
ShBinding * bindings
Definition: ShaderLang.h:232
bool parse(const TBuiltInResource *res, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages messages)
Definition: ShaderLang.h:516
Definition: ShaderLang.h:354
std::string sourceEntryPointName
Definition: ShaderLang.h:567
GLuint res
Definition: glext.h:10520
void * ShHandle
Definition: ShaderLang.h:244
Definition: ShaderLang.h:140
int numBindings
Definition: ShaderLang.h:231
Definition: ShaderLang.h:225
EShLanguage stage
Definition: ShaderLang.h:547
Definition: ShHandle.h:89
EShTargetLanguageVersion
Definition: ShaderLang.h:139
Definition: ShaderLang.h:151
Definition: localintermediate.h:210
SH_IMPORT_EXPORT const char * ShGetInfoLog(const ShHandle)
Definition: ShaderLang.cpp:1441
Definition: ShaderLang.h:179
EShLanguageMask
Definition: ShaderLang.h:100
int getUniformType(int index) const
Definition: ShaderLang.cpp:1916
Definition: ShaderLang.h:133
Definition: ResourceLimits.h:52
const char *const * stringNames
Definition: ShaderLang.h:562
Definition: ShaderLang.h:180
GLdouble s
Definition: glext.h:6390
int getUniformArraySize(int index) const
Definition: ShaderLang.cpp:1918
IncludeResult(const std::string &headerName, const char *const headerData, const size_t headerLength, void *userData)
Definition: ShaderLang.h:450
EShClient
Definition: ShaderLang.h:119
const char * GetGlslVersionString()
Definition: ShaderLang.cpp:1580
Definition: ShaderLang.h:102
SH_IMPORT_EXPORT int ShLinkExt(const ShHandle, const ShHandle h[], const int numHandles)
Definition: ShaderLang.cpp:1380
const int * lengths
Definition: ShaderLang.h:561
SH_IMPORT_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions)
Definition: ShaderLang.cpp:1221
GLsizei const GLchar *const * string
Definition: glext.h:6699
void addShader(TShader *shader)
Definition: ShaderLang.h:656
void setHlslIoMapping(bool hlslIoMap)
Definition: ShaderLang.cpp:1699
int getAttributeType(int index) const
Definition: ShaderLang.cpp:1921
#define __fastcall
Definition: ShaderLang.h:56
Definition: ShaderLang.h:197
EShTargetClientVersion EshTargetClientVersion
Definition: ShaderLang.h:137
const char * entryPoint
Definition: Hlsl.FromFile.cpp:45
const char * GetEsslVersionString()
Definition: ShaderLang.cpp:1575
GLsizei GLenum GLenum GLuint GLenum GLsizei * lengths
Definition: glext.h:8420
virtual void endResolve(EShLanguage stage)=0
void setShiftUboBinding(unsigned int base)
Definition: ShaderLang.cpp:1685
TIoMapper * ioMapper
Definition: ShaderLang.h:704
Definition: ShaderLang.h:508
TShader & operator=(TShader &)
virtual void endNotifications(EShLanguage stage)=0
TPoolAllocator * pool
Definition: ShaderLang.h:546
Definition: ShaderLang.h:374
TResourceType
Definition: ShaderLang.h:349
SH_IMPORT_EXPORT int __fastcall ShFinalize()
Definition: ShaderLang.cpp:1269
GLuint GLuint GLsizei count
Definition: glext.h:6292
bool mapIO(TIoMapResolver *resolver=NULL)
Definition: ShaderLang.cpp:1932
Definition: ShaderLang.h:101
Definition: ShaderLang.h:165
virtual int resolveUniformLocation(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
const char * getUniformName(int index) const
Definition: ShaderLang.cpp:1908
virtual ~TShader()
Definition: ShaderLang.cpp:1622
static GX2AttribVar attributes[]
Definition: bokeh.c:713
SH_IMPORT_EXPORT int ShSetVirtualAttributeBindings(const ShHandle, const ShBindingTable *)
Definition: ShaderLang.cpp:1486
Definition: ShaderLang.h:144
TShader(EShLanguage)
Definition: ShaderLang.cpp:1606
TClient client
Definition: ShaderLang.h:167
EShOptimizationLevel
Definition: ShaderLang.h:186
int getUniformIndex(const char *name) const
Definition: ShaderLang.cpp:1911
void setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set)
Definition: ShaderLang.cpp:1674
void dumpReflection()
Definition: ShaderLang.cpp:1927
virtual void notifyInOut(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
const char * name
Definition: ShaderLang.h:226
Definition: ShaderLang.h:207
EShTargetClientVersion version
Definition: ShaderLang.h:153
Definition: ShaderLang.h:187
Definition: ShaderLang.h:214
void setInvertY(bool invert)
Definition: ShaderLang.cpp:1695
Definition: ShaderLang.h:106
bool parse(const TBuiltInResource *builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages)
Definition: ShaderLang.h:524
TIntermediate * intermediate
Definition: ShaderLang.h:549
virtual void notifyBinding(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
#define NULL
Pointer to 0.
Definition: gctypes.h:65
Definition: ShaderLang.h:353
SH_IMPORT_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions)
Definition: ShaderLang.cpp:1231
GLenum type
Definition: glext.h:6233
Definition: ShaderLang.h:122
Definition: ShaderLang.h:190
bool l
Definition: connect_wiiupro.c:37
TInfoSink * infoSink
Definition: ShaderLang.h:550
int getNumLiveUniformBlocks() const
Definition: ShaderLang.cpp:1907
int getUniformBlockBinding(int index) const
Definition: ShaderLang.cpp:1913
EProfile
Definition: Versions.h:51
Definition: ShaderLang.h:449
Definition: reflection.h:95
virtual ~Includer()
Definition: ShaderLang.h:504
Definition: ShaderLang.h:96
Definition: ShaderLang.h:230
TIntermediate * getIntermediate(EShLanguage stage) const
Definition: ShaderLang.h:663
version
Definition: setup.py:6
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode)
Definition: ShaderLang.cpp:1703
SH_IMPORT_EXPORT int ShCompile(const ShHandle, const char *const shaderStrings[], const int numStrings, const int *lengths, const EShOptimizationLevel, const TBuiltInResource *resources, int debugOptions, int defaultVersion=110, bool forwardCompatible=false, EShMessages messages=EShMsgDefault)
Definition: ShaderLang.cpp:1326
void setShiftImageBinding(unsigned int base)
Definition: ShaderLang.cpp:1683
int binding
Definition: ShaderLang.h:227
int getUniformBufferOffset(int index) const
Definition: ShaderLang.cpp:1917
virtual IncludeResult * includeLocal(const char *, const char *, size_t)
Definition: ShaderLang.h:497
void setEnvClient(EShClient client, EShTargetClientVersion version)
Definition: ShaderLang.h:417
virtual int resolveInOutIndex(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
TInputLanguage input
Definition: ShaderLang.h:166
virtual bool validateInOut(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
TProgram & operator=(TProgram &)
Definition: ShaderLang.h:115
bool parse(const TBuiltInResource *builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages, Includer &includer)
Definition: ShaderLang.h:529
int GetKhronosToolId()
Definition: ShaderLang.cpp:1585
int getNumLiveAttributes() const
Definition: ShaderLang.cpp:1919
const char *const headerData
Definition: ShaderLang.h:462
virtual void beginNotifications(EShLanguage stage)=0
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:6233
int getUniformBinding(int index) const
Definition: ShaderLang.cpp:1912
void setSourceEntryPoint(const char *sourceEntryPointName)
Definition: ShaderLang.cpp:1658
EShLanguage getStage() const
Definition: ShaderLang.h:542
void setAutoMapBindings(bool map)
Definition: ShaderLang.cpp:1693
void setStringsWithLengthsAndNames(const char *const *s, const int *l, const char *const *names, int n)
Definition: ShaderLang.cpp:1644
virtual void beginResolve(EShLanguage stage)=0
void setPreamble(const char *s)
Definition: ShaderLang.h:382
const char * getInfoDebugLog()
Definition: ShaderLang.cpp:1880
Definition: ShaderLang.h:104
virtual void releaseInclude(IncludeResult *) override
Definition: ShaderLang.h:510
Definition: ShaderLang.h:212
EShTargetLanguage
Definition: ShaderLang.h:125
Definition: ShaderLang.h:352
int getUniformBlockSize(int blockIndex) const
Definition: ShaderLang.cpp:1910
int getNumLiveUniformVariables() const
Definition: ShaderLang.cpp:1906
EShTargetLanguage language
Definition: ShaderLang.h:157
virtual void releaseInclude(IncludeResult *)=0
#define SH_IMPORT_EXPORT
Definition: ShaderLang.h:54
void setShiftUavBinding(unsigned int base)
Definition: ShaderLang.cpp:1689
SH_IMPORT_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int count)
Definition: ShaderLang.cpp:1523
virtual int resolveBinding(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
Definition: ShaderLang.h:116
GLuint index
Definition: glext.h:6671
bool buildReflection()
Definition: ShaderLang.cpp:1889
void addProcesses(const std::vector< std::string > &)
Definition: ShaderLang.cpp:1663
Definition: ShaderLang.h:211
const char * getUniformBlockName(int blockIndex) const
Definition: ShaderLang.cpp:1909
virtual bool validateBinding(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
int dialectVersion
Definition: ShaderLang.h:148
Definition: ShaderLang.h:217
EShClient client
Definition: ShaderLang.h:152
TProgram()
Definition: ShaderLang.cpp:1759
bool linkStage(EShLanguage, EShMessages)
Definition: ShaderLang.cpp:1813
void setShiftTextureBinding(unsigned int base)
Definition: ShaderLang.cpp:1681
bool preprocess(const TBuiltInResource *builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages message, std::string *outputString, Includer &includer)
Definition: ShaderLang.cpp:1729
GLbitfield stages
Definition: glext.h:8287
Definition: ShaderLang.h:355
Definition: PoolAlloc.h:147
GLuint GLuint * names
Definition: glext.h:12452
int getUniformBlockIndex(int index) const
Definition: ShaderLang.cpp:1914
EShLanguage stage
Definition: ShaderLang.h:146
bool getEnvTargetHlslFunctionality1() const
Definition: ShaderLang.h:428
Definition: ShaderLang.h:141
SH_IMPORT_EXPORT int ShSetFixedAttributeBindings(const ShHandle, const ShBindingTable *)
Definition: ShaderLang.cpp:1505
const TType * getUniformTType(int index) const
Definition: ShaderLang.cpp:1923
void setShiftCbufferBinding(unsigned int base)
Definition: ShaderLang.cpp:1687
bool link(EShMessages)
Definition: ShaderLang.cpp:1788
void setEnvTarget(EShTargetLanguage lang, EShTargetLanguageVersion version)
Definition: ShaderLang.h:422
Definition: ShaderLang.h:105
const char * getInfoLog()
Definition: ShaderLang.cpp:1875
Definition: ShaderLang.h:206
Definition: ShaderLang.h:356
SH_IMPORT_EXPORT const void * ShGetExecutable(const ShHandle)
Definition: ShaderLang.cpp:1464
Definition: ShaderLang.h:218
SH_IMPORT_EXPORT void ShDestruct(ShHandle)
Definition: ShaderLang.cpp:1251
Definition: ShaderLang.h:198
TInfoSink * infoSink
Definition: ShaderLang.h:702
Definition: ShaderLang.h:351
TPoolAllocator * pool
Definition: ShaderLang.h:698
GLboolean invert
Definition: glext.h:6381
const size_t headerLength
Definition: ShaderLang.h:463
virtual ~TProgram()
Definition: ShaderLang.cpp:1769
TIntermediate * getIntermediate() const
Definition: ShaderLang.h:543
EShTargetLanguageVersion version
Definition: ShaderLang.h:158
const char * StageName(EShLanguage stage)
Definition: Versions.cpp:474
virtual int resolveInOutLocation(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
SH_IMPORT_EXPORT void ShSetEncryptionMethod(ShHandle)
Definition: ShaderLang.cpp:1432
const char * getInfoLog()
Definition: ShaderLang.cpp:1749
virtual int resolveInOutComponent(EShLanguage stage, const char *name, const TType &type, bool is_live)=0
Definition: ShaderLang.h:209
const TType * getUniformBlockTType(int index) const
Definition: ShaderLang.cpp:1924
Definition: ShaderLang.h:134
bool parse(const TBuiltInResource *, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages, Includer &)
Definition: ShaderLang.cpp:1710
const char *const * strings
Definition: ShaderLang.h:560
void setStrings(const char *const *s, int n)
Definition: ShaderLang.cpp:1630
EShMessages
Definition: ShaderLang.h:204
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
Definition: ShaderLang.h:216
void setShiftSamplerBinding(unsigned int base)
Definition: ShaderLang.cpp:1679
EShSource
Definition: ShaderLang.h:113
Definition: ShaderLang.h:132
bool InitializeProcess()
Definition: ShaderLang.cpp:1590
Definition: ShaderLang.h:213
Definition: iomapper.h:52
Definition: ShaderLang.h:91
unsigned getLocalSize(int dim) const
Definition: ShaderLang.cpp:1925
Definition: ShaderLang.h:156
Definition: ShaderLang.h:210
Definition: ShaderLang.h:128
Definition: ShaderLang.h:652
Definition: ShaderLang.h:121
Definition: ShaderLang.h:120
GLdouble n
Definition: glext.h:8396
Definition: ShaderLang.h:205
Definition: ShaderLang.h:188
Definition: ShaderLang.h:350
bool hlslFunctionality1
Definition: ShaderLang.h:159
Definition: ShaderLang.h:215
TTarget target
Definition: ShaderLang.h:168
Definition: ShaderLang.h:126
const char * getInfoDebugLog()
Definition: ShaderLang.cpp:1754
const TType * getAttributeTType(int index) const
Definition: ShaderLang.cpp:1922
Definition: ShaderLang.h:103
Definition: ShaderLang.h:114
Definition: ShaderLang.h:93
EShExecutable
Definition: ShaderLang.h:178
Definition: ShaderLang.h:97
void * userData
Definition: ShaderLang.h:465