HLSL: Basic turn on of non-static member functions.

Still need: pass by reference in SPIR-V and symbol-table level
for accessing 'this' members from member functions.
This commit is contained in:
John Kessenich
2017-03-19 18:09:59 -06:00
parent dfbdd9eb20
commit 4960baaf66
7 changed files with 275 additions and 18 deletions

View File

@@ -2747,7 +2747,8 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
const glslang::TType& paramType = parameters[p]->getAsTyped()->getType();
spv::Id typeId = convertGlslangToSpvType(paramType);
if (paramType.containsOpaque() ||
(paramType.getBasicType() == glslang::EbtBlock && paramType.getQualifier().storage == glslang::EvqBuffer))
(paramType.getBasicType() == glslang::EbtBlock &&
paramType.getQualifier().storage == glslang::EvqBuffer))
typeId = builder.makePointer(TranslateStorageClass(paramType), typeId);
else if (paramType.getQualifier().storage != glslang::EvqConstReadOnly)
typeId = builder.makePointer(spv::StorageClassFunction, typeId);