Jeff Noyle 5 роки тому
батько
коміт
e70fa4bdad

+ 5 - 0
lib/DxilPIXPasses/DxilDebugInstrumentation.cpp

@@ -768,6 +768,11 @@ bool DxilDebugInstrumentation::runOnModule(Module &M) {
     AllInstructions.push_back(&*I);
   }
 
+  auto Fn = DM.GetEntryFunction();
+  auto & Blocks = Fn->getBasicBlockList();
+  for (auto & block : Blocks) {
+    auto &Is = block.getInstList();
+  }
   // Branchless instrumentation requires taking care of a few things:
   // -Each invocation of the shader will be either of interest or not of interest
   //    -If of interest, the offset into the output UAV will be as expected

+ 1 - 1
tools/clang/test/HLSLFileCheck/pix/DebugFlowControl.hlsl

@@ -4,7 +4,7 @@
 
 // check instrumentation for one branch. 
 
-// CHECK:  %UAVIncResult2 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_DebugUAV_Handle, i32 0, i32 0, i32 undef, i32 undef, i32 %IncrementForThisInvocation1)
+// CHECK:  %UAVInc Result2 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_DebugUAV_Handle, i32 0, i32 0, i32 undef, i32 undef, i32 %IncrementForThisInvocation1)
 // CHECK:  %MaskedForUAVLimit3 = and i32 %UAVIncResult2, 983039
 // CHECK:  %MultipliedForInterest4 = mul i32 %MaskedForUAVLimit3, %OffsetMultiplicand
 // CHECK:  %AddedForInterest5 = add i32 %MultipliedForInterest4, %OffsetAddend