-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix printing of 'unknown stage' during crossStageCheck #3764
Fix printing of 'unknown stage' during crossStageCheck #3764
Conversation
Adds a 'stage' field to symbol nodes to remember what stage a symbol was defined in. Previously, 'unknown' stage was printed because linker object symbols are merged into a TIntermediate with language=EShLangCount while cross stage rules are checked. Storing the stage in the symbol fixes this problem.
@@ -59,10 +60,12 @@ namespace glslang { | |||
void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage unitStage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be changed to accept another "stage" argument, but that would require changing a bunch of callers which I opted not to do.
If getStage() is EShLangCount, as in the case of the intermediate created for merging linker objects, just opt to only print "unitStage"
@arcady-lunarg can you please help review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, and the messages are an improvement. I think you'll need to rebase this before it can be merged.
Thanks for reviewing. I rebased the changes |
Adds a 'stage' field to symbol nodes to remember what stage a symbol was
defined in.
Previously, 'unknown' stage was printed because linker object symbols are
merged into a TIntermediate with language=EShLangCount while cross stage
rules are checked. Storing the stage in the symbol fixes this problem.
Fixes errors such as
WARNING: Linking unknown stage and fragment stages: Matched shader interfaces are using different instance names.
unknown stage stage: Block: crossStageBlock2 Instance: blockName1: ""
fragment stage: Block: crossStageBlock2 Instance: blockName2: ""