Commit Graph

3590 Commits

Author SHA1 Message Date
Ralf Habacker
e0df12997f
Fix using invalid install path for cmake support files with MINGW platform (#5128) (#5129) 2023-03-03 15:53:23 +00:00
Ralf Habacker
3eff21366e
Fix MinGW build error (#4935) (#5127)
This commit fixes the following build error when the source code is build
with MinGW gcc 12 and compiler switch '-Werror=maybe-uninitialized' is
added:

    'file.{anonymous}::OutputFile::old_mode_' may be used uninitialized
     in this function [-Werror=maybe-uninitialized]
2023-03-03 15:53:08 +00:00
Laura Hermanns
bd83b772c3
Fix operand index out of bounds when folding OpCompositeExtract. (#5107)
GetExtractOperandsForElementOfCompositeConstruct() states "Returns the
empty vector if |result_index| is out-of-bounds", but violates that
contract for non-vector result types.
2023-03-03 15:52:49 +00:00
David Neto
5fe3bbe77d
Update Effcee so it doesn't hardcode C++11 (#5137) 2023-03-03 14:30:13 +00:00
github-actions[bot]
6c714f191e
Roll external/googletest/ c7d0bc830..2d4f20876 (3 commits) (#5130)
* Roll external/googletest/ c7d0bc830..2d4f20876 (3 commits)

c7d0bc8309...2d4f208765

$ git log c7d0bc830..2d4f20876 --date=short --no-merges --format='%ad %ae %s'
2023-02-28 absl-team   Rephrase the description of TEST_F() arguments for clarity.
2023-02-27 absl-team Eliminate argv list action parameter.
2023-02-19 39726720+VuPhamVan Fix typo

Created with:
  roll-dep external/googletest

* Roll external/spirv-headers/ aa331ab0f..295cf5fb3 (6 commits)

aa331ab0ff...295cf5fb3b

$ git log aa331ab0f..295cf5fb3 --date=short --no-merges --format='%ad %ae %s'
2023-03-01 abhishek2.tiwari update parameter name to match spec in grammar file
2023-02-23 abhishek2.tiwari move FPGAKernelAttributesv2INTEL to capability section in all files
2023-02-08 abhishek2.tiwari correct file entry position for FPGAKernelAttributesv2INTEL
2023-02-07 abhishek2.tiwari add FPGAKernelAttributesv2INTEL to all files
2023-01-27 abhishek2.tiwari address review comment
2023-01-26 abhishek2.tiwari add RegisterMapInterfaceINTEL

Created with:
  roll-dep external/spirv-headers

---------

Co-authored-by: GitHub Actions[bot] <>
2023-03-02 19:53:51 +00:00
Nathan Gauër
d6c707676d
linter: refactorize linter flag parsing (#5134)
Change custom flag parsing to the built-in one.
2023-03-02 15:17:34 +01:00
Nathan Gauër
8cee461986
tools: add uint32_t flags parsing (#5131)
* tools: add uint32_t flags parsing

This will be required to refactorize other tools.
2023-03-02 15:16:32 +01:00
Nathan Gauër
970ba4e8b0
linker: refactorize flag parsing (#5132)
replace the old parser with the common utility.
2023-03-01 18:50:42 +01:00
github-actions[bot]
9d71fb6764
Roll external/googletest/ 3d787f5a0..c7d0bc830 (4 commits) (#5126)
3d787f5a0d...c7d0bc8309

$ git log 3d787f5a0..c7d0bc830 --date=short --no-merges --format='%ad %ae %s'
2023-02-27 phoebeliang Reorder printers list.
2023-02-27 absl-team   Reformat to current g3doc style guide. No content changes.
2023-02-21 sergionso Fix error in_death_test_child_process: undeclared identifier
2023-02-02 benayang Update testing.md

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-28 11:59:21 +00:00
Nathan Gauër
9d4c95a574
build: fix build.gn missing comma (#5125)
Broke build using this file.
2023-02-27 20:45:43 +01:00
Nathan Gauër
2e0f4b52c9
tools: refactorize tools flags parsing. (#5111)
* tools: refactorize tools flags parsing.

Each SPIR-V tool was handing their own flag parsing. This PR
adds a new flag parsing utility that should be flexible enough
for our usage, but generic enough so it can be shared across tools while
remaining simple to use.

* cfg: replace cfg option parsing with the new one.

* change spirv-dis parsing + title + summary

* clang format

* flags: fix static init fiasco & remove help

Static initialization order is important, and was
working just by sheer luck.

Also removing the help generation tooling. It's less flexible than the
hand-written string, and making it as-good and as-flexible brings too
much complexity.

* review feedback
2023-02-27 18:45:14 +01:00
github-actions[bot]
3b2ea1a422
Roll external/googletest/ 39a26e12d..3d787f5a0 (2 commits) (#5123)
39a26e12d6...3d787f5a0d

$ git log 39a26e12d..3d787f5a0 --date=short --no-merges --format='%ad %ae %s'
2023-02-24 absl-team Add `const` qualifier to `gtest_sentinel` which doesn't change.
2023-02-23 absl-team Added a missing semicolon for GTEST_FLAG_SET code snippet.

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-25 18:54:35 +00:00
alan-baker
b955c468b1
Add missing header include (#5124)
* Found during an internal build
2023-02-24 13:21:53 -05:00
alan-baker
5d2bc6f064
Fix removal of dependent non-semantic instructions (#5122)
Fixes #5121

* If the non-semantic info instructions depended on other moved
  instructions the def/use manager would get corrupted.
2023-02-24 01:10:35 +00:00
github-actions[bot]
4183faa2ec
Roll external/googletest/ 750d67d80..39a26e12d (2 commits) (#5120)
750d67d809...39a26e12d6

$ git log 750d67d80..39a26e12d --date=short --no-merges --format='%ad %ae %s'
2023-02-22 dinor Avoid redundant declaration of static constexpr members in c++17
2023-02-22 dinor Update googletest's test docker containers

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-23 12:14:28 +00:00
Bruce Dawson
2cf48e9534
Allow invoking git.bat as git on Windows (#5118)
In a Chromium build environment on Windows git is supplied by
depot_tools as git.bat. This was causing build errors on Windows that
are most easily reproduced with this command:

  gn gen out\default && gn clean out\default && ninja -C out\default spirv-as

The errors included:

[12:55:40][ERROR   ] Failed to run "['git', 'tag', '--sort=-v:refname']" in "C:\src\chromium\src\third_party\vulkan-deps\spirv-tools\src": [WinError 2] The system cannot find the file specified
[12:55:40][WARNING ] Could not deduce latest release version from history.

This is because 'git' does not resolve to git.bat unless shell=True is
passed to subprocess.Popen. This change passes shell=True but only on
Windows which resolves these errors.
2023-02-23 03:24:34 +00:00
github-actions[bot]
9017cfcf62
Roll external/googletest/ 7a7231c44..750d67d80 (1 commit) (#5119)
7a7231c442...750d67d809

$ git log 7a7231c44..750d67d80 --date=short --no-merges --format='%ad %ae %s'
2023-02-21 tomhughes Remove int64_t cast in RecordProperty

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-22 11:23:34 +00:00
github-actions[bot]
8bcaad28f7
Roll external/re2/ 9049cd28d..3a8436ac4 (1 commit) (#5117)
9049cd28d7...3a8436ac43

$ git log 9049cd28d..3a8436ac4 --date=short --no-merges --format='%ad %ae %s'
2023-02-20 junyer Fuzz `RE2::Set` and `FilteredRE2`.

Created with:
  roll-dep external/re2

Co-authored-by: GitHub Actions[bot] <>
2023-02-21 13:44:37 +00:00
Nathan Gauër
987a5f1367
build: change the way we set cxx version for bazel. (#5114)
Before, we did set cxx version to c++17 using COPTS in our bazel files.
This was wrong, and part of the dependencies were then built with the
default standard version. This was not an issue until we moved to c++17.

Then, we decided to use the bazel --cxxopt=-std=c++17, but this was only
valid for nix platforms.
The last option left is to ask the user to specify the standard
when building using bazel.
2023-02-20 11:11:16 +01:00
github-actions[bot]
69ed5adf10
Roll external/googletest/ f063cd25c..7a7231c44 (1 commit) (#5116)
f063cd25c9...7a7231c442

$ git log f063cd25c..7a7231c44 --date=short --no-merges --format='%ad %ae %s'
2023-02-16 absl-team Fix link in ReportUninterestingCall message

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-17 14:45:07 +00:00
github-actions[bot]
c9947cc8d5
Roll external/googletest/ 2057566e4..f063cd25c (1 commit) (#5115)
2057566e4e...f063cd25c9

$ git log 2057566e4..f063cd25c --date=short --no-merges --format='%ad %ae %s'
2023-02-15 absl-team Remove strdup usage

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-16 13:11:36 +00:00
Dave Airlie
956114df28
opt: fix spirv ABI on Linux again. (#5113)
Breaking the ABI for this API isn't worth it when the fix is so simple.
2023-02-15 20:11:30 +00:00
Kévin Petit
f4343515ad
Remove duplicate lists of constant and type opcodes (#5106)
Adding a new type instruction required making the same change in two
places.

Also remove IsCompileTimeConstantInst that was used in a single place
and replace its use by an expression that better conveys the intent.

Change-Id: I49330b74bd34a35db6369c438c053224805c18e0

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2023-02-15 20:09:55 +00:00
github-actions[bot]
95f93810bb
Roll external/googletest/ b80a07ffe..2057566e4 (1 commit) (#5112)
b80a07ffe6...2057566e4e

$ git log b80a07ffe..2057566e4 --date=short --no-merges --format='%ad %ae %s'
2023-02-14 absl-team Remove some filesystem APIs and tests under !GTEST_HAS_FILE_SYSTEM

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-15 12:11:14 +00:00
Nathan Gauër
b84c86f718
libspirv.cpp: adds c++ api for spvBinaryParse (#5109)
This commit adds a C++ wrapper above the current spvBinaryParse
function. I tried to match it 1:1, except for 2 things:
 - std::function<>& are used. No more function pointers, allowing
   context capture.
 - spv_result_t replaced with a boolean, to match other C++ apis.

Callbacks still return a spv_result_t because the underlying implem
relies on that. The convertion from spv_result_t to boolean is only done
at the boundary.

Signed-off-by: Nathan Gauër <brioche@google.com>
2023-02-14 14:08:20 -05:00
github-actions[bot]
e150e716ff
roll deps (#5110)
* Roll external/googletest/ b73f27fd1..b80a07ffe (1 commit)

b73f27fd16...b80a07ffe6

$ git log b73f27fd1..b80a07ffe --date=short --no-merges --format='%ad %ae %s'
2023-02-13 absl-team Avoid reliance on <any> header without RTTI on MSVC

Created with:
  roll-dep external/googletest

* Roll external/re2/ 891fa6684..9049cd28d (2 commits)

891fa66846...9049cd28d7

$ git log 891fa6684..9049cd28d --date=short --no-merges --format='%ad %ae %s'
2023-02-13 junyer Add the `RE2_BUILD_FRAMEWORK` option to build RE2 as a framework.
2023-02-13 junyer Use `PUBLIC_HEADER` to install headers.

Created with:
  roll-dep external/re2

---------

Co-authored-by: GitHub Actions[bot] <>
2023-02-14 04:04:34 +00:00
github-actions[bot]
7221381361
Roll external/re2/ b025c6a3a..891fa6684 (1 commit) (#5108)
b025c6a3ae...891fa66846

$ git log b025c6a3a..891fa6684 --date=short --no-merges --format='%ad %ae %s'
2023-02-10 junyer Fix a typographical error.

Created with:
  roll-dep external/re2

Co-authored-by: GitHub Actions[bot] <>
2023-02-12 00:29:44 +00:00
github-actions[bot]
5b48c549b0
Roll external/googletest/ 0570e2d93..b73f27fd1 (1 commit) (#5105)
0570e2d930...b73f27fd16

$ git log 0570e2d93..b73f27fd1 --date=short --no-merges --format='%ad %ae %s'
2023-02-08 tomhughes Fix _MSC_VER check

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-09 13:16:56 +00:00
Kevin Lubick
dfcbf310af
Change exec_tools -> tools for local genrule (#5104) 2023-02-08 09:20:47 -05:00
github-actions[bot]
b0504f9905
Roll external/googletest/ 3d568bdda..0570e2d93 (2 commits) (#5102)
3d568bdda5...0570e2d930

$ git log 3d568bdda..0570e2d93 --date=short --no-merges --format='%ad %ae %s'
2023-02-07 tomhughes Remove GTEST_USES_PCRE references
2023-02-07 mvels Fix GTEST_HAS_ABSL define check for [-Werror=undef] compilations

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-08 12:48:50 +00:00
github-actions[bot]
c965624e34
Roll external/googletest/ 2f2e72bae..3d568bdda (1 commit) (#5100)
2f2e72bae9...3d568bdda5

$ git log 2f2e72bae..3d568bdda --date=short --no-merges --format='%ad %ae %s'
2023-02-06 absl-team Add support for the alternative base64 encoding in RFC 4648 section 5 to `WhenBase64Unescaped`.

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-07 14:17:24 +00:00
Caio Oliveira
0ce2bc4ce0
spirv-val: Conditional Branch without an exit is invalid in loop header (#5069)
* Update fuzz tests to not use invalid combinations of LoopMerge + BranchConditional

New IDs were selected to make clear the transformation being done here, instead
of reordering all IDs in between or refactoring the SPIR-V in the test.

* spirv-val: Conditional Branch without an exit is invalid in loop header

From 2.16.2, for CFG:

    Selections must be structured. That is, an OpSelectionMerge
    instruction is required to precede:

    - an OpSwitch instruction

    - an OpBranchConditional instruction that has different True Label
      and False Label operands where neither are declared merge blocks
      or Continue Targets.
2023-02-06 10:31:47 -05:00
github-actions[bot]
e9dc2c8ce1
Roll external/googletest/ ebedaa18c..2f2e72bae (4 commits) (#5099)
ebedaa18c7...2f2e72bae9

$ git log ebedaa18c..2f2e72bae --date=short --no-merges --format='%ad %ae %s'
2023-02-02 tomhughes Fix compiler flags in Linux presubmit
2023-02-02 tomhughes Fix -Wsign-conversion warnings
2023-02-02 tomhughes Remove unneccessary "#if _MSC_VER"
2023-02-02 absl-team Add a trailing decimal point to FormatTimeInMillisAsSeconds() output when input is an exact N seconds.

Created with:
  roll-dep external/googletest

Co-authored-by: GitHub Actions[bot] <>
2023-02-05 01:35:10 +00:00
Nathan Gauër
7823b8ff4a
build: allow update_build to generate fake version (#5098)
When the build is done on a shallow repo, or on a non-git copy,
the version script failed. We should not hard fail, but generate
a "version" (unknown).

Sample outputs:

with git history:
`"v2023.2-dev", "SPIRV-Tools v2023.2-dev v2022.4-87-g53541064"`

with shallow clone:
`"unknown_version", "SPIRV-Tools unknown_version d8759a140bc65811332d5f91f3b08febadd5a21d"`

not a git repo:
`"unknown_version", "SPIRV-Tools unknown_version unknown_hash, 2023-02-02T16:25:48.077995"`
2023-02-03 20:43:03 +00:00
Laura Hermanns
cac9a5a3ee
Fix null pointer in FoldInsertWithConstants. (#5093)
* Fix null pointer in FoldInsertWithConstants.

Struct types are not supported in constant folding yet.

* Added 'Test case 16' to fold_test.

Tests OpCompositeInsert not to be folded on a struct type.
2023-02-03 15:03:15 +00:00
Maciej
fd1e650cfe
Validate decoration of structs with RuntimeArray (#5094)
Contributes to https://github.com/KhronosGroup/glslang/issues/2439

* When OpTypeStruct is used in Vulkan env and its last member
  is a RuntimeArray, check if the struct is decorated with
  Block or BufferBlock, as required by VUID-...-04680.
2023-02-03 08:58:51 -05:00
Jeremy Gebben
5890763734
instrument: Clean up generation code (#5090)
-Make more use of InstructionBuilder instruction helper methods
-Use MakeUnique<>() rather than new
-Add InstrumentPass::GenReadFunctionCall() which optimizes function
calls in a loop with constant arguments and no side effects.

This is a prepatory change for future work on the instrumentation
code which will add more generated functions.
2023-02-03 00:39:09 +00:00
Nathan Gauër
d8759a140b
build: fix bazel build for c++17 (#5097)
This commit changes the way bazel chooses which version to build.
Before, we had a COPT set to -std=c++17, which is analogous to the cmake
way.
However, googletest decided to follow abseil, meaning this is *not*
recommended at all, and causes a mixed-standard build.

From https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#how-to-i-set-the-c-dialect-used-to-build-abseil
we have 3 options to define the standard. Using a bazelrc is what I
believe to be the simplest, as it "fixes" the repo standard.

Signed-off-by: Nathan Gauër <brioche@google.com>
2023-02-02 14:05:02 +00:00
Steven Perron
1a49b52188
Remove vs2017 no longer being run (#5095) 2023-02-01 18:45:42 +00:00
Daniel Story
0994ca45b6
Add C interface for Optimizer (#5030) 2023-02-01 13:58:52 +00:00
github-actions[bot]
8a0fe779e5
Roll external/re2/ 8afcf7fcc..b025c6a3a (1 commit) (#5091)
8afcf7fcc4...b025c6a3ae

$ git log 8afcf7fcc..b025c6a3a --date=short --no-merges --format='%ad %ae %s'
2023-01-30 raj.khem Use plain int type instead of int32_t

Created with:
  roll-dep external/re2

Co-authored-by: GitHub Actions[bot] <>
2023-01-31 21:54:27 +00:00
alan-baker
b230a7c7d1
Validate operand type before operating on it (#5092)
Fixes https://crbug.com/oss-fuzz/52921

* Validate the data operand of OpBitCount before trying to get its
  dimension
2023-01-31 15:40:22 -05:00
Nathan Gauër
fcfc3c580c
build: stop parsing CHANGES file. (#5067)
The CHANGES file was an alternative source of truth that was trying
to duplicate/replace the git history truth.
This allow us to change the way we handle releases so we don't have to make
sure our CHANGES PR are linked to the tag and tested PR, simplifying the
process.
2023-01-30 13:23:41 -05:00
Corentin Wallez
0174dd11ff
BUILD.gn: Make MSVC report the correct __cplusplus value (#5088) 2023-01-30 14:02:26 +00:00
Nathan Gauër
64ba112ffb
build: refactorize update_build_version (#5079)
This commit prepares the next change to stop parsing the
CHANGES file to determine version, but to use tags instead.
2023-01-27 14:36:09 +00:00
github-actions[bot]
96c5dac559
Roll external/re2/ ba541565b..8afcf7fcc (1 commit) (#5085)
ba541565b4...8afcf7fcc4

$ git log ba541565b..8afcf7fcc --date=short --no-merges --format='%ad %ae %s'
2023-01-25 junyer Improve support for the optional ICU dependency.

Created with:
  roll-dep external/re2

Co-authored-by: GitHub Actions[bot] <>
2023-01-27 02:27:32 +00:00
Steven Perron
5db6c38e65
Revert "spirv-val: Initial SPV_EXT_mesh_shader builtins (#5080)" (#5084)
This reverts commit f0b900ed9a.
2023-01-24 19:51:39 +00:00
Kévin Petit
57fb3c7a3f
Align git-sync-deps and CMake to use external/spirv-headers by default (#4963)
This should help with avoiding mistakes such as the one that happened under #4958.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I922f02e25c507f3412e0e7a99f525fb617b2d426

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2023-01-24 12:27:30 -05:00
github-actions[bot]
af15e5adea
Roll external/re2/ 954656f47..ba541565b (1 commit) (#5083)
954656f47f...ba541565b4

$ git log 954656f47..ba541565b --date=short --no-merges --format='%ad %ae %s'
2023-01-23 junyer Introduce `bitmap256.cc` for `FindNextSetBit()`.

Created with:
  roll-dep external/re2

Co-authored-by: GitHub Actions[bot] <>
2023-01-24 15:26:28 +00:00
Nathan Gauër
7f9184a5b2
kokoro: fix dubious ownership (#5082)
Kokoro clones repos with a different user used to run the build steps,
meaning if some git command must be run at build time, they will fail
because of this dubious ownership issue.
Running some git commands makes only sense with history, so changing
checkout depth so we can run them and get the true result.

This is a known Kororo issue.
Fixing this is required to generate the version file using git history.

Signed-off-by: Nathan Gauër <brioche@google.com>

Signed-off-by: Nathan Gauër <brioche@google.com>
2023-01-23 15:32:39 +00:00