mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
i965: Pull brw_compact_instructions() out of brw_get_program().
Acked-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
cce3bea2a7
commit
74b252d270
7 changed files with 10 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ static void compile_clip_prog( struct brw_context *brw,
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
brw_compact_instructions(&c.func);
|
||||
|
||||
/* get the program
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue