[Mesa-dev] [PATCH 07/14] i965/vec4: Move virtual register map into backend_emitter

Topi Pohjolainen topi.pohjolainen at intel.com
Wed May 28 05:36:03 PDT 2014


In preparation for merging virtual register allocation between
vector and fragment visitors.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_shader.cpp       | 4 +++-
 src/mesa/drivers/dri/i965/brw_shader.h         | 8 ++++++++
 src/mesa/drivers/dri/i965/brw_vec4.h           | 8 --------
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 --
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 7594713..fba347a 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -560,7 +560,9 @@ backend_emitter::backend_emitter(struct brw_context *brw, void *mem_ctx,
      fail_msg(NULL),
      failed(false),
      stage_name(stage_name),
-     debug_flag(debug_flag)
+     debug_flag(debug_flag),
+     virtual_grf_reg_count(0),
+     virtual_grf_reg_map(NULL)
 {
 }
 
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index f7bb15e..8c9b646 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -134,6 +134,14 @@ public:
    const char * const stage_name;
    const bool debug_flag;
 
+   /**
+    * This is the size to be used for an array with an element per
+    * reg_offset
+    */
+   int virtual_grf_reg_count;
+   /** Per-virtual-grf indices into an array of size virtual_grf_reg_count */
+   int *virtual_grf_reg_map;
+
    virtual void dump_instruction(backend_instruction *inst) = 0;
    virtual void dump_instructions();
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 3726eb0..db5f417 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -335,14 +335,6 @@ public:
    int *virtual_grf_end;
    dst_reg userplane[MAX_CLIP_PLANES];
 
-   /**
-    * This is the size to be used for an array with an element per
-    * reg_offset
-    */
-   int virtual_grf_reg_count;
-   /** Per-virtual-grf indices into an array of size virtual_grf_reg_count */
-   int *virtual_grf_reg_map;
-
    bool live_intervals_valid;
 
    dst_reg *variable_storage(ir_variable *var);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 83c482b..f7355b8 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -3384,8 +3384,6 @@ vec4_visitor::vec4_visitor(struct brw_context *brw,
    this->virtual_grf_end = NULL;
    this->virtual_grf_sizes = NULL;
    this->virtual_grf_count = 0;
-   this->virtual_grf_reg_map = NULL;
-   this->virtual_grf_reg_count = 0;
    this->virtual_grf_array_size = 0;
    this->live_intervals_valid = false;
 
-- 
1.8.3.1



More information about the mesa-dev mailing list