i965/vec4: Replace debug_flag with debug_enabled.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Feb 2015 01:50:42 +0000 (17:50 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Feb 2015 23:15:45 +0000 (15:15 -0800)
backend_visitor now handles this, so we can delete the vec4_visitor
specific code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp

index e4d0cb75b02f796d1486b89b02de270647b8ba06..a24f843b11278fd9fef4e5e4f51b601033710b56 100644 (file)
@@ -84,7 +84,6 @@ public:
                struct gl_shader_program *shader_prog,
                 gl_shader_stage stage,
                void *mem_ctx,
-                bool debug_flag,
                 bool no_spills,
                 shader_time_shader_type st_base,
                 shader_time_shader_type st_written,
@@ -398,8 +397,6 @@ protected:
    virtual vec4_instruction *emit_urb_write_opcode(bool complete) = 0;
    virtual int compute_array_stride(ir_dereference_array *ir);
 
-   const bool debug_flag;
-
 private:
    /**
     * If true, then register allocation should fail instead of spilling.
index 7a0ea3cdfdf8050889f4307d75fc6cbcf26a857c..2002ffd64285fc2e0d47a2bf030c0c080c044f4b 100644 (file)
@@ -41,7 +41,7 @@ vec4_gs_visitor::vec4_gs_visitor(struct brw_context *brw,
                                  bool no_spills)
    : vec4_visitor(brw, &c->base, &c->gp->program.Base, &c->key.base,
                   &c->prog_data.base, prog, MESA_SHADER_GEOMETRY, mem_ctx,
-                  INTEL_DEBUG & DEBUG_GS, no_spills,
+                  no_spills,
                   ST_GS, ST_GS_WRITTEN, ST_GS_RESET),
      c(c)
 {
index faae2c9bb6920f30a9da35a41b88cf599bd86814..4f66b6261444ca7d4c0762d265087316d2ac959e 100644 (file)
@@ -3588,7 +3588,6 @@ vec4_visitor::vec4_visitor(struct brw_context *brw,
                           struct gl_shader_program *shader_prog,
                            gl_shader_stage stage,
                           void *mem_ctx,
-                           bool debug_flag,
                            bool no_spills,
                            shader_time_shader_type st_base,
                            shader_time_shader_type st_written,
@@ -3601,7 +3600,6 @@ vec4_visitor::vec4_visitor(struct brw_context *brw,
      fail_msg(NULL),
      first_non_payload_grf(0),
      need_all_constants_in_pull_buffer(false),
-     debug_flag(debug_flag),
      no_spills(no_spills),
      st_base(st_base),
      st_written(st_written),
@@ -3662,7 +3660,7 @@ vec4_visitor::fail(const char *format, ...)
 
    this->fail_msg = msg;
 
-   if (debug_flag) {
+   if (debug_enabled) {
       fprintf(stderr, "%s",  msg);
    }
 }
index 72b6ef03b425efb8f978e2ad4d9ad72c31e93a57..129c2db638bf535bc0d0af21c2b9c5701f53fdd7 100644 (file)
@@ -220,7 +220,7 @@ vec4_vs_visitor::vec4_vs_visitor(struct brw_context *brw,
    : vec4_visitor(brw, &vs_compile->base, &vs_compile->vp->program.Base,
                   &vs_compile->key.base, &vs_prog_data->base, prog,
                   MESA_SHADER_VERTEX,
-                  mem_ctx, INTEL_DEBUG & DEBUG_VS, false /* no_spills */,
+                  mem_ctx, false /* no_spills */,
                   ST_VS, ST_VS_WRITTEN, ST_VS_RESET),
      vs_compile(vs_compile),
      vs_prog_data(vs_prog_data)
index 992cb60f1fc66f76fb459efc69806c5269a4e058..f9e4ce1dc42b7a2ba626fbb42565eb101ac50eb0 100644 (file)
@@ -47,7 +47,7 @@ public:
                                   struct gl_shader_program *shader_prog)
       : vec4_visitor(brw, NULL, NULL, NULL, NULL, shader_prog,
                      MESA_SHADER_VERTEX, NULL,
-                     false, false /* no_spills */,
+                     false /* no_spills */,
                      ST_NONE, ST_NONE, ST_NONE)
    {
    }
index 3c03f83fc26b546275911eeda4d38e20c74d9fb1..0c271629c0eefff9a251918a341fece7f5f8b11a 100644 (file)
@@ -50,7 +50,7 @@ public:
                                   struct gl_shader_program *shader_prog)
       : vec4_visitor(brw, NULL, NULL, NULL, NULL, shader_prog,
                      MESA_SHADER_VERTEX, NULL,
-                     false, false /* no_spills */,
+                     false /* no_spills */,
                      ST_NONE, ST_NONE, ST_NONE)
    {
    }