From: Andreas Baierl Date: Fri, 20 Dec 2019 10:30:05 +0000 (+0100) Subject: lima: Fix dump file creation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b0743dbb6f925921e52bc9ecdde6a8bf755d162;p=mesa.git 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: --- 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