fprintf(stderr, "clip:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
brw_disasm(stderr, &((struct brw_instruction *)program)[i],
- brw->gen);
+ brw->gen, false);
fprintf(stderr, "\n");
}
void brw_vec4_alloc_reg_set(struct intel_screen *screen);
/* brw_disasm.c */
-int brw_disasm (FILE *file, struct brw_instruction *inst, int gen);
+int brw_disasm (FILE *file, struct brw_instruction *inst, int gen, bool is_compacted);
/* brw_vs.c */
gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx);
[1] = ".sat"
};
+static const char * const cmpt_ctrl[2] = {
+ [0] = "",
+ [1] = "compacted"
+};
+
static const char * const accwr[2] = {
[0] = "",
[1] = "AccWrEnable"
return 0;
}
-int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
+int brw_disasm (FILE *file, struct brw_instruction *inst, int gen, bool is_compacted)
{
int err = 0;
int space = 0;
err |= print_opcode (file, inst->header.opcode);
err |= control (file, "saturate", saturate, inst->header.saturate, NULL);
+
err |= control (file, "debug control", debug_ctrl, inst->header.debug_control, NULL);
if (inst->header.opcode == BRW_OPCODE_MATH) {
}
}
+ err |= control (file, "compaction control", cmpt_ctrl, is_compacted, &space);
err |= control (file, "thread control", thread_ctrl, inst->header.thread_control, &space);
if (gen >= 6)
err |= control (file, "acc write control", accwr, inst->header.acc_wr_control, &space);
for (int offset = start; offset < end;) {
struct brw_instruction *insn = store + offset;
struct brw_instruction uncompacted;
+ bool compacted = insn->header.cmpt_control;
fprintf(out, "0x%08x: ", offset);
if (insn->header.cmpt_control) {
offset += 16;
}
- brw_disasm(out, insn, p->brw->gen);
+ brw_disasm(out, insn, p->brw->gen, compacted);
}
}
brw->gen);
fprintf(stderr, " before: ");
- brw_disasm(stderr, orig, brw->gen);
+ brw_disasm(stderr, orig, brw->gen, true);
fprintf(stderr, " after: ");
- brw_disasm(stderr, uncompacted, brw->gen);
+ brw_disasm(stderr, uncompacted, brw->gen, false);
uint32_t *before_bits = (uint32_t *)orig;
uint32_t *after_bits = (uint32_t *)uncompacted;
fprintf(stderr, "gs:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
brw_disasm(stderr, &((struct brw_instruction *)program)[i],
- brw->gen);
+ brw->gen, false);
fprintf(stderr, "\n");
}
fprintf(stderr, "sf:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
brw_disasm(stderr, &((struct brw_instruction *)program)[i],
- brw->gen);
+ brw->gen, false);
fprintf(stderr, "\n");
}
name,
data[i * 4], data[i * 4 + 1], data[i * 4 + 2], data[i * 4 + 3]);
- brw_disasm(stderr, (void *)(data + i * 4), brw->gen);
+ brw_disasm(stderr, (void *)(data + i * 4), brw->gen, false);
}
}
}
if (memcmp(&unchanged, &dst, sizeof(dst))) {
fprintf(stderr, "Failed to compact, but dst changed\n");
fprintf(stderr, " Instruction: ");
- brw_disasm(stderr, &src, brw->gen);
+ brw_disasm(stderr, &src, brw->gen, false);
return false;
}
}