From: Jordan Justen Date: Sun, 31 Aug 2014 02:10:27 +0000 (-0700) Subject: i965/fs: Add init function to fs_visitor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=246211d366feeff03e1ffa1756e718a1a5e2a6d5;p=mesa.git i965/fs: Add init function to fs_visitor This common init routine can be used by constructors for multiple program types. Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 02435b7d1d8..506f3ad4b39 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -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); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index ba163ecddc3..2c9602fc50f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -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;