summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-12-12 17:36:47 -0800
committerJason Ekstrand <[email protected]>2017-12-14 13:27:04 -0800
commita7ae72032f550d9680673b67b1e81452d0b74fed (patch)
tree290cffff477670f5d56b92461e7d2488723e5e8f /src/mesa
parentdca8f466ee3c1d2d3a8f120895639c9a2cca9272 (diff)
intel/decoder: Take a bit offset in gen_print_group
Previously, if a group was nested in another group such that it didn't start on a dword boundary, we would decode it as if it started at the start of its first dword. This changes things to work even more in terms of bits so that we can properly decode these structs. This affects MOCS, attribute swizzles, and several other things. Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index 91a6506a894..0e090f46250 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -401,7 +401,7 @@ decode_struct(struct brw_context *brw, struct gen_spec *spec,
fprintf(stderr, "%s\n", struct_name);
gen_print_group(stderr, group, gtt_offset + offset,
- &data[offset / 4], color);
+ &data[offset / 4], 0, color);
}
static void
@@ -418,7 +418,7 @@ decode_structs(struct brw_context *brw, struct gen_spec *spec,
for (int i = 0; i < entries; i++) {
fprintf(stderr, "%s %d\n", struct_name, i);
gen_print_group(stderr, group, gtt_offset + offset,
- &data[(offset + i * struct_size) / 4], color);
+ &data[(offset + i * struct_size) / 4], 0, color);
}
}
@@ -463,7 +463,7 @@ do_batch_dump(struct brw_context *brw)
fprintf(stderr, "%s0x%08"PRIx64": 0x%08x: %-80s%s\n", header_color,
offset, p[0], gen_group_get_name(inst), reset_color);
- gen_print_group(stderr, inst, offset, p, color);
+ gen_print_group(stderr, inst, offset, p, 0, color);
switch (gen_group_get_opcode(inst) >> 16) {
case _3DSTATE_PIPELINED_POINTERS:
@@ -505,7 +505,7 @@ do_batch_dump(struct brw_context *brw)
for (int i = 0; i < bt_entries; i++) {
fprintf(stderr, "SURFACE_STATE - BTI = %d\n", i);
gen_print_group(stderr, group, state_gtt_offset + bt_pointers[i],
- &state[bt_pointers[i] / 4], color);
+ &state[bt_pointers[i] / 4], 0, color);
}
break;
}
@@ -579,7 +579,7 @@ do_batch_dump(struct brw_context *brw)
for (int i = 0; i < bt_entries; i++) {
fprintf(stderr, "SURFACE_STATE - BTI = %d\n", i);
gen_print_group(stderr, group, state_gtt_offset + bt_pointers[i],
- &state[bt_pointers[i] / 4], color);
+ &state[bt_pointers[i] / 4], 0, color);
}
break;
}