Skip to content

Commit

Permalink
Merge tag 'v2023.6.rc1' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhangNV committed Jan 16, 2024
2 parents 8994351 + f0cc85e commit e5c3f2d
Show file tree
Hide file tree
Showing 92 changed files with 9,205 additions and 4,940 deletions.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
groups:
github-actions:
patterns:
- "*"
open-pull-requests-limit: 3
8 changes: 6 additions & 2 deletions .github/workflows/autoroll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Checkout the depot tools they are needed by roll_deps.sh
- name: Checkout depot tools
Expand Down Expand Up @@ -47,6 +47,10 @@ jobs:
if: steps.update_dependencies.outputs.changed == 'true'
run: |
git push --force --set-upstream origin roll_deps
gh pr create --label 'kokoro:run' --base main -f -r s-perron
# Create a PR. If it aready exists, the command fails, so ignore the return code.
gh pr create --base main -f || true
# Add the 'kokoro:run' label so that the kokoro tests will be run.
gh pr edit --add-label 'kokoro:run'
gh pr merge --auto --squash
env:
GITHUB_TOKEN: ${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: '0'
- name: Download dependencies
run: python3 utils/git-sync-deps
- name: Mount Bazel cache
uses: actions/cache@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.bazel/cache
key: bazel-cache-${{ runner.os }}
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: iOS
permissions:
contents: read

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-12, macos-13 ]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- name: Download dependencies
run: python3 utils/git-sync-deps
# NOTE: The MacOS SDK ships universal binaries. CI should reflect this.
- name: Configure Universal Binary for iOS
run: |
cmake -S . -B build \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_SYSTEM_NAME=iOS \
"-D CMAKE_OSX_ARCHITECTURES=arm64;x86_64" \
-G Ninja
env:
# Linker warnings as errors
LDFLAGS: -Wl,-fatal_warnings
- run: cmake --build build
- run: cmake --install build --prefix /tmp
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
prepare-release-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Prepare CHANGELOG for version
run: |
python utils/generate_changelog.py CHANGES "${{ github.ref_name }}" VERSION_CHANGELOG
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '36 17 * * 5'
push:
branches: [ "main" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write # to upload the results to code-scanning dashboard
id-token: write # to publish results and get a badge

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# To enable Branch-Protection uncomment the `repo_token` line below
# To create the Fine-grained PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
publish_results: true # allows the repo to include the Scorecard badge

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: '0'
- name: Build web
Expand Down
2 changes: 2 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ SPVTOOLS_OPT_SRC_FILES := \
source/opt/instrument_pass.cpp \
source/opt/interface_var_sroa.cpp \
source/opt/interp_fixup_pass.cpp \
source/opt/invocation_interlock_placement_pass.cpp \
source/opt/ir_context.cpp \
source/opt/ir_loader.cpp \
source/opt/licm_pass.cpp \
Expand Down Expand Up @@ -182,6 +183,7 @@ SPVTOOLS_OPT_SRC_FILES := \
source/opt/strip_debug_info_pass.cpp \
source/opt/strip_nonsemantic_info_pass.cpp \
source/opt/struct_cfg_analysis.cpp \
source/opt/switch_descriptorset_pass.cpp \
source/opt/trim_capabilities_pass.cpp \
source/opt/type_manager.cpp \
source/opt/types.cpp \
Expand Down
14 changes: 0 additions & 14 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ cc_library(
],
exclude = [
"test/cpp_interface_test.cpp",
"test/log_test.cpp",
"test/pch_test.cpp",
],
)]
Expand Down Expand Up @@ -487,19 +486,6 @@ cc_test(
],
)

