radv: keep track of descriptor heap mapping in the shader layout

This will be used by the common lowering.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
This commit is contained in:
Samuel Pitoiset 2025-06-26 12:29:46 +02:00 committed by Marge Bot
parent cebac5a427
commit eac2c1f141
3 changed files with 10 additions and 0 deletions

View file

@ -219,6 +219,10 @@ radv_pipeline_stage_init(VkPipelineCreateFlags2 pipeline_flags, const VkPipeline
out_stage->spirv.size = minfo->codeSize;
}
const VkShaderDescriptorSetAndBindingMappingInfoEXT *mapping =
vk_find_struct_const(sinfo->pNext, SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT);
out_stage->layout.mapping = mapping;
radv_shader_layout_init(pipeline_layout, out_stage->stage, &out_stage->layout);
vk_pipeline_hash_shader_stage(pipeline_flags, sinfo, NULL, out_stage->shader_blake3);

View file

@ -263,6 +263,8 @@ struct radv_shader_layout {
bool use_dynamic_descriptors;
bool independent_sets;
const VkShaderDescriptorSetAndBindingMappingInfoEXT *mapping;
};
struct radv_shader_stage {

View file

@ -96,6 +96,10 @@ radv_shader_stage_init(const VkShaderCreateInfoEXT *sinfo, struct radv_shader_st
radv_get_shader_layout(sinfo, &out_stage->layout);
const VkShaderDescriptorSetAndBindingMappingInfoEXT *mapping =
vk_find_struct_const(sinfo->pNext, SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT);
out_stage->layout.mapping = mapping;
const VkShaderRequiredSubgroupSizeCreateInfoEXT *const subgroup_size =
vk_find_struct_const(sinfo->pNext, SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT);