Greg Roth e1f594323b Split gather offsets into separate test (#3712) 4 years ago
..
d3dreflect fd07613a95 Texture2DMS fixes: missing ResProp data; reflection default NumSamples = 0 (#3578) 5 years ago
dxil 3bd5f9ccfa Errors on non-immediate load/gather offsets (#3283) 5 years ago
hlsl e1f594323b Split gather offsets into separate test (#3712) 4 years ago
infra 4e5440e1ee Reorganize tests in CodegenHLSL for better clarity and coverage (#2456) 6 years ago
passes cf135fa88b Allow removal of trivially dead convergent marker (#3640) 4 years ago
pix 880c1359c5 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 162a1587c6 Fix detection of inner UDT ptr used by lowered intrinsic (DispatchMesh) (#3713) 4 years ago
validation 86104f415f Internal validator error messages don't need /Zi anymore. (#3606) 5 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.