From 1b0743dbb6f925921e52bc9ecdde6a8bf755d162 Mon Sep 17 00:00:00 2001 From: Andreas Baierl Date: Fri, 20 Dec 2019 11:30:05 +0100 Subject: [PATCH] lima: Fix dump file creation Otherwise lima_dump_file_next() always opens a new file and creates the dumps regardless of what the environment variables say. Fixes d71cd245d74 ('lima: Rotate dump files after each finished pp frame') Reviewed-by: Vasily Khoruzhick Signed-off-by: Andreas Baierl Tested-by: Marge Bot Part-of: --- src/gallium/drivers/lima/lima_util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/lima/lima_util.c b/src/gallium/drivers/lima/lima_util.c index 65e3114ed5f..45f2b27b400 100644 --- a/src/gallium/drivers/lima/lima_util.c +++ b/src/gallium/drivers/lima/lima_util.c @@ -130,9 +130,11 @@ lima_dump_file_close(void) void lima_dump_file_next(void) { - lima_dump_file_close(); - lima_dump_frame_count++; - lima_dump_file_open(); + if (lima_dump_command_stream) { + lima_dump_file_close(); + lima_dump_frame_count++; + lima_dump_file_open(); + } } void -- 2.30.2