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.
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.
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"`
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>
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.
Adding a github action to open a PR when the DEPS can be updated.
It will run once a day or it can be manually triggered.
I updated roll_deps.sh so that it will not return an error if there were no new
commits for a repository.
* 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
* 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
The copyright check has hardcoded the years that can appear in the
copyright check. This means is has to be constantly updated as new
years or range of years are needed.
We try to avoid this, at least for a while. We allow years up to 2027.
The ranges for the years allow any combination of from 2014 to 2027.
Two deps changes branch names, and roll_deps.sh must be updated.
We also don't want the script to fail just because one of the deps is
already up-to-date. Set `+e` before rolling the deps.
Add a pass to spread Volatile semantics to variables with SMIDNV,
WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask,
SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn
decorations or OpLoad for them when the shader model is the ray
generation, closest hit, miss, intersection, or callable shaders. This
pass can be used for 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").
Handle variables used by multiple entry points:
1. Update error check to make it working regardless of the order of
entry points.
2. For a variable, if it is used by two entry points E1 and E2 and
it needs the Volatile semantics for E1 while it does not for E2
- If VulkanMemoryModel capability is enabled, which means we have to
set memory operation of load instructions for the variable, we
update load instructions in E1, but do not update the ones in E2.
- If VulkanMemoryModel capability is disabled, which means we have
to add Volatile decoration for the variable, we report an error
because E1 needs to add Volatile decoration for the variable while
E2 does not.
For the simplicity of the implementation, we assume that all functions
other than entry point functions are inlined.
- Mention that `depot_tools` are required and link to that repo.
- Make `roll_deps.sh` exit on error. The script passes `shellcheck`
with this change.
- Reword instruction in the README.
The new pass will removed interface variable on the OpEntryPoint instruction when they are not statically referenced in the call tree of the entry point.
It can be enabled on the command line using the options `remove-unused-interface-variables`.
* Initial support for SPV_KHR_integer_dot_product
- Adds new operand types for packed-vector-format
- Moves ray tracing enums to the end
- PackedVectorFormat is a new optional operand type, so it requires
special handling in grammar table generation.
- Add SPV_KHR_integer_dot_product to optimizer whitelists.
- Pass-through validation: valid cases pass validation
Validation errors are not checked.
- Update SPIRV-Headers
Patch by David Neto <dneto@google.com>
Rebase and minor tweaks by Kevin Petit <kevin.petit@arm.com>
Signed-off-by: David Neto <dneto@google.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Icb41741cb7f0f1063e5541ce25e5ba6c02266d2c
* format fixes
Change-Id: I35c82ec27bded3d1b62373fa6daec3ffd91105a3
* Fix export symbol test.
The symbol export test does not check weak symbols, even though they are
possibly exported. It also does not allow functions in the standard
namespace even though it allows symbols on other namespaces.
I've modified the check to look at the name of weakly defined function,
and I've allowed functions in the standard namespace, functions in a local scope, and
weak definitions of new and delete operators.
Fixes#4250
* utils/vscode: Allow running install.sh from any CWD
* utils/vscode: Update schema to latest
* utils/vscode: Don't keep on adding trailing newlines
Repeatedly formatting the file will keep on appending newlines to the end of the file.
Don't do that.
Fix URL to the `OpenCL.DebugInfo.100` grammar file, which moved from `SPIRV-Tools` to `SPIRV-Headers`.
Add a `go.mod` and `go.sum` file.
Go has now fully migrated to using modules, and relative imports no longer work.
Fixup all the relative imports to use a fully qualified path based on the module name.
Fix the `.exe` executable extension on windows.
Update the generated grammar files.
Update the `README.md` with more information.
Disable generation of the log file. Seems to end up in the workspaceDir on windows, not the executable path
* Work around GCC-9 warning treated as error
```
../source/opt/instruction.h:101:23: error: '*((void*)& operand +32)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
101 | uint64_t result = uint64_t(words[0]);
```
* Migrate all Kokoro build scripts over to use the docker VM image
Required updating the NDK SDK and build scripts, as well as the check_copyright for handling 2021.
This scripts fails to run in Python 2. For systems that have both
Python 2 and 3 installed, depending on your PATH the existing code may
or may not run. Explictly using Python 3 to avoid this.
* Update to final ray tracing extensions
Drop Provisional from ray tracing enums
sed -ie 's/RayQueryProvisionalKHR/RayQueryKHR/g' **/*
sed -ie 's/RayTracingProvisionalKHR/RayTracingKHR/g' **/*
Add terminator support for SpvOpIgnoreIntersectionKHR and SpvOpTerminateRayKHR
Update deps for SPIRV-Headers
* Update capability dependencies for MeshShadingNV
Accommodate https://github.com/KhronosGroup/SPIRV-Headers/pull/180
MeshShadingNV: enables PrimitiveId, Layer, and ViewportIndex
Co-authored-by: Daniel Koch <dkoch@nvidia.com>
* Combine the extinst-name and extinst-output-base into one arg.
Some build systems such as Android blueprints require that the inputs
and outputs of generator scripts are all provided as arguments. These
two arguments to generate_language_headers.py are combined to form the
output path in the script. This change simply lets the user provide the
whole output path as an argument.
* Fix typo in build_defs.bzl and update Android.mk
These were declared in the `Opcode` struct type, but were never assigned.
They're not actually used by the language server, but I reused this go schema package for a local experiment and found they were missing.