HLMatrixLower: Fix out matrix param for lib func
This commit is contained in:
Родитель
5f94a3cf57
Коммит
74f4fee608
|
@ -2195,7 +2195,7 @@ void HLMatrixLowerPass::castMatrixArgs(Instruction *I) {
|
|||
Value *argVal = I->getOperand(i);
|
||||
Type *argTy = argVal->getType();
|
||||
if (argTy->isPointerTy())
|
||||
argTy->getPointerElementType();
|
||||
argTy = argTy->getPointerElementType();
|
||||
if (argTy->isStructTy() && IsMatrixType(argTy)) {
|
||||
Value *vecVal = matToVecMap[argVal];
|
||||
Value *newMatVal = GetMatrixForVec(vecVal, argVal->getType());
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// RUN: %dxc -T lib_6_1 -Zpr %s | FileCheck %s
|
||||
|
||||
// CHECK: call void @"\01?GetMat
|
||||
// CHECK-NOT: undef
|
||||
// CHECK: load <16 x float>
|
||||
|
||||
void GetMat(out float4x4 mat);
|
||||
|
||||
[shader("pixel")]
|
||||
float4 test(uint i:I) : SV_Target {
|
||||
float4x4 mat;
|
||||
GetMat(mat);
|
||||
return mat[i];
|
||||
}
|
Загрузка…
Ссылка в новой задаче