Commit Graph

3678 Commits

Author SHA1 Message Date
Diego Novillo
b184efe2d4
Revert "Finalize v2023.1 release (#5062)" (#5064)
This reverts commit 0fc5526f2b.
2023-01-18 09:22:18 -05:00
Diego Novillo
0fc5526f2b
Finalize v2023.1 release (#5062)
* Finalize SPIRV-Tools v2023.1

* Start SPIRV-Tools v2023.2
2023-01-17 17:52:57 -05:00
Diego Novillo
30e51ceaab
Add #5049 to release v2023.1. (#5058) 2023-01-17 10:49:14 -05:00
Jeremy Gebben
ba4c9fe534
Instrument: Fix bindless checking for BufferDeviceAddress (#5049)
Avoid using OpConstantNull with types that do not allow it.

Update existing tests for slight changes in code generation.

Add new tests based on the Vulkan Validation layer test case
that exposed this problem.
2023-01-16 20:57:37 +00:00
Diego Novillo
0e6fbba776
Prepare for v2023.1 release (#5057)
* Roll external/effcee/ 35912e1b7..c7b4db79f (1 commit)

35912e1b77...c7b4db79f3

$ git log 35912e1b7..c7b4db79f --date=short --no-merges --format='%ad %ae %s'
2022-12-20 dneto Update Bazel external dependencies

Created with:
  roll-dep external/effcee

* Roll external/googletest/ v1.12.0..356fc3012 (117 commits)

https://github.com/google/googletest/compare/v1.12.0...356fc3012513

$ git log v1.12.0..356fc3012 --date=short --no-merges --format='%ad %ae %s'
2023-01-12 tomhughes Fix -Wshadow warnings
2023-01-12 dmauro Add an explicit #error that C++ versions less than C++14 are not supported
2023-01-11 dmauro Update GoogleTest dependencies
2023-01-05 tomhughes Fix GTEST_OS_ESP8266 check
2023-01-05 tomhughes IWYU: Add missing std includes
2023-01-04 dmauro Workaround for GCC12 bug illustrated by https://godbolt.org/z/Pe5aE59xG
2023-01-04 tomhughes Fix _MSC_VER check
2022-12-22 absl-team Use a more recent commit of googletest that uses OS constraints from @platforms//os:* instead of from @build_tools//platforms:*
2022-12-20 absl-team Fix a typo in the documentation for "Using Predicates as Matchers".
2022-12-20 dinor Comment that q0_ in primer should remain empty
2022-12-19 absl-team Specify a name for a `Property` in a code example.
2022-12-15 absl-team Shut up a Clang warning.
2022-12-14 absl-team Fix a typo in the gMock sample code for Defining a Custom Matcher Class.
2022-12-12 dmauro Convert feature requests to a form
2022-12-12 absl-team Refactor matrix verification into VerifyMatchMatrix.
2022-12-12 absl-team Introduces a new porting flag (GTEST_HAS_FILE_SYSTEM) to indicate whether a platform supports filesystem operations.
2022-12-08 tomhughes Fall back to the system clock when building with newlib on a system without a monotonic clock.
2022-12-07 dmauro Migrate GoogleTest to a bug report template and add a link to the discussion forum for non-bugs
2022-12-05 dmauro Remove the unused class TestNameIs
2022-11-30 absl-team Make SizeIsMatcher::Impl conform to the contract of MatcherDescriberInterface.
2022-11-29 absl-team Disables `-Wunused-member-function` and `-Wused-but-marked-unused` that trigger via `MOCK_METHOD()` and `EXPECT_THAT()` macros.
2022-11-23 absl-team This commit fixes a minor verb conjugation error in gmock_cook_book.md.
2022-11-20 i Change MakeUnique -> std::make_unique in docs
2022-11-16 absl-team When printing floating-point numbers, print full precision by default.
2022-11-15 absl-team Remove incorrect usage of GTEST_ATTRIBUTE_UNUSED_ on classes.
2022-11-12 m.h1ch4m
2022-11-12 m.h1ch4m fixing gcc.gnu domain redirection
2022-11-11 absl-team Defined a testing::SrcDir() function that returns the name of a directory where ancillary data files can be found.
2022-11-10 i Support kitty TERM
2022-11-08 absl-team Remove incorrect GTEST_ATTRIBUTE_UNUSED_ from InSequence class.
2022-11-07 absl-team RecordProperty serializes ints and 64-bit ints, including size_ts
2022-11-05 absl-team Fix typo in documentation of ConvertGenerator()
2022-11-03 absl-team Add documentation for `--gunit_recreate_environments_when_repeating`.
2022-10-25 dinor Use git commit hash in CMake quickstart
2022-10-24 absl-team Clarify that parameter generator does not evaluate immediately
2022-10-21 i Fix format without expectation name
2022-10-21 i Change messages
2022-10-20 i Allow naming expectations #3970
2022-10-18 absl-team CMake: Add GTEST_HAS_ABSL build option for using Absl
2022-10-18 absl-team Adds Win32 UNC path support to FilePath::IsAbsolutePath() and FilePath::IsRootDirectory() in GoogleTest
2022-10-17 dmauro Fix detection of the no_sanitize("hwaddress") attribute
2022-10-17 dinor Add Windows CI script
2022-10-16 i Add return for GTEST_FAIL_AT
2022-10-14 dmauro Use attribute testing to simplify portable attribute macros
2022-10-14 absl-team Terse printing of std::reference_wrapper hides pointer
2022-10-14 janbruckner Fix table markup in testing.md
2022-10-12 absl-team Workaround for Visual C++ error C2039 with std::tuple_element_t.
2022-10-11 i Fix JSON output format #3884
2022-10-07 ferenc.gm Suggests a release with fixed CMakeLists.txt
2022-10-08 julian.amann Update rules_python, bazel_skylib and platfroms
(...)
2022-09-01 absl-team Fixed header guards to match style guide conventions.
2022-08-26 absl-team Consider all TERM values ending in "-256color" to be color supporting. In particular this handles TERM=hterm-256color correctly.
2022-08-22 hardikv Add support of 19-member structs to gmock UnpackStructImpl.
2022-08-19 keithbsmiley bazel: move -std=c++14 to .bazelrc
2022-08-16 dmauro Update README.md to point to the Foundational C++ Support Policy
2022-08-12 dmauro Add --features=external_include_paths to Bazel CI to ignore warnings from dependencies
2022-08-08 dinor gtest_unittest: Call FAIL() in lambda, fix incorrect fatality expectation
2022-08-04 dinor Explicitly instantiate matchee std::string in MatchesRegex
2022-07-31 bmburstein Custom type with Combine(). Fix for #3781
2022-07-28 absl-team Add support of 18-member structs to gmock UnpackStructImpl.
2022-07-25 dinor Add IsEmpty overload for C-style strings
2022-07-21 thegeorg Continuation for #3183
2022-07-20 matdibu gtest-death-test: add 'noreturn'
2022-06-28 dev Set cmake policy CMP0069
2022-07-14 polushin export ThreadLocalValueHolderBase which is required by exported APIs.
2022-07-11 polushin cmake: make PDB output directory match that of a static library.
2022-07-11 polushin cmake: find python in order specified by PATH environment variable.
2022-07-11 dmauro Add envvar BAZEL_CXXOPTS=-std=c++14 to the GitHub Actions CI
2022-07-08 dmauro CMake: raise the default C++ standard to cxx_std_14
2022-07-07 ckennelly Enable heterogeneous lookup for RegisteredTestsMap.
2022-07-01 nikiforov.al cleanup from unique_ptr branch
2022-07-01 dmauro Remove the Bazel provided default cxxopt -std=c++0x and replace it with -std=c++14 when testing with GCC 5.
2022-07-01 57719497+yutotnh fix: some typos in source
2022-07-01 57719497+yutotnh fix: typo in test name
2022-07-01 57719497+yutotnh fix: some typos in comment
2022-06-30 dmauro Remove support for C++11
2022-06-30 dmauro Update version number in CMakeLists.txt Note that this is 1.12.1 as there will be a patch release to fix this
2022-06-29 absl-team Add support of 17-member structs to gmock UnpackStructImpl.
2022-06-27 absl-team Mark internal-only function as having internal linkage.
2022-06-27 93249401+assafpr Update gtest.cc
2022-06-27 93249401+assafpr Update gmock-matchers.h
2022-06-27 93249401+assafpr Update gmock-actions.h
2022-06-27 93249401+assafpr Update gmock-spec-builders_test.cc
2022-06-27 93249401+assafpr Update gtest-death-test.cc
2022-06-27 93249401+assafpr Update gmock-spec-builders.cc
2022-06-27 93249401+assafpr Update advanced.md
2022-06-26 asmodai27 Avoid implicit conversion from int to char
2022-06-26 asmodai27 Avoid implicit conversion from int to char
2022-06-25 julian.arkenau docs: update googletest README for release 1.12.0
2022-06-23 dmauro Update README.md for release 1.12.0
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr Update faq.md
2022-06-22 93249401+assafpr Update CONTRIBUTING.md
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr Update gmock_output_test_golden.txt
2022-06-22 93249401+assafpr change link from master to main in documentation
2022-05-31 gpetit Fix for undefined symbol: testing::internal::Random::kMaxRange
2022-05-18 akohlmey set -utf-8 flag only for real MSVC compilers. E.g. not Intel's icx.exe
2022-03-26 perez.cs Fix quickstart-cmake documentation

Created with:
  roll-dep external/googletest

* Roll external/re2/ d2836d1b1..954656f47 (13 commits)

d2836d1b1c...954656f47f

$ git log d2836d1b1..954656f47 --date=short --no-merges --format='%ad %ae %s'
2022-12-07 junyer Restore the "lock counter" option for `Mutex`.
2022-11-29 junyer Avoid "immortal" dynamic memory allocations.
2022-11-23 junyer Drop old compiler versions from the build matrix.
2022-11-22 junyer Control the maximum count permitted by `GlobalReplace()`.
2022-11-20 junyer Specify just the MAJOR.MINOR components to `cmake_minimum_required()`.
2022-11-18 junyer Install `re2.pc` with CMake too.
2022-10-26 junyer Reword some comments in `re2.h`.
2022-10-17 junyer Add the no-op GitHub Actions workflow for Python releases.
2022-10-17 junyer Revert "Add a GitHub Actions workflow for Python releases."
2022-10-17 junyer Add a GitHub Actions workflow for Python releases.
2022-10-17 junyer Revert "Add a GitHub Actions workflow for Python releases."
2022-10-14 junyer Add a GitHub Actions workflow for Python releases.
2022-10-14 junyer Bump versions of actions to address warnings.

Created with:
  roll-dep external/re2

* Update CHANGES

* Fix release name

* Revert "Roll external/googletest/ v1.12.0..356fc3012 (117 commits)"

This reverts commit 45f5de67c6.

Rolling back this update to googletest to prevent build failures.
Our CI systems are still assuming C++0x support.  Post release,
SPIRV-Tools will move to require C++17 minimum.
2023-01-16 15:21:17 -05:00
Juan Ramos
1dad991441
cmake: Modernize install(TARGET) usage (#5056) 2023-01-16 10:55:35 -05:00
Juan Ramos
ae893db200
cmake: Remove old policy code (#5055) 2023-01-16 10:52:31 -05:00
Rafael Marinheiro
ae8d50709f
Add Github Actions to test Bazel builds. (#5043)
* Add github action to build/test code using Bazel.

* Add a cache for Bazel github actions.
2023-01-16 10:29:02 -05:00
alan-baker
7e8813bb4c
Validate version 5 of clspv reflection (#5050)
* Validate version 5 of clspv reflection

* Add validation for instructions in versions 2 through 5
* Change the instruction reported for remaining indices on an access
  chain to the access chain itself for clarity

* update spirv-headers
2023-01-11 16:58:53 -05:00
David Neto
bfd278617c
utils: repos use 'main' as main devlopment branch (#5054)
roll_deps.h: SPIRV-Headers uses 'main'
check_code_format.h: SPIRV-Tools uses 'main'
2023-01-11 15:24:34 -05:00
David Neto
631f9bcb5e
Update README.md: Development occurs on the "main" branch (#5053)
Fixes: #5051
2023-01-11 14:58:35 -05:00
Caio Oliveira
f62e121b0d
spirv-val: Use more specific term 'switch header' in error message (#5048)
* spirv-val: Add tests for OpSwitch directly breaking/continuing outer loop

These are not valid, tests verify the validator catches the issue.
2023-01-09 18:39:02 -05:00
David Neto
d87f61605b
DEPS: update to last googletest release supporting C++11 (#5045)
Fixes #5039
2022-12-22 15:22:04 -05:00
David Neto
f416d39bb8
Bazel: Use @platforms//os:windows instead of @build_tools//src/conditions:windows (#5042)
Bazel has been changing its conventions for implementing
conditions on target OS. Update to the latest recommendation.
See https://bazel.build/extending/platforms

Silences a deprecation warning.

Fixes: #5037
2022-12-22 08:13:40 -05:00
Dmitry Kazakov
077b09c32a
Add exported CMake config file for binaries in ./tools/ (#5034)
The package is called SPIRV-Tools-tools, which might be a bit
confusing, but at lease follows the general naming scheme.
2022-12-21 16:24:48 -05:00
David Neto
bbdd0fefda
Update minimum required CMake to 3.17.2 (#5041)
* Update minimum required CMake to 3.17.2

- For Wasm build, update to emscripten/emsdk:3.1.28 which has 3.22.1
- Move the docker-compose.yml down to the source/wasm directory.

Fixes: #5040

* Fix working directory for invocation of wasm build
2022-12-21 16:22:17 -05:00
David Neto
01a3b9bec7
git-sync-deps: Use argparse, and print better help (#5038) 2022-12-21 12:52:28 -05:00
David Neto
6b5a00eb2b
Kokoro CI bots use git-sync-deps to get sources (#5031)
* Kokoro CI bots use git-sync-deps to get sources

Update git-sync-deps to reduce the amount of data downloaded on a first
checkout, while being able to checkout the specific commit specified in
the DEPS file.

Previously the CI bots would only clone --depth=1.  But that's not
enough to check out a specific commit.  So clone either blobless
or treeless.  For a CI bot, treeless is preferable, because it
downloads the least data.  For interactive use, blobless is better
because it prevents redundant downloads of tree data.
See
https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

Fixes: #5028

* --treeless decays to blob:none when git is too old

* Pin googletest to an older version, to make bazel build work
2022-12-21 10:49:52 -05:00
Rafael Marinheiro
c5d2316430
Enforce layering_check in Bazel build rules. (#5032)
* Enforce layering_check in Bazel build rules.

Enforcing layering_check ensures that the Build targets do not rely on
transitive dependencies. See
https://github.com/bazelbuild/bazel/pull/11440 for a detailed
description of the feature.

We also do a style pass on the build files, ensuring that common linters
are happy with it.

* Add .bazelversion file and fix build_defs.bzl.

We fix build_defs.bzl to work on Bazel 5.0.0.
2022-12-20 10:54:46 -05:00
David Neto
5bec0884cf
Remove testing support for VS2015 (#5027)
Fixes: #5026
2022-12-19 16:39:58 -05:00
David Neto
2937538210
Fix undef behaviour in hex float parsing (#5025)
When the parser saw more significant hex digits than fit in
the target type, it would compute a nonsensical shift amount, resulting
in undefined behaviour.

Now, drop the excess bits, effectively truncating the significand.

Also guard against overflow of the exponent in the extraordinary (and untested)
case where we see more than, for example, 2**(32-4+1) significant hex digits
for a 32-bit float, or 2**(16-4+1) significant hex digits for a 16-bit
float.

Also guard against overflow of the indexing counting the number of
significant bits.  When that would occur silently drop any further
significant bits.  (Untested)

Avoid hex floats in C++ code. It's a C++17 feature.

Fixes: #4724
2022-12-19 15:46:57 -05:00
Jeremy Gebben
025ea891fa
Optimize allocation of spvtools::opt::Instruction::operands_ (#5024)
Reserve space for the entire operand list rather than adding them
one a time.
2022-12-19 13:08:01 -05:00
David Neto
1c287b03d3
First attempt to set up CI-windows-msvc-2017-release-bazel build (#5023)
Part 1 of replacing the msvc-2015-release-bazel build.
See issue #5022
2022-12-19 12:42:04 -05:00
Greg Fischer
f64a4b64b7
[spirv-opt] Clone names for new struct in EliminateIODeadComponents (#5016) 2022-12-19 10:20:44 -07:00
David Neto
cc81529f4b
Test operator overloads for SPIR-V C++ mask enums (#5021)
Updates SPIRV-Headers in DEPS
2022-12-16 11:17:39 -05:00
alan-baker
5a78d798f7
Fix layout validation (#5015)
* Fix layout validation

Fixes #5010

* Unless scalar block layout is enabled, no member can reside at an
  offset between the end of the previous member that is a struct or
  array and the next multiple of that alignment

* Remove a dead if that was introduced

Co-authored-by: David Neto <dneto@google.com>
2022-12-15 21:38:09 -05:00
Samuel Bronson
451ba8ec3d
README.md: The validator now handles larger limits (#5003)
* README.md: The validator now handles larger limits

* Oops ...

* Fix typo

Co-authored-by: David Neto <dneto@google.com>
2022-12-15 21:35:08 -05:00
Pankaj Mistry
6b2318aec8
Fix for bug https://github.com/KhronosGroup/SPIRV-Tools/issues/5017 (#5019)
open_quote value becomes npos when it fails to find '\'' and then is used to
compute the string length for writing to result. This causes crash in win32 builds of the test.
2022-12-15 21:13:12 -05:00
David Neto
5d6adbdee0
Require C++11 *or later* (#5020)
Allow externally setting CMAKE_CXX_STANDARD to 14, for example,
which is needed to build protobufs
2022-12-15 21:12:53 -05:00
Cassandra Beckley
43c99b5ee0
Roll external/spirv-headers/ 47f2465ee..1d31a1004 (13 commits) (#5012)
47f2465ee3...1d31a10040

$ git log 47f2465ee..1d31a1004 --date=short --no-merges --format='%ad %ae %s'
2022-12-01 admin Update spir-v.xml
2022-12-01 admin Update spir-v.xml
2022-11-25 stephen.clarke Update spir-v.xml
2022-11-17 admin Register Taichi as SPIR-V generator
2022-11-16 dmitry.sidorov Remove unnecessary extensions addition
2022-11-14 alele Remove extension
2022-11-07 alele Fix typo.
2022-11-07 alele Review feedback 1.
2022-10-05 alele Add headers for SPV_NV_shader_invocation_reorder.
2022-10-17 dmitry.sidorov Add SPV_INTEL_runtime_aligned
2022-10-17 dmitry.sidorov Add SPV_INTEL_fpga_dsp_control
2022-10-17 dmitry.sidorov Add SPV_INTEL_fpga_invocation_pipelining_attributes
2022-10-17 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls to rev I

Created with:
  roll-dep external/spirv-headers
2022-12-12 11:10:52 -05:00
alan-baker
235182cfee
Fix use of invalid analysis (#5013)
Fixes https://crbug.com/1395415

* Block merging needed to invalid structured cfg analysis
2022-12-12 10:49:59 -05:00
alan-baker
9c6a925c87
Fix infinite loop in validator (#5006)
Fixes https://crbug.com/oss-fuzz/53510

* Fix infinite loop that could occur in structured cfg validation due to
  an invalid cfg
2022-12-06 11:22:33 -05:00
Spencer Fricke
7b8f00f00a
spirv-opt: Fix OpCompositeInsert with Null Constant (#5008)
* spirv-opt: Unify GetConstId function names

* spirv-opt: Fix OpCompositeInsert with Null Constant

* spirv-opt: Improve GetNullCompositeConstant description
2022-12-06 09:00:10 -05:00
Cassandra Beckley
40f5bf59c6
Revert "spirv-val: Multiple interface var with same SC (#4969)" (#5009)
This reverts commit 996d4c021f. This
commit is likely good, but it causes a failure in DXC tests. Will
un-revert once we fix the issue in DXC.
2022-12-05 12:31:01 -08:00
Brian Osman
d9446130d5
Update BUILD.gn with recently added file (#5004) 2022-11-28 13:24:44 -05:00
Greg Fischer
00018e58af
Change EliminateDeadInputComponentsPass to EliminateDeadIOComponentsPass (#4997)
To reflect processing of both Input and Output variables.

Also renamed files as needed.
2022-11-25 16:48:13 -07:00
Biswapriyo Nath
9a6f4121f4
Fix missing declaration of std::numeric_limits (#5002)
This fixes the errors:
validate_ray_tracing_reorder.cpp:25:49: error: 'numeric_limits' is not a member of 'std'
2022-11-25 10:54:38 -05:00
alelenv
f33d152400
Add validation support for SPV_NV_shader_invocation_reorder. (#4979)
Co-authored-by: Pankaj Mistry <pmistry@nvidia.com>
2022-11-24 09:50:45 -05:00
Spencer Fricke
597631b693
spirv-opt: Handle null CompositeInsert (#4998)
Fixes #4996
2022-11-24 08:38:12 -05:00
Greg Fischer
81ec2aaa0e
Add option to ADCE to remove output variables from interface. (#4994)
This can cause interface incompatibility and should only be done
if ADCE has been applied to the following shader in the pipeline.
For this reason this capability is not available through the CLI
but rather only non-default through the API. This functionality is
intended as part of a larger cross-shader dead code elimination
sequence.
2022-11-23 10:48:58 -07:00
Greg Fischer
46ca66e699
Add support for tesc, tese and geom to EliminateDead*Components (#4990) 2022-11-18 15:08:18 -07:00
Nathan Gauër
1a7f71afb4
clean: constexpr-ify and unify anon namespace use (#4991)
Constexpr guaranteed no runtime init in addition to const semantics.
Moving all opt/ to constexpr.
Moving all compile-unit statics to anonymous namespaces to uniformize
the method used (anonymous namespace vs static has the same behavior
here AFAIK).

Signed-off-by: Nathan Gauër <brioche@google.com>
2022-11-17 19:02:50 +01:00
Greg Fischer
8ea3ae6be2
Split EliminateDeadInputComponents into safe and unsafe versions. (#4984)
Safe version will only optimize vertex shaders. All other shaders will
succeed without change.

Change --eliminate-dead-input-components to use new safe version.

Unsafe version (allowing non-vertex shaders) currently only available
through API. Should only be used in combination with other optimizations
to keep interfaces consistent. See optimizer.hpp for more details.
2022-11-14 11:44:26 -07:00
Shahbaz Youssefi
a8647f59c0
Use Python3 for presubmit (#4986) 2022-11-11 09:18:00 -05:00
Jeremy Gebben
68e8327f29
Instrument: Change output buffer offset definitions (#4961)
Add a flags field at the first offset within this buffer.
Define flags to allow buffer OOB checking to be enabled or
disabled at run time. This is to support VK_EXT_pipeline_robustnes.
2022-11-10 12:35:18 -05:00
Spencer Fricke
996d4c021f
spirv-val: Multiple interface var with same SC (#4969)
* spirv-val: Multiple interface var with same SC

* spirv-val: Use C style headers
2022-11-10 12:32:58 -05:00
alan-baker
aae7d41325
Fix macos kokoro builds (#4985) 2022-11-09 17:37:23 -05:00
Greg Fischer
525bc38062
Add pass to eliminate dead output components (#4982)
This pass eliminates components of output variables that are not stored
to. Currently this just eliminates trailing components of arrays and
structs, all of which are dead.

WARNING: This pass is not designed to be a standalone pass as it can
cause interface incompatibiliies with the following shader in the
pipeline. See the comment in optimizer.hpp for best usage. This pass is
currently available only through the API; it is not available in the CLI.

This commit also fixes a bug in CreateDecoration() which is part of the
system of generating SPIR-V from the Type manager.
2022-11-08 10:45:32 -07:00
Spencer Fricke
54d4e77fa5
spirv-opt: Add const folding for CompositeInsert (#4943)
* spirv-opt: Add const folding pass for CompositeInsert

* spirv-opt: Fix anas stack-use-after-scope
2022-11-08 10:50:42 -05:00
Spencer Fricke
a5e766b2b4
spirv-val: Add VUID label for 07703 (#4980) 2022-11-06 19:05:25 -05:00