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

171 Коммитов

Автор SHA1 Сообщение Дата
Diego Novillo c201a11d6e
Update submodule hashes for SPIRV-Tools and SPIRV-Headers. (#5450)
This is in preparation for the upcoming 1.7.2308 release.
2023-07-24 20:50:52 +00:00
Diego Novillo 7305c8bf42
Update SPIRV-Tools and SPIRV-Headers to current release candidate versions (#5439)
Taken from
http://sheets/1r4wC2cge0Cjru1ShjGqZRmUNEmo_FRZHCX-BdeemXsU#gid=1167313977
2023-07-20 18:24:29 +02:00
Steven Perron 1501181418
Update spirv-headers and spirv-tools (#5419)
Updates the submodules, and disables validation on two tests. The SPIR-V
is invalid, and spir-val just started checking it. Since we have been
generating this code for a while, I do not see the need to modify the
generated code immediatly.
2023-07-17 10:28:48 -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
Diego Novillo a42e054983
Update SPIRV-Tools submodule. (#5245)
This also required a fix to the unrolling loop, as the SPIRV optimizer
has changed upstream.
2023-05-30 08:14:31 -07:00
Nathan Gauër 021f8f3e12
Update SPIRV-Tools to version v2023.3.rc1 (#5219)
Signed-off-by: Nathan Gauër <brioche@google.com>
2023-05-17 14:33:38 +02:00
Nathan Gauër d04c296ad7
update SPIRV-Tools version to v2023.2.rc1 (#5097)
Rolling SPIRV-Tools to the new version.
2023-03-21 09:19:49 -04:00
Greg Roth 8d5efcae84
Silence cmake endif mismatch warning (#5005)
A careless endif in cmake to enable catching a particular compiler
warning introduced an irritating cmake warning. The corrects the
mismatched endif
2023-02-09 08:08:14 +00:00
Cassandra Beckley e0f513f748
Update submodules (#4959) 2023-01-24 08:07:35 -08:00
Diego Novillo 3333079d45
Update SPIRV-Tools submodule hash for v2023.1 release. (#4953)
The v2023.1 release has had some hiccups, so I've been needing to bump
the hashes a few times.  Hopefully, this is the last one.
2023-01-18 16:01:15 +00:00
Diego Novillo 79b24d26da
Update submodule hash for SPIRV-Tool to reflect changes to v2023.1 release (#4950) 2023-01-17 15:37:40 -05:00
Diego Novillo 3dbea8f2f6
Update submodule hash for SPIRV-Tools. (#4947)
This is in preparation for the upcoming LunarG SDK release.
2023-01-16 21:18:27 +00:00
Nathan Gauër 8ccd72f725
git: change submodule tracking from master to main. (#4934)
Khronos is master branched on SPIRV repos to main. We should start
tracking it now.
2023-01-12 10:19:44 +00:00
Nathan Gauër 60530e57eb
misc: update submodules (#4909) 2023-01-06 09:49:49 -08:00
Greg Roth 7ad9c9c032
Fallthrough (#4843)
A common source of bugs. Although many of these were harmless, some were
not. By eliminating them and enabling this warning as an error, we won't
add more in the future.


Fixed a real SPIRV bug that required a test update to expect the correct behavior.
SPIRV testing was expecting incorrect results that came from a fallthrough error
2022-12-09 10:13:56 -08:00
Cassandra Beckley e78b2dd355
Update submodules (#4847) 2022-12-05 21:28:39 +00:00
Greg Roth 14a55b7738
[linux] Enable Reflection on *nix platforms (#4810)
Needed for the impending enabling on *nix platforms

* Remove circular dependency from RDAT Dumper

A file included by the source that implemented various ToString
converters of reflection data to strings itself depended on those
declarations, which it only found because of the unique way MSVC
processes templates. By moving the definitions and declarations into
their own header and source files, everyone gets what they need
without ouroborosing.

* Create DirectX-Headers submodule

Creates the DirectX-Headers submodule and adds the needed defines to
allow them to be used. As yet makes no use of these headers

* Improve src dir finding error

The check for the file stream that is meant to represent the filechecked
source file wasn't sufficient to detect a non-existent file. By expanding
the error check, it can produce a helpful message.

Also initialize the failure code so it isn't random

* Enable reflection functionality and testing

This flips the switch, removing or repositioning many ifdefs and
including previously excluded files in the build.

* Actually add the DirectX-Headers submodule

* fix *nix build breaks caused while fixing win breaks :P

* Respond to feedback -- some of it anyway ;)

* simplify cmake file to exclude unneeded src dir

* fix cmake (again)

* Fix GCC template specialization finickiness

What compiler is overly permissive now huh? huh? (or just quick to adopt
new language features?)

* LPCBYTE isn't a thing

Loathe as I am to push one more commit onto this. I don't want to
propagate a misconception. I meant to remove this earlier and caught it
from one final self-review >:(
2022-11-23 19:10:29 -07:00
Nathan Gauër 7b5200b9fa
maintenance: update submodules (#4782)
Signed-off-by: Nathan Gauër <brioche@google.com>

Signed-off-by: Nathan Gauër <brioche@google.com>
2022-11-10 11:07:39 -08:00
Cassandra Beckley 161ddc2b7c
Update submodules (#4770) 2022-11-07 13:46:49 +01:00
Diego Novillo 8d144f450e
Update submodule hashes for SPIRV-Tools, SPIRV-Headers and re2. (#4743)
This makes DXC use the latest SDK release for SPIRV-Tools and
SPIRV-Headers.
2022-10-25 17:26:26 +00:00
Nathan Gauër fc8c775ea6
bump SPIRV-Tools to fix #4429 (#4598)
SPIRV-Tools contains a fix for copy-propagate-arrays optimization pass.

Fixes #4429

Signed-off-by: Nathan Gauër <brioche@google.com>
2022-08-18 16:43:28 +02:00
Cassandra Beckley d58442d57d
Bump SPIRV-Tools to include bugfix for #4444 (#4587) 2022-08-11 15:52:32 -04:00
Nathan Gauër b3101a2feb
Bump spirv-tools, spirv-headers, effcee & re2 (#4582)
Signed-off-by: Nathan Gauër <brioche@google.com>
2022-08-09 15:16:51 +02:00
Cassandra Beckley 396e45cbc4
Bump spirv-tools, spirv-headers, effcee, and re2 submodules (#4577) 2022-08-08 10:09:35 -04:00
Jakub Kuderski ae943bc576
Bump spirv-tools, spirv-headers, effcee, and re2 submodules (#4493) 2022-06-01 14:20:16 -04:00
Daniele Vettorel 71fbb021fa
[spirv] Update SPIRV-Tools (#4445)
This includes some fixes related to flattening resource arrays.
2022-05-10 15:03:42 -04:00
Jaebaek Seo bf9632e8c8
[spirv] run interface variable SROA if signature packing is enabled (#4442)
Based on the Vulkan spec "15.1.5. Component Assignment":

"A Component decoration must not be specified for any type that is not a
scalar or vector."

we cannot decorate `Component` for array/matrix stage variables, which
is critical for the signature packing. We conduct the scalar replacement
for the stage variables to assign `Component` all stage variables, which
allows us to reduce the number of assigned `Location`s. This commit uses
the interface-variable-scalar-replacement spirv-opt pass for the SROA.

Note that the interface-variable-scalar-replacement spirv-opt pass is
experimental. We want to avoid the side effect caused by the pass as
much as possible. Therefore, we enable the pass only when the option for
the signature packing is enabled.
2022-05-10 11:54:05 -04:00
Natalie Chouinard 20fefeb1d0
Update SPIRV-Tools submodule (#4380) 2022-04-07 13:44:20 -04:00
Natalie Chouinard b1c75bee8a
Update SPIRV-Tools submodule to canary release (#4376) 2022-04-05 12:33:32 -04:00
Jaebaek Seo 2dc067b561
[spirv] Update SPIRV-Tools and SPIRV-Headers (#4352) 2022-03-25 17:41:26 -04:00
Jaebaek Seo 9dc0937519
[spirv] Update SPIRV-Tools and SPIRV-Headers submodules (#4322) 2022-03-10 15:09:17 -05:00
Natalie Chouinard 6633191b0b
[spirv] Update SPIRV-Tools and SPIRV-Headers submodules (#4253) 2022-02-14 09:58:43 -05:00
Jaebaek Seo c3b5a62337
[spirv] propagate Volatile semantics for raytracing interface vars (#4207)
Based on Vulkan spec

> VUID-StandaloneSpirv-VulkanMemoryModel-04678
If the VulkanMemoryModel capability is not declared, the Volatile
decoration must be used on any variable declaration that includes
one of the SMIDNV, WarpIDNV, SubgroupSize, SubgroupLocalInvocationId,
SubgroupEqMask, SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or
SubgroupLtMask BuiltIn decorations when used in the ray generation,
closest hit, miss, intersection, or callable shaders, or with the
RayTmaxKHR Builtin decoration when used in an intersection shader

> VUID-StandaloneSpirv-VulkanMemoryModel-04679
If the VulkanMemoryModel capability is declared, the OpLoad
instruction must use the Volatile memory semantics when it accesses
into any variable that includes one of the SMIDNV, WarpIDNV,
SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask,
SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask
BuiltIn decorations when used in the ray generation, closest hit,
miss, intersection, or callable shaders, or with the RayTmaxKHR
Builtin decoration when used in an intersection shader

We have to propagate the volatile semantics based on the spec. Since
adding Volatile decoration to interfaces is allowed in Vulkan 1.3 or
above, we simply add Volatile decoration for such interfaces. If it is
Vulkan 1.2 or earlier, we have to set the Volatile for OpLoad
instruction, which need the VulkanMemoryModel capability. In addition,
since Vulkan 1.1 or earlier does not have the VulkanMemoryModel
capability in the core spec, we use SPV_KHR_vulkan_memory_model.
2022-01-25 19:00:41 -05:00
Jaebaek Seo 833aee5446
[spirv] use OpDemoteToHelperInvocation for discard in vk1.3 (#4162)
In Vulkan1.3/SPIR-V1.6, we default OpDemoteToHelperInvocation
instruction for the discard statement. Unlike previous Vulkan versions,
we do not need to enable SPV_EXT_demote_to_helper_invocation extension.

This commit enables `-fspv-target-env=vulkan1.3` flag, but supporting
Vulkan1.3/SPIR-V1.6 is still WIP.
2022-01-05 09:59:01 -05:00
Jaebaek Seo 1941f3fdc5
[spirv] Update SPIRV-Tools and SPIRV-Headers submodules (#4144) 2021-12-14 17:06:15 -05:00
Jaebaek Seo a19c02d182
[spirv] allow cmake to use external SPIRV-Tools/Headers (#4143)
Without this change, setting the path of SPIRV-Tools with an arbitrary
path causes cmake error that the binary path of SPIRV-Tools is not
specified. This commit sets the binary path of SPIRV-Tools/Headers
even when they are out of DXC code base.
2021-12-14 13:45:46 -05:00
Natalie Chouinard 62ddc871bb [spirv] Update SPIRV-Tools and SPIRV-Headers submodules
Fixes #3705 with KhronosGroup/SPIRV-Tools@d0a827a
2021-11-30 09:31:54 -05:00
Jaebaek Seo 0c53d74705
[spirv] test preservation of RelaxedPrecision for resource in struct (#4064)
spirv-opt desc-sroa pass recently handles OpMemberDecorate by adding
OpDecorate instruction for the corresponding element of the resource
array. This commit uses it to preserve RelaxedPrecision decoration used
for resource variables in struct.
2021-11-05 16:43:12 -04:00
Jaebaek Seo e343bec685
[spirv] Support flattening descriptor array accessed by var index (#4042)
The existing DXC cannot a flatten descriptor array when an instruction
accesses it using a variable index, because spirv-opt
--descriptor-scalar-replacement pass did not support it. spirv-opt
recently added --replace-desc-array-access-using-var-index that replaces
accesses to descriptor arrays using variable indices with accesses to
constant elements using switch statements. This commit uses the newly
added pass to support flattening all descriptor arrays.
2021-10-28 10:16:05 -04:00
Chris B 4ca3a04252
Restore LLVM Testing Infrastructure (#4012)
* Restore lit and googletest sources from LLVM 3.7.0

This commit just re-adds sources that were removed somewhere along the
way.

* Pull in googletest & googlemock from LLVM 4.0

Googlemock was introduced in LLVM 4.0, and is used by SPIR-V's tests.
This pulls in the LLVM 4.0 version of GoogleTest and GoogleMock to
replace the external submodules.

LLVM's version of GoolgeTest and GoogleMock have some minor extensions
to work better with LIT for error reporting and producing cleaner test
output.

* Remove external googletest

* Fix lit to handle comment in gtest names

This fix came into LLVM with the updated googletest in a977582dead2

* Ignore raw_fd_ostream errors when not closing

There's some odditites with the changes in the filesystem code that
cause this to error sometimes in unit tests. Until we can dedicate time
to looking into the filesystem code, just swallow that error...

* Fix bot failure

Missed an option change.

* Fixing MSVC build failure

* A cleaner build fix

This should address issues with VS 2019 in a cleaner way.

* Fix build
2021-10-19 15:24:11 -05:00
Jaebaek Seo ebdf8fbdb4
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#4010) 2021-10-14 16:54:24 -04:00
Jaebaek Seo 71cffd43e2
[spirv] update SPIRV-Tools and SPIRV-Headers submodules (#3979) 2021-09-30 10:23:47 -04:00
Jaebaek Seo 555f813c4f
[spirv] add -fspv-reduce-load-size option (#3931)
Since loading a big object takes the memory pressure, reduction of the
load size can have some performance benefit. In particular, it is
useful for mobile GPUs. `-fspv-reduce-load-size` removes
OpLoad/OpCompositeExtract of struct/array types by running spirv-opt
--reduce-load-size pass.

Fixes #3889
2021-09-07 23:32:16 -04:00
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