spirv_target_env.cpp uses std::pair, which is defined in utility.
Right now, this compiles because utility is provided via transitive
includes in other C++ standard library headers provided by the
implementation. However, these transitive includes are not guaranteed to
exist, and won't exist in certain cases (e.g. compiling against LLVM's
libc++ with modules enabled.)
* dump: add tool skeleton.
This tool aims to be used a bit like objdump (hence the name).
Allowing the user to dump some info from a spirv-binary.
* add test structure for spirv-dump
* add spirv-dump to bazel build file
* fix licenses
* fix compilation with ubsan
* remove fdiagnostics
* rename dump to objdump
* move tests to test/tools
* rename dump to objdump for bazel
* Roll external/googletest/ 50e07d1c9..038e392eb (1 commit)
50e07d1c92...038e392ebd
$ git log 50e07d1c9..038e392eb --date=short --no-merges --format='%ad %ae %s'
2023-03-10 lawrencews [gtest] Drop custom-rolled heterogeneous comparator functors in favor of C++ standard ones
Created with:
roll-dep external/googletest
* Roll external/re2/ f0402c039..b059ae85c (1 commit)
f0402c0397...b059ae85c8
$ git log f0402c039..b059ae85c --date=short --no-merges --format='%ad %ae %s'
2023-03-10 junyer Move inst_ out of the blob of memory for a State.
Created with:
roll-dep external/re2
---------
Co-authored-by: GitHub Actions[bot] <>
This small utility parses the CHANGES file to generate
a CHANGELOG that can be used for GitHub releases.
This will be used by the GitHub workflow to make releases
automatic.
Given a CHANGES file path, a tag, the script extract the
editorialized changelog, and writes it to a given output file.
e1ee0fa3e1...a798c2f102
$ git log e1ee0fa3e..a798c2f10 --date=short --no-merges --format='%ad %ae %s'
2023-03-07 tomhughes Add -Wundef to the CI scripts when building with Bazel
2023-03-07 tomhughes Fix compilation of googletest-printers-test.cc when using -Wundef
2023-03-07 absl-team Suppress std::string DLL interface warning introduced in commit f063cd25c90cbd4089a0ff96f5991df4f2721338
2023-03-07 absl-team Internal Code Change
Created with:
roll-dep external/googletest
Co-authored-by: GitHub Actions[bot] <>
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]
GetExtractOperandsForElementOfCompositeConstruct() states "Returns the
empty vector if |result_index| is out-of-bounds", but violates that
contract for non-vector result types.
* 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
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.
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.
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>
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>
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] <>
* 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.