From 7b4bf219cc9dfa6320366e03d6055cdcbf5add5e Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 25 Oct 2022 17:41:15 +0200 Subject: [PATCH] r600: Account for color and clipvertex when evaluating LDS space Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6926 Fixes: 3340c7ce359252ad09b3e4d338837944482fb248 r600/sfn: lower CLIPVERTEX to clip planes Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/r600_shader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 86a74a73713..a6b9f94f9cb 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -741,9 +741,15 @@ int r600_get_lds_unique_index(unsigned semantic_name, unsigned index) return 2 + index; case TGSI_SEMANTIC_TEXCOORD: return 4 + index; + case TGSI_SEMANTIC_COLOR: + return 12 + index; + case TGSI_SEMANTIC_BCOLOR: + return 14 + index; + case TGSI_SEMANTIC_CLIPVERTEX: + return 16; case TGSI_SEMANTIC_GENERIC: - if (index <= 63-4) - return 4 + index; + if (index <= 63-17) + return 17 + index; else /* same explanation as in the default statement, * the only user hitting this is st/nine.