From d2b9e216893914228eb5d34e08bee70f46c3a9fb Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 10 Apr 2024 17:33:58 +0200 Subject: [PATCH] radv: simplify the check for exporting multiview in the last VGT stage Checking for the lib flags is unnecessary because in this case next_stage is NONE and it's already handled correctly by the helper. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_pipeline_graphics.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 953f9feb2cb..7e65f9b5877 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -1136,11 +1136,9 @@ radv_should_export_multiview(const struct radv_shader_stage *stage, const struct { /* Export the layer in the last VGT stage if multiview is used. * Also checks for NONE stage, which happens when we have depth-only rendering. - * When the next stage is unknown (with graphics pipeline library), the layer is exported unconditionally. + * When the next stage is unknown (with GPL or ESO), the layer is exported unconditionally. */ - return gfx_state->has_multiview_view_index && - (stage->info.next_stage == MESA_SHADER_FRAGMENT || stage->info.next_stage == MESA_SHADER_NONE || - !(gfx_state->lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT)) && + return gfx_state->has_multiview_view_index && radv_is_last_vgt_stage(stage) && !(stage->nir->info.outputs_written & VARYING_BIT_LAYER); }