Fix glslang can't link multiple AST in a single stage
authorRoy <lryer@msn.com>
Fri, 3 Jan 2020 08:21:34 +0000 (16:21 +0800)
committerRoy <lryer@msn.com>
Fri, 3 Jan 2020 08:30:37 +0000 (16:30 +0800)
commit05a5b53208e1eee47fd8fe6a8871e147833d1a96
tree2d541dd5ea22585c81f800756e9178b76f278f83
parent6334d594f68c2ba36e3e9bf91aac185ac3875717
Fix glslang can't link multiple AST in a single stage

Root cause:
GlslangToSpv use symbol structure's ptr as a map key, but multiple shader object can build a new AST.
In the AST the the same symbol has different ptr point to their structure, so indext map faild.

solution:
Add a new map glslangTypeToIdMap to map ptr to symbol id, and use symbol id to index memberRemapper.
SPIRV/GlslangToSpv.cpp