Fix silly bug in ConstExpr::GetConstant() with enum types.
(They would be incorrectly matched as int8 types.)
This commit is contained in:
6
expr.cpp
6
expr.cpp
@@ -5113,8 +5113,7 @@ ConstExpr::GetConstant(const Type *type) const {
|
|||||||
else
|
else
|
||||||
return LLVMInt8Vector(iv);
|
return LLVMInt8Vector(iv);
|
||||||
}
|
}
|
||||||
else if (type == AtomicType::UniformUInt8 || type == AtomicType::VaryingUInt8 ||
|
else if (type == AtomicType::UniformUInt8 || type == AtomicType::VaryingUInt8) {
|
||||||
dynamic_cast<const EnumType *>(type) != NULL) {
|
|
||||||
uint8_t uiv[ISPC_MAX_NVEC];
|
uint8_t uiv[ISPC_MAX_NVEC];
|
||||||
AsUInt8(uiv, type->IsVaryingType());
|
AsUInt8(uiv, type->IsVaryingType());
|
||||||
if (type->IsUniformType())
|
if (type->IsUniformType())
|
||||||
@@ -5130,8 +5129,7 @@ ConstExpr::GetConstant(const Type *type) const {
|
|||||||
else
|
else
|
||||||
return LLVMInt16Vector(iv);
|
return LLVMInt16Vector(iv);
|
||||||
}
|
}
|
||||||
else if (type == AtomicType::UniformUInt16 || type == AtomicType::VaryingUInt16 ||
|
else if (type == AtomicType::UniformUInt16 || type == AtomicType::VaryingUInt16) {
|
||||||
dynamic_cast<const EnumType *>(type) != NULL) {
|
|
||||||
uint16_t uiv[ISPC_MAX_NVEC];
|
uint16_t uiv[ISPC_MAX_NVEC];
|
||||||
AsUInt16(uiv, type->IsVaryingType());
|
AsUInt16(uiv, type->IsVaryingType());
|
||||||
if (type->IsUniformType())
|
if (type->IsUniformType())
|
||||||
|
|||||||
Reference in New Issue
Block a user