radeonsi: fix line splitting in si_shader_dump_assembly
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 29 Apr 2019 13:59:22 +0000 (15:59 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 13 Jun 2019 00:28:23 +0000 (20:28 -0400)
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 <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index ed2db3d..f4e522d 100644 (file)
@@ -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,