From: Nicolai Hähnle Date: Mon, 29 Apr 2019 13:59:22 +0000 (+0200) Subject: radeonsi: fix line splitting in si_shader_dump_assembly X-Git-Tag: upstream/19.3.0~5538 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bde69e789ca75d6b5dc9afc48dcb1675714769c;p=platform%2Fupstream%2Fmesa.git radeonsi: fix line splitting in si_shader_dump_assembly Compute the count since the start of the current line instead of the count since the start of the the disassembly. Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index ed2db3d..f4e522d 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5259,7 +5259,7 @@ static void si_shader_dump_disassembly(struct si_screen *screen, int count = nbytes - line; const char *nl = memchr(disasm + line, '\n', nbytes - line); if (nl) - count = nl - disasm; + count = nl - (disasm + line); if (count) { pipe_debug_message(debug, SHADER_INFO,