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

Author: Nicolai Hähnle <[email protected]>
Date:   Mon May 15 11:10:31 2017 +0200

ac/debug: handle index field in SET_*_REG correctly

Reviewed-by: Marek Olšák <[email protected]>

---

 src/amd/common/ac_debug.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c
index 9d051f9159..a8f81bf9a9 100644
--- a/src/amd/common/ac_debug.c
+++ b/src/amd/common/ac_debug.c
@@ -132,9 +132,15 @@ void ac_dump_reg(FILE *file, unsigned offset, uint32_t 
value,
 static void ac_parse_set_reg_packet(FILE *f, uint32_t *ib, unsigned count,
                                    unsigned reg_offset)
 {
-       unsigned reg = (ib[1] << 2) + reg_offset;
+       unsigned reg = ((ib[1] & 0xFFFF) << 2) + reg_offset;
+       unsigned index = ib[1] >> 28;
        int i;
 
+       if (index != 0) {
+               print_spaces(f, INDENT_PKT);
+               fprintf(f, "INDEX = %u\n", index);
+       }
+
        for (i = 0; i < count; i++)
                ac_dump_reg(f, reg + i*4, ib[2+i], ~0);
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to