Add support for extension GL_EXT_shader_implicit_conversions
Updated extension management in TIntermediate class.
This commit is contained in:
parent
97ee5c88de
commit
2a8ead2109
10 changed files with 182 additions and 17 deletions
|
|
@ -356,8 +356,15 @@ public:
|
|||
}
|
||||
const SpvVersion& getSpv() const { return spvVersion; }
|
||||
EShLanguage getStage() const { return language; }
|
||||
void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); }
|
||||
const std::set<std::string>& getRequestedExtensions() const { return requestedExtensions; }
|
||||
void updateRequestedExtension(const char* extension, TExtensionBehavior behavior) {
|
||||
if(requestedExtensions.find(extension) != requestedExtensions.end()) {
|
||||
requestedExtensions[extension] = behavior;
|
||||
} else {
|
||||
requestedExtensions.insert(std::make_pair(extension, behavior));
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<std::string, TExtensionBehavior>& getRequestedExtensions() const { return requestedExtensions; }
|
||||
|
||||
void setTreeRoot(TIntermNode* r) { treeRoot = r; }
|
||||
TIntermNode* getTreeRoot() const { return treeRoot; }
|
||||
|
|
@ -902,7 +909,13 @@ protected:
|
|||
#ifdef GLSLANG_WEB
|
||||
bool extensionRequested(const char *extension) const { return false; }
|
||||
#else
|
||||
bool extensionRequested(const char *extension) const {return requestedExtensions.find(extension) != requestedExtensions.end();}
|
||||
bool extensionRequested(const char *extension) const {
|
||||
auto it = requestedExtensions.find(extension);
|
||||
if (it != requestedExtensions.end()) {
|
||||
return (it->second == EBhDisable) ? false : true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char* getResourceName(TResourceType);
|
||||
|
|
@ -917,7 +930,7 @@ protected:
|
|||
int version; // source version
|
||||
SpvVersion spvVersion;
|
||||
TIntermNode* treeRoot;
|
||||
std::set<std::string> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
|
||||
std::map<std::string, TExtensionBehavior> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
|
||||
TBuiltInResource resources;
|
||||
int numEntryPoints;
|
||||
int numErrors;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue