vulkan: Set SPIR-V caps from supported features

Any drivers which use vk_spirv_to_nir() now no longer need to build a
caps table manually.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905>
This commit is contained in:
Faith Ekstrand
2024-04-24 11:45:55 -05:00
committed by Marge Bot
parent 1759c0eba7
commit ce2946ae0f
9 changed files with 8 additions and 264 deletions
-19
View File
@@ -161,25 +161,6 @@ v3dv_DestroyPipeline(VkDevice _device,
}
static const struct spirv_to_nir_options default_spirv_options = {
.caps = {
.device_group = true,
.float_controls = true,
.multiview = true,
.storage_8bit = true,
.storage_16bit = true,
.subgroup_ballot = true,
.subgroup_basic = true,
.subgroup_quad = true,
.subgroup_shuffle = true,
.subgroup_vote = true,
.variable_pointers = true,
.vk_memory_model = true,
.vk_memory_model_device_scope = true,
.physical_storage_buffer_address = true,
.workgroup_memory_explicit_layout = true,
.image_read_without_format = true,
.demote_to_helper_invocation = true,
},
.ubo_addr_format = nir_address_format_32bit_index_offset,
.ssbo_addr_format = nir_address_format_32bit_index_offset,
.phys_ssbo_addr_format = nir_address_format_2x32bit_global,