summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-05 15:49:34 -0700
committerJason Ekstrand <[email protected]>2015-10-19 08:45:14 -0700
commite00314bc57a59b3f816daba6249e7b7157761f86 (patch)
tree0a05259013868fd4ea28566ff45e84c94838eca3 /src/mesa
parentb23a4859f4dbbcca7d6a637010167d470211e45b (diff)
i965/asm: Explicitly use a nir_instr for IR annotations
Now that everything goes through NIR, we don't need this to be a void pointer anymore. Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_generator.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/intel_asm_annotation.c17
-rw-r--r--src/mesa/drivers/dri/i965/intel_asm_annotation.h3
4 files changed, 5 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 17e19cf807a..49884909f70 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -2187,7 +2187,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
100.0f * (before_size - after_size) / before_size);
dump_assembly(p->store, annotation.ann_count, annotation.ann,
- p->devinfo, prog);
+ p->devinfo);
ralloc_free(annotation.ann);
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index dcacc900540..2a1e4159a6b 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1663,7 +1663,7 @@ vec4_generator::generate_code(const cfg_t *cfg)
100.0f * (before_size - after_size) / before_size);
dump_assembly(p->store, annotation.ann_count, annotation.ann,
- p->devinfo, prog);
+ p->devinfo);
ralloc_free(annotation.ann);
}
diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.c b/src/mesa/drivers/dri/i965/intel_asm_annotation.c
index bb8bb8d38c9..b3d6324a5fe 100644
--- a/src/mesa/drivers/dri/i965/intel_asm_annotation.c
+++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.c
@@ -33,8 +33,7 @@
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
- const struct brw_device_info *devinfo,
- const struct gl_program *prog)
+ const struct brw_device_info *devinfo)
{
const char *last_annotation_string = NULL;
const void *last_annotation_ir = NULL;
@@ -57,19 +56,7 @@ dump_assembly(void *assembly, int num_annotations, struct annotation *annotation
last_annotation_ir = annotation[i].ir;
if (last_annotation_ir) {
fprintf(stderr, " ");
- if (prog->nir)
- nir_print_instr(annotation[i].ir, stderr);
- else if (!prog->Instructions)
- fprint_ir(stderr, annotation[i].ir);
- else {
- const struct prog_instruction *pi =
- (const struct prog_instruction *)annotation[i].ir;
- fprintf(stderr, "%d: ",
- (int)(pi - prog->Instructions));
- _mesa_fprint_instruction_opt(stderr,
- pi,
- 0, PROG_PRINT_DEBUG, NULL);
- }
+ nir_print_instr(annotation[i].ir, stderr);
fprintf(stderr, "\n");
}
}
diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.h b/src/mesa/drivers/dri/i965/intel_asm_annotation.h
index d9c69bc41b0..6c72326f058 100644
--- a/src/mesa/drivers/dri/i965/intel_asm_annotation.h
+++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.h
@@ -60,8 +60,7 @@ struct annotation_info {
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
- const struct brw_device_info *devinfo,
- const struct gl_program *prog);
+ const struct brw_device_info *devinfo);
void
annotate(const struct brw_device_info *devinfo,