File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3991,7 +3991,8 @@ void CShader::CopyVariableRaw(
39913991 CVariable* dst,
39923992 CVariable* src)
39933993{
3994- VISA_Type dataType = ISA_TYPE_UD;
3994+ // handle cases with uniform variables
3995+ VISA_Type dataType = dst->IsUniform () ? dst->GetType () : ISA_TYPE_UD;
39953996 uint dataTypeSizeInBytes = CEncoder::GetCISADataTypeSize (dataType);
39963997 uint offset = 0 ;
39973998 uint bytesToCopy = src->GetSize () * src->GetNumberInstance ();
@@ -4001,7 +4002,8 @@ void CShader::CopyVariableRaw(
40014002 bool dstSeconfHalf = offset >= dst->GetSize ();
40024003 bool srcSeconfHalf = offset >= src->GetSize ();
40034004 encoder.SetSecondHalf (dstSeconfHalf || srcSeconfHalf);
4004- SIMDMode simdMode = getGRFSize () == 64 ? SIMDMode::SIMD32 : SIMDMode::SIMD16;
4005+ SIMDMode simdMode = dst->IsUniform () ? SIMDMode::SIMD1 :
4006+ getGRFSize () == 64 ? SIMDMode::SIMD32 : SIMDMode::SIMD16;
40054007 uint movSize = numLanes (simdMode) * dataTypeSizeInBytes;
40064008 while (movSize > bytesToCopy ||
40074009 (!srcSeconfHalf && ((offset + movSize) > src->GetSize ())) ||
You can’t perform that action at this time.
0 commit comments