aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2018-03-14 13:06:18 -0400
committerDavid Neto <dneto@google.com>2018-03-17 15:25:26 -0400
commit1ef6b192602129d112112eb2e611a27e7b3cc6e7 (patch)
tree6a07a96edb6b87e7dcbe619aeba95d8bbee2785d /include
parent844e186cf7382df84684bf6afbf5b412641d8e47 (diff)
downloadspirv-tools-1ef6b192602129d112112eb2e611a27e7b3cc6e7.tar.gz
Migrate to use unified grammar tables
Previously we keep a separate static grammar table for opcodes/ operands per SPIR-V version. This commit changes that to use a single unified static grammar table for opcodes/operands. This essentially changes how grammar facts are queried against a certain target environment. There are only limited filtering according to the desired target environment; a symbol is considered as available as long as: 1. The target environment satisfies the minimal requirement of the symbol; or 2. There is at least one extension enabling this symbol. Note that the second rule assumes the extension enabling the symbol is indeed requested in the SPIR-V code; checking that should be the validator's work. Also fixed a few grammar related issues: * Rounding mode capability requirements are moved to client APIs. * Reserved symbols not available in any extension is no longer recognized by assembler.
Diffstat (limited to 'include')
-rw-r--r--include/spirv-tools/libspirv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/spirv-tools/libspirv.h b/include/spirv-tools/libspirv.h
index 948a6722..a1c8f7d2 100644
--- a/include/spirv-tools/libspirv.h
+++ b/include/spirv-tools/libspirv.h
@@ -73,6 +73,7 @@ typedef enum spv_result_t {
SPV_ERROR_INVALID_CAPABILITY = -13,
SPV_ERROR_INVALID_DATA = -14, // Indicates data rules validation failure.
SPV_ERROR_MISSING_EXTENSION = -15,
+ SPV_ERROR_WRONG_VERSION = -16, // Indicates wrong SPIR-V version
SPV_FORCE_32_BIT_ENUM(spv_result_t)
} spv_result_t;