Mesa (mesa_7_5_branch): util: Increase OutputDebugStringA to 4k.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Jul 1 18:18:21 UTC 2009


Module: Mesa
Branch: mesa_7_5_branch
Commit: f2de2d5f376a868f68a053257f7d6dfcdee6c8ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2de2d5f376a868f68a053257f7d6dfcdee6c8ae

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Jul  1 19:09:44 2009 +0100

util: Increase OutputDebugStringA to 4k.

According to http://unixwiz.net/techtips/outputdebugstring.html that's
how big the buffer is.

The 512bytes limitation is in kernel mode.

---

 src/gallium/auxiliary/util/u_debug.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 18597ef..a5ca0b7 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -97,10 +97,8 @@ void _debug_vprintf(const char *format, va_list ap)
       buf[0] = '\0';
    }
 #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
-   /* EngDebugPrint does not handle float point arguments, so we need to use
-    * our own vsnprintf implementation. It is also very slow, so buffer until
-    * we find a newline. */
-   static char buf[512 + 1] = {'\0'};
+   /* OutputDebugStringA can be very slow, so buffer until we find a newline. */
+   static char buf[4096] = {'\0'};
    size_t len = strlen(buf);
    int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
    if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {




More information about the mesa-commit mailing list