summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp21
2 files changed, 18 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index b777172c239..e143e7adbdd 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2287,6 +2287,11 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c,
c->prog_data.dispatch_width = 8;
+ fs_generator g(brw, c, prog, fp, v.dual_src_output.file != BAD_FILE);
+ const unsigned *generated = g.generate_assembly(&v.instructions,
+ simd16_instructions,
+ final_assembly_size);
+
if (unlikely(INTEL_DEBUG & DEBUG_PERF) && shader) {
if (shader->compiled_once)
brw_wm_debug_recompile(brw, prog, &c->key);
@@ -2298,9 +2303,7 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c,
}
}
- fs_generator g(brw, c, prog, fp, v.dual_src_output.file != BAD_FILE);
- return g.generate_assembly(&v.instructions, simd16_instructions,
- final_assembly_size);
+ return generated;
}
bool
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 1a199d6e822..5200daac043 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1159,6 +1159,17 @@ brw_vs_emit(struct brw_context *brw,
}
}
+ vec4_visitor v(brw, c, prog, shader, mem_ctx);
+ if (!v.run()) {
+ prog->LinkStatus = false;
+ ralloc_strcat(&prog->InfoLog, v.fail_msg);
+ return NULL;
+ }
+
+ vec4_generator g(brw, c, prog, mem_ctx);
+ const unsigned *generated =g.generate_assembly(&v.instructions,
+ final_assembly_size);
+
if (unlikely(INTEL_DEBUG & DEBUG_PERF) && shader) {
if (shader->compiled_once) {
brw_vs_debug_recompile(brw, prog, &c->key);
@@ -1170,15 +1181,7 @@ brw_vs_emit(struct brw_context *brw,
shader->compiled_once = true;
}
- vec4_visitor v(brw, c, prog, shader, mem_ctx);
- if (!v.run()) {
- prog->LinkStatus = false;
- ralloc_strcat(&prog->InfoLog, v.fail_msg);
- return NULL;
- }
-
- vec4_generator g(brw, c, prog, mem_ctx);
- return g.generate_assembly(&v.instructions, final_assembly_size);
+ return generated;
}
} /* extern "C" */