i965/fs: Add init function to fs_visitor
authorJordan Justen <jordan.l.justen@intel.com>
Sun, 31 Aug 2014 02:10:27 +0000 (19:10 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 4 Sep 2014 18:46:42 +0000 (11:46 -0700)
This common init routine can be used by constructors for multiple program
types.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index 02435b7d1d8de3ada3d202d32035d2d6d4339a6a..506f3ad4b392d5a9632c038cf19a72f3f3e27d61 100644 (file)
@@ -215,6 +215,7 @@ public:
               struct gl_fragment_program *fp,
               unsigned dispatch_width);
    ~fs_visitor();
+   void init();
 
    fs_reg *variable_storage(ir_variable *var);
    int virtual_grf_alloc(int size);
index ba163ecddc311b39fae135719ef52b8776b2b4c0..2c9602fc50f02bd2040fe4c9dc2a3bfd739b4c6f 100644 (file)
@@ -3271,6 +3271,12 @@ fs_visitor::fs_visitor(struct brw_context *brw,
 {
    this->fp = fp;
    this->mem_ctx = mem_ctx;
+   init();
+}
+
+void
+fs_visitor::init()
+{
    this->failed = false;
    this->simd16_unsupported = false;
    this->no16_msg = NULL;