Only reflect spec constant if it actually has a constant ID.
This commit is contained in:
parent
991b655c72
commit
c643addacd
@ -3471,12 +3471,10 @@ vector<SpecializationConstant> Compiler::get_specialization_constants() const
|
||||
if (id.get_type() == TypeConstant)
|
||||
{
|
||||
auto &c = id.get<SPIRConstant>();
|
||||
if (c.specialization)
|
||||
{
|
||||
if (c.specialization && has_decoration(c.self, DecorationSpecId))
|
||||
spec_consts.push_back({ c.self, get_decoration(c.self, DecorationSpecId) });
|
||||
}
|
||||
}
|
||||
}
|
||||
return spec_consts;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user