SPV: Support SPIR-V 1.5; five extensions no longer need OpExtension.
The generalization to addIncorporatedExtension() also fixed a 1.3 corner case with SPV_KHR_16bit_storage.
This commit is contained in:
@@ -363,12 +363,12 @@ void Builder::postProcess()
|
||||
Instruction* type = groupedTypes[OpTypePointer][t];
|
||||
if (type->getImmediateOperand(0) == (unsigned)StorageClassPhysicalStorageBufferEXT) {
|
||||
if (containsType(type->getIdOperand(1), OpTypeInt, 8)) {
|
||||
addExtension(spv::E_SPV_KHR_8bit_storage);
|
||||
addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
|
||||
addCapability(spv::CapabilityStorageBuffer8BitAccess);
|
||||
}
|
||||
if (containsType(type->getIdOperand(1), OpTypeInt, 16) ||
|
||||
containsType(type->getIdOperand(1), OpTypeFloat, 16)) {
|
||||
addExtension(spv::E_SPV_KHR_16bit_storage);
|
||||
addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
|
||||
addCapability(spv::CapabilityStorageBuffer16BitAccess);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user