aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktoria Maximova <viktoria.maksimova@intel.com>2024-02-28 19:58:09 +0100
committerGitHub <noreply@github.com>2024-02-28 13:58:09 -0500
commit0b027bafa54dba4e3f41c679ba0d45d6e514c4d5 (patch)
tree4ea5629be025415af3d3b0af48812fda3425dfc4
parentfbc7a14b3e5e494113a464bbfafc48b94516446a (diff)
downloadSPIRV-Tools-0b027bafa54dba4e3f41c679ba0d45d6e514c4d5.tar.gz
Support operand kind for SPV_INTEL_maximum_registers (#5580)
* Support operand kind for SPV_INTEL_maximum_registers * improvements * Update DEPS
-rw-r--r--DEPS2
-rw-r--r--include/spirv-tools/libspirv.h2
-rw-r--r--source/binary.cpp3
-rw-r--r--source/operand.cpp3
-rw-r--r--source/val/validate_mode_setting.cpp1
5 files changed, 9 insertions, 2 deletions
diff --git a/DEPS b/DEPS
index 323728a3..01960700 100644
--- a/DEPS
+++ b/DEPS
@@ -13,7 +13,7 @@ vars = {
'protobuf_revision': 'v21.12',
're2_revision': 'ed9fc269e2fdb299afe59e912928d31ad3fdcf7d',
- 'spirv_headers_revision': '05cc486580771e4fa7ddc89f5c9ee1e97382689a',
+ 'spirv_headers_revision': 'b73e168ca5e123dcf3dea8a34b19a5130f421ae1',
}
deps = {
diff --git a/include/spirv-tools/libspirv.h b/include/spirv-tools/libspirv.h
index abdfc15d..923e85f8 100644
--- a/include/spirv-tools/libspirv.h
+++ b/include/spirv-tools/libspirv.h
@@ -301,6 +301,8 @@ typedef enum spv_operand_type_t {
SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL,
// Enum type from SPV_INTEL_cache_controls
SPV_OPERAND_TYPE_STORE_CACHE_CONTROL,
+ // Enum type from SPV_INTEL_maximum_registers
+ SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS,
// This is a sentinel value, and does not represent an operand type.
// It should come last.
diff --git a/source/binary.cpp b/source/binary.cpp
index 3cfdee04..cc7d242b 100644
--- a/source/binary.cpp
+++ b/source/binary.cpp
@@ -670,7 +670,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_QUANTIZATION_MODES:
case SPV_OPERAND_TYPE_OVERFLOW_MODES:
case SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT:
- case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT: {
+ case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT:
+ case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: {
// A single word that is a plain enum value.
// Map an optional operand type to its corresponding concrete type.
diff --git a/source/operand.cpp b/source/operand.cpp
index 6577f8f7..1762e635 100644
--- a/source/operand.cpp
+++ b/source/operand.cpp
@@ -220,6 +220,8 @@ const char* spvOperandTypeStr(spv_operand_type_t type) {
return "load cache control";
case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL:
return "store cache control";
+ case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS:
+ return "named maximum number of registers";
case SPV_OPERAND_TYPE_IMAGE:
case SPV_OPERAND_TYPE_OPTIONAL_IMAGE:
return "image";
@@ -360,6 +362,7 @@ bool spvOperandIsConcrete(spv_operand_type_t type) {
case SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER:
case SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL:
case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL:
+ case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS:
return true;
default:
break;
diff --git a/source/val/validate_mode_setting.cpp b/source/val/validate_mode_setting.cpp
index 82c6c3f0..199d8ed4 100644
--- a/source/val/validate_mode_setting.cpp
+++ b/source/val/validate_mode_setting.cpp
@@ -346,6 +346,7 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _,
case spv::ExecutionMode::LocalSizeHintId:
case spv::ExecutionMode::LocalSizeId:
case spv::ExecutionMode::FPFastMathDefault:
+ case spv::ExecutionMode::MaximumRegistersIdINTEL:
valid_mode = true;
break;
default: