From 3bde69e789ca75d6b5dc9afc48dcb1675714769c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Mon, 29 Apr 2019 15:59:22 +0200 Subject: [PATCH] radeonsi: fix line splitting in si_shader_dump_assembly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/radeonsi/si_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.7.4