r300g: fix r300g cause GPU hang issue.
authorCooper Yuan <cooperyuan@gmail.com>
Mon, 28 Sep 2009 09:55:38 +0000 (17:55 +0800)
committerCooper Yuan <cooperyuan@gmail.com>
Mon, 28 Sep 2009 09:55:38 +0000 (17:55 +0800)
why there are two input position semantic tags is that ureg doesn't
set vs input semantic due to commit: 6d8dbd3d1ec888

so use vs input index instead of semantic name.

src/gallium/drivers/r300/r300_state_derived.c

index 5026afc8308043e8711268973593e07df25221df..02b7ab91076ad6217b760d2ccfa22442b22ddb98 100644 (file)
@@ -50,12 +50,11 @@ static void r300_vs_tab_routes(struct r300_context* r300,
 
     assert(info->num_inputs <= 16);
 
-    if (!r300screen->caps->has_tcl)
+    if (!r300screen->caps->has_tcl || !r300->rs_state->enable_vte)
     {
         for (i = 0; i < info->num_inputs; i++) {
-            switch (info->input_semantic_name[i]) {
+            switch (r300->vs->code.inputs[i]) {
                 case TGSI_SEMANTIC_POSITION:
-                    assert(pos == FALSE);
                     pos = TRUE;
                     tab[i] = 0;
                     break;