Skip to content

Commit

Permalink
Merge branch 'google:master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
McCallisterRomer authored May 18, 2024
2 parents 1de31cf + da33485 commit f08c7f6
Show file tree
Hide file tree
Showing 283 changed files with 30,896 additions and 9,529 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ if (NOT TARGET SPIRV-Tools)
set(SPIRV-Headers_SOURCE_DIR "${THIRD_PARTY_DIR}/SPIRV-Headers")
set(SPIRV_SKIP_TESTS TRUE CACHE BOOL "" FORCE)
set(SPIRV_SKIP_EXECUTABLES TRUE CACHE BOOL "" FORCE)
set(SPIRV_WERROR FALSE CACHE BOOL "" FORCE)
add_subdirectory(${THIRD_PARTY_DIR}/SPIRV-Tools) # Add SPIRV-Tools target
endif()

Expand Down
2 changes: 0 additions & 2 deletions src/Pipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ endif()
set_target_properties(core_tables PROPERTIES FOLDER "SPIRV-Tools build")
set_target_properties(enum_string_mapping PROPERTIES FOLDER "SPIRV-Tools build")
set_target_properties(extinst_tables PROPERTIES FOLDER "SPIRV-Tools build")
set_target_properties(spirv-tools-pkg-config PROPERTIES FOLDER "SPIRV-Tools build")
set_target_properties(spirv-tools-shared-pkg-config PROPERTIES FOLDER "SPIRV-Tools build")

