From a104311e5ac8f76854fb09e76133b0af4d20c314 Mon Sep 17 00:00:00 2001 From: Viktoria Maximova Date: Tue, 16 Apr 2024 16:03:18 +0200 Subject: [PATCH] [SPIR-V 1.5] Move the version to supported (#2497) --- README.md | 2 +- docs/SPIRVVersionsAndExtensionsHandling.rst | 2 +- lib/SPIRV/SPIRVWriter.cpp | 2 ++ lib/SPIRV/libSPIRV/SPIRVErrorEnum.h | 2 +- tools/llvm-spirv/llvm-spirv.cpp | 3 +-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 65480436ba..0a06f53cf5 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,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 1b1418f85c..619bf608be 100644 --- a/lib/SPIRV/SPIRVWriter.cpp +++ b/lib/SPIRV/SPIRVWriter.cpp @@ -6673,6 +6673,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 7a7f76df95..bd9c020a7a 100644 --- a/lib/SPIRV/libSPIRV/SPIRVErrorEnum.h +++ b/lib/SPIRV/libSPIRV/SPIRVErrorEnum.h @@ -2,7 +2,7 @@ _SPIRV_OP(Success, "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 35a7c4d7c0..59a01a81e4 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