Skip to content

Commit

Permalink
Don't instrument that! (#3176)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeff Noyle <[email protected]>
  • Loading branch information
jeffnn and Jeff Noyle authored Oct 1, 2020
1 parent 7b5d547 commit b0c029e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/DxilPIXPasses/DxilDebugInstrumentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,18 @@ void DxilDebugInstrumentation::addStepDebugEntry(BuilderContext &BC,
return;
}

if (Inst->getOpcode() == Instruction::OtherOps::Call) {
if (Inst->getNumOperands() > 0) {
if (auto *asInt =
llvm::cast_or_null<llvm::ConstantInt>(Inst->getOperand(0))) {
if (asInt->getZExtValue() == (uint64_t)DXIL::OpCode::AllocateRayQuery) {
// Ray query handles should not be stored in the debug trace UAV
return;
}
}
}
}

if (auto *St = llvm::dyn_cast<llvm::StoreInst>(Inst)) {
addStoreStepDebugEntry(BC, St);
return;
Expand Down

0 comments on commit b0c029e

Please sign in to comment.