Skip to content

Commit 75a2018

Browse files
houjenkoigcbot
authored andcommitted
Cleanup unnecessary R1Lo
Remove workaround from the code patching
1 parent b78f29a commit 75a2018

File tree

3 files changed

+0
-38
lines changed

3 files changed

+0
-38
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7852,18 +7852,12 @@ void EmitPass::getCoarsePixelSize(CVariable* destination, const uint component,
78527852

78537853
CPixelShader* const psProgram = static_cast<CPixelShader*>(m_currShader);
78547854
CVariable* r;
7855-
bool isR1Lo = false;
78567855
// Coarse pixel sizes are in R1 for both simd32 halves.
78577856
{
78587857
r = psProgram->GetPhase() == PSPHASE_PIXEL ? psProgram->GetCoarseR1() : psProgram->GetR1();
7859-
isR1Lo = true;
78607858
}
78617859
r = m_currShader->GetVarHalf(r, 0);
78627860
CVariable* const coarsePixelSize = m_currShader->BitCast(r, ISA_TYPE_UB);
7863-
if (isR1Lo && isCodePatchCandidate)
7864-
{
7865-
psProgram->AppendR1Lo(coarsePixelSize);
7866-
}
78677861
m_encoder->SetSrcRegion(0, 0, 1, 0);
78687862
uint subReg;
78697863
{
@@ -7914,10 +7908,6 @@ void EmitPass::emitPSSGV(GenIntrinsicInst* inst)
79147908
CVariable* floatR1 = nullptr;
79157909
{
79167910
floatR1 = psProgram->BitCast(psProgram->GetR1(), ISA_TYPE_F);
7917-
if (m_encoder->IsCodePatchCandidate())
7918-
{
7919-
psProgram->AppendR1Lo(floatR1);
7920-
}
79217911
}
79227912

79237913
// Returns (x - xstart) or (y - ystart) in float.
@@ -8127,10 +8117,6 @@ void EmitPass::emitPSSGV(GenIntrinsicInst* inst)
81278117
m_encoder->SetSimdSize(simdSize);
81288118
m_encoder->SetMask(i == 0 ? EMASK_Q1 : EMASK_Q2);
81298119
m_encoder->SetDstSubVar(i);
8130-
if (m_encoder->IsCodePatchCandidate())
8131-
{
8132-
psProgram->AppendR1Lo(src);
8133-
}
81348120
m_encoder->Cast(dst, src);
81358121
m_encoder->Push();
81368122
}
@@ -8301,16 +8287,10 @@ void EmitPass::getPixelPosition(CVariable* destination, const uint component, bo
83018287
{
83028288
// Coarse pixel sizes are in R1 for both simd32 halves.
83038289
CVariable* r;
8304-
bool isR1Lo = false;
83058290
{
83068291
r = m_currShader->GetVarHalf(psProgram->GetR1(), 0);
8307-
isR1Lo = true;
83088292
}
83098293
CVariable* CPSize = m_currShader->BitCast(r, ISA_TYPE_UB);
8310-
if (isR1Lo && isCodePatchCandidate)
8311-
{
8312-
psProgram->AppendR1Lo(CPSize);
8313-
}
83148294
pixelSize =
83158295
m_currShader->GetNewVariable(
83168296
numLanes(m_currShader->m_SIMDSize), ISA_TYPE_UW, EALIGN_GRF, CName::NONE);
@@ -8345,7 +8325,6 @@ void EmitPass::getPixelPosition(CVariable* destination, const uint component, bo
83458325
if (isCodePatchCandidate)
83468326
{
83478327
m_encoder->SetPayloadSectionAsPrimary();
8348-
psProgram->AppendR1Lo(position);
83498328
m_currShader->AddPatchTempSetup(destination);
83508329
}
83518330
m_encoder->Add(destination, position, pixelSize);

IGC/Compiler/CISACodeGen/PixelShaderCodeGen.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ CVariable* CPixelShader::GetR1()
3333
return m_R1;
3434
}
3535

36-
std::vector<CVariable*>& CPixelShader::GetR1Lo()
37-
{
38-
return m_R1Lo;
39-
}
40-
41-
void CPixelShader::AppendR1Lo(CVariable* var)
42-
{
43-
m_R1Lo.push_back(var);
44-
}
45-
4636
CVariable* CPixelShader::GetCoarseR1()
4737
{
4838
IGC_ASSERT(m_phase == PSPHASE_PIXEL);
@@ -145,10 +135,6 @@ void CPixelShader::AllocatePSPayload()
145135
for (uint i = 0; i < GetR1()->GetNumberInstance(); i++)
146136
{
147137
AllocateInput(GetR1(), offset, i, forceLiveOut);
148-
for (auto R1Lo: GetR1Lo()) {
149-
AllocateInput(R1Lo, offset, i, forceLiveOut);
150-
}
151-
152138
offset += getGRFSize();
153139
}
154140
}

IGC/Compiler/CISACodeGen/PixelShaderCodeGen.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class CPixelShader : public CShader
3636
CPixelShader(llvm::Function* pFunc, CShaderProgram* pProgram);
3737
~CPixelShader();
3838
CVariable* GetR1();
39-
std::vector<CVariable*>& GetR1Lo();
40-
void AppendR1Lo(CVariable* var);
4139
CVariable* GetCoarseR1();
4240
CVariable* GetBaryReg(e_interpolation mode);
4341
CVariable* GetBaryRegLoweredHalf(e_interpolation mode);
@@ -130,7 +128,6 @@ class CPixelShader : public CShader
130128
USC::GFX3DSTATE_SF_ATTRIBUTE_ACTIVE_COMPONENT GetActiveComponents(uint attribute) const;
131129

132130
CVariable* m_R1;
133-
std::vector<CVariable*> m_R1Lo;
134131
CVariable* m_PerspectiveBaryPlanes;
135132
CVariable* m_NonPerspectiveBaryPlanes;
136133
CVariable* m_CoarseR1;

0 commit comments

Comments
 (0)