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

2488 Коммитов

Автор SHA1 Сообщение Дата
Chas. Boyd c75796a202
Update README.md 2019-08-30 17:21:37 -07:00
Alex Paige cad61c1978 Adding test fixes and more support for SM6.5 WaveMultiPrefix functions (#2421)
* Adding test fixes and more support for SM6.5 WaveMultiPrefix functions

1)	Ensure wave lane-id’s are sorted when accumulating result
2)	Fix made for HLSL in ShaderOpArithTable.xml to ensure the input aligns with what is being tested
3)	Added support for the “UBit” version for all of these tests.
2019-08-30 07:14:11 +02:00
Ehsan 99d1561514
[spirv] Update SPIRV-Tools and SPIRV-Headers (#2431)
This also picks up the change that adds OpName for flattened resource
arrays.
2019-08-28 14:23:25 -04:00
Ehsan 9b70ec14d4
[spirv] Consider base structs when calculating layout. (#2405) 2019-08-27 14:55:01 -04:00
Ehsan 0a32799e58
[spirv] Interpolation modes are also allowed on VS outputs. (#2414)
Fixes #2378.
2019-08-26 14:32:20 -05:00
amarpMSFT 05d1ad532a
Acceleration structures should be classified as raw srv buffers, not typed srv buffers (#2425)
* acceleration structures should be classified as raw buffers
2019-08-22 16:35:47 -07:00
Vishal Sharma b342647084
Enable clang warnings for uninitialized variables/structs (#2424)
* Enable clang warnings for uninitialized variables/fields

* Fix typo
2019-08-22 14:15:36 -07:00
Tex Riddell 114080aaec
Merge pull request #2416 from tex3d/sep-reflect
Merge separate refleciton and validator 1.4 compatibility fixes
2019-08-22 12:08:44 -07:00
Ehsan 9b9615d5b3
[spirv] Ensure loop unroll is run before descriptor scalar replacement. (#2417) 2019-08-22 13:40:35 -05:00
Ehsan cbdd586184
[spirv] Fix struct member offsets for templated buffer load. (#2411) 2019-08-22 13:38:39 -05:00
Tex Riddell 8f92b56130 Merge branch 'sep-reflect-merge' into sep-reflect 2019-08-22 10:50:29 -07:00
Tex Riddell 0d6d1f1773 Fix mesh shader signature element usage masks 2019-08-22 10:45:14 -07:00
Jaebaek Seo 75e5f76a55
Update CLSID scope (#2420)
Some clang versions report compiler errors because of constants
definition for CLSID saying that 'selectany' can only be applied
to data items with external linkage. This commit let only MS VS
build use "__declspec(selectany)".
2019-08-21 14:05:08 -04:00
Tex Riddell 171b98ff05 Merge branch 'sep-reflect-merge' into sep-reflect 2019-08-20 17:39:42 -07:00
Tex Riddell 16bb46f69d -validator-version: use '.', fix typo, complete linker support 2019-08-20 17:38:46 -07:00
Tex Riddell 0f23b6946c Merge remote-tracking branch 'ms/master' into sep-reflect 2019-08-19 00:43:25 -07:00
Tex Riddell 892765cc4b Default to stripping reflection from DXIL and fix a bunch of fallout.
Two test options, -Qstrip_reflect_from_dxil and -Qkeep_reflect_in_dxil
for making tests work with reflection removed, since many tests are relying
on main module disassembly-reassembly between test phases and reflection
metadata will no longer be present there.  The strip option is for the
few cases where tests don't want the reflection kept in DXIL by default.

Validator no longer requires function annotations for no reason.

Fix places where remove global hook was not being called when functions
were removed manually from the list.

StripReflection now deletes function annotations, unless targeting lib or
old validator that required them.  Preserve global constructor list and
add annotation for 1.4 validator.  The global hook fixes were required
here, otherwise annotations would refer to dead functions during linking.
Struct annotations may not be removed in library case when they still need
translation to legacy types.

Allow missing struct annotation when not necessary to upgrade the layout.

Preserve usage in reflection by upgrading the module, emitting metadata,
cloning for reflection, then restoring validator version and re-emit
metadata.

Fix size for 16-bit type for usage and reflected size.

Make various batch reflection tests require validator 1.5, since these
tests rely on module disassembly->assembly, which will not preserve extra
usage metadata for reflection in 1.4.

Include reflection part in IDxcAssembler, but don't strip from module,
since there are no options to prevent this from breaking a lot of tests.

Don't strip reflection from offline lib target.
2019-08-19 00:39:39 -07:00
Tex Riddell 4ac7d8d584 Fix -validator-version issue, add tests
- default should be UINT_MAX, not zero, since zero is used
- compare validator version against target profile minimum for error
- add back implicit -Vd for lib_6_1/2 in CompileWithDebug since
  target profile is supplied outside options, so option validation
  would not know to fail without -Vd.
- add tests for various cases
2019-08-16 20:52:23 -07:00
Tex Riddell f48650865e Add part header and RDAT to separate reflection output 2019-08-14 20:06:09 -07:00
Tex Riddell a11fad7b86 Put HelpHidden on correct option 2019-08-14 16:27:14 -07:00
Ehsan fd4c08a10e
[spirv] Update SPIRV-Tools to get validator updates (#2407) 2019-08-14 15:40:57 -04:00
Jaebaek Seo 982d8fcc25
Support UUID for clang build (#2404)
Linux build emulated UUID because of the lack of UUID support, but
clang indeed supports it. This CL allows clang to use UUID.
2019-08-14 13:41:27 -04:00
Ehsan 3ce58eb95b
[spirv] Update SPIRV-Tools to get validator updates. (#2406) 2019-08-14 13:33:13 -04:00
Ehsan 922ef652fa
[spirv] Add option to flatten array of resources. (#2397)
* [spirv] Add option to flatten array of resources.

Current SPIR-V code generation uses 1 binding number for an array of
resources (e.g. an array of textures). However, the DX side uses one
binding number per array element. The newly added
'-fspv-flatten-resource-arrays' changes the SPIR-V backend behavior to
use one binding number per array element, and uses spirv-opt to flatten
the array.

TODO: Add a test where the array is passed around.
TODO: Test this works with steven's PR and proper results are produced.

* [spirv] Update tests to include array of samplers.

* [spirv] Take early exit condition out of the loop.

* [spirv] Add documentation for the new cmd option.

* [spirv] Invoke CreateDescriptorScalarReplacementPass when needed.

* [spirv] address code review comments.
2019-08-14 09:45:01 -04:00
Tex Riddell 52c8326a5b Disable OOM test; remove unused getMemBufferCopy in DxCompiler APIs
- OOM test is problematic, and it's not trivial to fix at this time.
  See note where test is disabled.
- getMemBufferCopy is called in two DxCompiler APIs, but the result is
  never used, so I removed it.
2019-08-13 21:42:54 -07:00
Tex Riddell aeea959d88 Add default to switch to remove compiler warning. 2019-08-12 22:49:24 -07:00
Tex Riddell ed53d1e5b0 Strip reflection from DXIL part when /Qstrip_reflect
- hide temporary /Qstrip_reflect_from_dxil option (it will always strip
  reflection from DXIL in the future)
2019-08-12 20:19:39 -07:00
Tex Riddell 5aec592757 Add seperate reflection part (STAT), add -Qstrip_reflect_from_dxil
- Put separate reflection in STAT part for now.
- Separate reflection is the module with deleted function bodies.
- Use new -Qstrip_reflect_from_dxil to drive stipping of reflection
  metadata from DXIL part, since now -Qstrip_reflect means strip
  the STAT reflection part, or don't include it in the first place.
- Update disassembler to use STAT part if available for reflecting
  resource bindings, buffer descriptions, and ViewID state.
- Put some Qstrip_* flags under DriverOption as well as CoreOption.
2019-08-12 18:15:19 -07:00
Tex Riddell 5894e7ab66 return bool changed from DxilModule::StripReflection 2019-08-12 16:15:52 -07:00
Tex Riddell bd929a7129 Reflection: optionally use new metadata+RDAT instead of instructions
- Makes it compatible with a module stripped of function bodies.
- Signature masks are improved, making it necessary to switch expected
  masks in DxilContainerTest.
2019-08-12 15:57:08 -07:00
Tex Riddell 03687f44c3 Fix IR sensitive tests 2019-08-12 15:50:45 -07:00
Tex Riddell f80a5c07f5 Add dxilver 1.5 to batch tests requiring it. 2019-08-12 15:50:18 -07:00
Tex Riddell 19706cbe8e Fix ValidationTest for new metadata and auto-skip on ValVer 2019-08-12 15:48:05 -07:00
Tex Riddell 4d07c17c65 Skip CompilerTest::Mesh if version < 1.5 2019-08-12 15:42:32 -07:00
Tex Riddell 5075b79496 FileCheck: auto-skip unsupported shader models for current validator 2019-08-12 15:41:30 -07:00
Tex Riddell a3f75c416d Fail earlier if ValVer is lower than required
- New shader models can cause existing validators to crash while loading
  the module, before it's able to report that it doesn't support the
  shader model/validator version in the container.
2019-08-12 15:35:48 -07:00
Tex Riddell 4234a9ae53 Add CB Usage to metadata, compute in hlsl-dxil-lower-handle-for-lib 2019-08-12 15:32:17 -07:00
Tex Riddell eea0c94c08 Add Sig element usage masks to metadata, compute in hlsl-dxilfinalize 2019-08-12 15:30:01 -07:00
Tex Riddell 153edf8f5e RDAT: Fix shader stage and feature masks for ValVer 1.4 compat 2019-08-12 15:22:59 -07:00
Tex Riddell d9f134530d Fix Validator 1.4 compat break for bool signature element. 2019-08-12 15:20:51 -07:00
Tex Riddell b637b8ebab Fix metadata load for a Type template arg
- This would cause an assert when you store, write to bitcode, load from
  bitcode, store to bitcode again, then load again, when using the
  Type template arg metadata.
2019-08-12 15:20:51 -07:00
Tex Riddell f0bab7f861 Make MetadataHelper validator version aware
- use current validator version for adding template type metadata,
  rather than min for shader model.
2019-08-12 15:20:51 -07:00
Tex Riddell 406f537b49 Add -validator-version override
- remove auto-Vd on lib < 6.3, since this is already required to be
  explicit by option parsing.
2019-08-12 15:20:51 -07:00
Tex Riddell f1633a93f0 Added to CoreOption: /Fo /Fe /P /Qstrip_rootsignature /setrootsignature 2019-08-12 15:20:51 -07:00
Tex Riddell a3013a28b5 Remove codegen failure code for subobjects based on validator version. 2019-08-12 15:20:50 -07:00
Tex Riddell bc216664e5 DxilValidation: Restore original wording for Patch Constant Signature 2019-08-12 15:20:50 -07:00
Tex Riddell 4599bd7588 Remove DxilRuntimeData::InitFromRDAT_Prerelease 2019-08-12 15:20:50 -07:00
Tex Riddell e5fc71ec2f Update GetMinValidatorVersion for DXR 1_1 (1.5) and Subobjects (1.4) 2019-08-12 14:40:31 -07:00
Tex Riddell 28a00c2c31 ShaderFlags: Set DXR 1.1 on RaytracingPipelineConfig1, new StateObjectFlag 2019-08-12 14:38:54 -07:00
Tex Riddell 6e99295bdc DxilConstants.h: Add CompareVersions and StateObjectFlags 1.4 valid mask 2019-08-12 14:35:37 -07:00