Don't output duplicate TypeAccelerationStructureNV declarations

This commit is contained in:
Piers Daniell
2019-01-07 14:17:44 -07:00
parent d12fbc4c0c
commit 3cf3f96292
3 changed files with 14 additions and 8 deletions

View File

@@ -531,6 +531,7 @@ Id Builder::makeAccelerationStructureNVType()
Instruction *type;
if (groupedTypes[OpTypeAccelerationStructureNV].size() == 0) {
type = new Instruction(getUniqueId(), NoType, OpTypeAccelerationStructureNV);
groupedTypes[OpTypeAccelerationStructureNV].push_back(type);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
} else {