diff options
author | Jason Ekstrand <[email protected]> | 2019-01-19 10:23:28 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-26 13:41:50 -0600 |
commit | 86e5f76d3d5a5608861813c051af2af4c075e814 (patch) | |
tree | 9538236d485eb99aabfa10335bc386a22ca3b42d /src/compiler/spirv/spirv_to_nir.c | |
parent | fb282a68bc46a1e28eaedb2670be241401f2b9da (diff) |
spirv: Add support for SPV_EXT_physical_storage_buffer
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 022a90eff7e..9bfe5805919 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -1308,6 +1308,9 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode, case SpvStorageClassStorageBuffer: val->type->type = b->options->ssbo_ptr_type; break; + case SpvStorageClassPhysicalStorageBufferEXT: + val->type->type = b->options->phys_ssbo_ptr_type; + break; case SpvStorageClassPushConstant: val->type->type = b->options->push_const_ptr_type; break; @@ -3718,6 +3721,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, spv_check_supported(post_depth_coverage, cap); break; + case SpvCapabilityPhysicalStorageBufferAddressesEXT: + spv_check_supported(physical_storage_buffer_address, cap); + break; + default: vtn_fail("Unhandled capability"); } @@ -3729,7 +3736,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, break; case SpvOpMemoryModel: - vtn_assert(w[1] == SpvAddressingModelLogical); + vtn_assert(w[1] == SpvAddressingModelLogical || + (b->options && + b->options->caps.physical_storage_buffer_address && + w[1] == SpvAddressingModelPhysicalStorageBuffer64EXT)); vtn_assert(w[2] == SpvMemoryModelSimple || w[2] == SpvMemoryModelGLSL450); break; |