Closed
Conversation
…ng resolver error.
Sync code from KhronosGroup/glslang/master
Sync code form Canonzki/glslang/master
St0fF-NPL-ToM
pushed a commit
to St0fF-NPL-ToM/glslang
that referenced
this pull request
Jul 22, 2019
Includes:
Update OpPhi instructions after splitting block. (KhronosGroup#1783)
Don't change decorations and names in merge return. (KhronosGroup#1777)
Transform to combine consecutive access chains
Handle undef literal value in vector shuffle
Fix block ordering in dead branch elim
Fix finding constant with particular type. (KhronosGroup#1724)
Fix infinite loop while folding OpVectorShuffle (KhronosGroup#1722)
Fix size error when folding vector shuffle. (KhronosGroup#1721)
Layout validation: Permit {vec3; float} tight packing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change for OpenGL shader in/out symbol and uniform symbol location Auto mapping. [issue]#1747
1. Background.
In OpenGL shader, user are not required to declare location explicit. so we need do a auto slot allocate in mapIO.
In old implementation, when declare a implicit location symbol, resolver will only make a location self grow, and it will be reset at add stage. That makes it‘s difficult for us to refer to the declare of in/out between two shader stage and refer to the uniform in other shader stage.
relative issue : GLSL vertex attribute overlap
2. New Implementation.
To reduce the complexity of new code and reduce the impact on OpenGL ES and Vulcan shader compiler.
We base the code on
TDefaultIoResolverBaseandandTIoMapper, and derivedTDefaultGlslIoResolver,TGlslIoMapperto detach logic.In new Implementation, we move the resolver to then end of
mapIOin functiondoMap, and add two new step —— slot collect(TSlotCollector) and symbol validater(TSymbolValidater). At slot collect we collect symbol info and compute the free slot. At symbol validater, we check symbol type is matched. after that all, wo do resolver and set traverser.3. Test.
This code can pass the glslangtests both on windows and linux.
4. Subsequent
Now, the test of OpenGL shader in/out mapper is missing, need add more test in glslangtest. I want it can be a option on glslangValidor. if it's possiable, we will do this two task next.