GlslangToSpv: Properly handle opaque types in TranslateStorageClass

This commit is contained in:
Jason Ekstrand 2016-06-08 13:52:36 -07:00
parent 5022d681d1
commit c24cc29d37

View File

@ -227,13 +227,15 @@ spv::StorageClass TranslateStorageClass(const glslang::TType& type)
return spv::StorageClassInput;
else if (type.getQualifier().isPipeOutput())
return spv::StorageClassOutput;
else if (type.getBasicType() == glslang::EbtSampler)
return spv::StorageClassUniformConstant;
else if (type.getBasicType() == glslang::EbtAtomicUint)
return spv::StorageClassAtomicCounter;
else if (type.getQualifier().isUniformOrBuffer()) {
if (type.getQualifier().layoutPushConstant)
return spv::StorageClassPushConstant;
if (type.getBasicType() == glslang::EbtBlock)
return spv::StorageClassUniform;
else if (type.getBasicType() == glslang::EbtAtomicUint)
return spv::StorageClassAtomicCounter;
else
return spv::StorageClassUniformConstant;
// TODO: how are we distuingishing between default and non-default non-writable uniforms? Do default uniforms even exist?