Skip to content

Commit

Permalink
[SPIR-V 1.5] Move the version to supported
Browse files Browse the repository at this point in the history
Original commit: a104311
  • Loading branch information
vmaksimo authored and MrSidims committed May 26, 2024
1 parent 322f162 commit 0f9ad66
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ the version of the SPIR-V file which is being generated/consumed.
the input file and emit an error if the SPIR-V version in it is higher than
one specified via this option.

Allowed values are `1.0`, `1.1`, `1.2`, `1.3`, and `1.4`.
Allowed values are `1.0`, `1.1`, `1.2`, `1.3`, `1.4`, and `1.5`.

More information can be found in
[SPIR-V versions and extensions handling](docs/SPIRVVersionsAndExtensionsHandling.rst)
Expand Down
2 changes: 1 addition & 1 deletion docs/SPIRVVersionsAndExtensionsHandling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ the version of the SPIR-V file which is being generated/consumed.
one exception: resulting SPIR-V version cannot be raised higher than
specified by this option.

Allowed values are ``1.0``, ``1.1``, ``1.2``, ``1.3``, and ``1.4``.
Allowed values are ``1.0``, ``1.1``, ``1.2``, ``1.3``, ``1.4``, and ``1.5``.

.. warning::
These two options are mutually exclusive and cannot be specified at the
Expand Down
2 changes: 2 additions & 0 deletions lib/SPIRV/SPIRVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5771,6 +5771,8 @@ VersionNumber getVersionFromTriple(const Triple &TT, SPIRVErrorLog &ErrorLog) {
return VersionNumber::SPIRV_1_3;
case Triple::SPIRVSubArch_v14:
return VersionNumber::SPIRV_1_4;
case Triple::SPIRVSubArch_v15:
return VersionNumber::SPIRV_1_5;
default:
ErrorLog.checkError(false, SPIRVEC_InvalidSubArch, TT.getArchName().str());
return VersionNumber::MaximumVersion;
Expand Down
2 changes: 1 addition & 1 deletion lib/SPIRV/libSPIRV/SPIRVErrorEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
_SPIRV_OP(Success, "")
_SPIRV_OP(InvalidTargetTriple,
"Expects spir-unknown-unknown or spir64-unknown-unknown.")
_SPIRV_OP(InvalidSubArch, "Expecting v1.0-v1.4.")
_SPIRV_OP(InvalidSubArch, "Expecting v1.0-v1.5.")
_SPIRV_OP(TripleMaxVersionIncompatible,
"Triple version and maximum version are incompatible.")
_SPIRV_OP(InvalidAddressingModel, "Expects 0-2.")
Expand Down
3 changes: 1 addition & 2 deletions tools/llvm-spirv/llvm-spirv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ static cl::opt<VersionNumber> MaxSPIRVVersion(
clEnumValN(VersionNumber::SPIRV_1_2, "1.2", "SPIR-V 1.2"),
clEnumValN(VersionNumber::SPIRV_1_3, "1.3", "SPIR-V 1.3"),
clEnumValN(VersionNumber::SPIRV_1_4, "1.4", "SPIR-V 1.4"),
clEnumValN(VersionNumber::SPIRV_1_5, "1.5",
"SPIR-V 1.5 (experimental)")),
clEnumValN(VersionNumber::SPIRV_1_5, "1.5", "SPIR-V 1.5")),
cl::init(VersionNumber::MaximumVersion));

static cl::list<std::string>
Expand Down

0 comments on commit 0f9ad66

Please sign in to comment.