Merge pull request #1542 from sheredom/fix_8bit_storagebuffer

Fix 8-bit storage nearly always using the UniformAndStorageBuffer8BitAccess capability.
This commit is contained in:
John Kessenich
2018-10-26 10:27:46 -06:00
committed by GitHub
27 changed files with 404 additions and 112 deletions

View File

@@ -2812,8 +2812,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
} else if (storageClass == spv::StorageClassUniform) {
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
if (node->getType().getQualifier().storage == glslang::EvqBuffer)
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
} else if (storageClass == spv::StorageClassStorageBuffer) {
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
}
}