From e364670e83437c72da57a287d023003f3d15d493 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 23 Sep 2022 13:47:41 +0200 Subject: [PATCH] radv: determine the last VGT api stage also for GPL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling the pre-rasterization stages, we need to know this. Signed-off-by: Samuel Pitoiset Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_pipeline.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 76d1ec0e51c..eebf5fea8de 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3962,10 +3962,17 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout radv_pipeline_load_retained_shaders(pipeline, stages); - if (pipeline->type == RADV_PIPELINE_GRAPHICS) { - struct radv_graphics_pipeline *graphics_pipeline = radv_pipeline_to_graphics(pipeline); + if (pipeline->type == RADV_PIPELINE_GRAPHICS || + pipeline->type == RADV_PIPELINE_GRAPHICS_LIB) { + VkShaderStageFlags active_stages; - radv_foreach_stage(s, graphics_pipeline->active_stages) { + if (pipeline->type == RADV_PIPELINE_GRAPHICS) { + active_stages = radv_pipeline_to_graphics(pipeline)->active_stages; + } else { + active_stages = radv_pipeline_to_graphics_lib(pipeline)->base.active_stages; + } + + radv_foreach_stage(s, active_stages) { if (s < MESA_SHADER_FRAGMENT || s == MESA_SHADER_MESH) *last_vgt_api_stage = s; }