radeonsi: fix broken st/nine from merging tessellation
authorMarek Olšák <marek.olsak@amd.com>
Sun, 26 Jul 2015 19:08:18 +0000 (21:08 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 31 Jul 2015 14:49:17 +0000 (16:49 +0200)
st/nine uses GENERIC slots greater than 60.

src/gallium/drivers/radeonsi/si_shader.c

index 4151e011d582664f3aa652b21b5d293f97d9ca18..92382e85985b5f8ceeed58165852231d7589d3cf 100644 (file)
@@ -136,8 +136,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: