forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIX: Fix recent regression in debug instrumentation of void instructi…
…ons (microsoft#6053) The misplacement of that "return" in DxilDebugInstrumentation.cpp meant that a thread would continue to the following call to addStepDebugEntryValue, even if pix_dxil::PixDxilReg::FromInst had failed (i.e. returned false), which means that RegNum is not valid (although initialized to 0). This meant that PIX was instrumenting a bunch of void-return DXIL instructions that it shouldn't have. Didn't think to test that it WASN'T instrumenting instructions, but herein is added a test to do just that.
- Loading branch information
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: %dxc -Tlib_6_6 %s | %opt -S -dxil-annotate-with-virtual-regs -hlsl-dxil-debug-instrumentation | %FileCheck %s | ||
|
||
// Check that the instrumentation does NOT instrument an instruction that has no dxil-inst-num metadata | ||
// The load instruction should not be instrumented. If it is, we can expect an "atomicBinOp", emitted | ||
// by the instrumentation, to be generated before the handle value is used, so assert that there | ||
// is no such atomicBinOp: | ||
|
||
// CHECK: [[HandleNum:%[0-9]+]] = load %dx.types.Handle, | ||
// CHECK-NOT: call i32 @dx.op.atomicBinOp.i32(i32 78 | ||
// CHECK: @dx.op.createHandleForLib.dx.types.Handle(i32 160, %dx.types.Handle [[HandleNum]] | ||
|
||
RWByteAddressBuffer buffer : register(u0); | ||
|
||
[shader("raygeneration")] | ||
void main() { | ||
buffer.Store(0, 42); | ||
} |