From 0a418561dab43a41f21ab209367f88c2ed9eb4a5 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 11 Oct 2023 14:46:20 +0100 Subject: [PATCH] radv: skip radv_remove_varyings for mesh shaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes compilation of a Talos Principle 2 shader. Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Fixes: 9fa9782c1790 ("radv: stop compiling a noop FS when the application doesn't provide a FS") Part-of: --- src/amd/vulkan/radv_pipeline_graphics.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 9b648dbc7c2..72ed9697f13 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -1627,6 +1627,12 @@ radv_pipeline_needs_noop_fs(struct radv_graphics_pipeline *pipeline, const struc static void radv_remove_varyings(nir_shader *nir) { + /* We can't demote mesh outputs to nir_var_shader_temp yet, because + * they don't support array derefs of vectors. + */ + if (nir->info.stage == MESA_SHADER_MESH) + return; + bool fixup_derefs = false; nir_foreach_shader_out_variable (var, nir) {