Hi, Those patches fix various VA tracer bugs or cosmetics.
1) Call va_TraceEndPicture() after the actual vaEndPicture(). i.e. let the driver flush and complete rendering of the surface. 2) Fix VA tracer to correctly dump array of bytes. i.e. use 0x%02x format instead of 0x%08x and drop leading space3) Don't dump VA surface pixels if driver doesn't return VA surface buffer. Some drivers don't have a direct access to the underlying VA surface pixels.
Regards, Gwenole.
commit 4320947dab9cc1891f79c58d651bb8b97b345e17 Author: Gwenole Beauchesne <[email protected]> Date: Wed Jun 2 09:04:33 2010 +0200 Call va_TraceEndPicture() after the actual vaEndPicture(). i.e. let the driver flush and complete rendering of the surface. diff --git a/va/va.c b/va/va.c index 9b68500..6918910 100644 --- a/va/va.c +++ b/va/va.c @@ -784,12 +784,14 @@ VAStatus vaEndPicture ( VAContextID context ) { + VAStatus va_status; VADriverContextP ctx; CHECK_DISPLAY(dpy); ctx = CTX(dpy); + va_status = ctx->vtable.vaEndPicture( ctx, context ); VA_TRACE(va_TraceEndPicture, dpy, context); - return ctx->vtable.vaEndPicture( ctx, context ); + return va_status; } VAStatus vaSyncSurface (
commit 439dbf94f34b10287d065b7c8f13ce6d3688b0a2 Author: Gwenole Beauchesne <[email protected]> Date: Wed Jun 2 09:07:43 2010 +0200 Fix VA tracer to correctly dump array of bytes. diff --git a/va/va_trace.c b/va/va_trace.c index dbd0749..7f09908 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -195,14 +195,14 @@ static int va_TraceVABuffers( ) { int i; - char *p = pbuf; + unsigned char *p = pbuf; unsigned int *pi = (unsigned int *)pbuf; va_TraceMsg("***Buffer Data***"); for (i=0; i<size; i++) { if ((i%16) == 0) va_TraceMsg("\n0x%08x:", i); - va_TraceMsg("%08x ", p[i]); + va_TraceMsg(" %02x", p[i]); } va_TraceMsg("\n"); @@ -1089,7 +1089,7 @@ int va_TraceEndPicture( for (j=0; j<trace_width; j++) { if ((j%16) == 0) va_TraceMsg("\n0x%08x:", j + i*trace_width); - va_TraceMsg("%08x ", tmp[j]); + va_TraceMsg(" %02x", tmp[j]); } va_TraceMsg("\n"); @@ -1104,7 +1104,7 @@ int va_TraceEndPicture( for (j=0; j<trace_width; j++) { if ((j%16) == 0) va_TraceMsg("\n0x%08x:", j + i*trace_width); - va_TraceMsg("%08x ", tmp[j]); + va_TraceMsg(" %02x", tmp[j]); } va_TraceMsg("\n");
commit 37a131913007b814fab6d1f0abe5ca033d4941b2 Author: Gwenole Beauchesne <[email protected]> Date: Wed Jun 2 09:10:27 2010 +0200 Don't dump VA surface pixels if driver doesn't return VA surface buffer. diff --git a/va/va_trace.c b/va/va_trace.c index 7f09908..1713f27 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -1078,13 +1078,14 @@ int va_TraceEndPicture( va_TraceMsg("\tchroma_u_offset=%d\n", chroma_u_offset); va_TraceMsg("\tchroma_v_offset=%d\n", chroma_v_offset); - va_TraceMsg("**Y data**\n"); + if (!buffer) + return; Y_data = buffer; UV_data = buffer + luma_offset; tmp = Y_data; - + va_TraceMsg("**Y data**\n"); for (i=0; i<trace_height; i++) { for (j=0; j<trace_width; j++) { if ((j%16) == 0)
_______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
