From 56a437183ac9a6c3436503fabcde82201e70bbb7 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Tue, 6 May 2025 17:03:53 +0800 Subject: [PATCH] radeonsi: si_get_vs support mesh shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_pipe.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 9c3e5e80df4..fd07d7f21b6 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -1882,8 +1882,14 @@ si_get_api_vs_inline(struct si_context *sctx, enum amd_gfx_level gfx_level, static inline struct si_shader_ctx_state *si_get_vs(struct si_context *sctx) { - return si_get_vs_inline(sctx, sctx->shader.tes.cso ? TESS_ON : TESS_OFF, - sctx->shader.gs.cso ? GS_ON : GS_OFF); + if (sctx->shader.gs.cso) + return &sctx->shader.gs; + else if (sctx->shader.tes.cso) + return &sctx->shader.tes; + else if (sctx->shader.vs.cso) + return &sctx->shader.vs; + else + return &sctx->ms_shader_state; } static inline bool si_get_strmout_en(struct si_context *sctx)