[Mesa-dev] [PATCH 14/15] i965: Never use the Gen8 code generators.

Kenneth Graunke kenneth at whitecape.org
Mon Aug 11 22:18:39 PDT 2014


Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_fs.cpp              | 14 ++++----------
 src/mesa/drivers/dri/i965/brw_vec4.cpp            | 12 +++---------
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 12 +++---------
 3 files changed, 10 insertions(+), 28 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 4aaba8f..cc5ec16 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3245,16 +3245,10 @@ brw_wm_fs_emit(struct brw_context *brw,
    }
 
    const unsigned *assembly = NULL;
-   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);
-   } else {
-      fs_generator g(brw, mem_ctx, key, prog_data, prog, fp, v.do_dual_src,
-                     v.runtime_check_aads_emit, INTEL_DEBUG & DEBUG_WM);
-      assembly = g.generate_assembly(&v.instructions, simd16_instructions,
-                                     final_assembly_size);
-   }
+   fs_generator g(brw, mem_ctx, key, prog_data, prog, fp, v.do_dual_src,
+                  v.runtime_check_aads_emit, INTEL_DEBUG & DEBUG_WM);
+   assembly = g.generate_assembly(&v.instructions, simd16_instructions,
+                                  final_assembly_size);
 
    if (unlikely(brw->perf_debug) && shader) {
       if (shader->compiled_once)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 8eae61d..b572b61 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1794,15 +1794,9 @@ brw_vs_emit(struct brw_context *brw,
    }
 
    const unsigned *assembly = NULL;
-   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);
-   } else {
-      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);
-   }
+   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);
 
    if (unlikely(brw->perf_debug) && shader) {
       if (shader->compiled_once) {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index 313bdbe..b7995ad 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -615,15 +615,9 @@ generate_assembly(struct brw_context *brw,
                   exec_list *instructions,
                   unsigned *final_assembly_size)
 {
-   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);
-   } else {
-      vec4_generator g(brw, shader_prog, prog, prog_data, mem_ctx,
-                       INTEL_DEBUG & DEBUG_GS);
-      return g.generate_assembly(instructions, final_assembly_size);
-   }
+   vec4_generator g(brw, shader_prog, prog, prog_data, mem_ctx,
+                    INTEL_DEBUG & DEBUG_GS);
+   return g.generate_assembly(instructions, final_assembly_size);
 }
 
 extern "C" const unsigned *
-- 
2.0.2



More information about the mesa-dev mailing list