bool multiple_instructions_emitted = false;
if (unlikely(debug_flag))
- annotate(brw, &annotation, cfg, inst, p->next_insn_offset);
+ annotate(p->devinfo, &annotation, cfg, inst, p->next_insn_offset);
for (unsigned int i = 0; i < inst->sources; i++) {
src[i] = brw_reg_from_fs_reg(&inst->src[i]);
spill_count, fill_count, promoted_constants, before_size, after_size,
100.0f * (before_size - after_size) / before_size);
- dump_assembly(p->store, annotation.ann_count, annotation.ann, brw, prog);
+ dump_assembly(p->store, annotation.ann_count, annotation.ann,
+ p->devinfo, prog);
ralloc_free(annotation.ann);
}
struct brw_reg src[3], dst;
if (unlikely(debug_flag))
- annotate(brw, &annotation, cfg, inst, p->next_insn_offset);
+ annotate(p->devinfo, &annotation, cfg, inst, p->next_insn_offset);
for (unsigned int i = 0; i < 3; i++) {
src[i] = inst->get_src(this->prog_data, i);
before_size / 16, loop_count, before_size, after_size,
100.0f * (before_size - after_size) / before_size);
- dump_assembly(p->store, annotation.ann_count, annotation.ann, brw, prog);
+ dump_assembly(p->store, annotation.ann_count, annotation.ann,
+ p->devinfo, prog);
ralloc_free(annotation.ann);
}
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
- struct brw_context *brw, const struct gl_program *prog)
+ const struct brw_device_info *devinfo,
+ const struct gl_program *prog)
{
const char *last_annotation_string = NULL;
const void *last_annotation_ir = NULL;
fprintf(stderr, " %s\n", last_annotation_string);
}
- brw_disassemble(brw->intelScreen->devinfo, assembly, start_offset, end_offset, stderr);
+ brw_disassemble(devinfo, assembly, start_offset, end_offset, stderr);
if (annotation[i].block_end) {
fprintf(stderr, " END B%d", annotation[i].block_end->num);
fprintf(stderr, "\n");
}
-void annotate(struct brw_context *brw,
+void annotate(const struct brw_device_info *devinfo,
struct annotation_info *annotation, const struct cfg_t *cfg,
struct backend_instruction *inst, unsigned offset)
{
* There's also only complication from emitting an annotation without
* a corresponding hardware instruction to disassemble.
*/
- if (brw->gen >= 6 && inst->opcode == BRW_OPCODE_DO) {
+ if (devinfo->gen >= 6 && inst->opcode == BRW_OPCODE_DO) {
annotation->ann_count--;
}
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
- struct brw_context *brw, const struct gl_program *prog);
+ const struct brw_device_info *devinfo,
+ const struct gl_program *prog);
void
-annotate(struct brw_context *brw,
+annotate(const struct brw_device_info *devinfo,
struct annotation_info *annotation, const struct cfg_t *cfg,
struct backend_instruction *inst, unsigned offset);
void