From 564410045d812369a2c869476686ea8a19653a72 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: (cherry picked from commit 7b4bf219cc9dfa6320366e03d6055cdcbf5add5e) --- .pick_status.json | 2 +- src/gallium/drivers/r600/r600_shader.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index fb448c760dd..60c954637b0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -301,7 +301,7 @@ "description": "r600: Account for color and clipvertex when evaluating LDS space", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3340c7ce359252ad09b3e4d338837944482fb248" }, diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 4f88635e7e4..d68d7082653 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -740,9 +740,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.