Mesa (main): i915g: Fix FS debug dumping for declarations.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 30 17:49:20 UTC 2021
Module: Mesa
Branch: main
Commit: 7e75b1ca4959027197e803fca64e0846617b726c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e75b1ca4959027197e803fca64e0846617b726c
Author: Emma Anholt <emma at anholt.net>
Date: Tue Jun 29 20:30:03 2021 -0700
i915g: Fix FS debug dumping for declarations.
Samplers have a type, and non-samplers have a destination writemask.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11648>
---
src/gallium/drivers/i915/i915_debug_fp.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/i915/i915_debug_fp.c b/src/gallium/drivers/i915/i915_debug_fp.c
index fcada721390..4a9517ebcd0 100644
--- a/src/gallium/drivers/i915/i915_debug_fp.c
+++ b/src/gallium/drivers/i915/i915_debug_fp.c
@@ -243,8 +243,31 @@ print_texkil_op(char **stream, unsigned opcode, const unsigned *program)
static void
print_dcl_op(char **stream, unsigned opcode, const unsigned *program)
{
+ unsigned type = (program[0] >> D0_TYPE_SHIFT) & REG_TYPE_MASK;
+
PRINTF(stream, "%s ", opcodes[opcode]);
- print_dest_reg(stream, program[0] | A0_DEST_CHANNEL_ALL);
+
+ unsigned dest_dword = program[0];
+ if (type == REG_TYPE_S)
+ dest_dword |= A0_DEST_CHANNEL_ALL;
+ print_dest_reg(stream, dest_dword);
+
+ if (type == REG_TYPE_S) {
+ switch (program[0] & D0_SAMPLE_TYPE_MASK) {
+ case D0_SAMPLE_TYPE_2D:
+ PRINTF(stream, " 2D");
+ break;
+ case D0_SAMPLE_TYPE_VOLUME:
+ PRINTF(stream, " 3D");
+ break;
+ case D0_SAMPLE_TYPE_CUBE:
+ PRINTF(stream, " CUBE");
+ break;
+ default:
+ PRINTF(stream, " XXX bad type");
+ break;
+ }
+ }
}
void
More information about the mesa-commit
mailing list