From c24cc29d3741065ed66311408afbccea578e9553 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 8 Jun 2016 13:52:36 -0700 Subject: [PATCH] GlslangToSpv: Properly handle opaque types in TranslateStorageClass --- SPIRV/GlslangToSpv.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index e08bff65..ff96b6d5 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -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?