diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2013-10-17 10:57:23 +0800 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2013-10-17 10:57:23 +0800 |
commit | e39ebdd95062995e4bdf082d50bd7d9005a3be6c (patch) | |
tree | c7c03f3082484f39790377c2d1c51dbdd037d787 | |
parent | c954ff868057e02f620470d64c1f2071e2cfbb4e (diff) |
vatrace: make LIBVA_TRACE_SURFACE work even without LIBVA_TRACE
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r-- | va/va.c | 8 | ||||
-rw-r--r-- | va/va_trace.c | 2 | ||||
-rw-r--r-- | va/va_trace.h | 12 |
3 files changed, 14 insertions, 8 deletions
@@ -641,7 +641,7 @@ VAStatus vaCreateConfig ( vaStatus = ctx->vtable->vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id ); /* record the current entrypoint for further trace/fool determination */ - VA_TRACE_LOG(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); + VA_TRACE_ALL(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); VA_FOOL_FUNC(va_FoolCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); return vaStatus; @@ -917,7 +917,7 @@ VAStatus vaCreateContext ( flag, render_targets, num_render_targets, context ); /* keep current encode/decode resoluton */ - VA_TRACE_LOG(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context); + VA_TRACE_ALL(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context); return vaStatus; } @@ -1071,7 +1071,7 @@ VAStatus vaBeginPicture ( CHECK_DISPLAY(dpy); ctx = CTX(dpy); - VA_TRACE_LOG(va_TraceBeginPicture, dpy, context, render_target); + VA_TRACE_ALL(va_TraceBeginPicture, dpy, context, render_target); VA_FOOL_RETURN(); va_status = ctx->vtable->vaBeginPicture( ctx, context, render_target ); @@ -1112,7 +1112,7 @@ VAStatus vaEndPicture ( va_status = ctx->vtable->vaEndPicture( ctx, context ); /* dump surface content */ - VA_TRACE_SURFACE(va_TraceEndPicture, dpy, context, 1); + VA_TRACE_ALL(va_TraceEndPicture, dpy, context, 1); return va_status; } diff --git a/va/va_trace.c b/va/va_trace.c index edd5a9e..42b461d 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -3018,7 +3018,7 @@ void va_TraceEndPicture( /* trace encode source surface, can do it before HW completes rendering */ if ((encode && (trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE))|| - (jpeg && (trace_flag & VA_TRACE_FLAG_SURFACE_JPEG))) + (jpeg && (trace_flag & VA_TRACE_FLAG_SURFACE_JPEG))) va_TraceSurface(dpy); /* trace coded buffer, do it after HW completes rendering */ diff --git a/va/va_trace.h b/va/va_trace.h index bc830b6..b2182b0 100644 --- a/va/va_trace.h +++ b/va/va_trace.h @@ -47,9 +47,9 @@ extern int trace_flag; if (trace_flag & VA_TRACE_FLAG_LOG) { \ trace_func(__VA_ARGS__); \ } -#define VA_TRACE_SURFACE(trace_func,...) \ - if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \ - trace_func(__VA_ARGS__); \ +#define VA_TRACE_ALL(trace_func,...) \ + if (trace_flag) { \ + trace_func(__VA_ARGS__); \ } void va_TraceInit(VADisplay dpy); @@ -85,6 +85,12 @@ void va_TraceCreateSurfaces( unsigned int num_attribs ); +void va_TraceDestroySurfaces( + VADisplay dpy, + VASurfaceID *surface_list, + int num_surfaces +); + void va_TraceCreateContext( VADisplay dpy, VAConfigID config_id, |