summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_clear.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_compact.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp5
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_generator.cpp6
6 files changed, 12 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
index 9f0f5148d7b..2bb08de447e 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
@@ -486,7 +486,7 @@ brw_blorp_const_color_program::compile(struct brw_context *brw,
if (unlikely(INTEL_DEBUG & DEBUG_BLORP)) {
fprintf(stderr, "Native code for BLORP clear:\n");
- brw_dump_compile(&func, stderr, 0, func.next_insn_offset);
+ brw_dump_compile(brw, &func.store, 0, func.next_insn_offset, stderr);
fprintf(stderr, "\n");
}
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index d8a35435a7e..90e84f866cd 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -254,14 +254,12 @@ const unsigned *brw_get_program( struct brw_compile *p,
}
void
-brw_dump_compile(struct brw_compile *p, FILE *out, int start, int end)
+brw_dump_compile(struct brw_context *brw, void *assembly, int start, int end, FILE *out)
{
- struct brw_context *brw = p->brw;
- void *store = p->store;
bool dump_hex = false;
for (int offset = start; offset < end;) {
- struct brw_instruction *insn = store + offset;
+ struct brw_instruction *insn = assembly + offset;
struct brw_instruction uncompacted;
bool compacted = insn->header.cmpt_control;
fprintf(out, "0x%08x: ", offset);
@@ -288,6 +286,6 @@ brw_dump_compile(struct brw_compile *p, FILE *out, int start, int end)
offset += 16;
}
- brw_disasm(out, insn, p->brw->gen, compacted);
+ brw_disasm(out, insn, brw->gen, compacted);
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 805c35b3937..75ceec2fcb1 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -105,7 +105,8 @@ void brw_set_acc_write_control(struct brw_compile *p, unsigned value);
void brw_init_compile(struct brw_context *, struct brw_compile *p,
void *mem_ctx);
-void brw_dump_compile(struct brw_compile *p, FILE *out, int start, int end);
+void brw_dump_compile(struct brw_context *brw, void *assembly,
+ int start,int end, FILE *out);
const unsigned *brw_get_program( struct brw_compile *p, unsigned *sz );
struct brw_instruction *brw_next_insn(struct brw_compile *p, unsigned opcode);
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index 54b29fdcd16..2667ca60c50 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
@@ -786,7 +786,7 @@ brw_compact_instructions(struct brw_compile *p)
if (0) {
fprintf(stderr, "dumping compacted program\n");
- brw_dump_compile(p, stderr, 0, p->next_insn_offset);
+ brw_dump_compile(brw, p->store, 0, p->next_insn_offset, stderr);
int cmp = 0;
for (offset = 0; offset < p->next_insn_offset;) {
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index a9a16ee6ba3..f8819da68f5 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1802,8 +1802,7 @@ fs_generator::generate_code(exec_list *instructions, FILE *dump_file)
}
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
- brw_dump_compile(p, stderr,
- last_native_insn_offset, p->next_insn_offset);
+ brw_dump_compile(brw, p->store, last_native_insn_offset, p->next_insn_offset, stderr);
foreach_list(node, &cfg->block_list) {
bblock_link *link = (bblock_link *)node;
@@ -1837,7 +1836,7 @@ fs_generator::generate_code(exec_list *instructions, FILE *dump_file)
* case you're doing that.
*/
if (dump_file) {
- brw_dump_compile(p, dump_file, 0, p->next_insn_offset);
+ brw_dump_compile(brw, p->store, 0, p->next_insn_offset, dump_file);
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 305a94c96fc..cd9c562e708 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1334,8 +1334,8 @@ vec4_generator::generate_code(exec_list *instructions)
}
if (unlikely(debug_flag)) {
- brw_dump_compile(p, stderr,
- last_native_insn_offset, p->next_insn_offset);
+ brw_dump_compile(brw, p->store,
+ last_native_insn_offset, p->next_insn_offset, stderr);
}
last_native_insn_offset = p->next_insn_offset;
@@ -1353,7 +1353,7 @@ vec4_generator::generate_code(exec_list *instructions)
* case you're doing that.
*/
if (0 && unlikely(debug_flag)) {
- brw_dump_compile(p, stderr, 0, p->next_insn_offset);
+ brw_dump_compile(brw, p->store, 0, p->next_insn_offset, stderr);
}
}