From 246211d366feeff03e1ffa1756e718a1a5e2a6d5 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sat, 30 Aug 2014 19:10:27 -0700 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 ++++++ 2 files changed, 7 insertions(+) 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; -- 2.30.2