From 32bc466dcbcf0cc584a0afaa7702413b30c28de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Thu, 28 Oct 2021 16:50:06 +0200 Subject: [PATCH] radv: Add radv_pipeline_has_mesh helper. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be used to determine whether a pipeline uses mesh shading or not. Signed-off-by: Timur Kristóf Acked-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_private.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 4226640ae70..b1998ea5ffd 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1920,6 +1920,12 @@ radv_pipeline_has_tess(const struct radv_pipeline *pipeline) return pipeline->shaders[MESA_SHADER_TESS_CTRL] ? true : false; } +static inline bool +radv_pipeline_has_mesh(const struct radv_pipeline *pipeline) +{ + return !!pipeline->shaders[MESA_SHADER_MESH]; +} + bool radv_pipeline_has_ngg_passthrough(const struct radv_pipeline *pipeline); bool radv_pipeline_has_gs_copy_shader(const struct radv_pipeline *pipeline);