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

355 Коммитов

Автор SHA1 Сообщение Дата
Farzon Lotfi b48341e403
[NFC] Fix a spelling mistake (#6946)
We have folks implementing the `firstbithigh` intrinsic and I noticed
this SPIRV error has a misspelling.
2024-10-04 16:05:20 -04:00
Xiang Li 9221570027
[Validator] Check size of PSV. (#6924)
Check size of PSV part matches the PSVVersion.
Updated DxilPipelineStateValidation::ReadOrWrite to read based on
initInfo.PSVVersion.
And return fail when size mismatch in RWMode::Read.

Fixes #6817
2024-10-02 20:48:32 -07:00
Xiang Li dfa1c814cc
[Doc] Update release notes for dxil validator hash. (#6904)
Add release notes for dxildll open sourced.

Fixes #6808
2024-10-02 10:48:17 -07:00
AndreyVK_D3D e1bb926f63
Update SPIR-V.rst (#6918)
Supports SPV_KHR_float_controls

05334a70d3/tools/clang/lib/SPIRV/FeatureManager.cpp (L293)
2024-09-18 11:22:07 -07:00
Cassandra Beckley ca2e67d29e
[SPIRV-V] Implement Shader Model 6.8 Expanded Comparison Sampling (#6854)
Compile `SampleCmpBias` using `OpImage*SampleDrefImplicitLod` and
`SampleCmpGrad` using `OpImage*SampleDrefExplicitLod`.

The existing handlers for `CalculateLevelOfDetail` and
`CalculateLevelOfDetailUnclamped` work for the
`SamplerComparisonSampler` overload, so no new code is needed other than
tests.
2024-09-09 18:42:24 +00:00
Steven Perron 7dcf2b483d
Add SPIRV version macros to DXC (#6874)
With inline spir-v, it becomes important for users to know which version
of SPIR-V is being targeted. They may need to generate different code
depending on the version.

This commit add these `__SPIRV_MAJOR_VERSION__` and
`__SPIRV_MINOR_VERSION__` to the compiler.
2024-08-22 10:01:27 -04:00
Cassandra Beckley 99f2d49810
[SPIR-V] Implement Shader Model 6.8 Extended Command Information (#6843)
Compile `SV_StartVertexLocation` as `BaseVertex` and
`SV_StartInstanceLocation` as `BaseInstance`.
2024-08-07 15:32:53 +02:00
Xiang Li cc6c6656d5
[DOC] update release note for remove WaveMatrix. (#6842)
Add remove WaveMatrix in release note.
2024-08-02 06:51:33 -07:00
Xiang Li 8b33431849
Remove WaveMatrix (#6807)
Remove WaveMatrix from main branch.
The DXIL operations are changed to Reserved to avoid affect DXIL
operation ID.
2024-08-01 10:52:13 -07:00
Xiang Li 0777bff092
[Doc] Release note update for 1.8.2407. (#6821)
Add note for loop structurizer fixes.
Fix the ReleaseNotes.md path.
2024-07-25 10:31:34 -07:00
Nathan Gauër 4a3a5dad43
[SPIR-V] Add support for D3D12 descriptor heaps (#6650)
This commit adds support for Sampler/Resource descriptor heaps in DXC.
Support for those heaps on the SPIR-V side requires no other extension
than SPV_EXT_descriptor_indexing.
On the Vulkan side, the VK_EXT_mutable_descriptor_type will be required
as multiple descriptor types must be allowed on the same binding.

When loading a type from a heap, DXC generates a new OpRuntimeArray of
the correct type, and binds it to `set=0,
binding=<BindingNumberOfTheHeap>`.
This means multiple OpRuntimeArrays will share the same binding. This is
why VK_EXT_mutable_descriptor_type is required.

This implementation uses at most 3 bindings:
 - N OpRuntimeArray as binding A for the ResourceDescriptorHeap
 - N OpRuntimeArray as binding B for the SamplerDescriptorHeap
- 1 OpRuntimeArray %counter_type for the ResourceDescriptorHeap
counters.

The bindings are only allocated if used. If only the
SamplerDescriptorHeap is used, a single binding is required.

The binding allocation logic is:
 1. allocate bindings for every resources, excluding heaps.
2. If ResourceDescriptorHeap is used, find the first unused binding in
set=0 and use it.
 3. Same for the SamplerDescriptorHeap
 4. Same for the counters.

UAV counters are not always created, only if used.
When used, they are stored in an OpRuntimeArray. The index of a counter
in that array
is equal to the index of the associated resource in its own
OpRuntimeArray.

```hlsl
        RWStructuredBuffer a = ResourceDescriptorHeap[2];
        a.IncrementCounter();
        // buffer in descriptorSet 0, binding 0, OpRuntimeArray[index=2]
        // counter in descriptorSet 0, binding 1, OpRuntimeArray[index=2]
```

As-is, this PR doesn't allow resource heaps to alias regular resources,
or to overlap.
A follow-up PR will add 3 flags to override each binding/set pairs:
 - 'fvk-bind-resource-heap <set> <binding>'
 - 'fvk-bind-sampler-heap <set> <binding>'
 - 'fvk-bind-counter-heap <set> <binding>'

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-07-22 12:08:13 -04:00
Greg Roth c4e9976904
Add upcoming release section to release notes (#6802)
This is the section where the next release notes will be inserted. It's
just a placeholder instruction for now.

Fixes #6697
2024-07-19 13:37:47 -07:00
Steven Perron 0703d9efad
[SPIRV] Fix documentation for RayTCurrent (#6784)
The documentation says that we use the HitTKHR builtin to implement
RayTCurrent. However, HitTKHR was renamed to RayTMaxKHR. We update
the documentation to represent that change.

Fixes #6739
2024-07-17 08:49:50 -04:00
Xiang Li 4cde6be812
[Release Note] Add release note for 1.8.2407 (#6776)
Add initial release note for 1.8.2407.

---------

Co-authored-by: Greg Roth <grroth@microsoft.com>
2024-07-16 20:36:03 -07:00
Greg Roth 9fa4618de9
Release Note for OS-normalized include paths (#6789)
The behavior was changed with #6317 so that regardless of spelling in
the shader, the include path will conform to the host OS style for the
purposes of the include handler. This just adds a release note for that
new behavior.

Fixes #6669
2024-07-16 19:22:55 +00:00
Greg Roth 8fce06b03c
Enable Living Release Notes (#6772)
Moving the source file for the README.md for github and nuget releases
into the DXC repo. It should be updated with relevant notes for the
upcoming release whenever they are made in main such that they will
already be available when the release is built.

Part of #6697
2024-07-11 22:47:31 +00:00
Justin Bogner d91523292e
Clean up inaccurate type information in resource metadata docs (#6763)
The `ResElem` type doesn't exist, and the example here seemed to imply
that the similar `ResRet` type was used in resource metadata. This is
incorrect, so fix the examples to match types that would actually show
up in this metadata.

Note: In practice the metadata doesn't generally actually refer to a
variable, but just an `undef` of the right type. I've opted not to
change the examples to reflect that here to minimize the change, but it
might be nice to describe when/why this occurs.

Fixes #3411
2024-07-10 21:11:33 +00:00
Zhengxing li 45018c752d
Rename WeakVH to WeakTrackingVH; NFC (#6663)
This PR pulls the upstream change, Rename WeakVH to WeakTrackingVH; NFC
(e6bca0eecb),
into DXC.

Here's the summary of the change:

> I plan to use WeakVH to mean "nulls itself out on deletion, but does
not track RAUW" in a subsequent commit.
> 
>   Reviewers: dblaikie, davide
> 
>   Reviewed By: davide
> 
> Subscribers: arsenm, mehdi_amini, mcrosier, mzolotukhin, jfb,
llvm-commits, nhaehnle
> 
>   Differential Revision: https://reviews.llvm.org/D32266

This is part 3 of the fix for #6659.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-18 12:34:55 -07:00
Nielsbishere 0bdd15b75f
Update SPIR-V.rst (#6642)
Mini typo
2024-05-22 09:54:31 -04:00
Natalie Chouinard 2432517221
[SPIR-V] Implement WaveMutliPrefix* (#6608)
Implements the Shader Model 6.5 WaveMultiPrefix* intrinsic functions
using the group operation from SPV_NV_shader_subgroup_partitioned,
PartitionedExclusiveScanNV, which performs a partitioned exclusive scan
operation across a subset of invocations ("lanes") in a subgroup
("wave"). The subset of the partition is determined by the provided
ballot ("mask") parameter, which follows the same requirements for
valid partitioning and active invocations/lanes as the HLSL parameter.

Note that WaveMultiPrefixCountBits remains unimplemented because it does
not directly map to a SPIR-V GroupNonUniformArithmetic instruction that
accepts the PartitionedExclusiveScanNV Group Operation.

DirectX Spec:
https://microsoft.github.io/DirectX-Specs/d3d/HLSL_ShaderModel6_5.html#wavemultiprefix-functions
SPIR-V Extension:
https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/NV/SPV_NV_shader_subgroup_partitioned.html

Depends on #6596
Fixes #6600
2024-05-17 09:59:35 -04:00
Natalie Chouinard 7db2fc129a
[SPIR-V] Implement WaveMatch intrinsic function (#6546)
Adds support for the `WaveMatch()` intrinsic function from Shader Model
6.5 using the `OpGroupNonUniformPartitionNV` instruction from the
`SPV_NV_shader_subgroup_partitioned` extension.

SPIRV-Tools bumped to include:
https://github.com/KhronosGroup/SPIRV-Tools/pull/5648

Fixes #6545
2024-05-06 15:45:12 +00:00
Xiang Li af955d601d
[DOC] Add doc about string function attribute in DXIL. (#6579)
This patch adds documentation about string function attribute in DXIL.
2024-05-03 12:20:14 -07:00
Natalie Chouinard 122464aeef
Require valid outputcontrolpoints on Hull shader (#6196)
According to the documentation: "A hull shader is implemented with an
HLSL function, and has the following properties: [...] The shader output
is between 1 and 32 control points".


https://learn.microsoft.com/en-us/windows/win32/direct3d11/direct3d-11-advanced-stages-tessellation#hull-shader-stage

This change adds a check to verify that the outputcontrolpoints
attribute is set on Hull shaders and has an argument in the valid range.

Fixes #3733 (by making the error consistent between backends)
2024-03-25 13:41:12 -04:00
Chris B 136f994a2f
[Docs] Update Readme and build instruction docs (#6185)
This workflow has been around long enough to stop treating it as the
"experimental" workflow and just update the documentation to use it.

We've gotten numerous issues lately related to problems building, so
this will hopefully help.

Fixes: #5762
Related: #6151
2024-03-05 15:50:36 -06:00
Tex Riddell 696a13a2a8
DxilValidation: add ShaderCompatInfo call graph checking (#6332)
ShaderCompatInfo identifies compatibility for functions that could be
called from an entry point.
Currently, this checking detects compatibility problems between entry
points and internal function calls that the validator otherwise misses.

This change adds a check for ShaderCompatInfo, recursing into called
functions looking for a source of conflict when not compatible with the
current entry point properties.
Errors are emitted for the entry point and at one source of each type of
conflict that ShaderCompatInfo detects.
A function is considered the source of a conflict when it has the
conflict but none of the functions called from this function have this
conflict.

Removed early exit for ShaderFlags validation when module is a library,
since these flags should be validated for libraries, and running
CollectShaderFlagsForModule fills in the ShaderCompatInfo data we need
for validation.

Also fixed tests for illegal barrier and derivative use, as well as
replacing the ignored MaxOutputRecords with the correct MaxRecords
attribute.

Fixes #6292.
2024-02-26 15:02:28 -08:00
Xiang Li 5dee81ce1d
Fix crash in DXIL.dll caused by illegal DXIL intrinsic. (#6302)
Replace assert on illegal DXIL op with return illegal value. Check the
illegal cases in validation.

Fixes #6168
2024-02-20 11:07:16 -08:00
Tex Riddell 2314d06cfe
New barrier DXIL Op fixes for Validation and RDAT function compatibility info (#6291)
Fix barrier allowed ops and flags by shader kind

New barrier operations lacked validation and for RDAT info: had
incorrect min target and shader stage flags.

- Identify barrier DXIL operations with new `is_barrier` in `hctdb.py`
and generated `OP::IsDxilOpBarrier`.
- Identify when a barrier op requires shader stage with group
(compute-like stage), or when it requires node memory.
- Add new `OptFeatureInfo_RequiresGroup` to identify function only
compatible with a shader stage with a visible group for access to
groupshared memory or use of group sync.
- Translate to original `BarrierMode` when compatible; adds
`BarrierMode::Invalid` to identify invalid cases.
- Account for `DXIL::MemoryTypeFlags::AllMemory` being allowed and
auto-masked by driver.
- Properly set min shader model and compatible shader stage flags.
- Validate barrier for shader stage.
- Added new barriers to counters which were missing.

Adressing parts of: #6256 and #6292
Fixes #6266
2024-02-20 10:44:34 -08:00
Joshua Batista cadf3bfed1
[Sema] Add final touches to wave size range implementation (#6202)
Upon further discussion, the team has agreed that in certain degenerate
cases, the current diagnostics are insufficient.
In the case that min == max in the wave size range attribute, a
defaultError warning should be emitted. Additionally, there should be an
explicit way to handle the case where 0,0,0 is passed to the wavesize
range attribute.
This PR directly handles and tests both of these cases.
Fixes #6161

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-10 02:15:59 +00:00
Natalie Chouinard 07a1c4ebfa
[SPIR-V] Allow SubpassInput without InputAttachmentIndex (#6240)
Vulkan allows SubpassInputs without an input attachment index specified,
so the error when it is missing has been removed and tests have been
updated.

As far as I can tell, there aren't earlier Vulkan or SPIR-V versions
where the presence of the the input attachment index was explicitly
required, so allowing it to be omitted in all cases.

Also added a test to verify that this fixes #2808 at the same time.

Fixes #6238, #2808
2024-02-06 10:22:27 -05:00
Joshua Batista 02afa578c1
[Validation] Add validation and tests for invalid system values in incompatible node launch type (#6108)
#5827 first requires validation at the DXIL level. The validation will
check for functions that have incompatible node launch types, and
intrinsics that represent certain system values.
This PR implements this validation and adds some tests that exercise
this validation.
Fixes #6104
2024-01-24 12:45:19 -08:00
Tex Riddell dcb618a2f1
Fix bad WaveSize non-range PSV0 and improve things (#6172)
PSV0 MaximumExpectedWaveLaneCount was incorrectly set to 0 for
non-range.

Create struct for WaveSize in DxilFunctionProps.h.
Centralize encoding and validation logic there.
Use validation logic in both SemaHLSL and DxilValidation.

Remove test requiring newer shader model in CodeGenHLSL.
Add comprehensive test for compute and node, cs and lib targets, SM 6.6
and 6.8, testing ast, metadata and RDAT.
Add PSV0 tests to catch incorrect runtime data.

Update validation rules and test for more cases.
2024-01-22 17:28:26 -08:00
Joshua Batista 00e170f348
Implement wave size range (#6167)
Wave Size should be able to take a range of possible wavesizes. This PR
aims to implement what is described in this spec:
https://github.com/microsoft/hlsl-specs/pull/149/files

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-20 06:16:03 +00:00
Greg Roth 79f55f267e
Correct sampling param error in DXIL docs (#6131)
The documentation for sample incorrectly implied that textureCUBE
resources should have 3 active offsets. Actually, cube textures have no
sample method overloads that include offsets.

This corrects the table indicating the number of active elements for
sample and also for sampleGrad as it incorrectly stated that the number
of active gradients is the same as the number of offsets. Again for cube
textures this is inaccurate. Cube textures take 3 gradients, but still
allow no active offsets.
2024-01-05 13:47:39 -08:00
Natalie Chouinard 1574879a29
[SPIR-V] Remove dead code and correct Float16 docs (#6127)
The docs were out of date stating that the
`SPV_AMD_gpu_shader_half_float` extension was added when half types were
used. This is now corrected to show that the Float16 capability is added
and no extension.

The remaining code that could have added that extension in certain cases
has been dead code since #2503 since none of the instructions checked in
that list are ones that are emitted by DXC, so it is removed to clean
up.

Evidence that this is dead code:
1. `git grep "InterpolateAt"` finds no uses other than those removed
here.
2. All tests still pass when it's removed.
3. The comments in #2503 also say they were not able to find a mapping
from any HLSL intrinsics to these instructions, which is why no tests
were added.

Follow-up from: https://github.com/KhronosGroup/SPIRV-Tools/pull/5519
2024-01-04 20:17:06 +00:00
S. Bharadwaj Yadavalli 8a37a92606
Update DXIL.rst (#6080)
Update table with supported shader model name, major and minor version
number.

Replace "verifier" with "validator"
2023-12-01 14:01:39 +00:00
S. Bharadwaj Yadavalli 6f516dd539
Update DXIL.rst (#6078)
Make the table with supported shader model, major and minor numbers
visible.
2023-11-29 18:39:08 +00:00
Helena Kotas 4b7b4ce637 Fix typo in DXIL.rst 2023-11-08 16:14:37 -08:00
Helena Kotas 96bb59b95a Merge branch 'main' into merge-from-main-11-2-no3 2023-11-02 14:25:31 -07:00
Joshua Batista cd03365aa5
[Diagnostics] Improve recursion diagnostics, specifically for library shaders (#5858)
Previously, there would be no recursion validation performed on any
function declarations in library shaders. This PR adds code that
validates that no function declarations that are found inside library
shaders are recursive. The diagnostics aren't repeated, since there's
logic to prevent the same diagnostic from being emitted by 2 similar
ancestors of the same recursive function. The PR also adjusts recursion
detection for shaders in non-library cases, and improves the original
diagnostic by adding information about the name of the function that is
recursive. The PR is meant to complete the work on issue #5789. However,
more work needs to be done for full accuracy.
The PR checks *all* function declarations in the translation unit for
the library shader case, when it should really only be checking a subset
of function declarations. This issue is filed here: #5857
Fixes #5789
2023-11-02 10:33:41 -07:00
Xiang Li 3d1b501290
Add SV_BaseVertexLocation and SV_StartInstanceLocation to VSIn (#5770)
New VS Input semantics SV_BaseVertexLocation and
SV_StartInstanceLocation are added for
BaseVertexLocation and StartInstanceLocation of
https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-drawindexedinstanced

Also added DXIL operation for these 2 input semantics.

Fixes https://github.com/microsoft/DirectXShaderCompiler/issues/2907
2023-10-31 14:43:37 -04:00
Chow ed1502e9bc
Support PerVertexKHR decorated input and SV_Barycentric (#5649)
1. Replace extension AMD_shader_explicit_vertex_parameter with
KHR_fragment_shading_barycentric as they define same semantic.

2. Support new usage of SV_BaryCentrics and PerVertexKHR decorated
input.

3. For per-vertex inputs, they will be used as an array if a shader call
new intrinsic GetAttributeAtVertex explicitly.

4. Support mixed deprecate usage of `nointerpolation` qualifier. When
use non-interpolated inputs outside new intrinsic, it will be treated as
accessing to first provoking vertex : data[0]. But it will still be
treated as an array if used as a function call's argument.

5. As now we allow mixed usage of this kind of inputs, add spirv
instruction operand replacement in DXC. A new visitor will replace
normal access to those inputs with a new AccessChain instruction targets
its first element.

6. For bool and bool vector type, we reconstruct a new bool/boolVec type
array in entry function wrapper.
2023-10-30 15:28:13 -04:00
Cassandra Beckley 93ad5b3131
[SPIR-V] Implement rasterizer ordered views (#5820)
Adds support for

- `RasterizerOrderedBuffer`
- `RasterizerOrderedByteAddressBuffer`
- `RasterizerOrderedStructuredBuffer`
- `RasterizerOrderedTexture1D`
- `RasterizerOrderedTexture1DArray`
- `RasterizerOrderedTexture2D`
- `RasterizerOrderedTexture2DArray`
- `RasterizerOrderedTexture3D`

Each of these types is treated and lowered as their corresponding `RW`
type, with the addition that loads and stores to values are wrapped with
`OpBeginInvocationInterlockEXT` and `OpEndInvocationInterlockEXT`. If
loads or stores to an ROV type are present, one of the

- `SampleInterlockOrderedEXT`
- `PixelInterlockOrderedEXT`
- `ShadingRateInterlockOrderedEXT`

execution modes are added to the entry function, based on semantics
inputted to the function.
2023-10-12 17:38:10 -07:00
Greg Roth 2123869930 Merge branch 'main' of into staging-sm-6.8 2023-10-12 10:41:37 -07:00
Tim Corringham 3870258157
Amend compute node compatibility DXIL validation (#5589)
Update the DXIL validation for compute node compatibility, and for node
input vs launch type compatibility, to make the diagnostics more
informative, and update the validation tests accordingly.

Fixes #5348

---------

Co-authored-by: Tim Corringham <tcorring@amd.com>
Co-authored-by: Joshua Batista <jbatista@microsoft.com>
2023-10-10 13:29:06 -07:00
Kleber Garcia 7640ffa3d5
Fixing documentation code tag for BuildingAndTestingDXC.rst (#5778)
Fixing documentation code tag for BuildingAndTestingDXC.rst doc file,
Lack of new line between code and content makes the code dissapear.
Removed also new line escape.
Sample sh code is now visible.

Results:

![image](https://github.com/microsoft/DirectXShaderCompiler/assets/789671/1163357c-2e28-4726-a1bc-9b6e6c71294e)
2023-09-28 19:34:42 +00:00
Xiang Li 2325bc539c
Add SampleCmpBias and SampleCmpGrad (#5716)
1. Add DXIL opcode for SampleCmpBias and SampleCmpGrad.
Merged from https://github.com/microsoft/DirectXShaderCompiler/pull/5562

2. Add hlsl intrinsic for  SampleCmpBias and SampleCmpGrad.
3. Lower the intrinsic to DXIL.

This is for https://github.com/microsoft/hlsl-specs/issues/30
Fixes #5560

---------

Co-authored-by: Greg Roth <grroth@microsoft.com>
2023-09-20 20:31:55 -04:00
Greg Roth eb252f0f33
Merge branch 'main' into 'staging-sm-6.8' (#5741)
Conflicts mostly to do with removing SAL annotations

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
Co-authored-by: Helena Kotas <hekotas@microsoft.com>
Co-authored-by: Xiang Li <python3kgae@outlook.com>
Co-authored-by: Chris B <cbieneman@microsoft.com>
Co-authored-by: Justin Bogner <mail@justinbogner.com>
Co-authored-by: Steven Perron <stevenperron@google.com>
Co-authored-by: Cassandra Beckley <cbeckley@google.com>
Co-authored-by: Natalie Chouinard <1953083+sudonatalie@users.noreply.github.com>
Co-authored-by: Jeff Noyle <jeffno@microsoft.com>
Co-authored-by: Nathan Gauër <brioche@google.com>
Co-authored-by: Tex Riddell <texr@microsoft.com>
Co-authored-by: r-a-sattarov <51679282+r-a-sattarov@users.noreply.github.com>
Co-authored-by: David Peixotto <davpeix@microsoft.com>
Co-authored-by: Joshua Batista <jbatista@microsoft.com>
Co-authored-by: Antonio Maiorano <amaiorano@google.com>
Co-authored-by: Minmin Gong <gongminmin@msn.com>
2023-09-18 22:01:12 -07:00
Nathan Gauër 3e7c98a91f
spirv: stop emitting ImageMSArray capability (#5663)
ImageMSArray is only required is OpTypeImage arrayed=1, MS=1 and
sampled=2. This is never the case AFAIK for code emitted from HLSL. No
tests or shaders I knew about required it, so should be OK removing it
from DXC.

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
2023-09-08 09:57:20 -04:00
Greg Roth af42292ab4 Merge 'main' into 'staging-sm-6.8' 2023-09-05 16:28:25 -07:00
Kirill Kozlov 38fcd6f741
[SPIRV] Add option to preserve interface variables (#5400)
Add `-fspv-preserve-interface` CLI option to prevent DCE optimization
pass from compiling out interface variables. It happens if these
variables are unused.

The option may be useful when decompiling SPIR-V back to HLSL.
Personally, I need it to convert DX12 shaders to DX11 ones using
SPIRV-Cross as a tool for converting SPIR-V, produced by DXC, to the old
shader model HLSL.

SPIR-V Tools now have a parameter in `RegisterPerformancePasses()` and
`RegisterLegalizationPasses()` for this. This PR creates a new command
line option in DXC and passes it to the `spvtools::Optimizer`.

Closes #4567
2023-07-11 12:20:58 +02:00