From 7b3aae89126dcdce4ec364fe0329a533c736d105 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 10 Oct 2022 16:11:50 +0200 Subject: [PATCH] radv: do not create a noop FS when the FS is imported from a library The entrypoint can be NULL even if the FS is imported from a library, but we shouldn't overwrite the pre-compiled FS by a noop. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 7b3229b6a92..96971e93145 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -4079,7 +4079,8 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout goto done; } - if (pipeline->type == RADV_PIPELINE_GRAPHICS && !stages[MESA_SHADER_FRAGMENT].entrypoint) { + if (pipeline->type == RADV_PIPELINE_GRAPHICS && + !(radv_pipeline_to_graphics(pipeline)->active_stages & VK_SHADER_STAGE_FRAGMENT_BIT)) { nir_builder fs_b = radv_meta_init_shader(device, MESA_SHADER_FRAGMENT, "noop_fs"); stages[MESA_SHADER_FRAGMENT] = (struct radv_pipeline_stage) {