Module: Mesa
Branch: master
Commit: 1cf6360f8955b4191c81be24c5b5fb950ff1b21f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cf6360f8955b4191c81be24c5b5fb950ff1b21f

Author: Paul Berry <stereotype...@gmail.com>
Date:   Tue Oct 23 10:59:44 2012 -0700

dispatch_sanity: print names of functions that shouldnt be in dispatch table.

Previously we just printed the dispatch table index and the user had
to convert it to a function name.  That was a pain because when
FEATURE_remap_table is defined, the assignment of functions to
dispatch table entries is done at run time.

Acked-by: Kenneth Graunke <kenn...@whitecape.org>
Reviewed-by: Matt Turner <matts...@gmail.com>

---

 src/mesa/main/tests/dispatch_sanity.cpp |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
b/src/mesa/main/tests/dispatch_sanity.cpp
index dbca581..ee53d2e 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -100,6 +100,13 @@ DispatchSanity_test::SetUp()
    _mesa_init_driver_functions(&driver_functions);
 }
 
+static const char *
+offset_to_proc_name_safe(unsigned offset)
+{
+   const char *name = _glapi_get_proc_name(offset);
+   return name ? name : "???";
+}
+
 static void
 validate_functions(_glapi_proc *table, const struct function *function_table)
 {
@@ -122,7 +129,8 @@ validate_functions(_glapi_proc *table, const struct 
function *function_table)
 
    const unsigned size = _glapi_get_dispatch_table_size();
    for (unsigned i = 0; i < size; i++) {
-      EXPECT_EQ((_glapi_proc) _mesa_generic_nop, table[i]) << "i = " << i;
+      EXPECT_EQ((_glapi_proc) _mesa_generic_nop, table[i])
+         << "i = " << i << " (" << offset_to_proc_name_safe(i) << ")";
    }
 }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to