cc_test(
name = "base_log_test",
size = "small",
srcs = ["test/log_test.cpp"],
copts = TEST_COPTS,
linkstatic = 1,
deps = [
":spirv_tools_opt_internal",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

cc_library(
name = "link_test_lib",
testonly = 1,
Expand Down
4 changes: 4 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,8 @@ static_library("spvtools_opt") {
"source/opt/interface_var_sroa.h",
"source/opt/interp_fixup_pass.cpp",
"source/opt/interp_fixup_pass.h",
"source/opt/invocation_interlock_placement_pass.cpp",
"source/opt/invocation_interlock_placement_pass.h",
"source/opt/ir_builder.h",
"source/opt/ir_context.cpp",
"source/opt/ir_context.h",
Expand Down Expand Up @@ -789,6 +791,8 @@ static_library("spvtools_opt") {
"source/opt/strip_nonsemantic_info_pass.h",
"source/opt/struct_cfg_analysis.cpp",
"source/opt/struct_cfg_analysis.h",
"source/opt/switch_descriptorset_pass.cpp",
"source/opt/switch_descriptorset_pass.h",
"source/opt/tree_iterator.h",
"source/opt/trim_capabilities_pass.cpp",
"source/opt/trim_capabilities_pass.h",
Expand Down
44 changes: 44 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
Revision history for SPIRV-Tools

v2023.6 2023-12-18
- General
- update_build_version.py produce deterministic header. (#5426)
- Support missing git in update_build_version.py (#5473)
- Optimizer
- Add ComputeDerivativeGroup*NV capabilities to trim capabilities pass. (#5430)
- Do not crash when tryingto fold unsupported spec constant (#5496)
- instrument: Fix handling of gl_InvocationID (#5493)
- Fix nullptr argument in MarkInsertChain (#5465)
- opt: support 64-bit OpAccessChain index in FixStorageClass (#5446)
- opt: add StorageImageReadWithoutFormat to cap trim (#5475)
- opt: add PhysicalStorageBufferAddresses to trim (#5476)
- Fix array size calculation (#5463
- Validator
- spirv-val: Loosen restriction on base type of DebugTypePointer and DebugTypeQualifier (#5479)
- spirv-val: Add WorkgroupMemoryExplicitLayoutKHR check for Block (#5461)

v2023.5 2023-10-15
- General
- Support 2 Intel extensions (#5357)
- SPV_QCOM_image_processing support (#5223)
- Optimizer
- opt: fix StorageInputOutput16 trimming. (#5359)
- opt: add StoragePushConstant16 to trim pass (#5366)
- opt: enable StorageUniform16 (#5371)
- opt: add bitmask support for capability trimming (#5372)
- opt: Add SwitchDescriptorSetPass (#5375)
- opt: add FragmentShader*InterlockEXT to capability trim pass (#5390)
- opt: add Int64 capability to trim pass (#5398)
- opt: add Float64 capability to trim pass (#5428)
- opt: add raytracing/rayquery to trim pass (#5397)
- opt: add ImageMSArray capability to trim pass. (#5395)
- Add SPV_KHR_physical_storage_buffer to allowlists (#5402)
- Add SPV_EXT_fragment_shader_interlock to allow lists (#5393)
- Make sure that fragment shader interlock instructions are not removed by DCE (#5400)
- instrument: Use Import linkage for instrumentation functions (#5355)
- Add a new legalization pass to dedupe invocation interlock instructions (#5409)
- instrument: Ensure linking works even of nothing is changed (#5419)
- Validator
- Move token version/cap/ext checks from parsing to validation (#5370)
- val: re-add ImageMSArray validation (#5394)
- Linker
- linker: Add --use-highest-version option

v2023.4 2023-07-17
- General
- Set cmake_policy CMP0128 (#5341)
Expand Down
22 changes: 15 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,23 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
endmacro()
endif()

# Defaults to OFF if the user didn't set it.
option(SPIRV_SKIP_EXECUTABLES
"Skip building the executable and tests along with the library"
${SPIRV_SKIP_EXECUTABLES})
option(SPIRV_SKIP_TESTS
"Skip building tests along with the library" ${SPIRV_SKIP_TESTS})
if ("${SPIRV_SKIP_EXECUTABLES}")
# Currently iOS and Android are very similar.
# They both have their own packaging (APP/APK).
# Which makes regular executables/testing problematic.
#
# Currently the only deliverables for these platforms are
# libraries (either STATIC or SHARED).
#
# Furthermore testing is equally problematic.
if (IOS OR ANDROID)
set(SPIRV_SKIP_EXECUTABLES ON)
endif()

option(SPIRV_SKIP_EXECUTABLES "Skip building the executable and tests along with the library")
if (SPIRV_SKIP_EXECUTABLES)
set(SPIRV_SKIP_TESTS ON)
endif()
option(SPIRV_SKIP_TESTS "Skip building tests along with the library")

# Defaults to ON. The checks can be time consuming.
# Turn off if they take too long.
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## For users: Reporting bugs and requesting features

We organize known future work in GitHub projects. See
[Tracking SPIRV-Tools work with GitHub projects](https://github.com/KhronosGroup/SPIRV-Tools/blob/master/docs/projects.md)
[Tracking SPIRV-Tools work with GitHub projects](https://github.com/KhronosGroup/SPIRV-Tools/blob/main/docs/projects.md)
for more.

To report a new bug or request a new feature, please file a GitHub issue. Please
Expand Down Expand Up @@ -46,7 +46,7 @@ sign the CLA until after you've submitted your code for review and a member has
approved it, but you must do it before we can put your code into our codebase.

See
[README.md](https://github.com/KhronosGroup/SPIRV-Tools/blob/master/README.md)
[README.md](https://github.com/KhronosGroup/SPIRV-Tools/blob/main/README.md)
for instruction on how to get, build, and test the source. Once you have made
your changes:

Expand All @@ -59,7 +59,7 @@ your changes:
* If your patch completely fixes bug 1234, the commit message should say
`Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1234` When you do
this, the issue will be closed automatically when the commit goes into
master. Also, this helps us update the [CHANGES](CHANGES) file.
main. Also, this helps us update the [CHANGES](CHANGES) file.
* Watch the continuous builds to make sure they pass.
* Request a code review.

Expand Down Expand Up @@ -107,7 +107,7 @@ should pay particular attention to:

## For maintainers: Merging a PR

We intend to maintain a linear history on the GitHub master branch, and the
We intend to maintain a linear history on the GitHub main branch, and the
build and its tests should pass at each commit in that history. A linear
always-working history is easier to understand and to bisect in case we want to
find which commit introduced a bug. The
Expand Down
6 changes: 3 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ vars = {

'effcee_revision': '19b4aa87af25cb4ee779a071409732f34bfc305c',

'googletest_revision': '6f6ab4212aa02cfe02e480711246da4fc17b0761',
'googletest_revision': 'b10fad38c4026a29ea6561ab15fc4818170d1c10',

# Use protobufs before they gained the dependency on abseil
'protobuf_revision': 'v21.12',

're2_revision': '960c861764ff54c9a12ff683ba55ccaad1a8f73b',
'spirv_headers_revision': '124a9665e464ef98b8b718d572d5f329311061eb',
're2_revision': '7e0c1a9e2417e70e5f0efc323267ac71d1fa0685',
'spirv_headers_revision': '1c6bb2743599e6eb6f37b2969acc0aef812e32e3',
}

deps = {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPIR-V Tools
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/KhronosGroup/SPIRV-Tools/badge)](https://securityscorecards.dev/viewer/?uri=github.com/KhronosGroup/SPIRV-Tools)

NEWS 2023-01-11: Development occurs on the `main` branch.

Expand Down
2 changes: 1 addition & 1 deletion docs/downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Latest builds

Download the latest builds of the [master](https://github.com/KhronosGroup/SPIRV-Tools/tree/master) branch.
Download the latest builds of the [main](https://github.com/KhronosGroup/SPIRV-Tools/tree/main) branch.

### Release build
| Windows | Linux | MacOS |
Expand Down
4 changes: 2 additions & 2 deletions docs/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ through the project workflow:
ones.
* They determine if the work for a card has been completed.
* Normally they are the person (or persons) who can approve and merge a pull
request into the `master` branch.
request into the `main` branch.

Our projects organize cards into the following columns:
* `Ideas`: Work which could be done, captured either as Cards or Notes.
Expand All @@ -51,7 +51,7 @@ Our projects organize cards into the following columns:
claimed by someone.
* `Done`: Issues which have been resolved, by completing their work.
* The changes have been applied to the repository, typically by being pushed
into the `master` branch.
into the `main` branch.
* Other kinds of work could update repository settings, for example.
* `Rejected ideas`: Work which has been considered, but which we don't want
implemented.
Expand Down
Loading

0 comments on commit e5c3f2d

Please sign in to comment.