Skip to content

Commit 4cc8dff

Browse files
mmereckiigcbot
authored andcommitted
Update the maximum simd size in CopyVariableRaw
Use simd32 for CopyVariableRaw in Xe2
1 parent 5ca86ba commit 4cc8dff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

IGC/Compiler/CISACodeGen/CShader.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3985,7 +3985,7 @@ void CShader::PackAndCopyVariable(
39853985
encoder.Push();
39863986
}
39873987

3988-
// Copies entire variable using simd16, UD type and NoMask
3988+
// Copies entire variable using simd32 (Xe2) or simd16 (Xe), UD type and NoMask
39893989
void CShader::CopyVariableRaw(
39903990
CVariable* dst,
39913991
CVariable* src)
@@ -3994,12 +3994,13 @@ void CShader::CopyVariableRaw(
39943994
uint dataTypeSizeInBytes = CEncoder::GetCISADataTypeSize(dataType);
39953995
uint offset = 0;
39963996
uint bytesToCopy = src->GetSize() * src->GetNumberInstance();
3997+
39973998
while (bytesToCopy > 0)
39983999
{
39994000
bool dstSeconfHalf = offset >= dst->GetSize();
40004001
bool srcSeconfHalf = offset >= src->GetSize();
40014002
encoder.SetSecondHalf(dstSeconfHalf || srcSeconfHalf);
4002-
SIMDMode simdMode = SIMDMode::SIMD16;
4003+
SIMDMode simdMode = getGRFSize() == 64 ? SIMDMode::SIMD32 : SIMDMode::SIMD16;
40034004
uint movSize = numLanes(simdMode) * dataTypeSizeInBytes;
40044005
while (movSize > bytesToCopy ||
40054006
(!srcSeconfHalf && ((offset + movSize) > src->GetSize())) ||

0 commit comments

Comments
 (0)