@@ -846,6 +846,11 @@ void va_TraceInit(VADisplay dpy)
846
846
va_trace_flag |= VA_TRACE_FLAG_SURFACE_ENCODE ;
847
847
if (strstr (env_value , "jpeg" ) || strstr (env_value , "jpg" ))
848
848
va_trace_flag |= VA_TRACE_FLAG_SURFACE_JPEG ;
849
+ /* now one context only support 1 surface dump file
850
+ * may add vpp input in future
851
+ */
852
+ if (strstr (env_value , "vppout" ))
853
+ va_trace_flag |= VA_TRACE_FLAG_SURFACE_VPPOUT ;
849
854
850
855
if (va_parseConfig ("LIBVA_TRACE_SURFACE_GEOMETRY" , & env_value [0 ]) == 0 ) {
851
856
char * p = env_value , * q ;
@@ -1440,7 +1445,7 @@ void va_TraceCreateContext(
1440
1445
struct va_trace * pva_trace = NULL ;
1441
1446
struct trace_context * trace_ctx = NULL ;
1442
1447
int tra_ctx_id = 0 ;
1443
- int encode = 0 , decode = 0 , jpeg = 0 ;
1448
+ int encode = 0 , decode = 0 , jpeg = 0 , vpp = 0 ;
1444
1449
int i ;
1445
1450
1446
1451
pva_trace = (struct va_trace * )(((VADisplayContextP )dpy )-> vatrace );
@@ -1525,9 +1530,12 @@ void va_TraceCreateContext(
1525
1530
encode = (trace_ctx -> trace_entrypoint == VAEntrypointEncSlice );
1526
1531
decode = (trace_ctx -> trace_entrypoint == VAEntrypointVLD );
1527
1532
jpeg = (trace_ctx -> trace_entrypoint == VAEntrypointEncPicture );
1533
+ vpp = (trace_ctx -> trace_entrypoint == VAEntrypointVideoProc );
1534
+
1528
1535
if ((encode && (va_trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE )) ||
1529
1536
(decode && (va_trace_flag & VA_TRACE_FLAG_SURFACE_DECODE )) ||
1530
- (jpeg && (va_trace_flag & VA_TRACE_FLAG_SURFACE_JPEG ))) {
1537
+ (jpeg && (va_trace_flag & VA_TRACE_FLAG_SURFACE_JPEG )) ||
1538
+ (vpp && (va_trace_flag & VA_TRACE_FLAG_SURFACE_VPPOUT ))) {
1531
1539
if (open_tracing_specil_file (pva_trace , trace_ctx , 1 ) < 0 ) {
1532
1540
va_errorMessage (dpy , "Open surface fail failed for ctx 0x%08x\n" , * context );
1533
1541
@@ -6871,20 +6879,22 @@ void va_TraceEndPictureExt(
6871
6879
int endpic_done
6872
6880
)
6873
6881
{
6874
- int encode , decode , jpeg ;
6882
+ int encode , decode , jpeg , vpp ;
6875
6883
DPY2TRACECTX (dpy , context , VA_INVALID_ID );
6876
6884
/* avoid to create so many empty files */
6877
6885
encode = (trace_ctx -> trace_entrypoint == VAEntrypointEncSlice );
6878
6886
decode = (trace_ctx -> trace_entrypoint == VAEntrypointVLD );
6879
6887
jpeg = (trace_ctx -> trace_entrypoint == VAEntrypointEncPicture );
6888
+ vpp = (trace_ctx -> trace_entrypoint == VAEntrypointVideoProc );
6880
6889
6881
6890
/* trace encode source surface, can do it before HW completes rendering */
6882
6891
if ((encode && (va_trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE )) ||
6883
6892
(jpeg && (va_trace_flag & VA_TRACE_FLAG_SURFACE_JPEG )))
6884
6893
va_TraceSurface (dpy , context );
6885
6894
6886
6895
/* trace decoded surface, do it after HW completes rendering */
6887
- if (decode && ((va_trace_flag & VA_TRACE_FLAG_SURFACE_DECODE ))) {
6896
+ if ((decode && (va_trace_flag & VA_TRACE_FLAG_SURFACE_DECODE )) ||
6897
+ (vpp && (va_trace_flag & VA_TRACE_FLAG_SURFACE_VPPOUT ))) {
6888
6898
vaSyncSurface (dpy , trace_ctx -> trace_rendertarget );
6889
6899
va_TraceSurface (dpy , context );
6890
6900
}
0 commit comments