Fix flags.nonprivate to be true for workgroup memory, which is implicitly workgroupcoherent/nonprivate

This commit is contained in:
Jeff Bolz
2018-10-15 22:46:48 -05:00
parent 4685f3246e
commit ab3c965a46
2 changed files with 11 additions and 11 deletions

10
SPIRV/GlslangToSpv.cpp Executable file → Normal file
View File

@@ -554,11 +554,11 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere
flags.subgroupcoherent = type.getQualifier().subgroupcoherent;
// *coherent variables are implicitly nonprivate in GLSL
flags.nonprivate = type.getQualifier().nonprivate ||
type.getQualifier().subgroupcoherent ||
type.getQualifier().workgroupcoherent ||
type.getQualifier().queuefamilycoherent ||
type.getQualifier().devicecoherent ||
type.getQualifier().coherent;
flags.subgroupcoherent ||
flags.workgroupcoherent ||
flags.queuefamilycoherent ||
flags.devicecoherent ||
flags.coherent;
flags.volatil = type.getQualifier().volatil;
flags.isImage = type.getBasicType() == glslang::EbtSampler;
return flags;