[Mesa-dev] [PATCH 3/4] radeonsi: fix line splitting in si_shader_dump_assembly
Nicolai Hähnle
nhaehnle at gmail.com
Mon May 13 21:14:40 UTC 2019
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
Compute the count since the start of the current line instead of the
count since the start of the the disassembly.
---
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 835eedd89e6..2186938fec9 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -5176,21 +5176,21 @@ static void si_shader_dump_disassembly(struct si_screen *screen,
* parsing of resulting logs.
*/
pipe_debug_message(debug, SHADER_INFO,
"Shader Disassembly Begin");
uint64_t line = 0;
while (line < nbytes) {
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,
"%.*s", count, disasm + line);
}
line += count + 1;
}
pipe_debug_message(debug, SHADER_INFO,
--
2.20.1
More information about the mesa-dev
mailing list