Граф коммитов

3101 Коммитов

Автор SHA1 Сообщение Дата
Greg Roth cac37e6890
No sinking coord calc for sample in libs (#3658)
Amidst catching the CS/AS/MS cases where convergent markers weren't
getting generated, it was pointed out that libs may need these too.
2021-04-01 15:40:34 -07:00
Greg Roth 93a98982cf
Prevent sinking coord calculation for sample (#3655)
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.
2021-04-01 14:01:22 -07:00
Vishal Sharma 3daa429525
Update BaseAlignLog2 field in ResourceProperties for StructuredBuffer (#3652) 2021-04-01 04:55:31 -07:00
Jaebaek Seo 530ddf4f7a
Add warning for VFACE semantic (#3626)
VFACE is obsolete. See #3494.
2021-03-31 14:57:40 -04:00
Jaebaek Seo 09f5b6d7cf
Fix build failure with undefined variable (#3647)
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`.
2021-03-31 09:54:00 -04:00
Adam Yang c8123cf7f7
Fixed a bug in pdb where -W[...] type options are split into two tokens (#3646) 2021-03-30 14:26:11 -07:00
Greg Roth cf135fa88b
Allow removal of trivially dead convergent marker (#3640)
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.
2021-03-29 17:54:28 -07:00
Tex Riddell ff19d80c55
Fix dxa/dxv options, crashes, support signing (#3622)
- 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
2021-03-29 14:22:43 -07:00
Helena Kotas 555ca24474
Add load library error to dxc exception handler; add header with exception error codes (#3639)
* Add load library error to dxc exception handler
* Add header with exception error codes
2021-03-26 23:37:41 -07:00
Helena Kotas e09223cc49
Enable debugging from kernel mode (#3637) 2021-03-26 20:46:56 -07:00
Greg Roth 6b44d611f7
convert recoverable exceptions to c++ (#3636)
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
2021-03-26 19:56:42 -07:00
Jeff Noyle ea1efe96ba
PIX passes: Centralize handle-generation code and update for 6.6 (#3628)
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.
2021-03-26 12:55:08 -07:00
Tex Riddell 6e0f1f96ff
Remove artificial FL12 requirement for CreateDevice (#3633) 2021-03-26 12:18:36 -07:00
Greg Roth 73a6706a6f
Remove unneeded atomicstest dependency (#3631)
The 32-bit atomics test variant was requiring a UAV type unnecessarily.
By using structured buffers for groupshared output, this dependency is
removed.
2021-03-26 09:09:34 -07:00
Tex Riddell 634cd49ba5
Disallow CreateHandle in SM66+ and library targets (#3629) 2021-03-25 23:09:16 -06:00
Greg Roth 82422d7761
Only keep legacy struct types from resources (#3624)
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.
2021-03-25 14:47:29 -07:00
Tex Riddell 6244ab8337
Validator/Dxil version error improvements (#3623)
- 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
2021-03-25 14:03:31 -07:00
Helena Kotas 53b2ad9ffd
Add d3d12TokenizedProgramFormat.hpp header from the Windows Driver kit (#3617)
* 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
2021-03-25 12:19:38 -07:00
Adam Yang 78cf9bde8f
Added deleted constructor for null type for StringRef (#3618) 2021-03-24 18:08:38 -07:00
Jeff Noyle 880c1359c5
PIX SM 6.6 resource access tracking (#3594)
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.
2021-03-24 13:04:46 -07:00
Ehsan 3bbcc69132
Roll back #3393. (#3621) 2021-03-24 11:00:24 -05:00
Helena Kotas c8c0f60e6a
Fix artifacts download link (#3614) 2021-03-23 14:04:23 -07:00
Helena Kotas d878c0a716
Enable experimental shaders option in HLK tests (#3601) 2021-03-23 14:04:00 -07:00
Tex Riddell cd3ef21b8f
Roll back llvm::ArrayRef dependency in ExecutionTest (#3613) 2021-03-22 16:56:39 -07:00
Tex Riddell 2791c51979
Generate descriptions for resources with no names (#3598)
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.
2021-03-21 15:04:02 -07:00
Tex Riddell 22fa20938f
Fix LifetimeIntrinsicTest issues (#3609)
* 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
2021-03-21 15:02:51 -07:00
Tex Riddell 2039610190
Fix Dxil validator compat and test issues (#3610) 2021-03-21 15:00:53 -07:00
Adam Yang 86104f415f
Internal validator error messages don't need /Zi anymore. (#3606) 2021-03-20 19:21:26 -07:00
Greg Roth 220e884560
Rename payload qualifier field to not match type (#3607)
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.
2021-03-19 16:24:25 -07:00
Greg Roth 0e892065bd
Correct exception handler sprintf for 32-bit (#3608)
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
2021-03-19 13:08:12 -07:00
Greg Roth 9b475a7fa3
Add dxc exception handler (#3604)
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.
2021-03-18 20:37:21 -07:00
Greg Roth ddde1217c9
Exec test - WAR SM feature check on older runtime (#3603)
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.
2021-03-18 11:03:11 -07:00
Jaebaek Seo e1915586d2
[spirv] update SPIRV-Tools and SPIRV-Headers (#3597) 2021-03-18 10:51:25 -04:00
Adam Yang e8372b9b9a
Fixed arg pairs not correct for old source in module pdbs (#3599) 2021-03-18 01:33:06 -07:00
Greg Roth 30e306f326
ShaderOpTest limit commandlist6 to where supported (#3600)
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.
2021-03-17 21:25:31 -07:00
Tex Riddell 2bda44fc06
Add constant evaluation for clamp() (#3581) 2021-03-17 17:46:23 -07:00
Vishal Sharma 63ce61aee5
Fix constexpr cast involving matrix type (#3593) 2021-03-17 15:36:14 -07:00
Adam Yang 640c9af748
Added way for caller to replace args in PDB utils (#3595) 2021-03-17 12:38:11 -07:00
Tex Riddell de00b014ac
Fix const error check for object subscript operator (#3580) 2021-03-17 11:40:48 -07:00
Helena Kotas 259ce00a78
Use D3D12 headers from the same Windows 10 SDK version as cmake is using (#3586)
* 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
2021-03-16 09:15:03 -07:00
Tex Riddell 3f6589a30b
Fix coverage bing used to init dx.ishelper when only discard is used (#3589) 2021-03-16 08:26:56 -07:00
Tex Riddell 92fa2508c4
Filecheck: Allow empty stderr input; replace last couple errs() uses (#3588) 2021-03-16 08:22:34 -07:00
Helena Kotas eed1d039da
Use Visual Studio 2019 in AppVeyor (#3587) 2021-03-15 21:45:35 -07:00
Vishal Sharma 6ad56561e2
Fix a misfiring assert due to unused static const involving matrix type (#3582) 2021-03-15 11:01:55 -07:00
Xiang Li de09119850
Add -link to dxc. (#3577)
* Add -link to dxc.
2021-03-15 09:09:58 -07:00
Tex Riddell fd07613a95
Texture2DMS fixes: missing ResProp data; reflection default NumSamples = 0 (#3578)
- Fix missing component type and count for Texture2DMS in ResProps
- Fix reflection for Texture2DMS with default NumSamples
2021-03-15 01:14:05 -07:00
Tex Riddell 0b686f347b
FileChecker improvements: VFS, %dxl, FileCheck -D, error reporting (#3576)
- 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
2021-03-14 22:13:26 -07:00
Michael Haidl 1db765ea9c
DXC extension for DXR Payload Access Qualifiers (#3171)
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.
2021-03-14 18:31:40 -07:00
Adam Yang acceedb905
Fixed version header potentially missing in some configs (#3574) 2021-03-14 00:12:40 -08:00
Adam Yang 92e3f2a6be
Fixed a bug reading version string from PDB. Implemented IDxcVersionInfo3 for DxcCompiler. (#3570) 2021-03-12 19:35:15 -08:00