radv: Use vk_physical_device_get_spirv_capabilities()

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-25 04:11:33 -05:00
committed by Marge Bot
parent ce2946ae0f
commit ac500495ac

View File

@@ -339,80 +339,14 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st
.device = device,
.object = stage->spirv.object,
};
const bool has_fragment_shader_interlock = radv_has_pops(pdev);
const struct spirv_capabilities spirv_caps =
vk_physical_device_get_spirv_capabilities(device->vk.physical);
const struct spirv_to_nir_options spirv_options = {
.amd_gcn_shader = true,
.amd_shader_ballot = true,
.amd_shader_explicit_vertex_parameter = true,
.amd_trinary_minmax = true,
.caps =
{
.amd_fragment_mask = true,
.amd_image_gather_bias_lod = true,
.amd_image_read_write_lod = true,
.demote_to_helper_invocation = true,
.derivative_group = true,
.descriptor_array_dynamic_indexing = true,
.descriptor_array_non_uniform_indexing = true,
.descriptor_indexing = true,
.device_group = true,
.draw_parameters = true,
.float_controls = true,
.float16 = pdev->info.has_packed_math_16bit,
.float32_atomic_add = true,
.float32_atomic_min_max = true,
.float64 = true,
.float64_atomic_min_max = true,
.fragment_barycentric = true,
.fragment_fully_covered = true,
.fragment_shader_pixel_interlock = has_fragment_shader_interlock,
.fragment_shader_sample_interlock = has_fragment_shader_interlock,
.geometry_streams = true,
.groups = true,
.image_atomic_int64 = true,
.image_ms_array = true,
.image_read_without_format = true,
.image_write_without_format = true,
.int8 = true,
.int16 = true,
.int64 = true,
.int64_atomics = true,
.integer_functions2 = true,
.mesh_shading = true,
.min_lod = true,
.multiview = true,
.physical_storage_buffer_address = true,
.post_depth_coverage = true,
.quad_control = true,
.ray_cull_mask = true,
.ray_query = true,
.ray_tracing = true,
.ray_tracing_position_fetch = true,
.ray_traversal_primitive_culling = true,
.runtime_descriptor_array = true,
.shader_clock = true,
.shader_viewport_index_layer = true,
.sparse_residency = true,
.stencil_export = true,
.storage_8bit = true,
.storage_16bit = true,
.storage_image_ms = true,
.subgroup_arithmetic = true,
.subgroup_ballot = true,
.subgroup_basic = true,
.subgroup_quad = true,
.subgroup_rotate = true,
.subgroup_shuffle = true,
.subgroup_vote = true,
.tessellation = true,
.transform_feedback = true,
.variable_pointers = true,
.vk_memory_model = true,
.vk_memory_model_device_scope = true,
.fragment_shading_rate = pdev->info.gfx_level >= GFX10_3,
.workgroup_memory_explicit_layout = true,
.cooperative_matrix = true,
},
.capabilities = &spirv_caps,
.ubo_addr_format = nir_address_format_vec2_index_32bit_offset,
.ssbo_addr_format = nir_address_format_vec2_index_32bit_offset,
.phys_ssbo_addr_format = nir_address_format_64bit_global,