Skip to content

Commit 848d187

Browse files
scottp101igcbot
authored andcommitted
GRF alignment for uniform ldraw result
1 parent 81ac26a commit 848d187

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

IGC/Compiler/CISACodeGen/CShader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,10 @@ e_alignment IGC::GetPreferredAlignment(llvm::Value* V, WIAnalysis* WIA,
20182018
Align = GetPreferredAlignmentOnUse(V, WIA, pContext);
20192019
return (Align == EALIGN_AUTO) ? (pContext->platform.getGRFSize() == 64) ? EALIGN_32WORD : EALIGN_HWORD : Align;
20202020
}
2021+
else if (isa<LdRawIntrinsic>(V))
2022+
{
2023+
return (pContext->platform.getGRFSize() == 64) ? EALIGN_32WORD : EALIGN_HWORD;
2024+
}
20212025

20222026
// If uniform variables are results from uniform atomic ops, they need
20232027
// being GRF aligned.

0 commit comments

Comments
 (0)