i965: Switch to the EU emit layer for code generation on Broadwell.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Jun 2014 16:04:26 +0000 (09:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Aug 2014 20:39:25 +0000 (13:39 -0700)
Everything should be in place to unify code generation between Gen4-7
and Gen8+.  We should be able to drop the Gen8 generators at this point.

However, leave them hooked up for a brief moment, for testing and
comparison purposes.  Set GEN8=1 to use the old Gen8+ code generator
paths.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp

index 3aee82226e07f36d93ab2ebd8731fe9733d1b462..4aaba8ff16cce41567cf262710079d7a1247051a 100644 (file)
@@ -3245,7 +3245,7 @@ brw_wm_fs_emit(struct brw_context *brw,
    }
 
    const unsigned *assembly = NULL;
-   if (brw->gen >= 8) {
+   if (brw->gen >= 8 && getenv("GEN8") != NULL) {
       gen8_fs_generator g(brw, mem_ctx, key, prog_data, prog, fp, v.do_dual_src);
       assembly = g.generate_assembly(&v.instructions, simd16_instructions,
                                      final_assembly_size);
index 9a73f8fa1a63c2f02f35f9c6064751d7e0352640..8eae61d6e9ee08c4dae8a1427b698119be3e1f4b 100644 (file)
@@ -1794,7 +1794,7 @@ brw_vs_emit(struct brw_context *brw,
    }
 
    const unsigned *assembly = NULL;
-   if (brw->gen >= 8) {
+   if (brw->gen >= 8 && getenv("GEN8") != NULL) {
       gen8_vec4_generator g(brw, prog, &c->vp->program.Base, &prog_data->base,
                             mem_ctx, INTEL_DEBUG & DEBUG_VS);
       assembly = g.generate_assembly(&v.instructions, final_assembly_size);
index 75ea9a265d5f51a0b78581c6702b441d3ec35218..313bdbe50675b0723de442e47fae138416ab0ba4 100644 (file)
@@ -615,7 +615,7 @@ generate_assembly(struct brw_context *brw,
                   exec_list *instructions,
                   unsigned *final_assembly_size)
 {
-   if (brw->gen >= 8) {
+   if (brw->gen >= 8 && getenv("GEN8") != NULL) {
       gen8_vec4_generator g(brw, shader_prog, prog, prog_data, mem_ctx,
                             INTEL_DEBUG & DEBUG_GS);
       return g.generate_assembly(instructions, final_assembly_size);