[Mesa-dev] [PATCH 09/47] spirv/nir: Add support for SPV_KHR_16bit_storage

Alejandro PiƱeiro apinheiro at igalia.com
Thu Aug 24 13:54:24 UTC 2017


From: Eduardo Lima Mitev <elima at igalia.com>

v2: Minor changes after rebase against recent master (Alejandro
    Pinheiro)
---
 src/compiler/spirv/nir_spirv.h    | 1 +
 src/compiler/spirv/spirv_to_nir.c | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
index 83577fb5d23..be7f536fe4a 100644
--- a/src/compiler/spirv/nir_spirv.h
+++ b/src/compiler/spirv/nir_spirv.h
@@ -52,6 +52,7 @@ struct nir_spirv_supported_extensions {
    bool int64;
    bool multiview;
    bool variable_pointers;
+   bool storage_16bit;
 };
 
 nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index abeb5a22d03..d1ba4fac15c 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2821,6 +2821,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:
          unreachable("Unhandled capability");
       }
-- 
2.11.0



More information about the mesa-dev mailing list