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

128 Коммитов

Автор SHA1 Сообщение Дата
JiaoluAMD 28e1f9f465
[SPIRV] Update the spirv tools to the later commit (#3923)
The spirv tools need to update to support the Link Attributes of the
Linkage capability
2021-09-01 10:32:34 -04:00
Jaebaek Seo 096afe6e6a
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3909) 2021-08-19 10:44:07 -04:00
Jaebaek Seo 9972b664a3
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3878) 2021-07-14 10:46:54 -04:00
Jaebaek Seo cef61b56ec
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3817) 2021-06-09 20:22:20 -04:00
Jaebaek Seo 377fd9d061
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3788) 2021-05-20 12:53:07 -04:00
Jaebaek Seo 2501f89613
[spirv] update SPIRV-Tools submodule (#3719) 2021-04-28 10:46:42 -04:00
Jaebaek Seo f66b04f584
[spirv] update SPIRV-Tools submodule (#3718) 2021-04-27 17:11:25 -04:00
Jaebaek Seo 3be3d15fc6
[spirv] update SPIRV-Tools submodule (#3694) 2021-04-20 13:17:41 -04:00
Jaebaek Seo dd8db73da5
[spirv] update SPIRV-Tools and SPIRV-Headers (#3689) 2021-04-15 09:38:36 -04:00
Jaebaek Seo e1915586d2
[spirv] update SPIRV-Tools and SPIRV-Headers (#3597) 2021-03-18 10:51:25 -04:00
seppala2 03cc4f8663
[spirv] Add vk::image_format attribute for Buffers, RWBuffers and RWTextures (#3395)
According to Vulkan specification when using `OpImageRead/OpImageWrite`, the `OpTypeImage` (`Buffers`, `RWBuffers`, `RWTextures`) must have a format that matches the format on the API side, unless the StorageImageReadWithoutFormat/StorageImageWriteWithoutFormat is added and `Unknown` is used as the format.

This pull request addressess #2498 for the format part by adding an attribute `[[vk::image_format("<image format as spelled in SPIR-V spec>")]].` Example of the syntax:

```
[[vk::image_format("rgba8")]]
RWBuffer<float4> Buf;

[[vk::image_format("rg16f")]]
RWTexture2D<float2> Tex;

RWTexture2D<float2> Tex2; // Works like before
```

The `image_format` only applies to **global variables** of type `Buffer`, `RWBuffer`, `RWTexture`. For variables and function parameters it is propagated by the inlining pass in legalization. This required a small change to one of the passes in SPIRV-Tools, that should be also checked by someone more familiar with the codebase: https://github.com/KhronosGroup/SPIRV-Tools/pull/4126

Note that this does not fix the handling of unspecified format (that case still works like before, using `R32f`, etc. based on the type in shader), although it should be still fixed to add the
StorageImageReadWithoutFormat and/or StorageImageWriteWithoutFormat and use Undefined. But I think the ability to specify the format is more urgent.

Design note from Jaebaek:
Since the `image_format` attribute only applies to **global variables**, under the DXC architecture
only `DeclResultIdMapper` can check the attribute when it handles `VarDecl`s. It means
we have to pass the `image_format` information to `LowerTypeVisitor` because it cannot access to
`VarDecl`. In order to pass the `image_format`, we use `SpirvContext` that can be accessed by
`SpirvEmitter` and all visitors. We use `SpirvVariable` to `spv::ImageFormat` mapping because the
attribute only applies to **global variables** (not to image types).
See how we use `llvm::DenseMap<const SpirvVariable *, spv::ImageFormat> spvVarToImageFormat`.
2021-03-01 10:07:40 -05:00
Jaebaek Seo 5bdb83bd4a
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3450) 2021-02-18 17:48:27 -05:00
Ehsan 0ec5839e5e
[spirv] Update SPIRV-Tools. (#3365) 2021-01-21 10:22:25 -06:00
Ehsan cc43bc82b9
Update SPIRV-Tools (fix for raytracing termination instructions). (#3306) 2020-12-07 11:28:16 -06:00
Ehsan f28bb1ae4e
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#3296)
Picks up more KHR ray tracing changes.
2020-12-03 11:43:58 -06:00
JiaoluAMD 4ced9bdf05
[SPIRV]Updates to final RayTracing semantics (#3279)
1. Add OpTraceRayKHR
2. Remove "provisional" in files
3. Update the SPIRV Headers/Tools to latest version
2020-11-24 10:03:41 -06:00
Jaebaek Seo 8fea615e3c
[spirv] wrap instructions with OpNoLine (#3229)
The current DXC emits `OpLine` for the first instruction in the location
and does not emit the same `OpLine` for the following instructions.
However, it does not specify the end of the effectiveness of the
`OpLine`, which is technically wrong based on the spec of OpLine and
OpNoLine. We have to specify the `OpLine` is not applied to the
following instructions when we meet an instruction without the location
information.
2020-11-02 14:11:29 -05:00
Jaebaek Seo 12fa61c61b
[spirv] allow debug info generation to use full optmization (#3201)
As SPIRV-Tools supports the debug info preservation for the full
optimization, we want to allow DXC users to use the full optimization
for the debug info generation.

This change updates SPIRV-Tools and SPIRV-Headers.
2020-10-15 12:04:39 -05:00
Ehsan 4f7da65200
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#3156) 2020-09-25 13:58:07 -05:00
Jaebaek Seo 7f985ff472
[spirv] generate OpenCL.DebugInfo.100 instructions (#3155)
OpenCL.DebugInfo.100
is a SPIR-V extended instruction set that provides DWARF style debug information.
This PR allows DXC SPIR-V backend to generate the rich HLSL debug information
using OpenCL.DebugInfo.100 instructions.
2020-09-22 16:50:29 -04:00
alan-baker 711e5e2969
[spirv] Update SPIRV-Tools and SPIRV-Headers (#3074)
* Update SPIRV-Tools and SPIRV-Headers

* SPIRV-Tools build has changed slightly
  * SPIRV-Tools-static is now the target to use instead of plain
    SPIRV-Tools

* Update SPIRV-Tools further
2020-08-11 21:35:19 -05:00
Jaebaek Seo 7c3fa86b07
[spirv] Update SPIRV-Tools (#3015) 2020-07-02 10:01:01 -05:00
Ehsan 2226112125
[spirv] Update SPIRV-Tools (#3007)
* Update SPIRV-Tools.

* [spirv] Update SPIRV-Tools.

* [spirv] Temporarily don't run spirv-val on some tests.
2020-06-29 13:46:47 -05:00
Greg Roth dd27189bab
Enable recompile of shaders with includes in dxc (#2996)
* Enable recompile of shaders with includes in dxc

When recompiling, the dxc executable stores all file blobs under names
that use backslashes. However, when recompiling, the filenames of the
includes in a shader are joined with the directory using a forward
slash. In addition, many authors use forward slashes to separate
subdirectories in these includes. Because of this, no includes could
ever match.

By converting all / in the path to \ just before trying to retrieve the
associated pseudo-file, the file is found. Recompilation is only
supported on Windows presently, so other OS path dividers needn't be
considered. The same native() call that generates the keys originally is
used to generate the keys to retrieve them.

Modify smoke.hlsl to verify that recompilation works
2020-06-26 11:20:56 -07:00
Ehsan fff78ef621
Update SPIRV-Tools. (#2993) 2020-06-24 15:31:55 -05:00
Ehsan a0b812e0fe
[spirv] Update SPIRV-Tools. (#2987) 2020-06-19 12:28:45 -05:00
Ehsan 2f9ad50cab
[spirv] Update SPIRV-Tools. (#2980) 2020-06-17 09:39:02 -05:00
Ehsan e0cde072b0
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#2915) 2020-05-27 16:27:25 -05:00
Minmin Gong a5365731f0
Change HLSL_DISABLE_DEBUG_ITERATORS to more natural HLSL_ENABLE_DEBUG_ITERATORS and flip the default value (#2885) 2020-05-14 10:29:56 -05:00
Minmin Gong 318e625924
Add an option to turn on/off debug iterators (#2879)
Add option to turn on/off debug iterators for more performant or more helpful debug builds
2020-05-13 11:00:35 -07:00
Jaebaek Seo 44fc51f304
[spirv] Update SPIRV-Tools submodule (#2794) 2020-03-26 18:16:34 -05:00
Ehsan 2c6afe2f1b
[spirv] Update SPIRV-Tools and SPIRV-Headers (#2771) 2020-03-18 12:21:35 -05:00
Jaebaek Seo 798b714518
[spirv] update spirv-tools and spirv-headers (#2723) 2020-02-28 09:30:59 -05:00
Jaebaek Seo 80ec7c6bc7
[spirv] update SPIRV-Tools and SPIRV-Headers (#2647)
Fixes #2625
2020-01-15 08:37:14 -05:00
Ehsan b410445cf8
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#2585) 2019-11-12 15:49:53 -05:00
Ehsan 9219b1fd9f
[spirv] Update effcee (external dependency for testing) (#2495) 2019-09-27 15:27:13 -04:00
Ehsan 6429307e63 Update SPIRV-Tools. (#2493)
Getting all the recent updates.
2019-09-27 14:20:36 -04:00
Ehsan 514b285d83
[spirv] Update SPIRV-Tools. (#2450)
Fixes #2437
2019-09-09 11:30:54 -04: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 fd4c08a10e
[spirv] Update SPIRV-Tools to get validator updates (#2407) 2019-08-14 15:40:57 -04:00
Ehsan 3ce58eb95b
[spirv] Update SPIRV-Tools to get validator updates. (#2406) 2019-08-14 13:33:13 -04:00
Ehsan f8d0271d40
[spirv] Update SPIRV-Tools. (#2398)
This is needed to get the descriptor array scalar replacement
optimization.
2019-08-08 13:41:39 -04:00
Jaebaek Seo 5ae65630d4 [spirv] updating SPIRV-Tools to fix segfault (#2353) 2019-07-17 18:26:45 -04:00
Sahil Parmar 968fe41136 Merged PR 116: Add support for HLSL Meshlets
This PR adds support for new HLSL mesh and amplification shaders.
2019-07-11 20:19:23 +00:00
Ehsan 109bbf0f8a
[spirv] Update SPIRV-Tools and SPIRV-Headers (#2287) 2019-06-21 11:44:19 -04:00
Jaebaek Seo a56693ee05
[spirv] update SPIRV-Tools and SPIRV-Headers (#2199) 2019-05-22 09:41:16 -04:00
Ehsan 09a9497ca8
[spirv] Update SPIRV-Tools (get storage class opt fix). (#2116) 2019-04-10 11:35:52 -04:00
Ehsan 2da31a2187
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#2102) 2019-04-03 17:35:03 -04:00
Ehsan 05ba6aa8f9
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#1984) 2019-02-27 20:25:10 -05:00
Ehsan Nasiri 0cb2899a32 [spirv] Migration to v2 with latest SPIRV-Tools 2019-02-08 13:46:44 -05:00