diff --git a/README.md b/README.md index f4e5570336..4e2d75af57 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/docs/SPIRVVersionsAndExtensionsHandling.rst b/docs/SPIRVVersionsAndExtensionsHandling.rst index 90fd05e9e7..03f2c057ed 100644 --- a/docs/SPIRVVersionsAndExtensionsHandling.rst +++ b/docs/SPIRVVersionsAndExtensionsHandling.rst @@ -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 diff --git a/lib/SPIRV/SPIRVWriter.cpp b/lib/SPIRV/SPIRVWriter.cpp index ff742d480c..68fd75915d 100644 --- a/lib/SPIRV/SPIRVWriter.cpp +++ b/lib/SPIRV/SPIRVWriter.cpp @@ -6244,6 +6244,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; diff --git a/lib/SPIRV/libSPIRV/SPIRVErrorEnum.h b/lib/SPIRV/libSPIRV/SPIRVErrorEnum.h index 7819897f1e..16d39036e3 100644 --- a/lib/SPIRV/libSPIRV/SPIRVErrorEnum.h +++ b/lib/SPIRV/libSPIRV/SPIRVErrorEnum.h @@ -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.") diff --git a/tools/llvm-spirv/llvm-spirv.cpp b/tools/llvm-spirv/llvm-spirv.cpp index d847f3282c..210f645133 100644 --- a/tools/llvm-spirv/llvm-spirv.cpp +++ b/tools/llvm-spirv/llvm-spirv.cpp @@ -112,8 +112,7 @@ static cl::opt 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