spirv/nir: Add support for SPV_KHR_16bit_storage
authorEduardo Lima Mitev <elima@igalia.com>
Sat, 1 Jul 2017 06:02:45 +0000 (08:02 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Wed, 6 Dec 2017 07:57:18 +0000 (08:57 +0100)
v2: Minor changes after rebase against recent master (Alejandro
    Pinheiro)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv_to_nir.c

index eb7146cb89de088a9a86386023d48b1806e7d39b..43ec19d5a50954223fdea339fdafc5ca28ef6b6e 100644 (file)
@@ -67,6 +67,7 @@ struct spirv_to_nir_options {
       bool int64;
       bool multiview;
       bool variable_pointers;
+      bool storage_16bit;
    } caps;
 
    struct {
index cde6481ef0d17a026ab4173cc4b2c4993cb4bde3..d321d1a30d7ac0a935a4a6af22e38424d2ee15be 100644 (file)
@@ -3073,6 +3073,13 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(variable_pointers, cap);
          break;
 
+      case SpvCapabilityStorageUniformBufferBlock16:
+      case SpvCapabilityStorageUniform16:
+      case SpvCapabilityStoragePushConstant16:
+      case SpvCapabilityStorageInputOutput16:
+         spv_check_supported(storage_16bit, cap);
+         break;
+
       default:
          vtn_fail("Unhandled capability");
       }