fix debug output mising from edgeflag changes
authorRoland Scheidegger <sroland@vmware.com>
Fri, 18 Dec 2009 15:09:32 +0000 (16:09 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 18 Dec 2009 15:09:32 +0000 (16:09 +0100)
src/mesa/state_tracker/st_mesa_to_tgsi.c
src/mesa/state_tracker/st_program.c

index 7b334e21d2362d57c21fac42553496a8b31a8a68..5c9be46a776fffe6fe02f320e73577b8742ba091 100644 (file)
@@ -918,13 +918,6 @@ out:
       debug_printf("%s: translate error flag set\n", __FUNCTION__);
    }
 
-/* ???
-   if (!tokens) {
-      debug_printf("%s: failed to translate Mesa program:\n", __FUNCTION__);
-      _mesa_print_program(program);
-      debug_assert(0);
-   }
-*/
    return PIPE_ERROR_OUT_OF_MEMORY;
 }
 
index fcc04782de25ff6f62d613490364e7b0ceb82e1a..feaac013c1a6f864a4ac220334d2fbd36d8b540c 100644 (file)
@@ -236,6 +236,9 @@ st_translate_vertex_program(struct st_context *st,
       goto fail;
 
    vpv->state.tokens = ureg_get_tokens( ureg, NULL );
+   if (!vpv->state.tokens)
+      goto fail;
+
    ureg_destroy( ureg );
 
    vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->state);
@@ -253,6 +256,10 @@ st_translate_vertex_program(struct st_context *st,
    return vpv;
 
 fail:
+   debug_printf("%s: failed to translate Mesa program:\n", __FUNCTION__);
+   _mesa_print_program(&stvp->Base.Base);
+   debug_assert(0);
+
    ureg_destroy( ureg );
    return NULL;
 }