Mesa (master): radv: ignore BB labels when splitting the disassembly string

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 21 08:54:48 UTC 2020


Module: Mesa
Branch: master
Commit: f811ddf5d1fac8a857aadc51278546d5b46d5a2b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f811ddf5d1fac8a857aadc51278546d5b46d5a2b

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Aug 19 13:42:57 2020 +0200

radv: ignore BB labels when splitting the disassembly string

Ignore everything that is not an instruction. This should fix
the annotated UMR disassembly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6387>

---

 src/amd/vulkan/radv_debug.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index e86b0079df7..47d70b96499 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -273,6 +273,12 @@ static void si_add_split_disasm(const char *disasm,
 		struct radv_shader_inst *inst = &instructions[*num];
 		unsigned len = next - disasm;
 
+		if (!memchr(disasm, ';', len)) {
+			/* Ignore everything that is not an instruction. */
+			disasm = next + 1;
+			continue;
+		}
+
 		assert(len < ARRAY_SIZE(inst->text));
 		memcpy(inst->text, disasm, len);
 		inst->text[len] = 0;



More information about the mesa-commit mailing list