From 4049c041221e614c64641fcbeb5b396fd3daa507 Mon Sep 17 00:00:00 2001 From: Eduardo Lima Mitev Date: Sat, 1 Jul 2017 08:02:45 +0200 Subject: [PATCH] spirv/nir: Add support for SPV_KHR_16bit_storage v2: Minor changes after rebase against recent master (Alejandro Pinheiro) Reviewed-by: Jason Ekstrand --- 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 eb7146cb89d..43ec19d5a50 100644 --- a/src/compiler/spirv/nir_spirv.h +++ b/src/compiler/spirv/nir_spirv.h @@ -67,6 +67,7 @@ struct spirv_to_nir_options { bool int64; bool multiview; bool variable_pointers; + bool storage_16bit; } caps; struct { diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index cde6481ef0d..d321d1a30d7 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -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"); } -- 2.30.2