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

2399 Коммитов

Автор SHA1 Сообщение Дата
Helena Kotas 88ddd4c978
dxexp: add explicit dependency on D3D12 (#3710) 2021-04-26 14:49:31 -07:00
Greg Roth 56370bad8d
Correct iteration over users for gather offsets (#3709)
When converting the internal gatherimm intrinsic to the official dxil
variant after validation has been performed, user iteration went over
the edge, resulting in an app verifier problem. This corrects the
iteration.

Fixes #3674
2021-04-26 11:42:41 -07:00
Xiang Li bd38504d5e
Add -dumprs to dxa. (#3703) 2021-04-21 15:31:44 -07:00
Tex Riddell 098af75e48
Move ExecutionTest setup out of area shared with HLK code. (#3682) 2021-04-13 13:23:08 -07:00
Michael Haidl bbe33bcf11
DiagnosticsEngine incorrectly handles DiagnoceOnce diagnostics and asserts/crashes (#3683)
When a diagnostic that should be emitted with DiagnoceOnce has already been emitted, an invalid DiagnosticsBuilder is returned to prohibit another emittance of the diagnostic. The current implementation, however, does not set IsActive=false and the DiagnosticsEngine tries to emit a diagnostic with an invalid DiagID. This function is currently only used with payload access qualifiers to emit a warning only once if qualifiers are dropped because PAQs are disabled because of the SM version or the user opted-out. (Update the corresponding test accordingly).
2021-04-13 08:38:28 -07:00
Jaebaek Seo c9249f313c
[spirv] Use object of correct base class for method call (#3671)
When calling a method using an object, we have to correctly pass "this"
object. When the class of the object used for the method call has
multiple base classes, it does not use the correct base class. It simply
uses "this" object. This commit fixes the issue.

Fixes #3644
2021-04-12 13:37:13 -04:00
Junda Liu d31f05ffd6
[spirv] Add VK_KHR_variable_rate_fragment_shading SPIR-V support (#3664)
Change the mapping of SV_ShadingRate from FragSizeEXT (VK_EXT_fragment_density_map) to PrimitiveShadingRateKHR/ShadingRateKHR (VK_KHR_variable_rate_fragment_shading).
2021-04-12 10:06:49 -04:00
Xiang Li 5fa34d1fd6
Save root sig for entry for lib. (#3669)
* Save root sig for entry for lib.
2021-04-07 21:32:17 -07:00
Jaebaek Seo c879f2f9b5
[spirv] reply on spirv-val for variable offset for OpImage* validation (#3656)
spirv-val reports a validation error when we use variable offset for
OpImage*. We have to rely on spirv-val for the validation instead of
doing it in DXC. In particular, when the HLSL code uses the loop
invariant variable for the Sample() intrinsics, it should be a constant
value after conducting the loop unrolling. Since we rely on spirv-opt
for the loop unrolling, we should not report the validation error in
DXC.

Fixes #3575
2021-04-07 17:48:21 -04:00
Greg Roth f7a633ddad
Constrain convergent_cs mesh test threads (#3662)
Allows running on limited platforms
2021-04-05 10:51:48 -07:00
Helena Kotas d0b19d30b3
Fix crash on undeclared identifier inside a vector (#3653)
Fixes #3357
2021-04-01 17:35:18 -07:00
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
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
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
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
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
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
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 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
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
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
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
Adam Yang b2c85528e7
Fixed some potential O0 failures (#3569) 2021-03-12 19:34:09 -08:00