Skip to content

Commit 9271d51

Browse files
scottp101igcbot
authored andcommitted
add hotzone overload
add hotzone overload
1 parent 900081d commit 9271d51

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

IGC/AdaptorCommon/RayTracing/AutoGenRTStackAccessPrivateOS.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,30 @@ static Type* _struct_RTStackFormat__SWHotZone_v2(Module &M)
277277
return StructType::create(M.getContext(), Tys, StructName, false);
278278
}();
279279
}
280+
static Type* _struct_RTStackFormat__SWHotZone_v3(Module &M)
281+
{
282+
return
283+
[&] {
284+
StringRef StructName = "struct.RTStackFormat::SWHotZone_v3";
285+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
286+
return Ty;
287+
Type* Tys[] = {
288+
IntegerType::get(M.getContext(), 32),
289+
[&] {
290+
auto *EltTy =
291+
IntegerType::get(M.getContext(), 32);
292+
return ArrayType::get(EltTy, 3);
293+
}(),
294+
IntegerType::get(M.getContext(), 32),
295+
[&] {
296+
auto *EltTy =
297+
IntegerType::get(M.getContext(), 32);
298+
return ArrayType::get(EltTy, 3);
299+
}(),
300+
};
301+
return StructType::create(M.getContext(), Tys, StructName, false);
302+
}();
303+
}
280304
static Type* _struct_IGC__RayDispatchGlobalData(Module &M)
281305
{
282306
return
@@ -739,6 +763,12 @@ static Type* _gettype_SWHotZone_v2(Module &M)
739763
_struct_RTStackFormat__SWHotZone_v2(M);
740764
}
741765

766+
static Type* _gettype_SWHotZone_v3(Module &M)
767+
{
768+
return
769+
_struct_RTStackFormat__SWHotZone_v3(M);
770+
}
771+
742772
static Type* _gettype_RayDispatchGlobalData(Module &M)
743773
{
744774
return

IGC/AdaptorCommon/RayTracing/RTBuilder.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,17 @@ void RTBuilder::setDisableRTGlobalsKnownValues(bool Disable) {
17241724
}
17251725

17261726

1727+
GenIntrinsicInst* RTBuilder::createDummyInstID(Value* pSrcVal)
1728+
{
1729+
Module* module = GetInsertBlock()->getModule();
1730+
Function* pFunc = GenISAIntrinsic::getDeclaration(
1731+
module,
1732+
GenISAIntrinsic::GenISA_dummyInstID,
1733+
pSrcVal->getType());
1734+
auto* CI = CreateCall(pFunc, pSrcVal);
1735+
return cast<GenIntrinsicInst>(CI);
1736+
}
1737+
17271738
CallInst* RTBuilder::ctlz(Value* V)
17281739
{
17291740
auto* Ctlz = Intrinsic::getDeclaration(

IGC/AdaptorCommon/RayTracing/RTBuilder.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ class RTBuilder : public IGCIRBuilder<>
453453
Type* getRayDispatchGlobalDataPtrTy(Module &M);
454454

455455

456+
GenIntrinsicInst* createDummyInstID(Value* pSrcVal);
457+
456458
CallInst* ctlz(Value* V);
457459

458460
void createPotentialHit2CommittedHit(StackPointerVal* StackPtr);

IGC/AdaptorCommon/RayTracing/RTStackFormat.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,17 @@ struct alignas(LSC_WRITE_GRANULARITY) SWHotZone_v2
904904
// pad to LSC write granularity (16B on Gen12)
905905
};
906906

907+
struct alignas(LSC_WRITE_GRANULARITY) SWHotZone_v3
908+
{
909+
uint32_t StackOffset;
910+
uint32_t DispatchRaysIndex[3];
911+
912+
uint32_t Complete;
913+
914+
// pad to LSC write granularity (16B on Gen12)
915+
uint32_t Pad[3];
916+
};
917+
907918
constexpr uint32_t StackFrameAlign = 16;
908919
static_assert(IGC::RTStackAlign % LSC_WRITE_GRANULARITY == 0, "not aligned to write granularity?");
909920

0 commit comments

Comments
 (0)