To profile llvmpipe you need to define PROFILE in mesa's code. Currently, this define can only be generated if mesa is built using scons. This patch makes it possible to generate this define also when building mesa through automake tools.
Signed-off-by: Oded Gabbay <oded.gab...@gmail.com> --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index b1c1d7d..a2485da 100644 --- a/configure.ac +++ b/configure.ac @@ -476,8 +476,23 @@ AC_ARG_ENABLE([debug], [enable_debug="$enableval"], [enable_debug=no] ) + +AC_ARG_ENABLE([llvmpipe-profile], + [AS_HELP_STRING([--enable-llvmpipe-profile], + [enable profiling of llvmpipe JIT code @<:@default=disabled@:>@])], + [enable_llvmpipe_profile="$enableval"], + [enable_llvmpipe_profile=no] +) + +if test "x$enable_llvmpipe_profile" = xyes; then + DEFINES="$DEFINES -DPROFILE" +fi + if test "x$enable_debug" = xyes; then DEFINES="$DEFINES -DDEBUG" + if test "x$enable_llvmpipe_profile" = xyes; then + AC_MSG_WARN([Debug and Profile are enabled at the same time]) + fi if test "x$GCC" = xyes; then if ! echo "$CFLAGS" | grep -q -e '-g'; then CFLAGS="$CFLAGS -g" -- 2.5.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev