|
@@ -2644,7 +2644,7 @@ bool CGMSHLSLRuntime::SetUAVSRV(SourceLocation loc,
|
|
|
EltTy = hlsl::GetHLSLVecElementType(Ty);
|
|
|
} else if (hlsl::IsHLSLMatType(Ty)) {
|
|
|
EltTy = hlsl::GetHLSLMatElementType(Ty);
|
|
|
- } else if (resultTy->isAggregateType()) {
|
|
|
+ } else if (hlsl::IsHLSLAggregateType(resultTy)) {
|
|
|
// Struct or array in a none-struct resource.
|
|
|
std::vector<QualType> ScalarTys;
|
|
|
CollectScalarTypes(ScalarTys, resultTy);
|
|
@@ -7012,7 +7012,7 @@ void CGMSHLSLRuntime::EmitHLSLOutParamConversionInit(
|
|
|
QualType ParamTy = Param->getType().getNonReferenceType();
|
|
|
bool RValOnRef = false;
|
|
|
if (!Param->isModifierOut()) {
|
|
|
- if (!ParamTy->isAggregateType() || hlsl::IsHLSLMatType(ParamTy)) {
|
|
|
+ if (!hlsl::IsHLSLAggregateType(ParamTy)) {
|
|
|
if (Arg->isRValue() && Param->getType()->isReferenceType()) {
|
|
|
// RValue on a reference type.
|
|
|
if (const CStyleCastExpr *cCast = dyn_cast<CStyleCastExpr>(Arg)) {
|
|
@@ -7108,7 +7108,7 @@ void CGMSHLSLRuntime::EmitHLSLOutParamConversionInit(
|
|
|
!isObject) {
|
|
|
QualType ArgTy = Arg->getType();
|
|
|
Value *outVal = nullptr;
|
|
|
- bool isAggregateTy = ParamTy->isAggregateType() && !IsHLSLVecMatType(ParamTy);
|
|
|
+ bool isAggregateTy = hlsl::IsHLSLAggregateType(ParamTy);
|
|
|
if (!isAggregateTy) {
|
|
|
if (!IsHLSLMatType(ParamTy)) {
|
|
|
RValue outRVal = CGF.EmitLoadOfLValue(argLV, SourceLocation());
|
|
@@ -7151,13 +7151,12 @@ void CGMSHLSLRuntime::EmitHLSLOutParamConversionCopyBack(
|
|
|
|
|
|
Value *outVal = nullptr;
|
|
|
|
|
|
- bool isAggrageteTy = ArgTy->isAggregateType();
|
|
|
- isAggrageteTy &= !IsHLSLVecMatType(ArgTy);
|
|
|
+ bool isAggregateTy = hlsl::IsHLSLAggregateType(ArgTy);
|
|
|
|
|
|
bool isObject = dxilutil::IsHLSLObjectType(
|
|
|
tmpArgAddr->getType()->getPointerElementType());
|
|
|
if (!isObject) {
|
|
|
- if (!isAggrageteTy) {
|
|
|
+ if (!isAggregateTy) {
|
|
|
if (!IsHLSLMatType(ParamTy))
|
|
|
outVal = CGF.Builder.CreateLoad(tmpArgAddr);
|
|
|
else
|