[Mesa-dev] [PATCH 15/18] radeonsi: fix broken st/nine from merging tessellation

Marek Olšák maraeo at gmail.com
Tue Jul 28 03:05:50 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

st/nine uses GENERIC slots greater than 60.
---
 src/gallium/drivers/radeonsi/si_shader.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 2239d96..4e4f766 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -135,8 +135,13 @@ unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index)
 		assert(index <= 1);
 		return 2 + index;
 	case TGSI_SEMANTIC_GENERIC:
-		assert(index <= 63-4);
-		return 4 + index;
+		if (index <= 63-4)
+			return 4 + index;
+		else
+			/* same explanation as in the default statement,
+			 * the only user hitting this is st/nine.
+			 */
+			return 0;
 
 	/* patch indices are completely separate and thus start from 0 */
 	case TGSI_SEMANTIC_TESSOUTER:
-- 
2.1.4



More information about the mesa-dev mailing list