Merge pull request #1645 from KhronosGroup/dupe-accelstruct

Don't output duplicate OpTypeAccelerationStructureNV declarations
This commit is contained in:
John Kessenich
2019-01-08 09:39:32 +07:00
committed by GitHub
3 changed files with 14 additions and 8 deletions

View File

@@ -565,6 +565,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 {