[PIX] Instrument DebugBreak() calls for PIX#8349
Draft
henchhinglimbu wants to merge 1 commit intomicrosoft:mainfrom
Draft
[PIX] Instrument DebugBreak() calls for PIX#8349henchhinglimbu wants to merge 1 commit intomicrosoft:mainfrom
henchhinglimbu wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
|
@henchhinglimbu please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Contributor
You can test this locally with the following command:git-clang-format --diff 33656f65c2fd735647ed10448b1fa3ca7b1f2e48 7211c61a71f087792c63d6d6e7f3bf83b0c6509b -- lib/DxilPIXPasses/DxilDebugBreakInstrumentation.cpp include/dxc/DxilPIXPasses/DxilPIXPasses.h tools/clang/unittests/HLSL/PixTest.cppView the diff from clang-format here.diff --git a/lib/DxilPIXPasses/DxilDebugBreakInstrumentation.cpp b/lib/DxilPIXPasses/DxilDebugBreakInstrumentation.cpp
index 6f727c46..896d0689 100644
--- a/lib/DxilPIXPasses/DxilDebugBreakInstrumentation.cpp
+++ b/lib/DxilPIXPasses/DxilDebugBreakInstrumentation.cpp
@@ -47,8 +47,7 @@ bool DxilDebugBreakInstrumentation::runOnModule(Module &M) {
HlslOP->GetOpFunc(OP::OpCode::AtomicBinOp, Type::getInt32Ty(Ctx));
Constant *AtomicBinOpcode =
HlslOP->GetU32Const((uint32_t)OP::OpCode::AtomicBinOp);
- Constant *AtomicOr =
- HlslOP->GetU32Const((uint32_t)DXIL::AtomicBinOpCode::Or);
+ Constant *AtomicOr = HlslOP->GetU32Const((uint32_t)DXIL::AtomicBinOpCode::Or);
std::map<Function *, CallInst *> FunctionToUAVHandle;
@@ -101,8 +100,7 @@ bool DxilDebugBreakInstrumentation::runOnModule(Module &M) {
const uint32_t InstructionNumBitPosition = (InstructionNumber % 32u);
const uint32_t InstructionNumBitMask = 1u << InstructionNumBitPosition;
- Constant *UAVByteOffsetArg =
- HlslOP->GetU32Const(InstructionNumByteOffset);
+ Constant *UAVByteOffsetArg = HlslOP->GetU32Const(InstructionNumByteOffset);
Constant *BitMaskArg = HlslOP->GetU32Const(InstructionNumBitMask);
// Write a 1 bit at the position corresponding to this DebugBreak's
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
DebugBreak()calls with UAV atomic writes so PIX can detect hit locations without haltingexecution.
Testing:
dxcompiler,ClangHLSLTests, andcheck-allcheck-allpassed locallyCo-authored-by: Copilot 223556219+Copilot@users.noreply.github.com