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_clip.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp8
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_generator.cpp1
7 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
index b6bb4b3ed11..9f0f5148d7b 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
@@ -489,6 +489,8 @@ brw_blorp_const_color_program::compile(struct brw_context *brw,
brw_dump_compile(&func, stderr, 0, func.next_insn_offset);
fprintf(stderr, "\n");
}
+
+ brw_compact_instructions(&func);
return brw_get_program(&func, program_size);
}
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index d1815f2216e..1c54b918d73 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -111,7 +111,7 @@ static void compile_clip_prog( struct brw_context *brw,
return;
}
-
+ brw_compact_instructions(&c.func);
/* get the program
*/
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index 15105c2944c..d8a35435a7e 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -249,8 +249,6 @@ brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx)
const unsigned *brw_get_program( struct brw_compile *p,
unsigned *sz )
{
- brw_compact_instructions(p);
-
*sz = p->next_insn_offset;
return (const unsigned *)p->store;
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index ff85171bb61..a9a16ee6ba3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1852,15 +1852,10 @@ fs_generator::generate_assembly(exec_list *simd8_instructions,
if (simd8_instructions) {
dispatch_width = 8;
generate_code(simd8_instructions, dump_file);
+ brw_compact_instructions(p);
}
if (simd16_instructions) {
- /* We have to do a compaction pass now, or the one at the end of
- * execution will squash down where our prog_offset start needs
- * to be.
- */
- brw_compact_instructions(p);
-
/* align to 64 byte boundary. */
while ((p->nr_insn * sizeof(struct brw_instruction)) % 64) {
brw_NOP(p);
@@ -1873,6 +1868,7 @@ fs_generator::generate_assembly(exec_list *simd8_instructions,
dispatch_width = 16;
generate_code(simd16_instructions, dump_file);
+ brw_compact_instructions(p);
}
return brw_get_program(p, assembly_size);
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 866d2988e37..eaa527f778f 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -128,6 +128,8 @@ static void compile_ff_gs_prog(struct brw_context *brw,
}
}
+ brw_compact_instructions(&c.func);
+
/* get the program
*/
program = brw_get_program(&c.func, &program_size);
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 61d308a3f8d..401fa7bf45a 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -110,6 +110,8 @@ static void compile_sf_prog( struct brw_context *brw,
return;
}
+ brw_compact_instructions(&c.func);
+
/* get the program
*/
program = brw_get_program(&c.func, &program_size);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index bcacde92dd1..305a94c96fc 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1363,6 +1363,7 @@ vec4_generator::generate_assembly(exec_list *instructions,
{
brw_set_access_mode(p, BRW_ALIGN_16);
generate_code(instructions);
+ brw_compact_instructions(p);
return brw_get_program(p, assembly_size);
}