Greg Roth 1071f1fb89 No sinking coord calc for sample in libs (#3661) 4 years ago
..
d3dreflect 81e86e51a1 Texture2DMS fixes: missing ResProp data; reflection default NumSamples = 0 (#3578) 4 years ago
dxil 3bd5f9ccfa Errors on non-immediate load/gather offsets (#3283) 4 years ago
hlsl 1071f1fb89 No sinking coord calc for sample in libs (#3661) 4 years ago
infra 4e5440e1ee Reorganize tests in CodegenHLSL for better clarity and coverage (#2456) 6 years ago
passes 985b29b467 Allow removal of trivially dead convergent marker (#3643) 4 years ago
pix 7a1c0bddca PIX SM 6.6 resource access tracking (#3594) 4 years ago
rewriter 4211802b9a Support -line-directive in dxr. (#3027) 5 years ago
samples eaa7f95d07 Enable generation of llvm.lifetime.start/.end intrinsics (#3034) 5 years ago
shader_targets 8f0184a31d DXC extension for DXR Payload Access Qualifiers (#3171) 4 years ago
validation 0b1c006f9d Internal validator error messages don't need /Zi anymore. (#3606) (#3615) 4 years ago
Readme.md 8d9e1cbb86 Dxil.dll <= 1.5 compat: Fix RDAT break and validation tests (#3117) 5 years ago

Readme.md

Files in this directory are executed using FileCheck in a batch mode.

There is a confirmation bias problem when testing debug info using file-check.

Say your test file contains:

// RUN: %dxc -E main -T vs_6_0 -Zi %s | FileCheck %s
// CHECK: foo
void main() {}

Due to /Zi, the !dx.source.contents metadata will be present and contain a string with the original source file. This means that the generated file contains your "// CHECK: foo", and hence the "foo" itself, so the check will succeed by default!

The current workaround is to include the following in your test to explicitly match the quoted source file:

// Exclude quoted source file (see readme)
// CHECK-LABEL: {{!"[^"]*\\0A[^"]*"}}

This will match a metadata string containing \0A (newline), which should only appear in the quoted source file. It will not match itself in the quoted source file because the regex won't match itself, and even less the escaped version of itself.

Note that if you see a failure on that line, it means that something else before that CHECK failed to match.