set_target_properties(vk_pipeline PROPERTIES
POSITION_INDEPENDENT_CODE 1
Expand Down
9 changes: 7 additions & 2 deletions src/Reactor/LLVMJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ __pragma(warning(push))

// See https://groups.google.com/g/llvm-dev/c/CAE7Va57h2c/m/74ITeXFEAQAJ
// for information about `RTDyldObjectLinkingLayer` vs `ObjectLinkingLayer`.
// On RISC-V, only `ObjectLinkingLayer` is supported.
#if defined(__riscv)
// On RISC-V and LoongArch, only `ObjectLinkingLayer` is supported.
#if defined(__riscv) || defined(__loongarch__)
#define USE_LEGACY_OBJECT_LINKING_LAYER 0
#else
#define USE_LEGACY_OBJECT_LINKING_LAYER 1
Expand Down Expand Up @@ -250,6 +250,11 @@ JITGlobals *JITGlobals::get()
// On RISC-V, using the default code model results in an
// "Unsupported riscv relocation" error.
jitTargetMachineBuilder.setCodeModel(llvm::CodeModel::Medium);
#elif defined(__loongarch__)
// jitTargetMachineBuilder.getFeatures() on LoongArch does
// not return the LoongArch CPU extensions, so they are
// manually added.
jitTargetMachineBuilder.getFeatures().AddFeature("+d");
#endif

jitTargetMachineBuilder.setCPU(std::string(llvm::sys::getHostCPUName()));
Expand Down
4 changes: 2 additions & 2 deletions src/Reactor/reactor.gni
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import("../swiftshader.gni")
import("//build_overrides/build.gni")

declare_args() {
# Subzero doesn't support ARM64, MIPS64, PPC64, and RISCV64 (only x86 and ARMv7a).
supports_subzero = current_cpu != "arm64" && current_cpu != "mips64el" && current_cpu != "ppc64" && current_cpu != "riscv64"
# Subzero doesn't support ARM64, LOONGARCH64, MIPS64, PPC64, and RISCV64 (only x86 and ARMv7a).
supports_subzero = current_cpu != "arm64" && current_cpu != "mips64el" && current_cpu != "ppc64" && current_cpu != "riscv64" && current_cpu != "loong64"
}

declare_args() {
Expand Down
10 changes: 10 additions & 0 deletions third_party/SPIRV-Headers/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
14 changes: 7 additions & 7 deletions third_party/SPIRV-Headers/.github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Ubuntu packages
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y dos2unix
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
test_cmake_min_required:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.14.0
Expand All @@ -54,7 +54,7 @@ jobs:
test_cmake_latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: CMake build
run: |
Expand All @@ -64,7 +64,7 @@ jobs:
add_subdirectory:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
Expand All @@ -76,7 +76,7 @@ jobs:
find_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
Expand All @@ -92,7 +92,7 @@ jobs:
find_pkg_config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
Expand All @@ -109,7 +109,7 @@ jobs:
find_pkg_config_absolute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.15.0
Expand Down
6 changes: 6 additions & 0 deletions third_party/SPIRV-Headers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ filegroup(
srcs = ["include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json"],
)

filegroup(
name = "spirv_ext_inst_nonsemantic_vkspreflection_grammar_unified1",
srcs = ["include/spirv/unified1/extinst.nonsemantic.vkspreflection.grammar.json"],
)

filegroup(
name = "spirv_ext_inst_nonsemantic_debugprintf_grammar_unified1",
srcs = ["include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json"],
Expand Down Expand Up @@ -128,6 +133,7 @@ cc_library(
"include/spirv/unified1/GLSL.std.450.h",
"include/spirv/unified1/NonSemanticClspvReflection.h",
"include/spirv/unified1/NonSemanticDebugPrintf.h",
"include/spirv/unified1/NonSemanticVkspReflection.h",
"include/spirv/unified1/OpenCL.std.h",
],
includes = ["include"],
Expand Down
3 changes: 2 additions & 1 deletion third_party/SPIRV-Headers/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 Google LLC
# Copyright (c) 2020-2024 Google LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and/or associated documentation files (the "Materials"),
Expand Down Expand Up @@ -35,6 +35,7 @@ source_set("spv_headers") {
"include/spirv/unified1/GLSL.std.450.h",
"include/spirv/unified1/NonSemanticClspvReflection.h",
"include/spirv/unified1/NonSemanticDebugPrintf.h",
"include/spirv/unified1/NonSemanticVkspReflection.h",
"include/spirv/unified1/OpenCL.std.h",
"include/spirv/unified1/spirv.h",
"include/spirv/unified1/spirv.hpp",
Expand Down
14 changes: 8 additions & 6 deletions third_party/SPIRV-Headers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2015-2023 The Khronos Group Inc.
# Copyright (c) 2015-2024 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and/or associated documentation files (the
Expand Down Expand Up @@ -35,12 +35,14 @@ add_library(SPIRV-Headers INTERFACE)
add_library(SPIRV-Headers::SPIRV-Headers ALIAS SPIRV-Headers)
target_include_directories(SPIRV-Headers INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)

if (PROJECT_IS_TOP_LEVEL)
option(BUILD_TESTS "Build the tests")
if (BUILD_TESTS)
add_subdirectory(tests)
endif()
option(SPIRV_HEADERS_ENABLE_TESTS "Test SPIRV-Headers" ${PROJECT_IS_TOP_LEVEL})
option(SPIRV_HEADERS_ENABLE_INSTALL "Install SPIRV-Headers" ${PROJECT_IS_TOP_LEVEL})

if(SPIRV_HEADERS_ENABLE_TESTS)
add_subdirectory(tests)
endif()

if(SPIRV_HEADERS_ENABLE_INSTALL)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

Expand Down
80 changes: 79 additions & 1 deletion third_party/SPIRV-Headers/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2015-2018 The Khronos Group Inc.
Files: All files except for those called out below.
Copyright (c) 2015-2024 The Khronos Group Inc.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
Expand All @@ -23,3 +24,80 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

---

Files: include/spirv/spir-v.xml
Copyright (c) 2015-2024 The Khronos Group Inc.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.

THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

---

Files: tools/buildHeaders/jsoncpp/*
The JsonCpp library's source code, including accompanying documentation,
tests and demonstration applications, are licensed under the following
conditions...

The author (Baptiste Lepilleur) explicitly disclaims copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain.

In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
released under the terms of the MIT License (see below).

In jurisdictions which recognize Public Domain property, the user of this
software may choose to accept it either as 1) Public Domain, 2) under the
conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose.

The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at:

http://en.wikipedia.org/wiki/MIT_License

The full text of the MIT License follows:

========================================================================
Copyright (c) 2007-2010 Baptiste Lepilleur

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
========================================================================

---
2 changes: 1 addition & 1 deletion third_party/SPIRV-Headers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ python3 bin/makeExtinstHeaders.py
## License
<a name="license"></a>
```
Copyright (c) 2015-2018 The Khronos Group Inc.
Copyright (c) 2015-2024 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
Expand Down
13 changes: 13 additions & 0 deletions third_party/SPIRV-Headers/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Security Policy

## Supported Versions

Security updates are applied only to the latest release.

## Reporting a Vulnerability

If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.

Please disclose it at [security advisory](https://github.com/KhronosGroup/SPIRV-Headers/security/advisories/new).

This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
26 changes: 18 additions & 8 deletions third_party/SPIRV-Headers/include/spirv/spir-v.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<!--
Copyright (c) 2015 The Khronos Group Inc.
Copyright (c) 2015-2024 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
Expand Down Expand Up @@ -82,12 +82,19 @@
<id value="29" vendor="Mikkosoft Productions" tool="MSP Shader Compiler" comment="Contact Mikko Rasa, [email protected]"/>
<id value="30" vendor="SpvGenTwo community" tool="SpvGenTwo SPIR-V IR Tools" comment="https://github.com/rAzoR8/SpvGenTwo"/>
<id value="31" vendor="Google" tool="Skia SkSL" comment="Contact Ethan Nicholas, [email protected]"/>
<id value="32" vendor="TornadoVM" tool="SPIRV Beehive Toolkit" comment="https://github.com/beehive-lab/spirv-beehive-toolkit"/>
<id value="32" vendor="TornadoVM" tool="Beehive SPIRV Toolkit" comment="https://github.com/beehive-lab/beehive-spirv-toolkit"/>
<id value="33" vendor="DragonJoker" tool="ShaderWriter" comment="Contact Sylvain Doremus, https://github.com/DragonJoker/ShaderWriter"/>
<id value="34" vendor="Rayan Hatout" tool="SPIRVSmith" comment="Contact Rayan Hatout [email protected], Repo https://github.com/rayanht/SPIRVSmith"/>
<id value="35" vendor="Saarland University" tool="Shady" comment="Contact Hugo Devillers [email protected], Repo https://github.com/Hugobros3/shady"/>
<id value="36" vendor="Taichi Graphics" tool="Taichi" comment="Contact Rendong Liang [email protected], Repo https://github.com/taichi-dev/taichi"/>
<unused start="37" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
<id value="37" vendor="heroseh" tool="Hero C Compiler" comment="https://github.com/heroseh/hcc"/>
<id value="38" vendor="Meta" tool="SparkSL" comment="Contact Dunfan Lu, [email protected], https://sparkar.facebook.com/ar-studio/learn/sparksl/sparksl-overview"/>
<id value="39" vendor="SirLynix" tool="Nazara ShaderLang Compiler" comment="Contact Jérôme Leclercq, https://github.com/NazaraEngine/ShaderLang"/>
<id value="40" vendor="NVIDIA" tool="Slang Compiler" comment="Contact Theresa Foley, [email protected], https://github.com/shader-slang/slang/"/>
<id value="41" vendor="Zig Software Foundation" tool="Zig Compiler" comment="Contact Robin Voetter, https://github.com/Snektron"/>
<id value="42" vendor="Rendong Liang" tool="spq" comment="Contact Rendong Liang, [email protected], https://github.com/PENGUINLIONG/spq-rs"/>
<id value="43" vendor="LLVM" tool="LLVM SPIR-V Backend" comment="Contact Michal Paszkowski, [email protected], https://github.com/llvm/llvm-project/tree/main/llvm/lib/Target/SPIRV"/>
<unused start="44" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
</ids>

<!-- SECTION: SPIR-V Opcodes and Enumerants -->
Expand Down Expand Up @@ -143,6 +150,7 @@
<ids type="opcode" start="6464" end="6527" vendor="N/A" comment="Blank range to keep alignment with non-opcodes"/>
<ids type="opcode" start="6528" end="6591" vendor="Codeplay" comment="Contact [email protected]"/>
<ids type="opcode" start="6592" end="6655" vendor="Saarland University" comment="Contact [email protected]"/>
<ids type="opcode" start="6656" end="6719" vendor="Meta" comment="Contact [email protected]"/>
<!-- Opcode enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
Expand Down Expand Up @@ -175,6 +183,7 @@
<ids type="enumerant" start="6464" end="6527" vendor="Mikkosoft Productions" comment="Contact Mikko Rasa, [email protected]"/>
<ids type="enumerant" start="6528" end="6591" vendor="Codeplay" comment="Contact [email protected]"/>
<ids type="enumerant" start="6592" end="6655" vendor="Saarland University" comment="Contact [email protected]"/>
<ids type="enumerant" start="6656" end="6719" vendor="Meta" comment="Contact [email protected]"/>
<!-- Enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
Expand All @@ -201,8 +210,8 @@

<!-- Reserved loop control bits -->
<ids type="LoopControl" start="0" end="15" vendor="Khronos" comment="Reserved LoopControl bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="LoopControl" start="16" end="25" vendor="Intel" comment="Contact [email protected]"/>
<ids type="LoopControl" start="26" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="LoopControl" start="16" end="27" vendor="Intel" comment="Contact [email protected]"/>
<ids type="LoopControl" start="28" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="LoopControl" start="31" end="31" vendor="Khronos" comment="Reserved LoopControl bit, not available to vendors"/>


Expand Down Expand Up @@ -242,7 +251,8 @@
<!-- Reserved FP fast math mode bits -->
<ids type="FPFastMathMode" start="0" end="15" vendor="Khronos" comment="Reserved FPFastMathMode bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="FPFastMathMode" start="16" end="17" vendor="Intel" comment="Contact [email protected]"/>
<ids type="FPFastMathMode" start="18" end="31" comment="Unreserved bits reservable for use by vendors"/>
<ids type="FPFastMathMode" start="18" end="18" vendor="khronos" comment="Reserved FPFastMathMode bit, not available to vendors - see SPV_KHR_float_controls2"/>
<ids type="FPFastMathMode" start="19" end="31" comment="Unreserved bits reservable for use by vendors"/>


<!-- SECTION: SPIR-V Memory Operand Bit Reservations -->
Expand All @@ -261,8 +271,8 @@

<!-- Reserved memory operand bits -->
<ids type="MemoryOperand" start="0" end="15" vendor="Khronos" comment="Reserved MemoryOperand bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="MemoryOperand" start="16" end="17" vendor="Intel" comment="Contact [email protected]"/>
<ids type="MemoryOperand" start="18" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="MemoryOperand" start="16" end="18" vendor="Intel" comment="Contact [email protected]"/>
<ids type="MemoryOperand" start="19" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="MemoryOperand" start="31" end="31" vendor="Khronos" comment="Reserved MemoryOperand bit, not available to vendors"/>

<!-- SECTION: SPIR-V Image Operand Bit Reservations -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 The Khronos Group Inc.
// Copyright (c) 2020-2024 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 The Khronos Group Inc.
// Copyright (c) 2020-2024 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 The Khronos Group Inc.
// Copyright (c) 2020-2024 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 The Khronos Group Inc.
// Copyright (c) 2020-2024 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
Expand Down
Loading

0 comments on commit f08c7f6

Please sign in to comment.