Skip to content

Commit c63b55c

Browse files
houjenkoigcbot
authored andcommitted
Remove sharing builtin vars for code patching
Separate builtin vars, like Builtin_R0, R1 between shader body and payload section. Each section will generate its own builtin vars
1 parent bbf8036 commit c63b55c

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

visa/BuildCISAIRImpl.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,12 +1689,6 @@ int CISA_IR_Builder::Compile(const char *isaasmFileName, bool emit_visa_only) {
16891689
// Copy main kernel's declarations (shader body) into payload section
16901690
kernel->CopyVars(mainKernel);
16911691
kernel->getKernel()->Declares = mainKernel->getKernel()->Declares;
1692-
kernel->getIRBuilder()->setInputR1(
1693-
mainKernel->getIRBuilder()->getInputR1());
1694-
kernel->getIRBuilder()->setRealR0(
1695-
mainKernel->getIRBuilder()->getRealR0());
1696-
kernel->getIRBuilder()->setBuiltInR0(
1697-
mainKernel->getIRBuilder()->getBuiltinR0());
16981692
// Set payload LiveOuts to be output
16991693
uint32_t inputCount = mainKernel->getIRBuilder()->getInputCount();
17001694
for (unsigned int id = 0; id < inputCount; id++) {

visa/BuildIR.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,11 +718,9 @@ class IR_Builder {
718718
}
719719

720720
G4_Declare *getBuiltinR0() { return builtinR0; }
721-
void setBuiltInR0(G4_Declare *dcl) { builtinR0 = dcl; }
722721
G4_Declare *getRealR0() const {
723722
return realR0;
724723
} // undefined terminology: what's "real" here (vs "builtin" above)?
725-
void setRealR0(G4_Declare *dcl) { realR0 = dcl; }
726724
G4_Declare *getBuiltinA0() { return builtinA0; }
727725
G4_Declare *getBuiltinA0Dot2() { return builtinA0Dot2; }
728726
G4_Declare *getBuiltinHWTID() const { return builtinHWTID; }

visa/BuildIRImpl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,7 @@ IR_Builder::IR_Builder(INST_LIST_NODE_ALLOCATOR &alloc, G4_Kernel &k,
750750
debugNameMem(4096), r0AccessMode(getR0AccessFromOptions()) {
751751
num_temp_dcl = 0;
752752
kernel.setBuilder(this); // kernel needs pointer to the builder
753-
if (!getIsPayload())
754-
createBuiltinDecls();
753+
createBuiltinDecls();
755754

756755
sampler8x8_group_id = 0;
757756

0 commit comments

Comments
 (0)