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; }