The mark convergent pass is meant to prevent unwanted moving of
operations on derivative op input. It was previously only run on pixel
shaders. Because derivatives are supported in CS/MS/AS shaders as part
of shader model 6.6, it needs to be run on these stages for that target
too.
PR #3636 (commit 6b44d611f7) changes the definition of
`llvm_unreachable(msg)`. Now it evaluates the `msg` even when
NDEBUG flag is defined.
For the following code,
```
static const char *const BundlingNotImplementedMsg =
"Aligned bundling is not implemented for this object format";
void MCObjectStreamer::EmitBundleAlignMode(unsigned AlignPow2) {
llvm_unreachable(BundlingNotImplementedMsg);
}
```
`llvm_unreachable(BundlingNotImplementedMsg)` did not evaluate
`BundlingNotImplementedMsg`. After PR #3636, it is evaluated and it
results in "undefined object" for `BundlingNotImplementedMsg`.
Failing to remove this because it is marked as having side effects so it
can prevent unwanted code movement resulted in trivially dead code being
retained unnecessarily because the marker isn't removed until after dead
code elimination. By allowing its removal when the operation that needed
it has been removed so it has no users, this dead code can be
eliminated.
- set up missing thread malloc and MSFileSystemForDisk causing crashes
- removed default "-" input since it doesn't even work to select stdin.
- dxv: write signed output with -o, when validating full DxilContainer
Instead of raising structured exceptions for unreachable and fatal
errors, raising c++ exceptions allows returning an error code and
getting a useful message instead of requiring a structured exception
handler to catch it.
Add cast failure assert
This is little more than a move of the "create-uav" code in lib/DxilPIXPasses/DxilShaderAccessTracking.cpp to PixPassHelpers.cpp, followed by a factoring-out of the parts that create a handle (either pre-SM6.6 fashion, or with the newer create-from-binding etc.).
All the other passes' near-identical code was then deleted and made to call the centralized function.
The 32-bit atomics test variant was requiring a UAV type unnecessarily.
By using structured buffers for groupshared output, this dependency is
removed.
When compiling a library without 16-bit support, certain struct types
containing either min precision types or matrices must be saved in
reflection data for conversion after linking. However, this is only
necessary when the types are used by a resource.
Instead of evaluating all matrix types and saving those that meet this
criteria, only the types used by resources are evaluated and possibly
preserved. This significantly shrinks the reflection size in this case.
- Move validator/dxil version checks up-front
These should fail first rather than side effects of trying to validate
details of a version we don't support.
- Improve message for unsupported validator or dxil version
These errors are most likely if compiling separately from validation
and failing to override the validator version properly, or running on
an external validator that doesn't support a newer dxil.
- Use dxil version from metadata for DxilModule when loading,
rather than just setting it to minimum based on shader model.
- Remove TODO from validator messages that shouldn't be there
* Add d3d12TokenizedProgramFormat.hpp header from the Windows Driver kit.
The header is now open source under the University of Illinois Open Source License.
This change reduces the DX compiler projects dependencies on WDK to TAEF testing
framework only. That means the project can be built without WDK if tests are
excluded from the build (HLSL_INCLUDE_TESTS cmake option to OFF).
Fixes#2965
This change updates the existing PIX resource-tracking code to handle dynamic resources (and SM6.6's resource binding apparatus in general).
The output UAV is now segmented into three parts: the original formatted buffer at the beginning, for old-style createHandle resources, followed by a block for resource (texture, buffer etc) access, followed by a block for sampler access.
The latter two are divided into 8-byte records. The first dword records writes to a resource/sampler, the second reads.
The writes are encoded bit fields denoting the access performed by the shader.
Module with stripped reflection will have no name for error messages.
Try to get the name from the debug module.
Failing that, use ID, type and binding info.
* Fix LifetimeIntrinsicTest issues
- was only run on SM 6.6 supporting devices
- would only run SM 6.6 tests in experimental mode, compiling with -Vd
- wasn't specifying options required to test lifetime fallback paths
* Disable LifetimeIntrinsicTest and HelperLaneTestWave on warp
Some compilers (gcc) get really unhappy when your field name matches the
type name. In the defense of such, it does make you wonder what sizeof()
would return if the member were not of its namesake's type.
Anyway, gcc should be able to build. This renames the member to differ
from the type to make all the Gnus happy.
The size of ULONG_PTR varies based on the address size of the
architecture. For 32-bit systems, it was invalid to treat it like a
64-bit value. By casting the value to a void pointer and changing the
print code to %p, we get the right thing for all platforms
The most common cause of internal compiler errors are access violations
or stack overflows. This registers an exception handler in dxc.exe for
these cases that are otherwise unhandled. It prints a simple message
for these errors and passes the exception along.
In case this is unwanted for some reason, a hidden disabling flag is
added as well.
Adds LLVM builtin exceptions for assert, fatal, and unreachable. Adds a
default message for exceptions not explicitly addressed.
Alters behavior of llvm_unreachable so it always raises an exception
regardless of compiler support for unreachable hints.
Reports errors using fputs instead of std::cerr to ensure that no
allocation is necessary. Custom output is performed in a static array
that is output with fputs.
An earlier version of the D3D runtime doesn't handle CheckFeatureSupport
for FEATURE_SHADER_MODEL when the corresponding struct is set to a
unrecognized shader model. Instead of returning the highest supported
shader model that is less than the one provided as documented, the call
fails. In practice, this only occurred for 6.6 tests where the SDK had
6.6 capability, but the installed runtime did not.
To work around this, we don't verify that the call succeeds. Instead,
a failing return result is interpretted the same way as a highest shader
model value that is lower than that requested.
Because version 6 of the command list pointer was being created whenever
the available SDK supported it, sometimes the test would try to create
version 6 where it wasn't supported.
Instead, this just stores the base pointer type and casts it up where we
know support is available.
* Use D3D12 headers from the same Windows 10 SDK version as cmake is using (cmake variable CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
* For ARM64EC builds detect SDK version from VSDevCmd environment variable instead of a fixed version in hctbuild.cmd
* Add option -show-cmake-log to hctbuild and enable it in AppVeyor
- VFS captures output files for duration of test, enabling:
- %dxl test IDxcLinker
- add -D to FileCheck args to supply defined variables
- report failing RUN command when not consumed by FileCheck or XFail
This extension adds qualifiers for payload structures accompanied with semantic checks and code generation. This feature is opt-in for SM 6.6 libraries. The information added by the developer is stored in the DXIL type system and a new metadata node is emitted during code generation. The metadata is not necessary for correct translation of DXIL, so it may be safely ignored, but it provides hints to unlock potential optimizations in payload storage between DXR shader stages.