Skip to content

Commit

Permalink
[Autobackout][FuncReg]Revert of change: c525925
Browse files Browse the repository at this point in the history
 Disallow assigning no mask flags for ld raw instructions

This change is to prevent from assigning no mask flags for ld raw instructions which contribute to sample coordinates as it may cause OOB access and page faults.
  • Loading branch information
krystian-andrzejewski authored and igcbot committed Oct 11, 2023
1 parent df256df commit 2a99486
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions IGC/Compiler/CISACodeGen/EmitVISAPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,30 +269,11 @@ bool EmitPass::IsNoMaskAllowed(SDAG& sdag)
{
if (auto* I = dyn_cast<LoadInst>(sdag.m_root))
{
switch (I->getPointerAddressSpace())
{
case ADDRESS_SPACE_PRIVATE:
case ADDRESS_SPACE_GLOBAL:
case ADDRESS_SPACE_CONSTANT:
return false;
default:
{
BufferType bufType = DecodeBufferType(I->getPointerAddressSpace());
return bufType != CONSTANT_BUFFER ||
!m_currShader->GetContext()->getModuleMetaData()->compOpt.WaDisableSubspanUseNoMaskForCB;
}
}
}
else if (auto* I = dyn_cast<GenIntrinsicInst>(sdag.m_root))
{
switch (I->getIntrinsicID())
{
case GenISAIntrinsic::GenISA_ldraw_indexed:
case GenISAIntrinsic::GenISA_ldrawvector_indexed:
return false;
default:
break;
}
BufferType bufType = DecodeBufferType(I->getPointerAddressSpace());
return I->getPointerAddressSpace() != ADDRESS_SPACE_PRIVATE &&
I->getPointerAddressSpace() != ADDRESS_SPACE_GLOBAL &&
I->getPointerAddressSpace() != ADDRESS_SPACE_CONSTANT &&
!(bufType == CONSTANT_BUFFER && m_currShader->GetContext()->getModuleMetaData()->compOpt.WaDisableSubspanUseNoMaskForCB);
}

return true;
Expand Down

0 comments on commit 2a99486

Please sign in to comment.