Mesa (master): compiler/spirv: add implementation to check for SpvCapabilityInt16 support

Iago Toral Quiroga itoral at kemper.freedesktop.org
Thu May 3 09:57:24 UTC 2018


Module: Mesa
Branch: master
Commit: f07c05576f3e4cba77d299d8a0f2946a0ab9f0b9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f07c05576f3e4cba77d299d8a0f2946a0ab9f0b9

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Fri Mar  2 11:08:52 2018 +0100

compiler/spirv: add implementation to check for SpvCapabilityInt16 support

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/compiler/shader_info.h        | 1 +
 src/compiler/spirv/spirv_to_nir.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 53a0ef21f6..afc53a8840 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -44,6 +44,7 @@ struct spirv_supported_capabilities {
    bool multiview;
    bool variable_pointers;
    bool storage_16bit;
+   bool int16;
    bool shader_viewport_index_layer;
    bool subgroup_arithmetic;
    bool subgroup_ballot;
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 2a835f047e..78437428aa 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3281,7 +3281,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityFloat16:
       case SpvCapabilityInt64Atomics:
       case SpvCapabilityAtomicStorage:
-      case SpvCapabilityInt16:
       case SpvCapabilityStorageImageMultisample:
       case SpvCapabilityInt8:
       case SpvCapabilitySparseResidency:
@@ -3297,6 +3296,9 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityInt64:
          spv_check_supported(int64, cap);
          break;
+      case SpvCapabilityInt16:
+         spv_check_supported(int16, cap);
+         break;
 
       case SpvCapabilityAddresses:
       case SpvCapabilityKernel:




More information about the mesa-commit mailing list