Fix bug in StructType::GetElementType().
We were only resolving unbound variability for the top-level type, which isn't enough if we have e.g. an unbound-variability pointer pointing to some type with unbound variability.
This commit is contained in:
8
type.cpp
8
type.cpp
@@ -2094,12 +2094,8 @@ StructType::GetElementType(int i) const {
|
|||||||
|
|
||||||
// If the element has unbound variability, resolve its variability to
|
// If the element has unbound variability, resolve its variability to
|
||||||
// the struct type's variability
|
// the struct type's variability
|
||||||
if (ret->HasUnboundVariability()) {
|
ret = ret->ResolveUnboundVariability(variability);
|
||||||
if (variability == Varying)
|
|
||||||
ret = ret->GetAsVaryingType();
|
|
||||||
else
|
|
||||||
ret = ret->GetAsUniformType();
|
|
||||||
}
|
|
||||||
return isConst ? ret->GetAsConstType() : ret;
|
return isConst ? ret->GetAsConstType() : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user