compiler/spirv: add implementation to check for SpvCapabilityInt16 support
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 2 Mar 2018 10:08:52 +0000 (11:08 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 3 May 2018 09:40:26 +0000 (11:40 +0200)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index 53a0ef21f6f6891caad75a624197f22b0ba27ee0..afc53a88405a61822b705754934a06c43734e407 100644 (file)
@@ -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;
index 2a835f047e4ea48f942d06b3787addb9f28eec4d..78437428aa7a7bd2e7d312da25bf39ae52fe8450 100644 (file)
@@ -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: