intel/batch_decoder: Fix dynamic state printing
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 24 Aug 2018 21:04:03 +0000 (16:04 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 25 Aug 2018 12:50:43 +0000 (07:50 -0500)
Instead of printing addresses like everyone else, we were accidentally
printing the offset from state base address.  Also, state_map is a void
pointer so we were incrementing in bytes instead of dwords and every
state other than the first was wrong.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/common/gen_batch_decoder.c

index f93f4df0066b8191ca5fa4bc766071a5bc1098dc..a57bd93e0f07cf2695f7430222f32e551f08d78e 100644 (file)
@@ -665,10 +665,10 @@ decode_dynamic_state_pointers(struct gen_batch_decode_ctx *ctx,
 
    for (int i = 0; i < count; i++) {
       fprintf(ctx->fp, "%s %d\n", struct_type, i);
-      ctx_print_group(ctx, state, state_offset, state_map);
+      ctx_print_group(ctx, state, state_addr, state_map);
 
       state_addr += state->dw_length * 4;
-      state_map += state->dw_length;
+      state_map += state->dw_length * 4;
    }
 }