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
commit 69932ab47f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {