Mesa (gallium-edgeflags): fix debug output mising from edgeflag changes

Roland Scheidegger sroland at kemper.freedesktop.org
Fri Dec 18 07:37:36 PST 2009


Module: Mesa
Branch: gallium-edgeflags
Commit: 9d938e29f202552a98605906b71f31485af1ef60
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d938e29f202552a98605906b71f31485af1ef60

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Fri Dec 18 16:09:32 2009 +0100

fix debug output mising from edgeflag changes

---

 src/mesa/state_tracker/st_mesa_to_tgsi.c |    7 -------
 src/mesa/state_tracker/st_program.c      |    7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 7b334e2..5c9be46 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -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;
 }
 
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index fcc0478..feaac01 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -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;
 }



More information about the mesa-commit mailing list