radv: add radv_shader_stage::next_stage field
This allows to init radv_shader_info correctly when the next stage is known, this is mostly for ESO. Though, next_stage could be used in other places too. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
This commit is contained in:

committed by
Marge Bot

parent
a12019cc91
commit
1dbb859b3b
@@ -227,6 +227,7 @@ radv_pipeline_stage_init(const VkPipelineShaderStageCreateInfo *sinfo,
|
||||
memset(out_stage, 0, sizeof(*out_stage));
|
||||
|
||||
out_stage->stage = vk_to_mesa_shader_stage(sinfo->stage);
|
||||
out_stage->next_stage = MESA_SHADER_NONE;
|
||||
out_stage->entrypoint = sinfo->pName;
|
||||
out_stage->spec_info = sinfo->pSpecializationInfo;
|
||||
out_stage->feedback.flags = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT;
|
||||
|
@@ -2505,7 +2505,13 @@ radv_graphics_shaders_compile(struct radv_device *device, struct vk_pipeline_cac
|
||||
|
||||
radv_foreach_stage(i, active_nir_stages)
|
||||
{
|
||||
gl_shader_stage next_stage = radv_get_next_stage(i, active_nir_stages);
|
||||
gl_shader_stage next_stage;
|
||||
|
||||
if (stages[i].next_stage != MESA_SHADER_NONE) {
|
||||
next_stage = stages[i].next_stage;
|
||||
} else {
|
||||
next_stage = radv_get_next_stage(i, active_nir_stages);
|
||||
}
|
||||
|
||||
radv_nir_shader_info_init(i, next_stage, &stages[i].info);
|
||||
}
|
||||
@@ -2638,6 +2644,7 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline, const Vk
|
||||
stages[i].entrypoint = NULL;
|
||||
stages[i].nir = NULL;
|
||||
stages[i].spirv.size = 0;
|
||||
stages[i].next_stage = MESA_SHADER_NONE;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {
|
||||
|
@@ -2285,6 +2285,7 @@ struct radv_shader_layout {
|
||||
|
||||
struct radv_shader_stage {
|
||||
gl_shader_stage stage;
|
||||
gl_shader_stage next_stage;
|
||||
|
||||
struct {
|
||||
const struct vk_object_base *object;
|
||||
|
Reference in New Issue
Block a user