This reverts commit 671f6e633f.
PR #4783 was reverted because it caused OpenCL CTS failures for clvk.
The was in clspv, which was not adding the no contract decoration when
it was required. This has been fixed in
https://github.com/google/clspv/pull/845. We can now reapply #4783.
* linker: Recalculate interface variables
By resolving extern symbols Entry Points might access variables they
hadn't declared before.
* test/linker: add test to verify linked spir-vs importing functions validate
Without the fix Validate will complain about:
"ERROR: 9: Interface variable id <5> is used by entry point 'bar' id <1>, but is not listed as an interface\n %5 = OpVariable %_ptr_Input_v3uint Input\n"
Adding Fma instruction can speed up the code. This was requested by
swiftshader, so they do not have to do this analysis themselves. It can
also help reduce the code size, and the work the ICD compilers have to
do.
In the installed file
/usr/lib64/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake, occurences of
librt in the INTERFACE_LINK_LIBRARIES property are incorrect. The
property contains the absolute path to librt. In most situations, this
produces no problem. But when building in a sysroot, which is commonly
done when cross-compiling, the absolute path breaks dependent projects.
For example, when building spirv-tools using the Chrome OS SDK, and
targeting the board 'volteer', where the build sysroot is
'/build/volteer', the file includes this line
INTERFACE_LINK_LIBRARIES "/build/volteer/usr/lib64/librt.so"
when it should instead say
INTERFACE_LINK_LIBRARIES "rt"
The CMake documentation agrees [1]:
Note that it is not advisable to populate the
INTERFACE_LINK_LIBRARIES of a target with absolute paths to
dependencies. That would hard-code into installed packages the
library file paths for dependencies as found on the machine the
package was made on.
[1] https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_LINK_LIBRARIES.html
* Fix gen_build_version on Windows
The paths used in the gen_build_version script are causing some failures
in downstream builds. Switch to using the location of the CHANGES file
rather than the ".." parent directory workaround.
* Update other build files
6a55fade62...4995a2f272
$ git log 6a55fade6..4995a2f27 --date=short --no-merges --format='%ad %ae %s'
2022-03-03 nikita.kornev Remove extensions tag from instructions
2022-02-18 nikita.kornev Implement SPV_KHR_uniform_group_instructions extension
2022-02-12 ben.ashbaugh update SPIR-V headers for SPV_INTEL_split_barrier
2022-02-08 prokop regenerate headers
2022-01-31 gleese Add EXT tag to capability to DemoteToHelperInvocationEXT
2022-01-28 tdb Reserve enum range for MSP extensions
2022-01-05 prokop regenerate the headers
2022-01-04 prokop Include bool type for C
Created with:
roll-dep external/spirv-headers
611baecbce...0c5616df9c
$ git log 611baecbc..0c5616df9 --date=short --no-merges --format='%ad %ae %s'
2022-03-30 junyer Replace `StdIntMap` with `std::vector<int>`.
2022-03-24 junyer Use `std::unordered_map<int, int>` for `StdIntMap`.
2022-03-22 junyer Remove `xkcd.png`, which is disused.
2022-03-18 junyer Prog::Fanout() is no longer experimental.
2022-03-15 junyer Fall back to std::shared_mutex, not std::mutex.
2022-03-15 junyer Set CMAKE_CXX_STANDARD if we seem to need to set it. :/
2022-03-15 junyer Don't specify CMAKE_CXX_STANDARD anymore either.
2022-03-11 slyich Don't overwrite testinstall.cc in testinstall.
2022-03-03 junyer Add Clang 14 to the build matrix.
2022-02-24 junyer Simplify OS selection in Bazel by using @platforms.
2022-02-17 junyer Check __cpp_lib_string_view, not __cplusplus.
2022-01-27 junyer Oops, I think I needed pull_request_target instead.
2022-01-27 junyer Close all GitHub pull requests automatically.
2022-01-27 junyer Handle older macOS SDKs not defining TARGET_OS_OSX.
Created with:
roll-dep external/re2
f45d5865ed...25dcdc7e8b
$ git log f45d5865e..25dcdc7e8 --date=short --no-merges --format='%ad %ae %s'
2022-04-04 dmauro Use the Abseil flags library when Abseil is present
2022-03-23 absl-team Address deprecation warning surfaced by Github presubmit tests
2022-03-23 mattias.ellert Split gmock-matchers_test into 4 smaller test #3653
2022-03-22 absl-team Only print disabled test banner if the test matches gtest_filter
2022-03-21 absl-team Clarify public access on gmock examples.
2022-03-18 bmesser Remove sanity as it is offensive to neurodiverse individuals.
2022-03-15 absl-team Running clang-format over all of GoogleTest
2022-03-14 dinor Remove references to deleted script gen_gtest_pred_impl.py
2022-03-08 absl-team Mark ACTION_Pn()-generated functions as must-use-result, adding non-compilation tests.
2022-03-08 sobik.szymon Add myself to contributors
2022-03-08 sobik.szymon Adjust documentation regarding xml and json source file location otput.
2022-03-08 sobik.szymon Adjust xml and json unit tests to test for source file and line location.
2022-03-08 sobik.szymon Add support for testing of xml and json output of source file and line location
2022-03-08 sobik.szymon Output source file path and line number in xml and json files.
2022-02-17 dmauro Update GCC/Clang Linux tests to use Bazel 5.0.0
2022-02-14 absl-team Address conversion warning by explicitly casting to size_t
2022-02-09 absl-team Add a 3-arg overload for ResultOf() matcher that takes a description string for better error messages.
2022-02-05 hgsilverman Apply requested changes by using std::inserter with move.
2022-02-05 noiseless-ak Fix gtest-help-test failure on OpenBSD
2022-02-01 absl-team GetCurrentOsStackTraceExceptTop (both the method of UnitTestImpl and the wrapper function in gtest.cc) rely on the fact that the inner call is not getting optimized. This CL annotates them with the appropriate attributes.
2022-01-29 hgsilverman Do constant time matching for exact match filters.
2022-01-28 dmauro Finish some missed pieces of the TestCase to TestSuite Migration
2022-01-26 dinor Change `ReturnArg` to use perfect forwarding of arguments (#3733)
2022-01-25 melroy Let me give a change to try it again - updating to latest version
2022-01-05 73706994+jjfvanderpol Set CMake Policy CMP0077 to NEW
2021-10-19 deniz CMake: Fix values of INTERFACE_INCLUDE_DIRECTORIES property
Created with:
roll-dep external/googletest
The code accidentally expected OpTypeFunction operand count to match.
This is fixed so that OpTypeFunction instructions with different operand
counts are considered not matching.
Currently, the diff tool matches types bottom up, so on every
instruction it expects to know if its operands are already matched or
not. With cyclical references, it cannot know that. Type matching
would need significant rework to be able to support such a use case; for
example, it may need to maintain a set of plausable matches between type
pointers that are forward-referenced, and potentially back track when
later the types turn out to be incompatible.
In this change, OpTypeForwardPointer is supported in the more common and
trivial case. Firstly, forwarded type pointers are only matched if they
have they have the same storage class and point to the same type opcode:
- In the presence of debug info, matching is done only if the names are
unique in both src and dst.
- In the absence of debug info, matching is done only if there is only
one possible matching.
Fixes: #4754
Standalone projects that depend on both SPIRV-Tools and SwiftShader
failed to have Ninja build files generated because `build_with_chromium`
is false for both of them and cause the executables to be declared
twice.
This change causes `build_with_chromium` builds to declare the
executables, but only for the copy in `//third_party`. The path for that
was also corrected to include the `vulkan-deps` and `src`
subdirectories.
Builds from the Fuchsia tree also declare the executable targets.
This change was tested with a Chromium build and a "standalone" Dawn
build.
Bug: b/158002593
spread-volatile-semantics pass spreads Volatile semantics for builtin
variables used by certain execution models based on
VUID-StandaloneSpirv-VulkanMemoryModel-04678 and
VUID-StandaloneSpirv-VulkanMemoryModel-04679 (See "Standalone SPIR-V
Validation" section of Vulkan spec "Appendix A: Vulkan Environment for
SPIR-V"). Therefore, shaders without execution model (e.g., used only
for linkage) are not the target of the pass. This commit lets the pass
just return SuccessWithoutChange in that case.
In preparation for supporting OpTypeForwardPointer, which adds more
usages like this. This change refactors common code used to group
instructions and match the groups.
GN does not allow multiple build files to declare the same executables,
so for SwiftShader to be able to use its own internal copy of SPIRV-
Tools libraries it needs to exclude the executable targets.
This is achieved by checking if the current path is //third-party/
SPIRV-Tools/.
Bug: b/158002593
Clang added -Wunqualified-std-cast-call in
https://reviews.llvm.org/D119670, which warns on unqualified std::move
and std::forward calls. This change qualifies these calls to allow the
project to build on HEAD Clang -Werror.
If the body of the module does not have any ids change, compact ids will
not change the id bound. This can cause problems because the id bound
could be much higher than the largest id in that is used. It should be
reset any time it is not the larger id used + 1.
Fixes#4604
When folding a vector shuffle feeding a vector shuffle, we do not
propagate an 0xFFFFFFFF, which has a special meaning, correctly. We
adjust the value making it lose it meaning as an undefined value.
Fixes#4581
CCP does not want to fold an instruction unless it folds to a constant.
There is an asser to check for this. The question if a spec constant
counts as a constant. The constant folder considers a spec constant a
constand, but CCP does not. I've fixed the assert in CCP to match what
the folder does. It should not require any new changes to CCP.
* Fixed Bazel Windows build
Before this commit, the bazel build setup would not work on windows.
This is due to the fact, that genrule tries to use bash, which fails.
One fix would be to use bazel-skylib's run_binary.
This however does not work (easily) since genrules is more complex.
To (temporarily) fix the windows build, I added the `cmd_bat` property to every genrule.
This seems more like a hack, because it basically repeat commands,
but for now it at least builds on windows.
* Removed BAZEL_SH from bazel presubmit build script
Thanks to @s-perron for pointing out, that the presubmit script uses the msys64 bash shell for the bazel build.
Since adding the `cmd_bat` argument removes the dependency on bash, this is no longer needed.
Swift shader needs a way to inline all functions, even those marked as
DontInline. See https://github.com/KhronosGroup/SPIRV-Tools/pull/4471.
This implements the suggestion I made in the PR. We add a pass that
will remove the DontInline function control, so that the inlining passes
will inline them.
SwiftShader will still have to modify their code to add this pass before
the other passes are run.
The function `BuildInvalideAnalyses` will be rebuilt for every analysis that
has been requested, but it is not necessary. It also can cause problems
because if the CFG needs to be rebuilt, so do the dominator trees.
This change will make the functionality match the description of the
function.
* Use bazel 5 for Linux bazel builds.
* Download bazel 5.0.0 for macos and windows bazel builds.
* Modify the readme to mention bazel 5.0.0 as the version to use.