Mesa (main): i915g: Fix dumping of the FS in batchbuffers.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 20 23:41:09 UTC 2021
Module: Mesa
Branch: main
Commit: 6649cfbf30471b8bf26f240742c42bf9bfb7b4dc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6649cfbf30471b8bf26f240742c42bf9bfb7b4dc
Author: Emma Anholt <emma at anholt.net>
Date: Mon May 17 13:54:10 2021 -0700
i915g: Fix dumping of the FS in batchbuffers.
We have to increment off of the packet header before disassembling (same
as i915c's copy of this code).
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10874>
---
src/gallium/drivers/i915/i915_debug_fp.c | 1 +
src/gallium/drivers/i915/i915_fpc_translate.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/gallium/drivers/i915/i915_debug_fp.c b/src/gallium/drivers/i915/i915_debug_fp.c
index 2dd9df3ac15..cc3503ba6f9 100644
--- a/src/gallium/drivers/i915/i915_debug_fp.c
+++ b/src/gallium/drivers/i915/i915_debug_fp.c
@@ -319,6 +319,7 @@ i915_disassemble_program(const unsigned * program, unsigned sz)
assert((program[0] & 0x1ff) + 2 == sz);
+ program++;
for (i = 1; i < sz; i += 3, program += 3) {
unsigned opcode = program[0] & (0x1f << 24);
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 85415b45167..37dcf70786b 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -1234,6 +1234,7 @@ i915_translate_fragment_program( struct i915_context *i915,
i915_optimize_free(i_tokens);
#if 0
+ /* XXX: The disasm wants the concatenation of the decl and program. */
i915_disassemble_program(fs->program, fs->program_len);
#endif
}
More information about the mesa-commit
mailing list