summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2017-07-01 08:02:45 +0200
committerJose Maria Casanova Crespo <[email protected]>2017-12-06 08:57:18 +0100
commit4049c041221e614c64641fcbeb5b396fd3daa507 (patch)
tree8ef2045561614296db6b66e8f982a1d49d3442ba /src/compiler
parente0667a8bd8029936aed5b97b5ceef7c58526e53c (diff)
spirv/nir: Add support for SPV_KHR_16bit_storage
v2: Minor changes after rebase against recent master (Alejandro Pinheiro) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/nir_spirv.h1
-rw-r--r--src/compiler/spirv/spirv_to_nir.c7
2 files changed, 8 insertions, 0 deletions
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");
}